Merge remote-tracking branch 'origin/develop' into NR_2port_CSIRS
This commit is contained in:
@@ -37,6 +37,7 @@ def testStageName = params.pipelineTestStageName
|
||||
// Name of the phone/server resource
|
||||
def ciSmartPhonesResource1 = params.SmartPhonesResource1
|
||||
def ciSmartPhonesResource2 = params.SmartPhonesResource2
|
||||
def ciSmartPhonesResource3 = params.SmartPhonesResource3
|
||||
|
||||
// Global Parameters. Normally they should be populated when the master job
|
||||
// triggers the slave job with parameters
|
||||
@@ -55,7 +56,7 @@ pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
|
||||
lock(extra: [[resource: ciSmartPhonesResource2],[resource: ciSmartPhonesResource1]],resource: ciSmartPhonesResource3)
|
||||
}
|
||||
stages {
|
||||
stage("Build Init") {
|
||||
@@ -87,6 +88,9 @@ pipeline {
|
||||
if (params.SmartPhonesResource2 == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
if (params.SmartPhonesResource3 == null) {
|
||||
allParametersPresent = false
|
||||
}
|
||||
// 1st eNB parameters
|
||||
if (params.eNB_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
@@ -378,6 +382,19 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Result Update"){
|
||||
when {
|
||||
expression { params.DataBaseHost != "none" }
|
||||
}
|
||||
agent {label DataBaseHost}
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts/ran_dashboard') {
|
||||
sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${env.BUILD_ID} ${StatusForDb} "
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,15 +80,23 @@ pipeline {
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
//calling OAIUE B200
|
||||
build job: "RAN-SA-OAIUE-B200-CN5G", wait : true, propagate : false, parameters: [
|
||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
//build job: "RAN-SA-OAIUE-B200-CN5G", wait : true, propagate : false, parameters: [
|
||||
// string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
// string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
// string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
// string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
// booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
//]
|
||||
//calling OAIUE N310
|
||||
build job: "RAN-SA-OAIUE-N310-CN5G", wait : true, propagate : false, parameters: [
|
||||
//build job: "RAN-SA-OAIUE-N310-CN5G", wait : true, propagate : false, parameters: [
|
||||
// string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
// string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
// string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
// string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)),
|
||||
// booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
//]
|
||||
//calling OAIUE N310-X300
|
||||
build job: "RAN-SA-OAIUE-N310-X300-CN5G", wait : true, propagate : false, parameters: [
|
||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||
@@ -96,7 +104,6 @@ pipeline {
|
||||
booleanParam(name: 'eNB_mergeRequest', value: Boolean.valueOf(ALLOW_MERGE))
|
||||
]
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ then
|
||||
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FILE || true`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h" || true`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc|openair1/PHY/CODING/types.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
@@ -198,7 +198,7 @@ do
|
||||
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FULLFILE || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h" || true`
|
||||
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc|openair1/PHY/CODING/types.h" || true`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
|
||||
@@ -177,7 +177,8 @@ class Containerize():
|
||||
self.dockerfileprefix = '.rhel8.2'
|
||||
self.cliBuildOptions = '--no-cache --disable-compression'
|
||||
|
||||
imageNames = []
|
||||
# we always build the ran-build image with all targets
|
||||
imageNames = [('ran-build', 'build')]
|
||||
result = re.search('eNB', self.imageKind)
|
||||
# Creating a tupple with the imageName and the DockerFile prefix pattern on obelix
|
||||
if result is not None:
|
||||
@@ -197,8 +198,6 @@ class Containerize():
|
||||
imageNames.append(('oai-physim', 'phySim'))
|
||||
if self.host == 'Ubuntu':
|
||||
imageNames.append(('oai-lte-ru', 'lteRU'))
|
||||
if len(imageNames) == 0:
|
||||
imageNames.append(('oai-enb', 'eNB'))
|
||||
|
||||
# Workaround for some servers, we need to erase completely the workspace
|
||||
if self.forcedWorkspaceCleanup:
|
||||
@@ -210,42 +209,41 @@ class Containerize():
|
||||
|
||||
# if asterix, copy the entitlement and subscription manager configurations
|
||||
if self.host == 'Red Hat':
|
||||
mySSH.command('mkdir -p tmp/ca/', '\$', 5)
|
||||
mySSH.command('mkdir -p tmp/entitlement/', '\$', 5)
|
||||
mySSH.command('mkdir -p tmp/ca/ tmp/entitlement/', '\$', 5)
|
||||
mySSH.command('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca/', '\$', 5)
|
||||
mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5)
|
||||
|
||||
sharedimage = 'ran-build'
|
||||
sharedTag = 'develop'
|
||||
forceSharedImageBuild = False
|
||||
baseImage = 'ran-base'
|
||||
baseTag = 'develop'
|
||||
forceBaseImageBuild = False
|
||||
imageTag = 'develop'
|
||||
if (self.ranAllowMerge):
|
||||
imageTag = 'ci-temp'
|
||||
if self.ranTargetBranch == 'develop':
|
||||
mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.ran' + self.dockerfileprefix + ' | grep --colour=never -i INDEX', '\$', 5)
|
||||
mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.base' + self.dockerfileprefix + ' | grep --colour=never -i INDEX', '\$', 5)
|
||||
result = re.search('index', mySSH.getBefore())
|
||||
if result is not None:
|
||||
forceSharedImageBuild = True
|
||||
sharedTag = 'ci-temp'
|
||||
forceBaseImageBuild = True
|
||||
baseTag = 'ci-temp'
|
||||
else:
|
||||
forceSharedImageBuild = True
|
||||
forceBaseImageBuild = True
|
||||
|
||||
# Let's remove any previous run artifacts if still there
|
||||
mySSH.command(self.cli + ' image prune --force', '\$', 30)
|
||||
if forceSharedImageBuild:
|
||||
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag + ' || true', '\$', 30)
|
||||
if forceBaseImageBuild:
|
||||
mySSH.command(self.cli + ' image rm ' + baseImage + ':' + baseTag + ' || true', '\$', 30)
|
||||
for image,pattern in imageNames:
|
||||
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30)
|
||||
|
||||
# Build the shared image only on Push Events (not on Merge Requests)
|
||||
# On when the shared image docker file is being modified.
|
||||
if forceSharedImageBuild:
|
||||
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
|
||||
# First verify if the shared image was properly created.
|
||||
# Build the base image only on Push Events (not on Merge Requests)
|
||||
# On when the base image docker file is being modified.
|
||||
if forceBaseImageBuild:
|
||||
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + baseImage + ' --tag ' + baseImage + ':' + baseTag + ' --file docker/Dockerfile.base' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-base.log 2>&1', '\$', 1600)
|
||||
# First verify if the base image was properly created.
|
||||
status = True
|
||||
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + sharedimage + ':' + sharedTag, '\$', 5)
|
||||
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + baseImage + ':' + baseTag, '\$', 5)
|
||||
if mySSH.getBefore().count('o such image') != 0:
|
||||
logging.error('\u001B[1m Could not build properly ran-build\u001B[0m')
|
||||
logging.error('\u001B[1m Could not build properly ran-base\u001B[0m')
|
||||
status = False
|
||||
else:
|
||||
result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', mySSH.getBefore())
|
||||
@@ -253,20 +251,20 @@ class Containerize():
|
||||
imageSize = float(result.group('size'))
|
||||
imageSize = imageSize / 1000
|
||||
if imageSize < 1000:
|
||||
logging.debug('\u001B[1m ran-build size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m')
|
||||
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' kbytes'
|
||||
logging.debug('\u001B[1m ran-base size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m')
|
||||
self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' kbytes'
|
||||
else:
|
||||
imageSize = imageSize / 1000
|
||||
if imageSize < 1000:
|
||||
logging.debug('\u001B[1m ran-build size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
|
||||
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' Mbytes'
|
||||
logging.debug('\u001B[1m ran-base size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
|
||||
self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' Mbytes'
|
||||
else:
|
||||
imageSize = imageSize / 1000
|
||||
logging.debug('\u001B[1m ran-build size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
|
||||
self.allImagesSize['ran-build'] = str(round(imageSize,1)) + ' Gbytes'
|
||||
logging.debug('\u001B[1m ran-base size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
|
||||
self.allImagesSize['ran-base'] = str(round(imageSize,1)) + ' Gbytes'
|
||||
else:
|
||||
logging.debug('ran-build size is unknown')
|
||||
# If the shared image failed, no need to continue
|
||||
logging.debug('ran-base size is unknown')
|
||||
# If the base image failed, no need to continue
|
||||
if not status:
|
||||
# Recover the name of the failed container?
|
||||
mySSH.command(self.cli + ' ps --quiet --filter "status=exited" -n1 | xargs ' + self.cli + ' rm -f', '\$', 5)
|
||||
@@ -278,16 +276,18 @@ class Containerize():
|
||||
sys.exit(1)
|
||||
else:
|
||||
# Recover build logs, for the moment only possible when build is successful
|
||||
mySSH.command(self.cli + ' create --name test ' + sharedimage + ':' + sharedTag, '\$', 5)
|
||||
mySSH.command('mkdir -p cmake_targets/log/ran-build', '\$', 5)
|
||||
mySSH.command(self.cli + ' cp test:/oai-ran/cmake_targets/log/. cmake_targets/log/ran-build', '\$', 5)
|
||||
mySSH.command(self.cli + ' create --name test ' + baseImage + ':' + baseTag, '\$', 5)
|
||||
mySSH.command('mkdir -p cmake_targets/log/ran-base', '\$', 5)
|
||||
mySSH.command(self.cli + ' cp test:/oai-ran/cmake_targets/log/. cmake_targets/log/ran-base', '\$', 5)
|
||||
mySSH.command(self.cli + ' rm -f test', '\$', 5)
|
||||
|
||||
# Build the target image(s)
|
||||
for image,pattern in imageNames:
|
||||
# the archived Dockerfiles have "ran-build:latest" as base image
|
||||
# the archived Dockerfiles have "ran-base:latest" as base image
|
||||
# we need to update them with proper tag
|
||||
mySSH.command('sed -i -e "s#' + sharedimage + ':latest#' + sharedimage + ':' + sharedTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
|
||||
mySSH.command('sed -i -e "s#' + baseImage + ':latest#' + baseImage + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
|
||||
if image != 'ran-build':
|
||||
mySSH.command('sed -i -e "s#' + "ran-build" + ':latest#' + "ran-build" + ':' + imageTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
|
||||
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200)
|
||||
# split the log
|
||||
mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5)
|
||||
@@ -318,7 +318,7 @@ class Containerize():
|
||||
logging.debug('\u001B[1m ' + image + ' size is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
|
||||
self.allImagesSize[image] = str(round(imageSize,1)) + ' Gbytes'
|
||||
else:
|
||||
logging.debug('ran-build size is unknown')
|
||||
logging.debug('ran-base size is unknown')
|
||||
self.allImagesSize[image] = 'unknown'
|
||||
# Now pruning dangling images in between target builds
|
||||
mySSH.command(self.cli + ' image prune --force', '\$', 30)
|
||||
@@ -337,13 +337,17 @@ class Containerize():
|
||||
mySSH.command('zip -r -qq build_log_' + self.testCase_id + '.zip build_log_' + self.testCase_id, '\$', 5)
|
||||
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '.zip', '.')
|
||||
mySSH.command('rm -f build_log_' + self.testCase_id + '.zip','\$', 5)
|
||||
# Remove all intermediate build images
|
||||
if self.ranAllowMerge and forceBaseImageBuild:
|
||||
mySSH.command(self.cli + ' image rm ' + baseImage + ':' + baseTag + ' || true', '\$', 30)
|
||||
mySSH.command(self.cli + ' image rm ran-build:' + imageTag + ' || true','\$', 5)
|
||||
mySSH.close()
|
||||
ZipFile('build_log_' + self.testCase_id + '.zip').extractall('.')
|
||||
|
||||
#Trying to identify the errors and warnings for each built images
|
||||
imageNames1 = imageNames
|
||||
shared = ('ran-build','ran')
|
||||
imageNames1.insert(0, shared)
|
||||
base = ('ran-base','ran')
|
||||
imageNames1.insert(0, base)
|
||||
for image,pattern in imageNames1:
|
||||
files = {}
|
||||
file_list = [f for f in os.listdir('build_log_' + self.testCase_id + '/' + image) if os.path.isfile(os.path.join('build_log_' + self.testCase_id + '/' + image, f)) and f.endswith('.txt')]
|
||||
@@ -606,6 +610,9 @@ class Containerize():
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'KO', logStatus)
|
||||
else:
|
||||
HTML.CreateHtmlTestRow(RAN.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
# all the xNB run logs shall be on the server 0 for logCollecting
|
||||
if self.eNB_serverId[self.eNB_instance] != '0':
|
||||
mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './' + self.eNB_logFile[self.eNB_instance], self.eNBSourceCodePath + '/cmake_targets/')
|
||||
logging.info('\u001B[1m Undeploying OAI Object Pass\u001B[0m')
|
||||
|
||||
def DeployGenObject(self, HTML):
|
||||
@@ -638,7 +645,7 @@ class Containerize():
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml up -d ' + self.services[0]
|
||||
logging.debug(cmd)
|
||||
try:
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
|
||||
except Exception as e:
|
||||
self.exitStatus = 1
|
||||
logging.error('Could not deploy')
|
||||
@@ -651,7 +658,7 @@ class Containerize():
|
||||
healthy = 0
|
||||
while (count < 10):
|
||||
count += 1
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
|
||||
healthy = 0
|
||||
for state in deployStatus.split('\n'):
|
||||
res = re.search('Up \(healthy\)', state)
|
||||
@@ -683,7 +690,7 @@ class Containerize():
|
||||
# if the containers are running, recover the logs!
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
|
||||
anyLogs = False
|
||||
for state in deployStatus.split('\n'):
|
||||
res = re.search('Name|----------', state)
|
||||
@@ -697,7 +704,7 @@ class Containerize():
|
||||
cName = res.group('container_name')
|
||||
cmd = 'cd ' + self.yamlPath[0] + ' && docker logs ' + cName + ' > ' + cName + '.log 2>&1'
|
||||
logging.debug(cmd)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
|
||||
if anyLogs:
|
||||
cmd = 'mkdir -p ../cmake_targets/log && mv ' + self.yamlPath[0] + '/*.log ../cmake_targets/log'
|
||||
logging.debug(cmd)
|
||||
@@ -805,7 +812,7 @@ class Containerize():
|
||||
time.sleep(5)
|
||||
cmd = 'docker cp ' + self.svrContName + ':/tmp/iperf_server.log ../cmake_targets/log/iperf_server_' + HTML.testCase_id + '.log'
|
||||
logging.debug(cmd)
|
||||
serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
|
||||
serverStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
|
||||
|
||||
# Analyze client output
|
||||
result = re.search('Server Report:', clientStatus)
|
||||
|
||||
@@ -126,6 +126,7 @@ class OaiCiTest():
|
||||
self.desc = ''
|
||||
self.ping_args = ''
|
||||
self.ping_packetloss_threshold = ''
|
||||
self.ping_rttavg_threshold =''
|
||||
self.iperf_args = ''
|
||||
self.iperf_packetloss_threshold = ''
|
||||
self.iperf_profile = ''
|
||||
@@ -1632,6 +1633,7 @@ class OaiCiTest():
|
||||
min_msg = 'RTT(Min) : ' + rtt_min + ' ms'
|
||||
avg_msg = 'RTT(Avg) : ' + rtt_avg + ' ms'
|
||||
max_msg = 'RTT(Max) : ' + rtt_max + ' ms'
|
||||
|
||||
lock.acquire()
|
||||
logging.debug('\u001B[1;37;44m ping result (' + UE_IPAddress + ') \u001B[0m')
|
||||
logging.debug('\u001B[1;34m ' + pal_msg + '\u001B[0m')
|
||||
@@ -1658,17 +1660,29 @@ class OaiCiTest():
|
||||
ping_stat_msg+='RTT(Max) : ' + str("{:.2f}".format(ping_stat['max_1'])) + 'ms \n'
|
||||
|
||||
#building html message
|
||||
qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg + '\n' + ping_stat_msg
|
||||
qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg + '\n' + ping_stat_msg
|
||||
|
||||
#checking packet loss compliance
|
||||
packetLossOK = True
|
||||
if packetloss is not None:
|
||||
if float(packetloss) > float(self.ping_packetloss_threshold):
|
||||
qMsg += '\nPacket Loss too high'
|
||||
logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m')
|
||||
logging.debug('\u001B[1;37;41m Packet Loss too high; Target: '+ self.ping_packetloss_threshold + '%\u001B[0m')
|
||||
packetLossOK = False
|
||||
elif float(packetloss) > 0:
|
||||
qMsg += '\nPacket Loss is not 0%'
|
||||
logging.debug('\u001B[1;30;43m Packet Loss is not 0% \u001B[0m')
|
||||
if (packetLossOK):
|
||||
|
||||
#checking RTT avg compliance
|
||||
rttavgOK = True
|
||||
if self.ping_rttavg_threshold != '':
|
||||
if float(rtt_avg)>float(self.ping_rttavg_threshold):
|
||||
ping_rttavg_error_msg = 'RTT(Avg) too high: ' + rtt_avg + ' ms; Target: '+ self.ping_rttavg_threshold+ ' ms'
|
||||
qMsg += '\n'+ping_rttavg_error_msg
|
||||
logging.debug('\u001B[1;37;41m'+ ping_rttavg_error_msg +' \u001B[0m')
|
||||
rttavgOK = False
|
||||
|
||||
if packetLossOK and rttavgOK:
|
||||
statusQueue.put(0)
|
||||
else:
|
||||
statusQueue.put(-1)
|
||||
|
||||
@@ -54,15 +54,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 0;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0; #for DL slot
|
||||
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
|
||||
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
|
||||
|
||||
initialDLBWPk0_1 = 0; #for mixed slot
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -119,19 +110,6 @@ gNBs =
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 2; # used for UL slot
|
||||
initialULBWPmappingType_0 = 1
|
||||
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12
|
||||
|
||||
initialULBWPk2_1 = 2; # used for mixed slot
|
||||
initialULBWPmappingType_1 = 1;
|
||||
initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2
|
||||
|
||||
initialULBWPk2_2 = 7; # used for Msg.3 during RA
|
||||
initialULBWPmappingType_2 = 1;
|
||||
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
|
||||
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
#p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -237,7 +237,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "mgmt_addr=192.168.18.241,addr=192.168.20.2,second_addr=192.168.10.2";
|
||||
sdr_addrs = "mgmt_addr=192.168.18.241,addr=192.168.10.2";
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -237,7 +237,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "mgmt_addr=192.168.18.241,addr=192.168.20.2,second_addr=192.168.10.2";
|
||||
sdr_addrs = "mgmt_addr=192.168.18.241,addr=192.168.10.2";
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -89,19 +89,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0;
|
||||
#initialULBWPmappingType
|
||||
#0=typeA,1=typeB
|
||||
initialDLBWPmappingType_0 = 0;
|
||||
#this is SS=1,L=13
|
||||
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||
|
||||
initialDLBWPk0_1 = 0;
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
#this is SS=1,L=5
|
||||
initialDLBWPstartSymbolAndLength_1 = 57;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -156,22 +143,6 @@ gNBs =
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 2;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=2 L=13
|
||||
initialULBWPstartSymbolAndLength_0 = 41;
|
||||
|
||||
initialULBWPk2_1 = 2;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=4
|
||||
initialULBWPstartSymbolAndLength_1 = 52;
|
||||
|
||||
initialULBWPk2_2 = 7;
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
|
||||
@@ -86,19 +86,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 10;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0;
|
||||
#initialULBWPmappingType
|
||||
#0=typeA,1=typeB
|
||||
initialDLBWPmappingType_0 = 0;
|
||||
#this is SS=1,L=13
|
||||
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||
|
||||
initialDLBWPk0_1 = 0;
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
#this is SS=1,L=5
|
||||
initialDLBWPstartSymbolAndLength_1 = 57;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -153,22 +140,6 @@ gNBs =
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 6;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=2 L=13
|
||||
initialULBWPstartSymbolAndLength_0 = 41;
|
||||
|
||||
initialULBWPk2_1 = 6;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=4
|
||||
initialULBWPstartSymbolAndLength_1 = 52;
|
||||
|
||||
initialULBWPk2_2 = 7;
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ gNBs =
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
min_rxtxtime_pdsch = 6;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -55,15 +55,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0; #for DL slot
|
||||
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
|
||||
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
|
||||
|
||||
initialDLBWPk0_3 = 0; #for mixed slot
|
||||
initialDLBWPmappingType_3 = 0;
|
||||
initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -118,21 +109,6 @@ gNBs =
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 6;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=0 L=11
|
||||
initialULBWPstartSymbolAndLength_0 = 41;
|
||||
|
||||
initialULBWPk2_1 = 6;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=12
|
||||
initialULBWPstartSymbolAndLength_1 = 69;
|
||||
|
||||
initialULBWPk2_2 = 14;
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -24,6 +24,7 @@ gNBs =
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -54,15 +55,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0; #for DL slot
|
||||
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
|
||||
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
|
||||
|
||||
initialDLBWPk0_3 = 0; #for mixed slot
|
||||
initialDLBWPmappingType_3 = 0;
|
||||
initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -118,18 +110,6 @@ gNBs =
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 6; # used for UL slot
|
||||
initialULBWPmappingType_0 = 1
|
||||
initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
|
||||
|
||||
initialULBWPk2_1 = 6; # used for mixed slot
|
||||
initialULBWPmappingType_1 = 1;
|
||||
initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2
|
||||
|
||||
initialULBWPk2_2 = 7; # used for Msg.3 during RA
|
||||
initialULBWPmappingType_2 = 1;
|
||||
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -55,15 +55,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 0;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0; #for DL slot
|
||||
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
|
||||
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
|
||||
|
||||
initialDLBWPk0_1 = 0; #for mixed slot
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -118,18 +109,6 @@ gNBs =
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 2; # used for UL slot
|
||||
initialULBWPmappingType_0 = 1
|
||||
initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
|
||||
|
||||
initialULBWPk2_1 = 2; # used for mixed slot
|
||||
initialULBWPmappingType_1 = 1;
|
||||
initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2
|
||||
|
||||
initialULBWPk2_2 = 7; # used for Msg.3 during RA
|
||||
initialULBWPmappingType_2 = 1;
|
||||
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -90,19 +90,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0;
|
||||
#initialULBWPmappingType
|
||||
#0=typeA,1=typeB
|
||||
initialDLBWPmappingType_0 = 0;
|
||||
#this is SS=1,L=13
|
||||
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||
|
||||
initialDLBWPk0_1 = 0;
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
#this is SS=1,L=5
|
||||
initialDLBWPstartSymbolAndLength_1 = 57;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -157,22 +144,6 @@ gNBs =
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 6;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=2 L=13
|
||||
initialULBWPstartSymbolAndLength_0 = 41;
|
||||
|
||||
initialULBWPk2_1 = 6;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=4
|
||||
initialULBWPstartSymbolAndLength_1 = 52;
|
||||
|
||||
initialULBWPk2_2 = 7;
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
|
||||
@@ -1,343 +1,316 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_CU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-OAI";
|
||||
min_rxtxtime_pdsch = 6;
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ({
|
||||
mcc = 208;
|
||||
mnc = 97;
|
||||
mnc_length = 2;
|
||||
snssaiList = (
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x010203; // 0 false, else true
|
||||
},
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x112233; // 0 false, else true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
nr_cellid = 12345678L
|
||||
|
||||
# tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
#pusch_TargetSNRx10 = 200;
|
||||
#pucch_TargetSNRx10 = 200;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 11;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6
|
||||
#absoluteFrequencySSB = 620640;
|
||||
# this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68
|
||||
absoluteFrequencySSB = 621312;
|
||||
# this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2
|
||||
#absoluteFrequencySSB = 634080;
|
||||
# this is 3600.48 MHz
|
||||
#absoluteFrequencySSB = 640032;
|
||||
#dl_frequencyBand = 78;
|
||||
# this is 3301.68 MHz
|
||||
#dl_absoluteFrequencyPointA = 620112;
|
||||
# this is 3300.60 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
# this is 3502.56 MHz
|
||||
#dl_absoluteFrequencyPointA = 633552;
|
||||
# this is 3600.48 MHz
|
||||
#dl_absoluteFrequencyPointA = 640032;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0;
|
||||
#initialULBWPmappingType
|
||||
#0=typeA,1=typeB
|
||||
initialDLBWPmappingType_0 = 0;
|
||||
#this is SS=1,L=13
|
||||
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||
|
||||
initialDLBWPk0_1 = 0;
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
#this is SS=1,L=5
|
||||
initialDLBWPstartSymbolAndLength_1 = 57;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 106;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 12;
|
||||
preambleReceivedTargetPower = -104;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 6;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=2 L=13
|
||||
initialULBWPstartSymbolAndLength_0 = 41;
|
||||
|
||||
initialULBWPk2_1 = 6;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=4
|
||||
initialULBWPstartSymbolAndLength_1 = 52;
|
||||
|
||||
initialULBWPk2_2 = 7;
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "em1";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "em1";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 2;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||
bf_weights = [0x00007fff, 0x0000];
|
||||
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||
## beamforming 2x2 matrix:
|
||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||
## beamforming 4x4 matrix:
|
||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||
sf_extension = 0
|
||||
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "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";
|
||||
f1ap_log_level ="debug";
|
||||
f1ap_log_verbosity ="medium";
|
||||
};
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_CU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-OAI";
|
||||
min_rxtxtime_pdsch = 6;
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ({
|
||||
mcc = 208;
|
||||
mnc = 97;
|
||||
mnc_length = 2;
|
||||
snssaiList = (
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x010203; // 0 false, else true
|
||||
},
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x112233; // 0 false, else true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
nr_cellid = 12345678L
|
||||
|
||||
# tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
#pusch_TargetSNRx10 = 200;
|
||||
#pucch_TargetSNRx10 = 200;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 11;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6
|
||||
#absoluteFrequencySSB = 620640;
|
||||
# this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68
|
||||
absoluteFrequencySSB = 621312;
|
||||
# this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2
|
||||
#absoluteFrequencySSB = 634080;
|
||||
# this is 3600.48 MHz
|
||||
#absoluteFrequencySSB = 640032;
|
||||
#dl_frequencyBand = 78;
|
||||
# this is 3301.68 MHz
|
||||
#dl_absoluteFrequencyPointA = 620112;
|
||||
# this is 3300.60 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
# this is 3502.56 MHz
|
||||
#dl_absoluteFrequencyPointA = 633552;
|
||||
# this is 3600.48 MHz
|
||||
#dl_absoluteFrequencyPointA = 640032;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 106;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 12;
|
||||
preambleReceivedTargetPower = -104;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "em1";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "em1";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 4;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||
bf_weights = [0x00007fff, 0x0000];
|
||||
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||
## beamforming 2x2 matrix:
|
||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||
## beamforming 4x4 matrix:
|
||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||
sf_extension = 0
|
||||
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "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";
|
||||
f1ap_log_level ="debug";
|
||||
f1ap_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,316 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_CU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-OAI";
|
||||
min_rxtxtime_pdsch = 6;
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ({
|
||||
mcc = 208;
|
||||
mnc = 97;
|
||||
mnc_length = 2;
|
||||
snssaiList = (
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x010203; // 0 false, else true
|
||||
},
|
||||
{
|
||||
sst = 1;
|
||||
sd = 0x112233; // 0 false, else true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
nr_cellid = 12345678L
|
||||
|
||||
# tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
#pusch_TargetSNRx10 = 200;
|
||||
#pucch_TargetSNRx10 = 200;
|
||||
ul_prbblacklist = "51,52,53,54"
|
||||
|
||||
pdcch_ConfigSIB1 = (
|
||||
{
|
||||
controlResourceSetZero = 11;
|
||||
searchSpaceZero = 0;
|
||||
}
|
||||
);
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3301.68 MHz + 22*12*30e-3 MHz = 3309.6
|
||||
#absoluteFrequencySSB = 620640;
|
||||
# this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68
|
||||
absoluteFrequencySSB = 621312;
|
||||
# this is 3503.28 MHz + 22*12*30e-3 MHz = 3511.2
|
||||
#absoluteFrequencySSB = 634080;
|
||||
# this is 3600.48 MHz
|
||||
#absoluteFrequencySSB = 640032;
|
||||
#dl_frequencyBand = 78;
|
||||
# this is 3301.68 MHz
|
||||
#dl_absoluteFrequencyPointA = 620112;
|
||||
# this is 3300.60 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
# this is 3502.56 MHz
|
||||
#dl_absoluteFrequencyPointA = 633552;
|
||||
# this is 3600.48 MHz
|
||||
#dl_absoluteFrequencyPointA = 640032;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=0,L=106 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 106;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 12;
|
||||
preambleReceivedTargetPower = -104;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "em1";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "em1";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
ulsch_max_frame_inactivity = 1;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
pusch_proc_threads = 4;
|
||||
prach_dtx_threshold = 120;
|
||||
# pucch0_dtx_threshold = 150;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||
bf_weights = [0x00007fff, 0x0000];
|
||||
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||
## beamforming 2x2 matrix:
|
||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||
## beamforming 4x4 matrix:
|
||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||
sf_extension = 0
|
||||
sdr_addrs = "mgmt_addr=192.168.18.240,addr=192.168.10.2,second_addr=192.168.20.2,clock_source=internal,time_source=internal"
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "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";
|
||||
f1ap_log_level ="debug";
|
||||
f1ap_log_verbosity ="medium";
|
||||
};
|
||||
@@ -24,7 +24,7 @@ gNBs =
|
||||
ssb_SubcarrierOffset = 0;
|
||||
pdsch_AntennaPorts = 1;
|
||||
pusch_AntennaPorts = 1;
|
||||
min_rxtxtime_pdsch = 6;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -55,15 +55,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0; #for DL slot
|
||||
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
|
||||
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
|
||||
|
||||
initialDLBWPk0_1 = 0; #for mixed slot
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -118,19 +109,6 @@ gNBs =
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 6; # used for UL slot
|
||||
initialULBWPmappingType_0 = 1
|
||||
initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
|
||||
|
||||
initialULBWPk2_1 = 6; # used for mixed slot
|
||||
initialULBWPmappingType_1 = 1;
|
||||
initialULBWPstartSymbolAndLength_1 = 38; # this is SS=10 L=3
|
||||
|
||||
initialULBWPk2_2 = 7; # used for Msg.3 during RA
|
||||
initialULBWPmappingType_2 = 1;
|
||||
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
|
||||
@@ -52,15 +52,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 0;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0; #for DL slot
|
||||
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
|
||||
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
|
||||
|
||||
initialDLBWPk0_1 = 0; #for mixed slot
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -115,18 +106,6 @@ gNBs =
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 6; # used for UL slot
|
||||
initialULBWPmappingType_0 = 1
|
||||
initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13
|
||||
|
||||
initialULBWPk2_1 = 6; # used for mixed slot
|
||||
initialULBWPmappingType_1 = 1;
|
||||
initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4
|
||||
|
||||
initialULBWPk2_2 = 7; # used for Msg.3 during RA
|
||||
initialULBWPmappingType_2 = 1;
|
||||
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -53,19 +53,6 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 0;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0;
|
||||
#initialULBWPmappingType
|
||||
#0=typeA,1=typeB
|
||||
initialDLBWPmappingType_0 = 0;#for DL slot
|
||||
#this is SS=1,L=13
|
||||
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||
|
||||
initialDLBWPk0_1 = 0;#for mixed slot
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
#this is SS=1,L=5
|
||||
initialDLBWPstartSymbolAndLength_1 = 57;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
@@ -120,21 +107,6 @@ gNBs =
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 2;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=0 L=11
|
||||
initialULBWPstartSymbolAndLength_0 = 41;
|
||||
|
||||
initialULBWPk2_1 = 2;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=12
|
||||
initialULBWPstartSymbolAndLength_1 = 69;
|
||||
|
||||
initialULBWPk2_2 = 7;
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -295,6 +295,11 @@ def GetParametersFromXML(action):
|
||||
CiTestObj.ue_id = ""
|
||||
else:
|
||||
CiTestObj.ue_id = ue_id
|
||||
ping_rttavg_threshold = test.findtext('ping_rttavg_threshold')
|
||||
if (ping_rttavg_threshold is None):
|
||||
CiTestObj.ping_rttavg_threshold = ""
|
||||
else:
|
||||
CiTestObj.ping_rttavg_threshold = ping_rttavg_threshold
|
||||
|
||||
elif action == 'Iperf':
|
||||
CiTestObj.iperf_args = test.findtext('iperf_args')
|
||||
|
||||
+3
-1
@@ -752,6 +752,7 @@ class RANManagement():
|
||||
msgLine = 0
|
||||
foundSegFault = False
|
||||
foundRealTimeIssue = False
|
||||
foundRealTimeIssue_cnt = 0
|
||||
rrcSetupComplete = 0
|
||||
rrcReleaseRequest = 0
|
||||
rrcReconfigRequest = 0
|
||||
@@ -890,6 +891,7 @@ class RANManagement():
|
||||
result = re.search('LLL', str(line))
|
||||
if result is not None and not exitSignalReceived:
|
||||
foundRealTimeIssue = True
|
||||
foundRealTimeIssue_cnt += 1
|
||||
if foundAssertion and (msgLine < 3):
|
||||
msgLine += 1
|
||||
msgAssertion += str(line)
|
||||
@@ -1258,7 +1260,7 @@ class RANManagement():
|
||||
global_status = CONST.ENB_PROCESS_ASSERTION
|
||||
if foundRealTimeIssue:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB faced real time issues! \u001B[0m')
|
||||
htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues!\n'
|
||||
htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues! COUNT = '+ str(foundRealTimeIssue_cnt) +' lines\n'
|
||||
if rlcDiscardBuffer > 0:
|
||||
rlcMsg = nodeB_prefix + 'NB RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)'
|
||||
logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m')
|
||||
|
||||
@@ -43,7 +43,7 @@ import gitlab
|
||||
import yaml
|
||||
import os
|
||||
import time
|
||||
|
||||
import sys
|
||||
|
||||
from sqlconnect import SQLConnect
|
||||
|
||||
@@ -61,7 +61,9 @@ class Dashboard:
|
||||
self.git = self.__getGitData(cmd) #git data from Gitlab
|
||||
self.tests = self.__loadCfg('ran_dashboard_cfg.yaml') #tests table setup from yaml
|
||||
self.db = self.__loadFromDB() #test results from database
|
||||
|
||||
self.mr_list=[] #mr list in string format
|
||||
for x in range(len(self.git)):
|
||||
self.mr_list.append(str(self.git[x]['iid']))
|
||||
|
||||
def __loadCfg(self,yaml_file):
|
||||
with open(yaml_file,'r') as f:
|
||||
@@ -86,6 +88,29 @@ class Dashboard:
|
||||
mydb.close_connection()
|
||||
return mydb.data
|
||||
|
||||
def singleMR_initHTML(self, date):
|
||||
self.f_html.write('<!DOCTYPE html>\n')
|
||||
self.f_html.write('<head>\n')
|
||||
self.f_html.write('<link rel="stylesheet" href="../test_styles.css">\n')
|
||||
self.f_html.write('<title>Test Dashboard</title>\n')
|
||||
self.f_html.write('</head>\n')
|
||||
self.f_html.write('<br>\n')
|
||||
self.f_html.write('<br>\n')
|
||||
self.f_html.write('<table>\n')
|
||||
self.f_html.write('<tr>\n')
|
||||
self.f_html.write('<td class="Main">OAI RAN TEST Status Dashboard</td>\n')
|
||||
self.f_html.write('</td>\n')
|
||||
self.f_html.write('<tr>\n')
|
||||
self.f_html.write('<tr></tr>\n')
|
||||
self.f_html.write('<tr>\n')
|
||||
self.f_html.write('<td class="Date">Update : '+date+'</td>\n')
|
||||
self.f_html.write('</td>\n')
|
||||
self.f_html.write('</tr>\n')
|
||||
self.f_html.write('</table>\n')
|
||||
self.f_html.write('<br>\n')
|
||||
self.f_html.write('<br>\n')
|
||||
|
||||
|
||||
def Test_initHTML(self, date):
|
||||
self.f_html.write('<!DOCTYPE html>\n')
|
||||
self.f_html.write('<head>\n')
|
||||
@@ -197,11 +222,13 @@ class Dashboard:
|
||||
self.f_html.write('</tr>\n')
|
||||
|
||||
|
||||
def Build(self, type, htmlfilename):
|
||||
def Build(self, type, mr, htmlfilename):
|
||||
if type=='MR':
|
||||
self.Build_MR_Table(htmlfilename)
|
||||
elif type=='Tests':
|
||||
self.Build_Test_Table(htmlfilename)
|
||||
elif type=='singleMR':
|
||||
self.Build_singleMR_Table(mr,htmlfilename)
|
||||
else :
|
||||
print("Undefined Dashboard Type, options : MR or Tests")
|
||||
|
||||
@@ -291,6 +318,93 @@ class Dashboard:
|
||||
self.Test_terminateHTML()
|
||||
|
||||
|
||||
def Build_singleMR_Table(self,singlemr,htmlfilename):
|
||||
print("Building single MR Tests Results...")
|
||||
|
||||
self.f_html=open(htmlfilename,'w')
|
||||
|
||||
###update date/time, format dd/mm/YY H:M:S
|
||||
now = datetime.now()
|
||||
dt_string = now.strftime("%d/%m/%Y %H:%M")
|
||||
#HTML table header
|
||||
self.singleMR_initHTML(dt_string)
|
||||
|
||||
|
||||
#1 table per MR if test results exist => 1 table for matching mr
|
||||
for x in range(len(self.git)):
|
||||
mr=str(self.git[x]['iid'])
|
||||
if mr==singlemr:
|
||||
#if 'PASS' not in self.db[mr]:
|
||||
self.f_html.write('<h3><a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/'+mr+'">'+mr+'</a>'+' '+self.git[x]['title'] + '</h3>\n')
|
||||
self.f_html.write('<table class="Test_Table">\n')
|
||||
self.f_html.write('<tr>\n')
|
||||
self.f_html.write('<th class="Test_Name">Test Name</th>\n')
|
||||
self.f_html.write('<th class="Test_Descr">Bench</th> \n')
|
||||
self.f_html.write('<th class="Test_Descr">Test</th> \n')
|
||||
self.f_html.write('<th class="Pass"># Pass</th>\n')
|
||||
self.f_html.write('<th class="Fail"># Fail</th>\n')
|
||||
self.f_html.write('<th class="Last_Pass">Last Pass</th>\n')
|
||||
self.f_html.write('<th class="Last_Fail">Last Fail</th>\n')
|
||||
self.f_html.write('</tr>\n')
|
||||
|
||||
#parsing the tests
|
||||
for t in self.tests:
|
||||
|
||||
row=[]
|
||||
short_name= t
|
||||
hyperlink= self.tests[t]['link']
|
||||
job=self.tests[t]['job']
|
||||
|
||||
|
||||
if job in self.db[mr]:
|
||||
if 'PASS' in self.db[mr][job]:
|
||||
row.append(self.db[mr][job]['PASS'])
|
||||
else:
|
||||
row.append('')
|
||||
if 'FAIL' in self.db[mr][job]:
|
||||
row.append(self.db[mr][job]['FAIL'])
|
||||
else:
|
||||
row.append('')
|
||||
#2 columns for last_pass and last_fail links
|
||||
if 'last_pass' in self.db[mr][job]:
|
||||
lastpasshyperlink= self.db[mr][job]['last_pass'][1]
|
||||
lastpasstext= self.db[mr][job]['last_pass'][0]
|
||||
else:
|
||||
lastpasshyperlink=''
|
||||
lastpasstext=''
|
||||
|
||||
if 'last_fail' in self.db[mr][job]:
|
||||
lastfailhyperlink= self.db[mr][job]['last_fail'][1]
|
||||
lastfailtext= self.db[mr][job]['last_fail'][0]
|
||||
else:
|
||||
lastfailhyperlink=''
|
||||
lastfailtext=''
|
||||
|
||||
|
||||
|
||||
self.f_html.write('<tr>\n')
|
||||
self.f_html.write('<td><a href='+hyperlink+'>'+short_name+'</a></td>\n')
|
||||
self.f_html.write('<td>'+self.tests[t]['bench']+'</td>\n')
|
||||
self.f_html.write('<td>'+self.tests[t]['test']+'</td>\n')
|
||||
if row[0]!='':
|
||||
self.f_html.write('<td style="background-color: rgb(58, 236, 58);">'+str(row[0])+'</td>\n')
|
||||
else:
|
||||
self.f_html.write('<td></td>\n')
|
||||
if row[1]!='':
|
||||
self.f_html.write('<td style="background-color: red;">'+str(row[1])+'</td>\n')
|
||||
else:
|
||||
self.f_html.write('<td></td>\n')
|
||||
self.f_html.write('<td><a href='+lastpasshyperlink+'>'+lastpasstext+'</a></td>\n')
|
||||
self.f_html.write('<td><a href='+lastfailhyperlink+'>'+lastfailtext+'</a></td>\n')
|
||||
self.f_html.write('</tr>\n')
|
||||
|
||||
self.f_html.write('</table>\n')
|
||||
|
||||
#terminate HTML table and close file
|
||||
self.Test_terminateHTML()
|
||||
|
||||
|
||||
|
||||
def Build_MR_Table(self,htmlfilename):
|
||||
|
||||
print("Building Merge Requests Dashboard...")
|
||||
@@ -379,6 +493,7 @@ class Dashboard:
|
||||
#terminate HTML table and close file
|
||||
self.MR_terminateHTML()
|
||||
|
||||
|
||||
def CopyToS3(self,htmlfilename,bucket,key):
|
||||
print("Uploading to S3 bucket")
|
||||
#Creating Session With Boto3.
|
||||
@@ -387,15 +502,58 @@ class Dashboard:
|
||||
#Creating S3 Resource From the Session.
|
||||
result = s3.upload_file(htmlfilename, bucket,key, ExtraArgs={'ACL':'public-read','ContentType': 'text/html'})
|
||||
|
||||
#unused
|
||||
def CopyCSS(self,path):
|
||||
s3 = boto3.resource('s3')
|
||||
copy_source = {'Bucket': 'oaitestdashboard','Key':'test_styles.css'}
|
||||
s3.meta.client.copy(copy_source, 'oaitestdashboard', path+'/'+ 'test_styles.css')
|
||||
|
||||
|
||||
def PostGitNote(self,mr,jobname,buildurl,buildid,status):
|
||||
gl = gitlab.Gitlab.from_config('OAI')
|
||||
project_id = 223
|
||||
project = gl.projects.get(project_id)
|
||||
editable_mr = project.mergerequests.get(int(mr))
|
||||
mr_notes = editable_mr.notes.list()
|
||||
mr_note = editable_mr.notes.create({
|
||||
'body': 'Completed Test : '+jobname+', status: <b>'+status+'</b>, '+\
|
||||
'(<a href="'+buildurl+'">'+buildid+'</a>)<br>'+\
|
||||
'<a href="https://oaitestdashboard.s3.eu-west-1.amazonaws.com/MR'+mr+'/index.html">Consolidated Test Results</a>'
|
||||
})
|
||||
editable_mr.save()
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
htmlDash=Dashboard()
|
||||
htmlDash.Build('MR','/tmp/MR_index.html')
|
||||
htmlDash.CopyToS3('/tmp/MR_index.html','oairandashboard','index.html')
|
||||
htmlDash.Build('Tests','/tmp/Tests_index.html')
|
||||
htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html')
|
||||
#call from Jenkinsfile : sh "python3 Hdashboard.py testevent ${params.eNB_MR} ${JOB_NAME} ${env.BUILD_URL} ${env.BUILD_ID} ${StatusForDb} "
|
||||
|
||||
#individual MR test results + test dashboard, event based (end of jenkins pipeline)
|
||||
if len(sys.argv)>1:
|
||||
if sys.argv[1]=="testevent" :
|
||||
mr=sys.argv[2]
|
||||
jobname=sys.argv[3]
|
||||
buildurl=sys.argv[4]
|
||||
buildid=sys.argv[5]
|
||||
status=sys.argv[6]
|
||||
htmlDash=Dashboard()
|
||||
if mr in htmlDash.mr_list:
|
||||
htmlDash.Build('singleMR',mr,'/tmp/MR'+mr+'_index.html')
|
||||
htmlDash.CopyToS3('/tmp/MR'+mr+'_index.html','oaitestdashboard','MR'+mr+'/index.html')
|
||||
htmlDash.Build('Tests','0000','/tmp/Tests_index.html')
|
||||
htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html')
|
||||
htmlDash.PostGitNote(mr,jobname,buildurl,buildid,status)
|
||||
else:
|
||||
print("Not a Merge Request => this build is for testing/debug purpose, no report to git")
|
||||
#test and MR status dash boards, cron based
|
||||
else:
|
||||
htmlDash=Dashboard()
|
||||
htmlDash.Build('MR','0000','/tmp/MR_index.html')
|
||||
htmlDash.CopyToS3('/tmp/MR_index.html','oairandashboard','index.html')
|
||||
htmlDash.Build('Tests','0000','/tmp/Tests_index.html')
|
||||
htmlDash.CopyToS3('/tmp/Tests_index.html','oaitestdashboard','index.html')
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# execute only if run as a script
|
||||
main()
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
050001
|
||||
070000
|
||||
070001
|
||||
050000
|
||||
050001
|
||||
010002
|
||||
000001
|
||||
030202
|
||||
@@ -103,6 +105,7 @@
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
@@ -111,6 +114,7 @@
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 100 -i 0.2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
|
||||
@@ -87,14 +87,16 @@
|
||||
<desc>Ping: 20 pings</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>40</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
<testCase id="050001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100 pings, size 1024</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -s 1024 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>30</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<htmlTabRef>TEST-NSA-FR1-TM2-Tab1</htmlTabRef>
|
||||
<htmlTabName>NSA 2x2 Ping DL UL with QUECTEL</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>5</repeatCount>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030000
|
||||
040000
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<htmlTabRef>TEST-NSA-FR1-TM2-Tab2</htmlTabRef>
|
||||
<htmlTabName>NSA 2x2 Attach-Detach with QUECTEL</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>5</repeatCount>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
031000
|
||||
041000
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
000001
|
||||
070001
|
||||
000001
|
||||
050000
|
||||
050001
|
||||
010002
|
||||
080001
|
||||
080000
|
||||
@@ -98,6 +100,7 @@
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
@@ -106,6 +109,7 @@
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 100 -i 0.2</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-Tab1</htmlTabRef>
|
||||
<htmlTabName>SA Ping DL UL with OAI NR UE</htmlTabName>
|
||||
<htmlTabName>SA Ping DL UL with OAI NR UE (N310)</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Initialize_OAI_UE</class>
|
||||
<desc>Initialize OAI UE</desc>
|
||||
<desc>Initialize OAI UE (N310)</desc>
|
||||
<air_interface>nr</air_interface>
|
||||
<Initialize_OAI_UE_args>--sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=192.168.18.241,addr=192.168.20.2,second_addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation </Initialize_OAI_UE_args>
|
||||
<Initialize_OAI_UE_args>--sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=192.168.18.241,second_addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation </Initialize_OAI_UE_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010002">
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-Tab2</htmlTabRef>
|
||||
<htmlTabName>SA Ping DL UL with OAI NR UE (X300)</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
040000
|
||||
000002
|
||||
010000
|
||||
000002
|
||||
050000
|
||||
050001
|
||||
000001
|
||||
010002
|
||||
080000
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Initialize_OAI_UE</class>
|
||||
<desc>Initialize OAI UE (X300)</desc>
|
||||
<air_interface>nr</air_interface>
|
||||
<Initialize_OAI_UE_args>--sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "addr=192.168.60.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation </Initialize_OAI_UE_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Terminate_OAI_UE</class>
|
||||
<desc>Terminate OAI UE</desc>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="040000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf --sa --usrp-tx-thread-config 1</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
<eNB_Trace>yes</eNB_Trace>
|
||||
<eNB_Stats>yes</eNB_Stats>
|
||||
<USRP_IPAddress>192.168.18.240</USRP_IPAddress>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping from CN to UE: 20pings in 20sec</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping from CN to UE: 100pings in 20sec</desc>
|
||||
<ping_args>-c 100 -i 0.2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/60Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 60M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 3M -t 60</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate gNB</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
@@ -93,7 +94,8 @@
|
||||
<desc>Ping: 100pings in 20sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-Tab3</htmlTabRef>
|
||||
<htmlTabName>SA Ping DL UL with QUECTEL</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
040000
|
||||
000002
|
||||
010000
|
||||
000001
|
||||
050000
|
||||
050001
|
||||
070000
|
||||
070001
|
||||
000001
|
||||
010002
|
||||
080000
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<UE_Trace>yes</UE_Trace>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="040000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
<eNB_Trace>yes</eNB_Trace>
|
||||
<eNB_Stats>yes</eNB_Stats>
|
||||
<USRP_IPAddress>192.168.18.240</USRP_IPAddress>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 100pings in 20sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 100 -i 0,2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/140Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 140M -t 60</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 3M -t 60</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate gNB</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>15</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-Tab4</htmlTabRef>
|
||||
<htmlTabName>SA Staged DL with QUECTEL</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
040000
|
||||
000002
|
||||
010000
|
||||
000001
|
||||
050000
|
||||
000001
|
||||
070000
|
||||
000001
|
||||
070001
|
||||
000001
|
||||
070002
|
||||
000001
|
||||
070003
|
||||
000001
|
||||
070004
|
||||
000001
|
||||
070005
|
||||
000001
|
||||
010002
|
||||
080000
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<UE_Trace>yes</UE_Trace>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="040000">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
<eNB_Trace>yes</eNB_Trace>
|
||||
<eNB_Stats>yes</eNB_Stats>
|
||||
<USRP_IPAddress>192.168.18.240</USRP_IPAddress>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="050000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="070000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/10Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 10M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/20Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/40Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 40M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070003">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/60Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 60M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070004">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/90Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 90M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
<testCase id="070005">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/140Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 140M -t 30</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>nrmodule2_quectel</id>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
|
||||
<testCase id="080000">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate gNB</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<air_interface>nr</air_interface>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
+59
-137
@@ -1,4 +1,4 @@
|
||||
#/*
|
||||
#/*
|
||||
# * 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.
|
||||
@@ -69,8 +69,6 @@ elseif (${RF_BOARD} STREQUAL "OAI_AW2SORI")
|
||||
|
||||
endif (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||
|
||||
message("RU=${RU}")
|
||||
|
||||
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
|
||||
if(NOT ${OPENPGM_FOUND})
|
||||
message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
|
||||
@@ -270,6 +268,22 @@ function(make_version VERSION_VALUE)
|
||||
endforeach()
|
||||
set(${VERSION_VALUE} "${RESULT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
macro(compile_asn1 asn1Source asn1cCmd ResultFlag)
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
execute_process(COMMAND ${asn1cCmd} ${asn1Source} RESULT_VARIABLE ret)
|
||||
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
|
||||
add_custom_target (
|
||||
${ResultFlag} ALL
|
||||
${asn1cCmd} ${asn1Source}
|
||||
DEPENDS ${asn1Source}
|
||||
)
|
||||
endmacro(compile_asn1)
|
||||
|
||||
####################################################
|
||||
# compilation flags
|
||||
#############################################
|
||||
@@ -294,7 +308,7 @@ else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
|
||||
set(COMPILATION_AVX2 "False")
|
||||
endif()
|
||||
if (CPUINFO MATCHES "sse4_1")
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.1")
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.1 -mpclmul")
|
||||
endif()
|
||||
if (CPUINFO MATCHES "ssse3")
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mssse3")
|
||||
@@ -434,23 +448,11 @@ set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.
|
||||
add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
|
||||
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
if (${RU} STREQUAL 0)
|
||||
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}"
|
||||
RESULT_VARIABLE ret)
|
||||
endif (${RU} STREQUAL 0)
|
||||
set(rrc_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}")
|
||||
|
||||
compile_asn1("${RRC_GRAMMAR}" "${rrc_cmd}" rrc_flag)
|
||||
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
file(GLOB rrc_source ${RRC_FULL_DIR}/*.c)
|
||||
add_custom_target (
|
||||
rrc_flag ALL
|
||||
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}"
|
||||
DEPENDS ${RRC_GRAMMAR}
|
||||
)
|
||||
|
||||
set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
|
||||
add_library(RRC_LIB ${rrc_source}
|
||||
${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg.c
|
||||
${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c)
|
||||
@@ -467,21 +469,12 @@ add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION})
|
||||
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION})
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
execute_process(
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}"
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif ()
|
||||
set(nr_rrc_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}")
|
||||
|
||||
compile_asn1("${NR_RRC_GRAMMAR}" "${nr_rrc_cmd}" nr_rrc_flag)
|
||||
|
||||
file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c)
|
||||
file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h)
|
||||
|
||||
add_custom_target (
|
||||
nr_rrc_flag ALL
|
||||
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}"
|
||||
DEPENDS ${NR_RRC_GRAMMAR}
|
||||
)
|
||||
|
||||
add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source}
|
||||
${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c
|
||||
)
|
||||
@@ -503,22 +496,11 @@ set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE})
|
||||
set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
if (${RU} STREQUAL 0)
|
||||
execute_process(
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}"
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
file(GLOB S1AP_source ${S1AP_C_DIR}/*.c)
|
||||
endif (${RU} STREQUAL 0)
|
||||
set(s1ap_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}")
|
||||
|
||||
add_custom_target (
|
||||
s1ap_flag ALL
|
||||
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}"
|
||||
DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}"
|
||||
)
|
||||
compile_asn1("${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "${s1ap_cmd}" s1ap_flag)
|
||||
|
||||
file(GLOB S1AP_source ${S1AP_C_DIR}/*.c)
|
||||
add_library(S1AP_LIB
|
||||
${S1AP_source}
|
||||
${S1AP_DIR}/s1ap_common.c
|
||||
@@ -560,20 +542,11 @@ set(NGAP_ASN_DIR ${NGAP_DIR}/MESSAGES/ASN1/ASN1_files)
|
||||
set(NGAP_C_DIR ${asn1_generated_dir}/NGAP_${NGAP_RELEASE})
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
execute_process(
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
set (ngap_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}")
|
||||
|
||||
compile_asn1("${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "${ngap_cmd}" ngap_flag)
|
||||
|
||||
file(GLOB NGAP_source ${NGAP_C_DIR}/*.c)
|
||||
|
||||
add_custom_target (
|
||||
ngap_flag ALL
|
||||
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
|
||||
DEPENDS "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
|
||||
)
|
||||
|
||||
add_library(NGAP_LIB
|
||||
${NGAP_source}
|
||||
# ${NGAP_DIR}/ngap_common.c
|
||||
@@ -627,23 +600,10 @@ set(M2AP_ASN_DIR ${M2AP_DIR}/MESSAGES/ASN1/${M2AP_RELEASE})
|
||||
set(M2AP_C_DIR ${asn1_generated_dir}/M2AP_${M2AP_RELEASE})
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
if (${RU} STREQUAL 0)
|
||||
execute_process(
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}"
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
endif (${RU} STREQUAL 0)
|
||||
set(m2ap_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}")
|
||||
|
||||
compile_asn1("${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" "${m2ap_cmd}" m2_flag)
|
||||
file(GLOB M2AP_source ${M2AP_C_DIR}/*.c)
|
||||
|
||||
add_custom_target (
|
||||
m2_flag ALL
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}"
|
||||
DEPENDS ${M2AP_ASN_DIR}/${M2AP_ASN_FILES}
|
||||
)
|
||||
|
||||
add_library(M2AP_LIB
|
||||
${M2AP_source}
|
||||
${M2AP_DIR}/m2ap_common.c
|
||||
@@ -700,23 +660,12 @@ set(M3AP_ASN_DIR ${M3AP_DIR}/MESSAGES/ASN1/${M3AP_RELEASE})
|
||||
set(M3AP_C_DIR ${asn1_generated_dir}/M3AP_${M3AP_RELEASE})
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
if (${RU} STREQUAL 0)
|
||||
execute_process(
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}"
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
endif (${RU} STREQUAL 0)
|
||||
set(m3_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}")
|
||||
|
||||
compile_asn1("${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "${m3_cmd}" m3_flag)
|
||||
|
||||
file(GLOB M3AP_source ${M3AP_C_DIR}/*.c)
|
||||
|
||||
add_custom_target (
|
||||
m3_flag ALL
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}"
|
||||
DEPENDS ${M3AP_ASN_DIR}/${M3AP_ASN_FILES}
|
||||
)
|
||||
|
||||
add_library(M3AP_LIB
|
||||
${M3AP_source}
|
||||
${M3AP_DIR}/m3ap_common.c
|
||||
@@ -757,23 +706,12 @@ add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
|
||||
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE})
|
||||
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
if (${RU} STREQUAL 0)
|
||||
execute_process(
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}"
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
endif (${RU} STREQUAL 0)
|
||||
set(x2_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}")
|
||||
|
||||
compile_asn1("${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "${x2_cmd}" x2_flag)
|
||||
|
||||
file(GLOB X2AP_source ${X2AP_C_DIR}/*.c)
|
||||
|
||||
add_custom_target (
|
||||
x2_flag ALL
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}"
|
||||
DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
|
||||
)
|
||||
|
||||
add_library(X2AP_LIB
|
||||
${X2AP_source}
|
||||
${X2AP_DIR}/x2ap_common.c
|
||||
@@ -817,36 +755,23 @@ set(F1AP_ASN_FILES
|
||||
${F1AP_ASN_DIR}/F1AP-Containers.asn
|
||||
)
|
||||
|
||||
if (${RU} STREQUAL 0)
|
||||
set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR})
|
||||
message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}")
|
||||
execute_process(
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "asn1c: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
|
||||
add_custom_target (
|
||||
f1_flag ALL
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
|
||||
DEPENDS ${F1AP_ASN_FILES}
|
||||
)
|
||||
file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c)
|
||||
add_library(F1AP_LIB
|
||||
${F1AP_ASN_GENERATED_C_FILES}
|
||||
)
|
||||
add_dependencies (F1AP_LIB f1_flag)
|
||||
|
||||
include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
|
||||
include_directories ("${F1AP_DIR}")
|
||||
|
||||
file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c)
|
||||
add_library(F1AP ${F1AP_C_FILES} )
|
||||
|
||||
endif (${RU} STREQUAL 0)
|
||||
set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR})
|
||||
|
||||
set(f1_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" "${F1AP_ASN_GENERATED_C_DIR}")
|
||||
|
||||
compile_asn1("${F1AP_ASN_FILES}" "${f1_cmd}" f1_flag)
|
||||
|
||||
file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c)
|
||||
add_library(F1AP_LIB
|
||||
${F1AP_ASN_GENERATED_C_FILES}
|
||||
)
|
||||
add_dependencies (F1AP_LIB f1_flag)
|
||||
|
||||
include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
|
||||
include_directories ("${F1AP_DIR}")
|
||||
|
||||
file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c)
|
||||
add_library(F1AP ${F1AP_C_FILES} )
|
||||
|
||||
# Hardware dependant options
|
||||
###################################
|
||||
@@ -964,7 +889,7 @@ set(HWLIB_BENETEL_4G_SOURCE
|
||||
)
|
||||
add_library(benetel_4g MODULE ${HWLIB_BENETEL_4G_SOURCE} )
|
||||
|
||||
set_target_properties(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
|
||||
set_target_properties(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
|
||||
|
||||
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
|
||||
TARGET_LINK_LIBRARIES(benetel_4g ${DPDK_LIBS})
|
||||
@@ -982,7 +907,7 @@ set(HWLIB_BENETEL_5G_SOURCE
|
||||
)
|
||||
add_library(benetel_5g MODULE ${HWLIB_BENETEL_5G_SOURCE} )
|
||||
|
||||
set_target_properties(benetel_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
|
||||
set_target_properties(benetel_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")
|
||||
|
||||
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
|
||||
TARGET_LINK_LIBRARIES(benetel_5g ${DPDK_LIBS})
|
||||
@@ -1036,7 +961,6 @@ add_boolean_option(DRIVER2013 True "only relevant for EXMIMO")
|
||||
add_boolean_option(EXMIMO_IOT True "????")
|
||||
add_boolean_option(LOCALIZATION False "???")
|
||||
add_integer_option(MAX_NUM_CCs 1 "????")
|
||||
add_boolean_option(PHYSIM False "for L1 simulators (dlsim, ulsim, ...)")
|
||||
add_boolean_option(SMBV False "Rohde&Schwarz SMBV100A vector signal generator")
|
||||
add_boolean_option(DEBUG_PHY False "Enable PHY layer debugging options")
|
||||
add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures")
|
||||
@@ -1069,7 +993,6 @@ add_boolean_option(TRACE_RLC_AM_HOLE False "TRACE for RLC AM, TO BE CHANGE
|
||||
add_boolean_option(TRACE_RLC_AM_PDU False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
|
||||
add_boolean_option(TRACE_RLC_AM_RESEGMENT False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
|
||||
add_boolean_option(TRACE_RLC_AM_RX False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
|
||||
add_boolean_option(TRACE_RLC_AM_RX_DECODE False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
|
||||
add_boolean_option(TRACE_RLC_AM_TX False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
|
||||
add_boolean_option(TRACE_RLC_AM_TX_STATUS False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
|
||||
add_boolean_option(TRACE_RLC_AM_STATUS_CREATION False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
|
||||
@@ -1648,7 +1571,6 @@ set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach_common.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch_common.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_gold_generic.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/srs_modulation.c
|
||||
${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time.c
|
||||
|
||||
+9
-28
@@ -27,9 +27,8 @@
|
||||
set -e
|
||||
|
||||
# Include helper functions
|
||||
ORIGIN_PATH=$PWD
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
source $THIS_SCRIPT_PATH/tools/build_helper
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f "$0"))
|
||||
source "$THIS_SCRIPT_PATH"/tools/build_helper
|
||||
|
||||
# Set environment variables (OPENAIR_HOME, ...)
|
||||
set_openair_env
|
||||
@@ -38,7 +37,6 @@ set_openair_env
|
||||
gen_nvram_path=$OPENAIR_DIR/targets/bin
|
||||
conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
|
||||
|
||||
MSC_GEN=0
|
||||
XFORMS="True"
|
||||
SKIP_SHARED_LIB_FLAG="False"
|
||||
UE_EXPANSION="False"
|
||||
@@ -106,7 +104,7 @@ Options
|
||||
--nrUE
|
||||
Makes the NR UE softmodem
|
||||
--RU
|
||||
Makes the OAI RRU (without full stack)
|
||||
Makes the OAI RRU
|
||||
--UE
|
||||
Makes the UE specific parts (ue_ip, usim, nvram) from the given configuration file
|
||||
--UE-conf-nvram [configuration file]
|
||||
@@ -208,28 +206,24 @@ function main() {
|
||||
-g | --run-with-gdb)
|
||||
case "$2" in
|
||||
"Release")
|
||||
GDB=0
|
||||
CMAKE_BUILD_TYPE="Release"
|
||||
echo_info "Will Compile without gdb symbols and with compiler optimization"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Release"
|
||||
shift
|
||||
;;
|
||||
"RelWithDebInfo")
|
||||
GDB=0
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
echo_info "Will Compile with gdb symbols"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
|
||||
shift
|
||||
;;
|
||||
"MinSizeRel")
|
||||
GDB=0
|
||||
CMAKE_BUILD_TYPE="MinSizeRel"
|
||||
echo_info "Will Compile for minimal exec size"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=MinSizeRel"
|
||||
shift
|
||||
;;
|
||||
"Debug" | *)
|
||||
GDB=1
|
||||
CMAKE_BUILD_TYPE="Debug"
|
||||
echo_info "Will Compile with gdb symbols and disable compiler optimization"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug"
|
||||
@@ -244,37 +238,30 @@ function main() {
|
||||
shift;;
|
||||
--eNB)
|
||||
eNB=1
|
||||
RU=0
|
||||
echo_info "Will compile eNB"
|
||||
shift;;
|
||||
--eNBocp)
|
||||
eNBocp=1
|
||||
RU=0
|
||||
echo_info "Will compile OCP eNB"
|
||||
shift;;
|
||||
--gNB)
|
||||
gNB=1
|
||||
RU=0
|
||||
NR="True"
|
||||
echo_info "Will compile gNB"
|
||||
shift;;
|
||||
--RU)
|
||||
RU=1
|
||||
RU=1
|
||||
echo_info "Will compile RRU"
|
||||
shift;;
|
||||
-a | --agent)
|
||||
echo_info "FlexRAN support is always compiled into the eNB"
|
||||
shift;;
|
||||
--UE)
|
||||
RU=0
|
||||
UE=1
|
||||
echo_info "Will compile UE"
|
||||
shift;;
|
||||
--nrUE)
|
||||
RU=0
|
||||
nrUE=1
|
||||
rfsimNas=1
|
||||
NR="True"
|
||||
echo_info "Will compile NR UE"
|
||||
shift;;
|
||||
--mu)
|
||||
@@ -282,10 +269,10 @@ function main() {
|
||||
echo_info "Will compile with UE_EXPANSION"
|
||||
shift;;
|
||||
--UE-conf-nvram)
|
||||
conf_nvram_path=$(readlink -f $2)
|
||||
conf_nvram_path=$(readlink -f "$2")
|
||||
shift 2;;
|
||||
--UE-gen-nvram)
|
||||
gen_nvram_path=$(readlink -f $2)
|
||||
gen_nvram_path=$(readlink -f "$2")
|
||||
shift 2;;
|
||||
-w | --hardware)
|
||||
# Use OAI_USRP as the key word USRP is used inside UHD driver
|
||||
@@ -309,7 +296,6 @@ function main() {
|
||||
shift 2;;
|
||||
-P | --phy_simulators)
|
||||
SIMUS_PHY=1
|
||||
RU=0
|
||||
echo_info "Will compile dlsim, ulsim, ..."
|
||||
shift;;
|
||||
-S | --core_simulators)
|
||||
@@ -344,11 +330,11 @@ function main() {
|
||||
echo_info "Will compile hw latency test program"
|
||||
shift;;
|
||||
--verbose-ci)
|
||||
VERBOSE_CI=1
|
||||
VERBOSE_CI=1
|
||||
echo_info "Will compile with verbose instructions in CI Docker env"
|
||||
shift;;
|
||||
--verbose-compile)
|
||||
VERBOSE_COMPILE=1
|
||||
VERBOSE_COMPILE=1
|
||||
echo_info "Will compile with verbose instructions"
|
||||
shift;;
|
||||
--cflags_processor)
|
||||
@@ -478,7 +464,7 @@ function main() {
|
||||
########################################################
|
||||
# to be discussed
|
||||
|
||||
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$gNB" = "1" -o "$RU" = "1" ] ; then
|
||||
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$gNB" = "1" ] ; then
|
||||
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
|
||||
echo_info "No local radio head and no transport protocol selected"
|
||||
fi
|
||||
@@ -629,7 +615,6 @@ function main() {
|
||||
echo "set ( UE_TIMING_TRACE $UE_TIMING_TRACE )" >> $cmake_file
|
||||
echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file
|
||||
echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file
|
||||
echo "set ( RU $RU )" >> $cmake_file
|
||||
echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file
|
||||
echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
@@ -677,14 +662,10 @@ function main() {
|
||||
$build_dir $config_libconfig_shlib \
|
||||
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||
|
||||
if [ "$RU" = "0" ] ; then
|
||||
|
||||
compilations \
|
||||
$build_dir coding \
|
||||
libcoding.so $dbin/libcoding.so
|
||||
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -256,6 +256,48 @@ void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset) {
|
||||
*n_rb = 6*count;
|
||||
}
|
||||
|
||||
int get_nb_periods_per_frame(uint8_t tdd_period) {
|
||||
|
||||
int nb_periods_per_frame;
|
||||
switch(tdd_period) {
|
||||
case 0:
|
||||
nb_periods_per_frame = 20; // 10ms/0p5ms
|
||||
break;
|
||||
|
||||
case 1:
|
||||
nb_periods_per_frame = 16; // 10ms/0p625ms
|
||||
break;
|
||||
|
||||
case 2:
|
||||
nb_periods_per_frame = 10; // 10ms/1ms
|
||||
break;
|
||||
|
||||
case 3:
|
||||
nb_periods_per_frame = 8; // 10ms/1p25ms
|
||||
break;
|
||||
|
||||
case 4:
|
||||
nb_periods_per_frame = 5; // 10ms/2ms
|
||||
break;
|
||||
|
||||
case 5:
|
||||
nb_periods_per_frame = 4; // 10ms/2p5ms
|
||||
break;
|
||||
|
||||
case 6:
|
||||
nb_periods_per_frame = 2; // 10ms/5ms
|
||||
break;
|
||||
|
||||
case 7:
|
||||
nb_periods_per_frame = 1; // 10ms/10ms
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Undefined tdd period %d\n", tdd_period);
|
||||
}
|
||||
return nb_periods_per_frame;
|
||||
}
|
||||
|
||||
|
||||
int get_dmrs_port(int nl, uint16_t dmrs_ports) {
|
||||
|
||||
@@ -275,14 +317,6 @@ int get_dmrs_port(int nl, uint16_t dmrs_ports) {
|
||||
return p;
|
||||
}
|
||||
|
||||
int get_num_dmrs(uint16_t dmrs_mask ) {
|
||||
|
||||
int num_dmrs=0;
|
||||
|
||||
for (int i=0;i<16;i++) num_dmrs+=((dmrs_mask>>i)&1);
|
||||
return(num_dmrs);
|
||||
}
|
||||
|
||||
lte_frame_type_t get_frame_type(uint16_t current_band, uint8_t scs_index)
|
||||
{
|
||||
lte_frame_type_t current_type;
|
||||
@@ -472,6 +506,10 @@ int get_subband_size(int NPRB,int size) {
|
||||
|
||||
}
|
||||
|
||||
int get_SLIV(uint8_t S, uint8_t L) {
|
||||
return ( (uint16_t)(((L-1)<=7)? (14*(L-1)+S) : (14*(15-L)+(13-S))) );
|
||||
}
|
||||
|
||||
void SLIV2SL(int SLIV,int *S,int *L) {
|
||||
|
||||
int SLIVdiv14 = SLIV/14;
|
||||
|
||||
@@ -50,9 +50,17 @@ typedef struct nr_bandentry_s {
|
||||
|
||||
extern const size_t nr_bandtable_size;
|
||||
extern nr_bandentry_t nr_bandtable[];
|
||||
static inline int get_num_dmrs(uint16_t dmrs_mask ) {
|
||||
|
||||
int num_dmrs=0;
|
||||
|
||||
for (int i=0;i<16;i++) num_dmrs+=((dmrs_mask>>i)&1);
|
||||
return(num_dmrs);
|
||||
}
|
||||
|
||||
|
||||
int get_SLIV(uint8_t S, uint8_t L);
|
||||
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset);
|
||||
int get_num_dmrs(uint16_t dmrs_mask);
|
||||
uint16_t config_bandwidth(int mu, int nb_rb, int nr_band);
|
||||
int get_nr_table_idx(int nr_bandP, uint8_t scs_index);
|
||||
int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index);
|
||||
@@ -71,6 +79,7 @@ uint32_t nr_get_code_rate(uint8_t Imcs, uint8_t table_idx);
|
||||
int get_subband_size(int NPRB,int size);
|
||||
void SLIV2SL(int SLIV,int *S,int *L);
|
||||
int get_dmrs_port(int nl, uint16_t dmrs_ports);
|
||||
int get_nb_periods_per_frame(uint8_t tdd_period);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
#include <dlfcn.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <form.h>
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "common/utils/threadPool/thread-pool.h"
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
all:
|
||||
measurement_display thread-pool-test
|
||||
|
||||
measurement_display:
|
||||
measurement_display.c thread-pool.h
|
||||
gcc measurement_display.c -I $ {OPENAIR_DIR}/ -I $ {OPENAIR_DIR}/common/utils/ -I. $ {OPENAIR_DIR}/common/utils/backtrace.c -lpthread -D TEST_THREAD_POOL -I../LOG -I../../utils/T -o
|
||||
measurement_display
|
||||
|
||||
thread-pool-test:
|
||||
thread-pool.c thread-pool.h
|
||||
gcc -g thread-pool.c -I $ {OPENAIR_DIR}/ -I $ {OPENAIR_DIR}/common/utils/ -I. $ {OPENAIR_DIR}/common/utils/backtrace.c -I $ {OPENAIR_DIR}/openair2/COMMON $ {OPENAIR_DIR}/common/utils/LOG/log.c $ {OPENAIR_DIR}/common/config/config_userapi.c
|
||||
$ {OPENAIR_DIR}/common/config/config_load_configmodule.c $ {OPENAIR_DIR}/common/config/config_cmdline.c -lpthread -ldl -D TEST_THREAD_POOL -I../LOG -I../../utils/T -o thread-pool-test
|
||||
thread-pool-test: thread-pool.c thread-pool.h
|
||||
gcc -g -O3 thread-pool.c -I ${OPENAIR_DIR}/nfapi/open-nFAPI/nfapi/public_inc -I ${OPENAIR_DIR}/ -I ${OPENAIR_DIR}/common/utils/ -I. ${OPENAIR_DIR}/common/utils/backtrace.c -I ${OPENAIR_DIR}/openair2/COMMON ${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/LOG/log.c ${OPENAIR_DIR}/common/config/config_userapi.c ${OPENAIR_DIR}/common/config/config_load_configmodule.c ${OPENAIR_DIR}/common/config/config_cmdline.c -lpthread -ldl -D TEST_THREAD_POOL -DMAX_NUM_CCs=1 -I../LOG -I../../utils/T -o thread-pool-test
|
||||
|
||||
|
||||
@@ -155,21 +155,24 @@ void initNamedTpool(char *params,tpool_t *pool, bool performanceMeas, char *name
|
||||
}
|
||||
|
||||
#ifdef TEST_THREAD_POOL
|
||||
volatile int oai_exit=0;
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s) {
|
||||
}
|
||||
|
||||
struct testData {
|
||||
int id;
|
||||
int sleepTime;
|
||||
char txt[30];
|
||||
};
|
||||
|
||||
void processing(void *arg) {
|
||||
struct testData *in=(struct testData *)arg;
|
||||
printf("doing: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() );
|
||||
//printf("doing: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() );
|
||||
sprintf(in->txt,"Done by %ld, job %d", pthread_self(), in->id);
|
||||
usleep(rand()%100);
|
||||
printf("done: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() );
|
||||
in->sleepTime=rand()%1000;
|
||||
usleep(in->sleepTime);
|
||||
//printf("done: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() );
|
||||
}
|
||||
|
||||
int main() {
|
||||
@@ -208,11 +211,43 @@ int main() {
|
||||
} while(tmp);
|
||||
|
||||
tpool_t pool;
|
||||
char params[]="1,2,3,u";
|
||||
char params[]="1,2,3,4,5";
|
||||
initTpool(params,&pool, true);
|
||||
notifiedFIFO_t worker_back;
|
||||
initNotifiedFIFO(&worker_back);
|
||||
|
||||
sleep(1);
|
||||
int cumulProcessTime=0, cumulTime=0;
|
||||
struct timespec st,end;
|
||||
clock_gettime(CLOCK_MONOTONIC, &st);
|
||||
int nb_jobs=4;
|
||||
for (int i=0; i <1000 ; i++) {
|
||||
int parall=nb_jobs;
|
||||
for (int j=0; j <parall ; j++) {
|
||||
notifiedFIFO_elt_t *work=newNotifiedFIFO_elt(sizeof(struct testData), i, &worker_back, processing);
|
||||
struct testData *x=(struct testData *)NotifiedFifoData(work);
|
||||
x->id=i;
|
||||
pushTpool(&pool, work);
|
||||
}
|
||||
int sleepmax=0;
|
||||
while (parall) {
|
||||
tmp=pullTpool(&worker_back,&pool);
|
||||
if (tmp) {
|
||||
parall--;
|
||||
struct testData *dd=NotifiedFifoData(tmp);
|
||||
if (dd->sleepTime > sleepmax)
|
||||
sleepmax=dd->sleepTime;
|
||||
delNotifiedFIFO_elt(tmp);
|
||||
}
|
||||
}
|
||||
cumulProcessTime+=sleepmax;
|
||||
}
|
||||
clock_gettime(CLOCK_MONOTONIC, &end);
|
||||
long long dur=(end.tv_sec-st.tv_sec)*1000*1000+(end.tv_nsec-st.tv_nsec)/1000;
|
||||
printf("In µs, Total time per group of %d job:%lld, work time per job %d, overhead per job %lld\n",
|
||||
nb_jobs, dur/1000, cumulProcessTime/1000, (dur-cumulProcessTime)/(1000*nb_jobs));
|
||||
|
||||
/*
|
||||
for (int i=0; i <1000 ; i++) {
|
||||
notifiedFIFO_elt_t *work=newNotifiedFIFO_elt(sizeof(struct testData), i, &worker_back, processing);
|
||||
struct testData *x=(struct testData *)NotifiedFifoData(work);
|
||||
@@ -232,7 +267,7 @@ int main() {
|
||||
|
||||
abortTpool(&pool,510);
|
||||
} while(tmp);
|
||||
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <assertions.h>
|
||||
#include <LOG/log.h>
|
||||
#include <common/utils/system.h>
|
||||
//#include <stdatomic.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
#define THREADINIT PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
|
||||
@@ -50,7 +51,7 @@
|
||||
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||
#define condbroadcast(signal) {int ret=pthread_cond_broadcast(&signal); \
|
||||
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||
#define condsignal(signal) {int ret=pthread_cond_broadcast(&signal); \
|
||||
#define condsignal(signal) {int ret=pthread_cond_signal(&signal); \
|
||||
AssertFatal(ret==0,"ret=%d\n",ret);}
|
||||
#define tpool_nbthreads(tpool) (tpool.nbThreads)
|
||||
typedef struct notifiedFIFO_elt_s {
|
||||
@@ -130,7 +131,7 @@ static inline void pushNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf, notifiedFIF
|
||||
static inline void pushNotifiedFIFO(notifiedFIFO_t *nf, notifiedFIFO_elt_t *msg) {
|
||||
mutexlock(nf->lockF);
|
||||
pushNotifiedFIFO_nothreadSafe(nf,msg);
|
||||
condbroadcast(nf->notifF);
|
||||
condsignal(nf->notifF);
|
||||
mutexunlock(nf->lockF);
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -307,8 +307,10 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
|
||||
- Scheduler procedures for SIB1
|
||||
- Scheduler procedures for RA
|
||||
- Contention free RA procedure
|
||||
- Contention based RA procedure
|
||||
- Contention Free RA procedure
|
||||
- Contention Based RA procedure
|
||||
- Msg3 can transfer uplink CCCH, DTCH or DCCH messages
|
||||
- CBRA can be performed using MAC CE or C-RNTI
|
||||
- Scheduler procedures for CSI-RS
|
||||
- MAC downlink scheduler
|
||||
- phy-test scheduler (fixed allocation and usable also without UE)
|
||||
|
||||
@@ -53,29 +53,7 @@ gNBs =
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 0;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
#pdsch-ConfigCommon
|
||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||
initialDLBWPk0_0 = 0;
|
||||
#initialULBWPmappingType
|
||||
#0=typeA,1=typeB
|
||||
initialDLBWPmappingType_0 = 0;
|
||||
#this is SS=1,L=13
|
||||
initialDLBWPstartSymbolAndLength_0 = 40;
|
||||
|
||||
initialDLBWPk0_1 = 0;
|
||||
initialDLBWPmappingType_1 = 0;
|
||||
#this is SS=2,L=12
|
||||
initialDLBWPstartSymbolAndLength_1 = 53;
|
||||
|
||||
initialDLBWPk0_2 = 0;
|
||||
initialDLBWPmappingType_2 = 0;
|
||||
#this is SS=1,L=12
|
||||
initialDLBWPstartSymbolAndLength_2 = 54;
|
||||
|
||||
initialDLBWPk0_3 = 0;
|
||||
initialDLBWPmappingType_3 = 0;
|
||||
#this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
|
||||
initialDLBWPstartSymbolAndLength_3 = 57; //43; //57;
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
@@ -129,21 +107,6 @@ gNBs =
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
# pusch-ConfigCommon (up to 16 elements)
|
||||
initialULBWPk2_0 = 2;
|
||||
initialULBWPmappingType_0 = 1
|
||||
# this is SS=0 L=11
|
||||
initialULBWPstartSymbolAndLength_0 = 55;
|
||||
|
||||
initialULBWPk2_1 = 2;
|
||||
initialULBWPmappingType_1 = 1;
|
||||
# this is SS=0 L=12
|
||||
initialULBWPstartSymbolAndLength_1 = 69;
|
||||
|
||||
initialULBWPk2_2 = 7;
|
||||
initialULBWPmappingType_2 = 1;
|
||||
# this is SS=10 L=4
|
||||
initialULBWPstartSymbolAndLength_2 = 52;
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-base
|
||||
ARG NEEDED_GIT_PROXY
|
||||
ENV TZ=Europe/Paris
|
||||
ENV BUILD_UHD_FROM_SOURCE=True
|
||||
@@ -66,6 +66,5 @@ COPY . .
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai -I -w USRP
|
||||
|
||||
RUN rm /etc/pki/entitlement/*pem
|
||||
./build_oai -I -w USRP && \
|
||||
rm /etc/pki/entitlement/*pem
|
||||
@@ -26,7 +26,7 @@
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
FROM ubuntu:bionic AS ran-build
|
||||
FROM ubuntu:bionic AS ran-base
|
||||
ARG NEEDED_GIT_PROXY
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Europe/Paris
|
||||
@@ -0,0 +1,38 @@
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Ubuntu 18.04
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest as ran-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --eNB --gNB --RU --UE --nrUE --ninja -w USRP --verbose-ci
|
||||
@@ -0,0 +1,38 @@
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Ubuntu 18.04
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest as ran-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
# build all targets so final targets can be created afterwards
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --eNB --gNB --RU --UE --nrUE --ninja -w USRP --verbose-ci
|
||||
@@ -25,19 +25,12 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS enb-base
|
||||
|
||||
FROM ran-build:latest AS enb-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --eNB --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
|
||||
@@ -62,50 +55,55 @@ RUN yum update -y && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
WORKDIR /opt/oai-enb/bin
|
||||
COPY --from=enb-build /oai-ran/targets/bin/lte-softmodem.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/docker/scripts/enb_entrypoint.sh entrypoint.sh
|
||||
COPY --from=enb-build \
|
||||
/oai-ran/targets/bin/lte-softmodem.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=enb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=enb-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
COPY --from=enb-build /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so .
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||
COPY --from=enb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
COPY --from=enb-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/libicudata.so.60 \
|
||||
/lib64/libicui18n.so.60 \
|
||||
/lib64/libicuuc.so.60 \
|
||||
/lib64/
|
||||
|
||||
COPY --from=enb-build /lib64/libconfig.so.9 /lib64
|
||||
COPY --from=enb-build /lib64/libblas.so.3 /lib64
|
||||
COPY --from=enb-build /lib64/liblapack.so.3 /lib64
|
||||
COPY --from=enb-build /lib64/liblapacke.so.3 /lib64
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=enb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_program_options.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_serialization.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_thread.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_system.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||
COPY --from=enb-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||
|
||||
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=enb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=enb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=enb-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
|
||||
COPY --from=enb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||
|
||||
WORKDIR /usr/local/share/uhd/rfnoc
|
||||
COPY --from=enb-build /usr/local/share/uhd/rfnoc/ .
|
||||
COPY --from=enb-base /usr/local/share/uhd/rfnoc/ .
|
||||
|
||||
RUN ldconfig
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for eNB
|
||||
WORKDIR /opt/oai-enb/etc
|
||||
|
||||
@@ -25,19 +25,12 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest as enb-base
|
||||
|
||||
FROM ran-build:latest AS enb-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --eNB --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-enb
|
||||
@@ -48,6 +41,7 @@ RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
software-properties-common \
|
||||
tzdata \
|
||||
procps \
|
||||
libsctp1 \
|
||||
libnettle6 \
|
||||
@@ -68,37 +62,41 @@ RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-enb/bin
|
||||
COPY --from=enb-build /oai-ran/targets/bin/lte-softmodem.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/docker/scripts/enb_entrypoint.sh entrypoint.sh
|
||||
COPY --from=enb-build \
|
||||
/oai-ran/targets/bin/lte-softmodem.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=enb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=enb-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=enb-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
COPY --from=enb-build /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so .
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||
COPY --from=enb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=enb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||
COPY --from=enb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
|
||||
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=enb-base \
|
||||
/usr/local/lib/libuhd.so.3.15.0 \
|
||||
/usr/local/lib/libprotobuf-c.so.1 \
|
||||
/usr/local/lib/
|
||||
COPY --from=enb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||
COPY --from=enb-base \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/
|
||||
|
||||
RUN ldconfig
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for eNB
|
||||
WORKDIR /opt/oai-enb/etc
|
||||
|
||||
@@ -25,19 +25,12 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS gnb-base
|
||||
|
||||
FROM ran-build:latest AS gnb-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --gNB --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
|
||||
@@ -64,54 +57,58 @@ RUN yum repolist --disablerepo=* && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/docker/scripts/gnb_entrypoint.sh entrypoint.sh
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/targets/bin/nr-softmodem.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so .
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
||||
/usr/local/lib/
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
|
||||
COPY --from=gnb-build /lib64/libconfig.so.9 /lib64
|
||||
COPY --from=gnb-build /lib64/libforms.so.2 /lib64
|
||||
COPY --from=gnb-build /lib64/libblas.so.3 /lib64
|
||||
COPY --from=gnb-build /lib64/liblapack.so.3 /lib64
|
||||
COPY --from=gnb-build /lib64/liblapacke.so.3 /lib64
|
||||
COPY --from=gnb-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/libicudata.so.60 \
|
||||
/lib64/libicui18n.so.60 \
|
||||
/lib64/libicuuc.so.60 \
|
||||
/lib64/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=gnb-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_program_options.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_serialization.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_thread.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_system.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||
COPY --from=gnb-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||
|
||||
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=gnb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=gnb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=gnb-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
|
||||
COPY --from=gnb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||
|
||||
WORKDIR /usr/local/share/uhd/rfnoc
|
||||
COPY --from=gnb-build /usr/local/share/uhd/rfnoc/ .
|
||||
COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ .
|
||||
|
||||
RUN ldconfig
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for gNB
|
||||
WORKDIR /opt/oai-gnb/etc
|
||||
|
||||
@@ -25,19 +25,12 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest as gnb-base
|
||||
|
||||
FROM ran-build:latest AS gnb-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --gNB --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-gnb
|
||||
@@ -68,41 +61,44 @@ RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/docker/scripts/gnb_entrypoint.sh entrypoint.sh
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/targets/bin/nr-softmodem.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=gnb-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so .
|
||||
COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so .
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
||||
/usr/local/lib/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=gnb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||
COPY --from=gnb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
|
||||
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=gnb-base \
|
||||
/usr/local/lib/libuhd.so.3.15.0 \
|
||||
/usr/local/lib/libprotobuf-c.so.1 \
|
||||
/usr/local/lib/
|
||||
COPY --from=gnb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
|
||||
COPY --from=gnb-base \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/
|
||||
|
||||
RUN ldconfig
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for gNB
|
||||
WORKDIR /opt/oai-gnb/etc
|
||||
|
||||
@@ -25,19 +25,12 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS ru-base
|
||||
|
||||
FROM ran-build:latest AS ru-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --RU --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/lte_ru_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ru
|
||||
@@ -59,45 +52,47 @@ RUN yum update -y && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
WORKDIR /opt/oai-lte-ru/bin
|
||||
COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh
|
||||
COPY --from=ru-build \
|
||||
/oai-ran/targets/bin/oairu.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
.
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
COPY --from=ru-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=ru-build /lib64/libconfig.so.9 /lib64
|
||||
COPY --from=ru-build /lib64/libblas.so.3 /lib64
|
||||
COPY --from=ru-build /lib64/liblapack.so.3 /lib64
|
||||
COPY --from=ru-build /lib64/liblapacke.so.3 /lib64
|
||||
COPY --from=ru-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/
|
||||
|
||||
# Copying from the ran-build image the USRP needed packages
|
||||
COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_program_options.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_serialization.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_thread.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_system.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||
COPY --from=ru-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||
|
||||
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=ru-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=ru-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
|
||||
COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=ru-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=ru-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
|
||||
|
||||
WORKDIR /usr/local/share/uhd/rfnoc
|
||||
COPY --from=ru-build /usr/local/share/uhd/rfnoc/ .
|
||||
COPY --from=ru-base /usr/local/share/uhd/rfnoc/ .
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
|
||||
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
|
||||
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for RRU
|
||||
|
||||
@@ -25,19 +25,12 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest as ru-base
|
||||
|
||||
FROM ran-build:latest AS ru-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --RU --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/lte_ru_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-lte-ru
|
||||
@@ -64,32 +57,35 @@ RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-lte-ru/bin
|
||||
COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh
|
||||
COPY --from=ru-build \
|
||||
/oai-ran/targets/bin/oairu.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
COPY --from=ru-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/usr/local/lib/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=ru-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||
COPY --from=ru-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
|
||||
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||
COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||
COPY --from=ru-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=ru-base /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||
COPY --from=ru-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
|
||||
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
|
||||
/bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \
|
||||
COPY --from=ru-base \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for RRU
|
||||
|
||||
@@ -25,20 +25,13 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS lte-ue-base
|
||||
|
||||
FROM ran-build:latest AS lte-ue-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --UE --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/lte_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
|
||||
@@ -63,53 +56,57 @@ RUN yum update -y && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
WORKDIR /opt/oai-lte-ue/bin
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/lte-uesoftmodem.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/docker/scripts/lte_ue_entrypoint.sh entrypoint.sh
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/conf2uedata .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/nvram .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/usim .
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/targets/bin/lte-uesoftmodem.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
/oai-ran/targets/bin/conf2uedata \
|
||||
/oai-ran/targets/bin/nvram \
|
||||
/oai-ran/targets/bin/usim \
|
||||
./
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=lte-ue-build /oai-ran/cmake_targets/ran_build/build/libSIMU.so .
|
||||
COPY --from=lte-ue-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libSIMU.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
|
||||
COPY --from=lte-ue-build /lib64/libconfig.so.9 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libblas.so.3 /lib64
|
||||
COPY --from=lte-ue-build /lib64/liblapack.so.3 /lib64
|
||||
COPY --from=lte-ue-build /lib64/liblapacke.so.3 /lib64
|
||||
COPY --from=lte-ue-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/libicudata.so.60 \
|
||||
/lib64/libicui18n.so.60 \
|
||||
/lib64/libicuuc.so.60 \
|
||||
/lib64/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=lte-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_program_options.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_serialization.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_thread.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_system.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||
COPY --from=lte-ue-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||
|
||||
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=lte-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
|
||||
COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=lte-ue-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
|
||||
COPY --from=lte-ue-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=lte-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
|
||||
|
||||
WORKDIR /usr/local/share/uhd/rfnoc
|
||||
COPY --from=lte-ue-build /usr/local/share/uhd/rfnoc/ .
|
||||
COPY --from=lte-ue-base /usr/local/share/uhd/rfnoc/ .
|
||||
|
||||
RUN ldconfig
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for UE
|
||||
WORKDIR /opt/oai-lte-ue/etc
|
||||
|
||||
@@ -25,20 +25,13 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS lte-ue-base
|
||||
|
||||
FROM ran-build:latest AS lte-ue-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --UE --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml
|
||||
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/lte_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-lte-ue
|
||||
@@ -49,6 +42,7 @@ RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
software-properties-common \
|
||||
tzdata \
|
||||
procps \
|
||||
libsctp1 \
|
||||
libnettle6 \
|
||||
@@ -69,41 +63,45 @@ RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-lte-ue/bin
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/lte-uesoftmodem.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/docker/scripts/lte_ue_entrypoint.sh entrypoint.sh
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/conf2uedata .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/nvram .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/usim .
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/targets/bin/lte-uesoftmodem.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
/oai-ran/targets/bin/conf2uedata \
|
||||
/oai-ran/targets/bin/nvram \
|
||||
/oai-ran/targets/bin/usim \
|
||||
./
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=lte-ue-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=lte-ue-build /oai-ran/cmake_targets/ran_build/build/libSIMU.so .
|
||||
COPY --from=lte-ue-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||
|
||||
COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
COPY --from=lte-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libSIMU.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/usr/local/lib/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=lte-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||
COPY --from=lte-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
|
||||
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
|
||||
COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=lte-ue-base \
|
||||
/usr/local/lib/libuhd.so.3.15.0 \
|
||||
/usr/local/lib/libprotobuf-c.so.1 \
|
||||
/usr/local/lib/
|
||||
COPY --from=lte-ue-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
|
||||
|
||||
RUN ldconfig
|
||||
COPY --from=lte-ue-base \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for UE
|
||||
WORKDIR /opt/oai-lte-ue/etc
|
||||
|
||||
@@ -25,17 +25,11 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS nr-ue-base
|
||||
|
||||
FROM ran-build:latest AS nr-ue-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --nrUE --ninja -w USRP --verbose-ci
|
||||
RUN cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-ue
|
||||
@@ -62,58 +56,61 @@ RUN yum update -y && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
WORKDIR /opt/oai-nr-ue/bin
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/nr-uesoftmodem.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/docker/scripts/nr_ue_entrypoint.sh entrypoint.sh
|
||||
COPY --from=nr-ue-build \
|
||||
/oai-ran/targets/bin/nr-uesoftmodem.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so .
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||
COPY --from=nr-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
|
||||
COPY --from=nr-ue-build /lib64/libconfig.so.9 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libblas.so.3 /lib64
|
||||
COPY --from=nr-ue-build /lib64/liblapack.so.3 /lib64
|
||||
COPY --from=nr-ue-build /lib64/liblapacke.so.3 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libforms.so.2 /lib64
|
||||
COPY --from=nr-ue-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libboost_chrono.so.1.66.0 \
|
||||
/lib64/libboost_date_time.so.1.66.0 \
|
||||
/lib64/libboost_filesystem.so.1.66.0 \
|
||||
/lib64/libboost_program_options.so.1.66.0 \
|
||||
/lib64/libboost_serialization.so.1.66.0 \
|
||||
/lib64/libboost_thread.so.1.66.0 \
|
||||
/lib64/libboost_system.so.1.66.0 \
|
||||
/lib64/libboost_unit_test_framework.so.1.66.0 \
|
||||
/lib64/libboost_atomic.so.1.66.0 \
|
||||
/lib64/libboost_timer.so.1.66.0 \
|
||||
/lib64/libboost_regex.so.1.66.0 \
|
||||
/lib64/libicudata.so.60 \
|
||||
/lib64/libicui18n.so.60 \
|
||||
/lib64/libicuuc.so.60 \
|
||||
/lib64/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=nr-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_program_options.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_serialization.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_thread.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_system.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64
|
||||
COPY --from=nr-ue-build /lib64/libboost_regex.so.1.66.0 /lib64
|
||||
|
||||
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=nr-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
|
||||
COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=nr-ue-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
|
||||
COPY --from=nr-ue-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=nr-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
|
||||
|
||||
WORKDIR /usr/local/share/uhd/rfnoc
|
||||
COPY --from=nr-ue-build /usr/local/share/uhd/rfnoc/ .
|
||||
COPY --from=nr-ue-base /usr/local/share/uhd/rfnoc/ .
|
||||
|
||||
|
||||
RUN ldconfig
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
# Copy the relevant configuration files for eNB
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
|
||||
@@ -25,17 +25,11 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS nr-ue-base
|
||||
|
||||
FROM ran-build:latest AS nr-ue-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --nrUE --ninja -w USRP --verbose-ci
|
||||
RUN cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:bionic as oai-nr-ue
|
||||
@@ -67,44 +61,48 @@ RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-nr-ue/bin
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/nr-uesoftmodem.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/docker/scripts/nr_ue_entrypoint.sh entrypoint.sh
|
||||
COPY --from=nr-ue-build \
|
||||
/oai-ran/targets/bin/nr-uesoftmodem.Rel15 \
|
||||
/oai-ran/docker/scripts/entrypoint.sh \
|
||||
./
|
||||
|
||||
WORKDIR /opt/oai-nr-ue/etc
|
||||
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/nr-ue-sim.conf .
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=nr-ue-build /oai-ran/targets/bin/libparams_libconfig.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so .
|
||||
COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so .
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
|
||||
|
||||
COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
|
||||
COPY --from=nr-ue-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtcp_bridge_oai.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
||||
/usr/local/lib/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=nr-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib
|
||||
COPY --from=nr-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
|
||||
WORKDIR /usr/lib/x86_64-linux-gnu
|
||||
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 .
|
||||
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 .
|
||||
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
|
||||
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
|
||||
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
|
||||
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
|
||||
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
|
||||
COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=nr-ue-base \
|
||||
/usr/local/lib/libuhd.so.3.15.0 \
|
||||
/usr/local/lib/libprotobuf-c.so.1 \
|
||||
/usr/local/lib/
|
||||
COPY --from=nr-ue-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
|
||||
|
||||
RUN ldconfig
|
||||
COPY --from=nr-ue-base \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 \
|
||||
/usr/lib/x86_64-linux-gnu/
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
|
||||
ldconfig
|
||||
|
||||
WORKDIR /opt/oai-nr-ue
|
||||
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15", "-O", "/opt/oai-nr-ue/etc/nr-ue-sim.conf"]
|
||||
|
||||
@@ -25,11 +25,7 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-build:develop AS phy-sim-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
FROM ran-base:latest AS phy-sim-build
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
@@ -37,7 +33,6 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
./build_oai --phy_simulators --ninja --verbose-ci
|
||||
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-physim
|
||||
|
||||
@@ -45,6 +40,7 @@ RUN yum update -y && \
|
||||
yum install -y --enablerepo="ubi-8-codeready-builder" \
|
||||
lksctp-tools \
|
||||
nettle \
|
||||
tzdata \
|
||||
atlas \
|
||||
hostname \
|
||||
sudo \
|
||||
@@ -58,66 +54,61 @@ RUN yum update -y && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
WORKDIR /opt/oai-physim/targets/bin
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/dlsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/nr_dlsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/nr_prachsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/nr_ulschsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/polartest.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/ulsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/ldpctest.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/nr_dlschsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/nr_pbchsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/nr_pucchsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/nr_ulsim.Rel15 .
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/smallblocktest.Rel15 .
|
||||
COPY --from=phy-sim-build \
|
||||
/oai-ran/targets/bin/dlsim.Rel15 \
|
||||
/oai-ran/targets/bin/nr_dlsim.Rel15 \
|
||||
/oai-ran/targets/bin/nr_prachsim.Rel15 \
|
||||
/oai-ran/targets/bin/nr_ulschsim.Rel15 \
|
||||
/oai-ran/targets/bin/polartest.Rel15 \
|
||||
/oai-ran/targets/bin/ulsim.Rel15 \
|
||||
/oai-ran/targets/bin/ldpctest.Rel15 \
|
||||
/oai-ran/targets/bin/nr_dlschsim.Rel15 \
|
||||
/oai-ran/targets/bin/nr_pbchsim.Rel15 \
|
||||
/oai-ran/targets/bin/nr_pucchsim.Rel15 \
|
||||
/oai-ran/targets/bin/nr_ulsim.Rel15 \
|
||||
/oai-ran/targets/bin/smallblocktest.Rel15 \
|
||||
./
|
||||
|
||||
WORKDIR /usr/local/lib/
|
||||
COPY --from=phy-sim-build /oai-ran/targets/bin/libcoding.so .
|
||||
COPY --from=phy-sim-build /lib64/liblapacke.so.3 .
|
||||
COPY --from=phy-sim-build /lib64/libX11.so.6 .
|
||||
COPY --from=phy-sim-build /lib64/libXpm.so.4 .
|
||||
COPY --from=phy-sim-build /lib64/libxcb.so.1 .
|
||||
COPY --from=phy-sim-build /lib64/libXau.so.6 .
|
||||
COPY --from=phy-sim-build /lib64/libforms.so.2 .
|
||||
COPY --from=phy-sim-build /lib64/libblas.so.3 .
|
||||
COPY --from=phy-sim-build /lib64/liblapack.so.3 .
|
||||
COPY --from=phy-sim-build /lib64/libexslt.so.0 .
|
||||
COPY --from=phy-sim-build /lib64/libxslt.so.1 .
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/phy_simulators/build/libdfts.so .
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/phy_simulators/build/libSIMU.so .
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/phy_simulators/build/libldpc.so .
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/phy_simulators/build/libldpc_orig.so .
|
||||
COPY --from=phy-sim-build \
|
||||
/oai-ran/targets/bin/libcoding.so \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libX11.so.6 \
|
||||
/lib64/libXpm.so.4 \
|
||||
/lib64/libxcb.so.1 \
|
||||
/lib64/libXau.so.6 \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/libexslt.so.0 \
|
||||
/lib64/libxslt.so.1 \
|
||||
/oai-ran/cmake_targets/phy_simulators/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/phy_simulators/build/libSIMU.so \
|
||||
/oai-ran/cmake_targets/phy_simulators/build/libldpc.so \
|
||||
/oai-ran/cmake_targets/phy_simulators/build/libldpc_orig.so \
|
||||
/usr/local/lib/
|
||||
|
||||
RUN ldconfig
|
||||
|
||||
#debug
|
||||
#RUN ldd /opt/oai-physim/targets/bin/dlsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/nr_dlsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/nr_prachsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/nr_ulschsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/polartest.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/ulsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/ldpctest.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/nr_dlschsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/nr_pbchsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/nr_pucchsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/nr_ulsim.Rel15
|
||||
#RUN ldd /opt/oai-physim/targets/bin/smallblocktest.Rel15
|
||||
|
||||
# Copy some executables
|
||||
WORKDIR /usr/bin/
|
||||
|
||||
COPY --from=phy-sim-build /usr/bin/killall .
|
||||
COPY --from=phy-sim-build /usr/bin/xmlstarlet .
|
||||
COPY --from=phy-sim-build /usr/bin/svn .
|
||||
COPY --from=phy-sim-build \
|
||||
/usr/bin/killall \
|
||||
/usr/bin/xmlstarlet \
|
||||
/usr/bin/svn \
|
||||
./
|
||||
|
||||
# Copy the relevant configuration files for phySim
|
||||
WORKDIR /opt/oai-physim/
|
||||
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/autotests/run_exec_autotests.bash /opt/oai-physim/cmake_targets/autotests/
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/autotests/test_case_list.xml /opt/oai-physim/cmake_targets/autotests/
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/autotests/tools/free_mem.bash /opt/oai-physim/cmake_targets/autotests/tools/
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/tools/build_helper /opt/oai-physim/cmake_targets/tools/
|
||||
COPY --from=phy-sim-build /oai-ran/cmake_targets/tools/test_helper /opt/oai-physim/cmake_targets/tools/
|
||||
COPY --from=phy-sim-build \
|
||||
/oai-ran/cmake_targets/autotests/run_exec_autotests.bash \
|
||||
/oai-ran/cmake_targets/autotests/test_case_list.xml \
|
||||
/opt/oai-physim/cmake_targets/autotests/
|
||||
COPY --from=phy-sim-build \
|
||||
/oai-ran/cmake_targets/autotests/tools/free_mem.bash \
|
||||
/oai-ran/cmake_targets/tools/build_helper \
|
||||
/oai-ran/cmake_targets/tools/test_helper \
|
||||
/opt/oai-physim/cmake_targets/tools/
|
||||
|
||||
#CMD ["sleep", "infinity"]
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
FROM registry.access.redhat.com/ubi7/ubi:latest AS ran-build
|
||||
FROM registry.access.redhat.com/ubi7/ubi:latest AS ran-base
|
||||
|
||||
# Entitlements and RHSM configurations are Open-Shift Secret and ConfigMaps
|
||||
# It is pre-requisite
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build
|
||||
FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-base
|
||||
|
||||
# Entitlements and RHSM configurations are Open-Shift Secret and ConfigMaps
|
||||
# It is pre-requisite
|
||||
|
||||
+24
-10
@@ -29,12 +29,18 @@
|
||||
|
||||
For all platforms, the strategy for building docker/podman images is the same:
|
||||
|
||||
* First we create a common shared image that contains:
|
||||
* First we create a common shared image `ran-base` that contains:
|
||||
- the latest source files (by using the `COPY` function)
|
||||
- all the means to build an OAI RAN executable
|
||||
* all packages, compilers, ...
|
||||
* especially UHD is installed
|
||||
* Then from this shared image (`ran-build`) we can build target images for:
|
||||
* Then, from the `ran-base` shared image, we create a shared image `ran-build`
|
||||
in which all targets are compiled:
|
||||
- eNB
|
||||
- gNB
|
||||
- lte-UE
|
||||
- nr-UE
|
||||
* Then from the `ran-build` shared image we can build target images for:
|
||||
- eNB
|
||||
- gNB
|
||||
- lte-UE
|
||||
@@ -58,7 +64,8 @@ Dockerfiles are named with the following naming convention: `Dockerfile.${target
|
||||
|
||||
Targets can be:
|
||||
|
||||
- `ran` for an image named `ran-build` (the shared image)
|
||||
- `base` for an image named `ran-base` (shared image)
|
||||
- `ran` for an image named `ran-build` (shared image)
|
||||
- `eNB` for an image named `oai-enb`
|
||||
- `gNB` for an image named `oai-gnb`
|
||||
- `lteUE` for an image named `oai-lte-ue`
|
||||
@@ -85,9 +92,11 @@ For more details in build within a Openshift Cluster, see [OpenShift README](../
|
||||
* `docker-ce` installed
|
||||
* Pulling `ubuntu:bionic` from DockerHub
|
||||
|
||||
## 3.2. Building the shared image ##
|
||||
## 3.2. Building the shared images ##
|
||||
|
||||
This can be done starting `2020.w41` tag on the `develop` branch, or any branch that includes that tag.
|
||||
Note: This can be done starting `2020.XX` tag on the `develop` branch, or any branch that includes that tag.
|
||||
|
||||
There are two shared images: one that has all dependencies, and a second that compiles all targets (eNB, gNB, [nr]UE).
|
||||
|
||||
```bash
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
|
||||
@@ -98,21 +107,25 @@ git checkout develop
|
||||
In our Eurecom/OSA environment we need to pass a GIT proxy.
|
||||
|
||||
```bash
|
||||
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.ran.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
|
||||
docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
|
||||
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
|
||||
```
|
||||
|
||||
if you don't need it, do NOT pass any value:
|
||||
|
||||
```bash
|
||||
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.ran.ubuntu18 .
|
||||
docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu18 .
|
||||
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu18 .
|
||||
```
|
||||
|
||||
After a while:
|
||||
After building both:
|
||||
|
||||
```bash
|
||||
docker image ls
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
ran-build latest ccb721bc0b57 1 minute ago 4.06GB
|
||||
ran-build latest f2633a7f5102 1 minute ago 6.81GB
|
||||
ran-base latest 5c9c02a5b4a8 1 minute ago 2.4GB
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
@@ -131,7 +144,8 @@ docker image ls
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
oai-enb latest 25ddbd8b7187 1 minute ago 516MB
|
||||
<none> <none> 875ea3b05b60 8 minutes ago 8.18GB
|
||||
ran-build latest ccb721bc0b57 1 hour ago 4.06GB
|
||||
ran-build latest f2633a7f5102 1 hour ago 6.81GB
|
||||
ran-base latest 5c9c02a5b4a8 1 hour ago 2.4GB
|
||||
```
|
||||
|
||||
Do not forget to remove the temporary image:
|
||||
|
||||
@@ -18,11 +18,19 @@ if [[ -v USE_FDD_IF4P5_RCC ]]; then cp $PREFIX/etc/rcc.if4p5.fdd.conf $PREFIX/et
|
||||
if [[ -v USE_TDD_IF4P5_RCC ]]; then cp $PREFIX/etc/rcc.if4p5.tdd.conf $PREFIX/etc/enb.conf; fi
|
||||
if [[ -v USE_FDD_RRU ]]; then cp $PREFIX/etc/rru.fdd.conf $PREFIX/etc/enb.conf; fi
|
||||
if [[ -v USE_TDD_RRU ]]; then cp $PREFIX/etc/rru.tdd.conf $PREFIX/etc/enb.conf; fi
|
||||
# Sometimes, the templates are not enough. We mount a conf file on $PREFIX/etc. It can be a template itself.
|
||||
if [[ -v USE_VOLUMED_CONF ]]; then cp $PREFIX/etc/mounted.conf $PREFIX/etc/enb.conf; fi
|
||||
|
||||
# Only this template will be manipulated
|
||||
CONFIG_FILES=`ls $PREFIX/etc/enb.conf || true`
|
||||
|
||||
for c in ${CONFIG_FILES}; do
|
||||
# Sometimes templates have no pattern to be replaced.
|
||||
if ! grep -oP '@[a-zA-Z0-9_]+@' ${c}; then
|
||||
echo "Configuration is already set"
|
||||
break
|
||||
fi
|
||||
|
||||
# grep variable names (format: ${VAR}) from template to be rendered
|
||||
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
|
||||
|
||||
|
||||
@@ -9,11 +9,19 @@ THREAD_PARALLEL_CONFIG=${THREAD_PARALLEL_CONFIG:-PARALLEL_SINGLE_THREAD}
|
||||
# Based another env var, pick one template to use
|
||||
if [[ -v USE_NSA_TDD_MONO ]]; then cp $PREFIX/etc/gnb.nsa.tdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
if [[ -v USE_SA_TDD_MONO ]]; then cp $PREFIX/etc/gnb.sa.tdd.conf $PREFIX/etc/gnb.conf; fi
|
||||
# Sometimes, the templates are not enough. We mount a conf file on $PREFIX/etc. It can be a template itself.
|
||||
if [[ -v USE_VOLUMED_CONF ]]; then cp $PREFIX/etc/mounted.conf $PREFIX/etc/gnb.conf; fi
|
||||
|
||||
# Only this template will be manipulated
|
||||
CONFIG_FILES=`ls $PREFIX/etc/gnb.conf || true`
|
||||
|
||||
for c in ${CONFIG_FILES}; do
|
||||
# Sometimes templates have no pattern to be replaced.
|
||||
if ! grep -oP '@[a-zA-Z0-9_]+@' ${c}; then
|
||||
echo "Configuration is already set"
|
||||
break
|
||||
fi
|
||||
|
||||
# grep variable names (format: ${VAR}) from template to be rendered
|
||||
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
|
||||
|
||||
|
||||
@@ -401,15 +401,15 @@ void init_gNB_Tpool(int inst) {
|
||||
LOG_I(PHY,"Number of threads requested in config file: %d, Number of threads available on this machine: %d\n",gNB->pusch_proc_threads,numCPU);
|
||||
int threadCnt = min(numCPU, gNB->pusch_proc_threads);
|
||||
if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt);
|
||||
char ul_pool[80];
|
||||
sprintf(ul_pool,"-1");
|
||||
char pool[80];
|
||||
sprintf(pool,"-1");
|
||||
int s_offset = 0;
|
||||
for (int icpu=1; icpu<threadCnt; icpu++) {
|
||||
sprintf(ul_pool+2+s_offset,",-1");
|
||||
sprintf(pool+2+s_offset,",-1");
|
||||
s_offset += 3;
|
||||
}
|
||||
if (getenv("noThreads")) strcpy(ul_pool, "n");
|
||||
initTpool(ul_pool, gNB->threadPool, false);
|
||||
if (getenv("noThreads")) strcpy(pool, "n");
|
||||
initTpool(pool, gNB->threadPool, false);
|
||||
// ULSCH decoder result FIFO
|
||||
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
||||
initNotifiedFIFO(gNB->respDecode);
|
||||
|
||||
+1
-1
@@ -784,7 +784,7 @@ void init_NR_UE_threads(int nb_inst) {
|
||||
/* HACK: this function is needed to compile the UE
|
||||
* fix it somehow
|
||||
*/
|
||||
int8_t find_dlsch(uint16_t rnti,
|
||||
int find_dlsch(uint16_t rnti,
|
||||
PHY_VARS_eNB *eNB,
|
||||
find_type_t type)
|
||||
{
|
||||
|
||||
@@ -233,20 +233,15 @@ nrUE_params_t *get_nrUE_params(void) {
|
||||
/* initialie thread pools used for NRUE processing paralleliation */
|
||||
void init_tpools(uint8_t nun_dlsch_threads) {
|
||||
char *params = NULL;
|
||||
if (IS_SOFTMODEM_RFSIM) {
|
||||
params = calloc(1,2);
|
||||
memcpy(params,"N",1);
|
||||
}
|
||||
else {
|
||||
params = calloc(1,(NR_RX_NB_TH*NR_NB_TH_SLOT*3)+1);
|
||||
for (int i=0; i<NR_RX_NB_TH*NR_NB_TH_SLOT; i++) {
|
||||
memcpy(params+(i*3),"-1,",3);
|
||||
}
|
||||
params = calloc(1,(NR_RX_NB_TH*NR_NB_TH_SLOT*3)+1);
|
||||
for (int i=0; i<NR_RX_NB_TH*NR_NB_TH_SLOT; i++) {
|
||||
memcpy(params+(i*3),"-1,",3);
|
||||
}
|
||||
initTpool(params, &(nrUE_params.Tpool), false);
|
||||
free(params);
|
||||
init_dlsch_tpool( nun_dlsch_threads);
|
||||
}
|
||||
|
||||
static void get_options(void) {
|
||||
|
||||
nrUE_params.ofdm_offset_divisor = 8;
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
/// UL_CONFIG_REQ
|
||||
#define FAPI_NR_UL_CONFIG_LIST_NUM 10
|
||||
|
||||
#define FAPI_NR_UL_CONFIG_TYPE_DONE 0x00
|
||||
#define FAPI_NR_UL_CONFIG_TYPE_PRACH 0x01
|
||||
#define FAPI_NR_UL_CONFIG_TYPE_PUCCH 0x02
|
||||
#define FAPI_NR_UL_CONFIG_TYPE_PUSCH 0x03
|
||||
|
||||
@@ -0,0 +1,543 @@
|
||||
/*******************************************************************************
|
||||
Copyright (c) 2009-2018, Intel Corporation
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*******************************************************************************/
|
||||
|
||||
/**
|
||||
* Header file for module with CRC computation methods
|
||||
*
|
||||
* PCLMULQDQ implementation is based on work by:
|
||||
* Erdinc Ozturk
|
||||
* Vinodh Gopal
|
||||
* James Guilford
|
||||
*
|
||||
* "Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction"
|
||||
* URL: http://download.intel.com/design/intarch/papers/323102.pdf
|
||||
*/
|
||||
|
||||
#ifndef __CRC_H__
|
||||
#define __CRC_H__
|
||||
|
||||
#include <x86intrin.h>
|
||||
|
||||
#include "crcext.h"
|
||||
#include "types.h"
|
||||
#include <immintrin.h>
|
||||
#include <wmmintrin.h>
|
||||
|
||||
/**
|
||||
* PCLMULQDQ CRC computation context structure
|
||||
*/
|
||||
struct crc_pclmulqdq_ctx {
|
||||
/**
|
||||
* K1 = reminder X^128 / P(X) : 0-63
|
||||
* K2 = reminder X^192 / P(X) : 64-127
|
||||
*/
|
||||
uint64_t k1;
|
||||
uint64_t k2;
|
||||
|
||||
/**
|
||||
* K3 = reminder X^64 / P(X) : 0-63
|
||||
* q = quotient X^64 / P(X) : 64-127
|
||||
*/
|
||||
uint64_t k3;
|
||||
uint64_t q;
|
||||
|
||||
/**
|
||||
* p = polynomial / P(X) : 0-63
|
||||
* res = reserved : 64-127
|
||||
*/
|
||||
uint64_t p;
|
||||
uint64_t res;
|
||||
};
|
||||
|
||||
/**
|
||||
* Functions and prototypes
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Initializes look-up-table (LUT) for given 8 bit polynomial
|
||||
*
|
||||
* @param poly CRC polynomial
|
||||
* @param lut pointer to look-up-table to be initialized
|
||||
*/
|
||||
void crc8_init_lut(const uint8_t poly, uint8_t *lut);
|
||||
|
||||
/**
|
||||
* @brief Calculates 8 bit CRC using LUT method.
|
||||
*
|
||||
* @param crc CRC initial value
|
||||
* @param data pointer to data block to calculate CRC for
|
||||
* @param data_len size of data block
|
||||
* @param lut 256x8bits look-up-table pointer
|
||||
*
|
||||
* @return New CRC value
|
||||
*/
|
||||
__forceinline
|
||||
uint8_t crc8_calc_lut(const uint8_t *data,
|
||||
uint32_t data_len,
|
||||
uint8_t crc,
|
||||
const uint8_t *lut)
|
||||
{
|
||||
if (unlikely(data == NULL || lut == NULL))
|
||||
return crc;
|
||||
|
||||
while (data_len--)
|
||||
crc = lut[*data++ ^ crc];
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initializes look-up-table (LUT) for given 16 bit polynomial
|
||||
*
|
||||
* @param poly CRC polynomial
|
||||
* @param lut pointer to 256x16bits look-up-table to be initialized
|
||||
*/
|
||||
void crc16_init_lut(const uint16_t poly, uint16_t *lut);
|
||||
|
||||
/**
|
||||
* @brief Calculates 16 bit CRC using LUT method.
|
||||
*
|
||||
* @param crc CRC initial value
|
||||
* @param data pointer to data block to calculate CRC for
|
||||
* @param data_len size of data block
|
||||
* @param lut 256x16bits look-up-table pointer
|
||||
*
|
||||
* @return New CRC value
|
||||
*/
|
||||
__forceinline
|
||||
uint16_t crc16_calc_lut(const uint8_t *data,
|
||||
uint32_t data_len,
|
||||
uint16_t crc,
|
||||
const uint16_t *lut)
|
||||
{
|
||||
if (unlikely(data == NULL || lut == NULL))
|
||||
return crc;
|
||||
|
||||
while (data_len--)
|
||||
crc = lut[(crc >> 8) ^ *data++] ^ (crc << 8);
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initializes look-up-table (LUT) for given 32 bit polynomial
|
||||
*
|
||||
* @param poly CRC polynomial
|
||||
* @param lut pointer to 256x32bits look-up-table to be initialized
|
||||
*/
|
||||
void crc32_init_lut(const uint32_t poly, uint32_t *lut);
|
||||
|
||||
/**
|
||||
* @brief Calculates 32 bit CRC using LUT method.
|
||||
*
|
||||
* @param crc CRC initial value
|
||||
* @param data pointer to data block to calculate CRC for
|
||||
* @param data_len size of data block
|
||||
* @param lut 256x32bits look-up-table pointer
|
||||
*
|
||||
* @return New CRC value
|
||||
*/
|
||||
__forceinline
|
||||
uint32_t crc32_calc_lut(const uint8_t *data,
|
||||
uint32_t data_len,
|
||||
uint32_t crc,
|
||||
const uint32_t *lut)
|
||||
{
|
||||
if (unlikely(data == NULL || lut == NULL))
|
||||
return crc;
|
||||
|
||||
while (data_len--)
|
||||
crc = lut[(crc >> 24) ^ *data++] ^ (crc << 8);
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initializes look up tables for slice-By-2 method.
|
||||
*
|
||||
* @param poly CRC polynomial
|
||||
* @param slice1 slice-by-2 look-up-table 1
|
||||
* @param slice2 slice-by-2 look-up-table 2
|
||||
*
|
||||
* @return New CRC value
|
||||
*/
|
||||
void crc16_init_slice2(const uint16_t poly,
|
||||
uint16_t *slice1,
|
||||
uint16_t *slice2);
|
||||
|
||||
/**
|
||||
* @brief Calculates 16 bit CRC using Slice-By-2 method.
|
||||
*
|
||||
* @param crc CRC initial value
|
||||
* @param data pointer to data block to calculate CRC for
|
||||
* @param data_len size of data block
|
||||
* @param slice1 256x16bits slice look-up-table 1
|
||||
* @param slice2 256x16bits slice look-up-table 2
|
||||
*
|
||||
* @return New CRC value
|
||||
*/
|
||||
__forceinline
|
||||
uint16_t crc16_calc_slice2(const uint8_t *data,
|
||||
uint32_t data_len,
|
||||
uint16_t crc,
|
||||
const uint16_t *slice1,
|
||||
const uint16_t *slice2)
|
||||
{
|
||||
uint_fast32_t i;
|
||||
|
||||
if (unlikely(data == NULL))
|
||||
return crc;
|
||||
|
||||
if (unlikely(slice1 == NULL || slice2 == NULL))
|
||||
return crc;
|
||||
|
||||
crc = bswap2(crc);
|
||||
for (i = (data_len & (~1)), data += (data_len & (~1)); i != 0;
|
||||
i -= sizeof(uint16_t)) {
|
||||
crc ^= (*((const uint16_t *)(data - i)));
|
||||
crc = slice2[(uint8_t)crc] ^ slice1[(uint8_t)(crc >> 8)];
|
||||
}
|
||||
crc = bswap2(crc);
|
||||
if (data_len & 1)
|
||||
crc = (crc << 8) ^ bswap2(slice1[(crc >> 8) ^ *data]);
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initializes look up tables for slice-By-4 method.
|
||||
*
|
||||
* @param poly CRC polynomial
|
||||
* @param slice1 256x32bits slice look-up-table 1
|
||||
* @param slice2 256x32bits slice look-up-table 2
|
||||
* @param slice3 256x32bits slice look-up-table 3
|
||||
* @param slice4 256x32bits slice look-up-table 4
|
||||
*
|
||||
* @return New CRC value
|
||||
*/
|
||||
void crc32_init_slice4(const uint32_t poly,
|
||||
uint32_t *slice1, uint32_t *slice2,
|
||||
uint32_t *slice3, uint32_t *slice4);
|
||||
|
||||
/**
|
||||
* @brief Calculates 32 bit CRC using Slice-By-4 method.
|
||||
*
|
||||
* @param data pointer to data block to calculate CRC for
|
||||
* @param data_len size of data block
|
||||
* @param crc CRC initial value
|
||||
* @param slice1 256x32bits slice look-up-table 1
|
||||
* @param slice2 256x32bits slice look-up-table 2
|
||||
* @param slice3 256x32bits slice look-up-table 3
|
||||
* @param slice4 256x32bits slice look-up-table 4
|
||||
*
|
||||
* @return New CRC value
|
||||
*/
|
||||
__forceinline
|
||||
uint32_t crc32_calc_slice4(const uint8_t *data,
|
||||
uint32_t data_len, uint32_t crc,
|
||||
const uint32_t *slice1, const uint32_t *slice2,
|
||||
const uint32_t *slice3, const uint32_t *slice4)
|
||||
{
|
||||
uint_fast32_t i;
|
||||
|
||||
if (unlikely(data == NULL))
|
||||
return crc;
|
||||
|
||||
if (unlikely(slice1 == NULL || slice2 == NULL ||
|
||||
slice3 == NULL || slice4 == NULL))
|
||||
return crc;
|
||||
|
||||
crc = bswap4(crc);
|
||||
for (i = data_len & (~3), data += (data_len & (~3)); i != 0;
|
||||
i -= sizeof(uint32_t)) {
|
||||
crc ^= (*((const uint32_t *)(data - i)));
|
||||
crc = slice4[(uint8_t)(crc)] ^
|
||||
slice3[(uint8_t)(crc >> 8)] ^
|
||||
slice2[(uint8_t)(crc >> 16)] ^
|
||||
slice1[(uint8_t)(crc >> 24)];
|
||||
}
|
||||
crc = bswap4(crc);
|
||||
for (i = data_len & 3, data += (data_len & 3); i != 0; i--)
|
||||
crc = (crc << 8) ^
|
||||
bswap4(slice1[(crc >> 24) ^ *(data - i)]);
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Performs one folding round
|
||||
*
|
||||
* Logically function operates as follows:
|
||||
* DATA = READ_NEXT_16BYTES();
|
||||
* F1 = LSB8(FOLD)
|
||||
* F2 = MSB8(FOLD)
|
||||
* T1 = CLMUL( F1, K1 )
|
||||
* T2 = CLMUL( F2, K2 )
|
||||
* FOLD = XOR( T1, T2, DATA )
|
||||
*
|
||||
* @param data_block 16 byte data block
|
||||
* @param k1_k2 k1 and k2 constanst enclosed in XMM register
|
||||
* @param fold running 16 byte folded data
|
||||
*
|
||||
* @return New 16 byte folded data
|
||||
*/
|
||||
__forceinline
|
||||
__m128i crc32_folding_round(const __m128i data_block,
|
||||
const __m128i k1_k2,
|
||||
const __m128i fold)
|
||||
{
|
||||
__m128i tmp = _mm_clmulepi64_si128(fold, k1_k2, 0x11);
|
||||
|
||||
return _mm_xor_si128(_mm_clmulepi64_si128(fold, k1_k2, 0x00),
|
||||
_mm_xor_si128(data_block, tmp));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Performs Barret's reduction from 128 bits to 64 bits
|
||||
*
|
||||
* @param data128 128 bits data to be reduced
|
||||
* @param k3_q k3 and Q constants enclosed in XMM register
|
||||
*
|
||||
* @return data reduced to 64 bits
|
||||
*/
|
||||
__forceinline
|
||||
__m128i crc32_reduce_128_to_64(__m128i data128, const __m128i k3_q)
|
||||
{
|
||||
__m128i tmp;
|
||||
|
||||
tmp = _mm_xor_si128(_mm_clmulepi64_si128(data128, k3_q, 0x01 /* k3 */),
|
||||
data128);
|
||||
|
||||
data128 = _mm_xor_si128(_mm_clmulepi64_si128(tmp, k3_q, 0x01 /* k3 */),
|
||||
data128);
|
||||
|
||||
return _mm_srli_si128(_mm_slli_si128(data128, 8), 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Performs Barret's reduction from 64 bits to 32 bits
|
||||
*
|
||||
* @param data64 64 bits data to be reduced
|
||||
* @param k3_q k3 and Q constants enclosed in XMM register
|
||||
* @param p_res P constant enclosed in XMM register
|
||||
*
|
||||
* @return data reduced to 32 bits
|
||||
*/
|
||||
__forceinline
|
||||
uint32_t
|
||||
crc32_reduce_64_to_32(__m128i fold, const __m128i k3_q, const __m128i p_res)
|
||||
{
|
||||
__m128i temp;
|
||||
|
||||
temp = _mm_clmulepi64_si128(_mm_srli_si128(fold, 4),
|
||||
k3_q, 0x10 /* Q */);
|
||||
temp = _mm_srli_si128(_mm_xor_si128(temp, fold), 4);
|
||||
temp = _mm_clmulepi64_si128(temp, p_res, 0 /* P */);
|
||||
return _mm_extract_epi32(_mm_xor_si128(temp, fold), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Calculates 32 bit CRC for given \a data block by applying folding and
|
||||
* reduction methods.
|
||||
*
|
||||
* Algorithm operates on 32 bit CRCs so polynomials and initial values may
|
||||
* need to be promoted to 32 bits where required.
|
||||
*
|
||||
* @param crc initial CRC value (32 bit value)
|
||||
* @param data pointer to data block
|
||||
* @param data_len length of \a data block in bytes
|
||||
* @param params pointer to PCLMULQDQ CRC calculation context
|
||||
*
|
||||
* @return CRC for given \a data block (32 bits wide).
|
||||
*/
|
||||
__forceinline
|
||||
uint32_t
|
||||
crc32_calc_pclmulqdq(const uint8_t *data,
|
||||
uint32_t data_len, uint32_t crc,
|
||||
const struct crc_pclmulqdq_ctx *params)
|
||||
{
|
||||
__m128i temp, fold, k, swap;
|
||||
uint32_t n;
|
||||
|
||||
if (unlikely(data == NULL || data_len == 0 || params == NULL))
|
||||
return crc;
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/**
|
||||
* Preserve FPU context
|
||||
*/
|
||||
kernel_fpu_begin();
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Add 4 bytes to data block size
|
||||
* This is to secure the following:
|
||||
* CRC32 = M(X)^32 mod P(X)
|
||||
* M(X) - message to compute CRC on
|
||||
* P(X) - CRC polynomial
|
||||
*/
|
||||
data_len += 4;
|
||||
|
||||
/**
|
||||
* Load first 16 data bytes in \a fold and
|
||||
* set \a swap BE<->LE 16 byte conversion variable
|
||||
*/
|
||||
fold = _mm_loadu_si128((__m128i *)data);
|
||||
swap = crc_xmm_be_le_swap128;
|
||||
|
||||
/**
|
||||
* -------------------------------------------------
|
||||
* Folding all data into single 16 byte data block
|
||||
* Assumes: \a fold holds first 16 bytes of data
|
||||
*/
|
||||
|
||||
if (unlikely(data_len <= 16)) {
|
||||
/**
|
||||
* Data block fits into 16 byte block
|
||||
* - adjust data block
|
||||
* - 4 least significant bytes need to be zero
|
||||
*/
|
||||
fold = _mm_shuffle_epi8(fold, swap);
|
||||
fold = _mm_slli_si128(xmm_shift_right(fold, 20 - data_len), 4);
|
||||
|
||||
/**
|
||||
* Apply CRC init value
|
||||
*/
|
||||
temp = _mm_insert_epi32(_mm_setzero_si128(), bswap4(crc), 0);
|
||||
temp = xmm_shift_left(temp, data_len - 4);
|
||||
fold = _mm_xor_si128(fold, temp);
|
||||
} else {
|
||||
/**
|
||||
* There are 2x16 data blocks or more
|
||||
*/
|
||||
__m128i next_data;
|
||||
|
||||
/**
|
||||
* n = number of bytes required to align \a data_len
|
||||
* to multiple of 16
|
||||
*/
|
||||
n = ((~data_len) + 1) & 15;
|
||||
|
||||
/**
|
||||
* Apply CRC initial value and
|
||||
* get \a fold to BE format
|
||||
*/
|
||||
fold = _mm_xor_si128(fold,
|
||||
_mm_insert_epi32(_mm_setzero_si128(),
|
||||
crc, 0));
|
||||
fold = _mm_shuffle_epi8(fold, swap);
|
||||
|
||||
/**
|
||||
* Load next 16 bytes of data and
|
||||
* adjust \a fold & \a next_data as follows:
|
||||
*
|
||||
* CONCAT(fold,next_data) >> (n*8)
|
||||
*/
|
||||
next_data = _mm_loadu_si128((__m128i *)&data[16]);
|
||||
next_data = _mm_shuffle_epi8(next_data, swap);
|
||||
next_data = _mm_or_si128(xmm_shift_right(next_data, n),
|
||||
xmm_shift_left(fold, 16 - n));
|
||||
fold = xmm_shift_right(fold, n);
|
||||
|
||||
if (unlikely(data_len <= 32))
|
||||
/**
|
||||
* In such unlikely case clear 4 least significant bytes
|
||||
*/
|
||||
next_data =
|
||||
_mm_slli_si128(_mm_srli_si128(next_data, 4), 4);
|
||||
|
||||
/**
|
||||
* Do the initial folding round on 2 first 16 byte chunks
|
||||
*/
|
||||
k = _mm_load_si128((__m128i *)(¶ms->k1));
|
||||
fold = crc32_folding_round(next_data, k, fold);
|
||||
|
||||
if (likely(data_len > 32)) {
|
||||
/**
|
||||
* \a data_block needs to be at least 48 bytes long
|
||||
* in order to get here
|
||||
*/
|
||||
__m128i new_data;
|
||||
|
||||
/**
|
||||
* Main folding loop
|
||||
* - n is adjusted to point to next 16 data block
|
||||
* to read
|
||||
* (16+16) = 2x16; represents 2 first data blocks
|
||||
* processed above
|
||||
* (- n) is the number of zero bytes padded to
|
||||
* the message in order to align it to 16 bytes
|
||||
* - the last 16 bytes is processed separately
|
||||
*/
|
||||
for (n = 16 + 16 - n; n < (data_len - 16); n += 16) {
|
||||
new_data = _mm_loadu_si128((__m128i *)&data[n]);
|
||||
new_data = _mm_shuffle_epi8(new_data, swap);
|
||||
fold = crc32_folding_round(new_data, k, fold);
|
||||
}
|
||||
|
||||
/**
|
||||
* The last folding round works always on 12 bytes
|
||||
* (12 bytes of data and 4 zero bytes)
|
||||
* Read from offset -4 is to avoid one
|
||||
* shift right operation.
|
||||
*/
|
||||
new_data = _mm_loadu_si128((__m128i *)&data[n - 4]);
|
||||
new_data = _mm_shuffle_epi8(new_data, swap);
|
||||
new_data = _mm_slli_si128(new_data, 4);
|
||||
fold = crc32_folding_round(new_data, k, fold);
|
||||
} /* if (data_len > 32) */
|
||||
}
|
||||
|
||||
/**
|
||||
* -------------------------------------------------
|
||||
* Reduction 128 -> 32
|
||||
* Assumes: \a fold holds 128bit folded data
|
||||
*/
|
||||
|
||||
/**
|
||||
* REDUCTION 128 -> 64
|
||||
*/
|
||||
k = _mm_load_si128((__m128i *)(¶ms->k3));
|
||||
fold = crc32_reduce_128_to_64(fold, k);
|
||||
|
||||
/**
|
||||
* REDUCTION 64 -> 32
|
||||
*/
|
||||
n = crc32_reduce_64_to_32(fold, k,
|
||||
_mm_load_si128((__m128i *)(¶ms->p)));
|
||||
|
||||
#ifdef __KERNEL__
|
||||
/**
|
||||
* - restore FPU context
|
||||
*/
|
||||
kernel_fpu_end();
|
||||
#endif
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
#endif /* __CRC_H__ */
|
||||
@@ -30,10 +30,17 @@
|
||||
Modified in June, 2001, to include the length non multiple of 8
|
||||
*/
|
||||
|
||||
#ifndef __SSE4_1__
|
||||
#define USE_INTEL_CRC 0
|
||||
#else
|
||||
#define USE_INTEL_CRC __SSE4_1__
|
||||
#endif
|
||||
|
||||
#include "coding_defs.h"
|
||||
#include "assertions.h"
|
||||
|
||||
#if USE_INTEL_CRC
|
||||
#include "crc.h"
|
||||
#endif
|
||||
/*ref 36-212 v8.6.0 , pp 8-9 */
|
||||
/* the highest degree is set by default */
|
||||
|
||||
@@ -94,6 +101,28 @@ static unsigned short crc11Table[256];
|
||||
static unsigned char crc8Table[256];
|
||||
static unsigned char crc6Table[256];
|
||||
|
||||
#if USE_INTEL_CRC
|
||||
static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24a_pclmulqdq, 16) = {
|
||||
0x64e4d700, /**< k1 */
|
||||
0x2c8c9d00, /**< k2 */
|
||||
0xd9fe8c00, /**< k3 */
|
||||
0xf845fe24, /**< q */
|
||||
0x864cfb00, /**< p */
|
||||
0ULL /**< res */
|
||||
};
|
||||
__m128i crc_xmm_be_le_swap128;
|
||||
|
||||
DECLARE_ALIGNED(const uint8_t crc_xmm_shift_tab[48], 16) = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
void crcTableInit (void)
|
||||
{
|
||||
unsigned char c = 0;
|
||||
@@ -108,23 +137,29 @@ void crcTableInit (void)
|
||||
crc8Table[c] = (unsigned char) (crcbit (&c, 1, poly8) >> 24);
|
||||
crc6Table[c] = (unsigned char) (crcbit (&c, 1, poly6) >> 24);
|
||||
} while (++c);
|
||||
#if USE_INTEL_CRC
|
||||
crc_xmm_be_le_swap128 = _mm_setr_epi32(0x0c0d0e0f, 0x08090a0b,
|
||||
0x04050607, 0x00010203);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
||||
Byte by byte implementations,
|
||||
Byte by byte LUT implementations,
|
||||
assuming initial byte is 0 padded (in MSB) if necessary
|
||||
|
||||
can use SIMD optimized Intel CRC for LTE/NR 24a/24b variants
|
||||
*********************************************************/
|
||||
|
||||
unsigned int crc24a (unsigned char * inptr,
|
||||
int bitlen)
|
||||
{
|
||||
int octetlen = bitlen / 8; /* Change in octets */
|
||||
|
||||
int octetlen, resbit;
|
||||
unsigned int crc = 0;
|
||||
octetlen = bitlen / 8; /* Change in octets */
|
||||
resbit = (bitlen % 8);
|
||||
|
||||
if ( bitlen % 8 || !USE_INTEL_CRC ) {
|
||||
unsigned int crc = 0;
|
||||
int resbit= (bitlen % 8);
|
||||
|
||||
while (octetlen-- > 0) {
|
||||
// printf("crc24a: in %x => crc %x\n",crc,*inptr);
|
||||
crc = (crc << 8) ^ crc24aTable[(*inptr++) ^ (crc >> 24)];
|
||||
@@ -132,17 +167,35 @@ unsigned int crc24a (unsigned char * inptr,
|
||||
|
||||
if (resbit > 0)
|
||||
crc = (crc << resbit) ^ crc24aTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
|
||||
|
||||
return crc;
|
||||
}
|
||||
#if USE_INTEL_CRC
|
||||
else {
|
||||
return crc32_calc_pclmulqdq(inptr, octetlen, 0,
|
||||
<e_crc24a_pclmulqdq);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if USE_INTEL_CRC
|
||||
static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24b_pclmulqdq, 16) = {
|
||||
0x80140500, /**< k1 */
|
||||
0x42000100, /**< k2 */
|
||||
0x90042100, /**< k3 */
|
||||
0xffff83ff, /**< q */
|
||||
0x80006300, /**< p */
|
||||
0ULL /**< res */
|
||||
};
|
||||
#endif
|
||||
unsigned int crc24b (unsigned char * inptr,
|
||||
int bitlen)
|
||||
int bitlen)
|
||||
{
|
||||
int octetlen, resbit;
|
||||
int octetlen = bitlen / 8; /* Change in octets */
|
||||
|
||||
if ( bitlen % 8 || !USE_INTEL_CRC ) {
|
||||
unsigned int crc = 0;
|
||||
octetlen = bitlen / 8; /* Change in octets */
|
||||
resbit = (bitlen % 8);
|
||||
int resbit = (bitlen % 8);
|
||||
|
||||
while (octetlen-- > 0) {
|
||||
// printf("crc24b: in %x => crc %x (%x)\n",crc,*inptr,crc24bTable[(*inptr) ^ (crc >> 24)]);
|
||||
@@ -153,6 +206,13 @@ unsigned int crc24b (unsigned char * inptr,
|
||||
crc = (crc << resbit) ^ crc24bTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
|
||||
|
||||
return crc;
|
||||
}
|
||||
#if USE_INTEL_CRC
|
||||
else {
|
||||
return crc32_calc_pclmulqdq(inptr, octetlen, 0,
|
||||
<e_crc24b_pclmulqdq);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned int crc24c (unsigned char * inptr,
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/*******************************************************************************
|
||||
Copyright (c) 2009-2018, Intel Corporation
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*******************************************************************************/
|
||||
|
||||
/**
|
||||
* Header file with CRC external definitions
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __CRCEXT_H__
|
||||
#define __CRCEXT_H__
|
||||
|
||||
#include <x86intrin.h>
|
||||
#include "types.h"
|
||||
/**
|
||||
* Flag indicating availability of PCLMULQDQ instruction
|
||||
* Only valid after running CRCInit() function.
|
||||
*/
|
||||
extern int pclmulqdq_available;
|
||||
|
||||
/**
|
||||
* Flag indicating availability of PCLMULQDQ instruction
|
||||
* Only valid after running CRCInit() function.
|
||||
*/
|
||||
extern __m128i crc_xmm_be_le_swap128;
|
||||
extern const uint8_t crc_xmm_shift_tab[48];
|
||||
|
||||
/**
|
||||
* @brief Shifts right 128 bit register by specified number of bytes
|
||||
*
|
||||
* @param reg 128 bit value
|
||||
* @param num number of bytes to shift right \a reg by (0-16)
|
||||
*
|
||||
* @return \a reg >> (\a num * 8)
|
||||
*/
|
||||
__forceinline
|
||||
__m128i xmm_shift_right(__m128i reg, const unsigned int num)
|
||||
{
|
||||
const __m128i *p = (const __m128i *)(crc_xmm_shift_tab + 16 + num);
|
||||
|
||||
return _mm_shuffle_epi8(reg, _mm_loadu_si128(p));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Shifts left 128 bit register by specified number of bytes
|
||||
*
|
||||
* @param reg 128 bit value
|
||||
* @param num number of bytes to shift left \a reg by (0-16)
|
||||
*
|
||||
* @return \a reg << (\a num * 8)
|
||||
*/
|
||||
__forceinline
|
||||
__m128i xmm_shift_left(__m128i reg, const unsigned int num)
|
||||
{
|
||||
const __m128i *p = (const __m128i *)(crc_xmm_shift_tab + 16 - num);
|
||||
|
||||
return _mm_shuffle_epi8(reg, _mm_loadu_si128(p));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initializes CRC module.
|
||||
* @note It is mandatory to run it before using any of CRC API's.
|
||||
*/
|
||||
extern void CRCInit(void);
|
||||
|
||||
#endif /* __CRCEXT_H__ */
|
||||
@@ -22,6 +22,7 @@
|
||||
// encoder interface
|
||||
#ifndef __NRLDPC_DEFS__H__
|
||||
#define __NRLDPC_DEFS__H__
|
||||
#include <openair1/PHY/defs_nr_common.h>
|
||||
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
|
||||
/**
|
||||
\brief LDPC encoder
|
||||
@@ -36,17 +37,31 @@
|
||||
\param 9-12 time_stats_t *tinput,*tprep, *tparity,*toutput
|
||||
*/
|
||||
typedef struct {
|
||||
int n_segments; // optim8seg
|
||||
unsigned int macro_num; // optim8segmulti
|
||||
unsigned char gen_code; //orig
|
||||
time_stats_t *tinput;
|
||||
time_stats_t *tprep;
|
||||
time_stats_t *tparity;
|
||||
time_stats_t *toutput;
|
||||
}encoder_implemparams_t;
|
||||
unsigned int n_segments; // optim8seg
|
||||
unsigned int macro_num; // optim8segmulti
|
||||
unsigned char gen_code; //orig
|
||||
time_stats_t *tinput;
|
||||
time_stats_t *tprep;
|
||||
time_stats_t *tparity;
|
||||
time_stats_t *toutput;
|
||||
int Kr;
|
||||
uint32_t Kb;
|
||||
uint32_t *Zc;
|
||||
void *harq;
|
||||
/// Encoder BG
|
||||
uint8_t BG;
|
||||
/// Interleaver outputs
|
||||
unsigned char *output;
|
||||
/// Number of bits in "small" code segments
|
||||
uint32_t K;
|
||||
/// Number of "Filler" bits
|
||||
uint32_t F;
|
||||
/// LDPC-code outputs
|
||||
uint8_t *d[MAX_NUM_NR_DLSCH_SEGMENTS];
|
||||
} encoder_implemparams_t;
|
||||
#define INIT0_LDPCIMPLEMPARAMS {0,0,0,NULL,NULL,NULL,NULL}
|
||||
typedef void(*nrLDPC_initcallfunc_t)(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out);
|
||||
typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,short, short, encoder_implemparams_t*);
|
||||
typedef void(*nrLDPC_initcallfunc_t)(t_nrLDPC_dec_params *p_decParams, int8_t *p_llr, int8_t *p_out);
|
||||
typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,short, short, encoder_implemparams_t *);
|
||||
//============================================================================================================================
|
||||
// decoder interface
|
||||
/**
|
||||
@@ -56,5 +71,5 @@ typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,sho
|
||||
\param p_llrOut Output vector
|
||||
\param p_profiler LDPC profiler statistics
|
||||
*/
|
||||
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params* , int8_t*, int8_t* , t_nrLDPC_procBuf* , t_nrLDPC_time_stats* );
|
||||
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params *, int8_t *, int8_t *, t_nrLDPC_procBuf *, t_nrLDPC_time_stats * );
|
||||
#endif
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
|
||||
//#define DEBUG_LDPC
|
||||
|
||||
#include "ldpc384_byte.c"
|
||||
#include "ldpc352_byte.c"
|
||||
#include "ldpc320_byte.c"
|
||||
@@ -73,9 +71,18 @@
|
||||
|
||||
|
||||
|
||||
static inline void encode_parity_check_part_optim(uint8_t *c,uint8_t *d, short BG,short Zc,short Kb)
|
||||
static void encode_parity_check_part_optim(uint8_t *cc,uint8_t *d, short BG,short Zc,short Kb, int simd_size, int ncols)
|
||||
{
|
||||
|
||||
unsigned char c[2*22*Zc*simd_size] __attribute__((aligned(32))); //double size matrix of c
|
||||
|
||||
for (int i1=0; i1 < ncols; i1++) {
|
||||
memcpy(&c[2*i1*Zc], &cc[i1*Zc], Zc*sizeof(unsigned char));
|
||||
memcpy(&c[(2*i1+1)*Zc], &cc[i1*Zc], Zc*sizeof(unsigned char));
|
||||
}
|
||||
for (int i1=1;i1<simd_size;i1++) {
|
||||
memcpy(&c[(2*ncols*Zc*i1)], &c[i1], (2*ncols*Zc*sizeof(unsigned char))-i1);
|
||||
}
|
||||
|
||||
if (BG==1)
|
||||
{
|
||||
switch (Zc)
|
||||
|
||||
@@ -39,8 +39,6 @@
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "defs.h"
|
||||
|
||||
//#define DEBUG_LDPC
|
||||
|
||||
#include "ldpc384_byte.c"
|
||||
#include "ldpc352_byte.c"
|
||||
#include "ldpc320_byte.c"
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
#include "ldpc_encode_parity_check.c"
|
||||
#include "ldpc_generate_coefficient.c"
|
||||
//#define DEBUG_LDPC
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +47,7 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
{
|
||||
|
||||
short nrows=0,ncols=0;
|
||||
int i,i1,rate=3;
|
||||
int rate=3;
|
||||
int no_punctured_columns,removed_bit;
|
||||
|
||||
int simd_size;
|
||||
@@ -86,8 +83,6 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
unsigned char c[22*Zc] __attribute__((aligned(32))); //padded input, unpacked, max size
|
||||
unsigned char d[46*Zc] __attribute__((aligned(32))); //coded parity part output, unpacked, max size
|
||||
|
||||
unsigned char c_extension[2*22*Zc*simd_size] __attribute__((aligned(32))); //double size matrix of c
|
||||
|
||||
// calculate number of punctured bits
|
||||
no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*rate)/Zc;
|
||||
removed_bit=(nrows-no_punctured_columns-2) * Zc+block_length-(int)(block_length*rate);
|
||||
@@ -98,7 +93,7 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
memset(d,0,sizeof(unsigned char) * nrows * Zc);
|
||||
|
||||
if(impp->tinput != NULL) start_meas(impp->tinput);
|
||||
for (i=0; i<block_length; i++) {
|
||||
for (int i=0; i<block_length; i++) {
|
||||
c[i] = (test_input[0][i/8]&(128>>(i&7)))>>(7-(i&7));
|
||||
//printf("c(%d,%d)=%d\n",j,i,temp);
|
||||
}
|
||||
@@ -108,24 +103,10 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
if ((BG==1 && Zc>176) || (BG==2 && Zc>64)) {
|
||||
// extend matrix
|
||||
if(impp->tprep != NULL) start_meas(impp->tprep);
|
||||
for (i1=0; i1 < ncols; i1++)
|
||||
{
|
||||
memcpy(&c_extension[2*i1*Zc], &c[i1*Zc], Zc*sizeof(unsigned char));
|
||||
memcpy(&c_extension[(2*i1+1)*Zc], &c[i1*Zc], Zc*sizeof(unsigned char));
|
||||
}
|
||||
for (i1=1;i1<simd_size;i1++) {
|
||||
memcpy(&c_extension[(2*ncols*Zc*i1)], &c_extension[i1], (2*ncols*Zc*sizeof(unsigned char))-i1);
|
||||
// memset(&c_extension[(2*ncols*Zc*i1)],0,i1);
|
||||
/*
|
||||
printf("shift %d: ",i1);
|
||||
for (int j=0;j<64;j++) printf("%d ",c_extension[(2*ncols*Zc*i1)+j]);
|
||||
printf("\n");
|
||||
*/
|
||||
}
|
||||
if(impp->tprep != NULL) stop_meas(impp->tprep);
|
||||
//parity check part
|
||||
if(impp->tparity != NULL) start_meas(impp->tparity);
|
||||
encode_parity_check_part_optim(c_extension, d, BG, Zc, Kb);
|
||||
encode_parity_check_part_optim(c, d, BG, Zc, Kb,simd_size, ncols);
|
||||
if(impp->tparity != NULL) stop_meas(impp->tparity);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
//#define DEBUG_LDPC
|
||||
#include "ldpc_encode_parity_check.c"
|
||||
#include "ldpc_generate_coefficient.c"
|
||||
|
||||
@@ -102,7 +101,6 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
unsigned char c[22*Zc] __attribute__((aligned(32))); //padded input, unpacked, max size
|
||||
unsigned char d[46*Zc] __attribute__((aligned(32))); //coded parity part output, unpacked, max size
|
||||
|
||||
unsigned char c_extension[2*22*Zc*simd_size] __attribute__((aligned(32))); //double size matrix of c
|
||||
|
||||
// calculate number of punctured bits
|
||||
no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*rate)/Zc;
|
||||
@@ -151,24 +149,10 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
if ((BG==1 && Zc>176) || (BG==2 && Zc>64)) {
|
||||
// extend matrix
|
||||
if(impp->tprep != NULL) start_meas(impp->tprep);
|
||||
for (i1=0; i1 < ncols; i1++)
|
||||
{
|
||||
memcpy(&c_extension[2*i1*Zc], &c[i1*Zc], Zc*sizeof(unsigned char));
|
||||
memcpy(&c_extension[(2*i1+1)*Zc], &c[i1*Zc], Zc*sizeof(unsigned char));
|
||||
}
|
||||
for (i1=1;i1<simd_size;i1++) {
|
||||
memcpy(&c_extension[(2*ncols*Zc*i1)], &c_extension[i1], (2*ncols*Zc*sizeof(unsigned char))-i1);
|
||||
// memset(&c_extension[(2*ncols*Zc*i1)],0,i1);
|
||||
/*
|
||||
printf("shift %d: ",i1);
|
||||
for (int j=0;j<64;j++) printf("%d ",c_extension[(2*ncols*Zc*i1)+j]);
|
||||
printf("\n");
|
||||
*/
|
||||
}
|
||||
if(impp->tprep != NULL) stop_meas(impp->tprep);
|
||||
//parity check part
|
||||
if(impp->tparity != NULL) start_meas(impp->tparity);
|
||||
encode_parity_check_part_optim(c_extension, d, BG, Zc, Kb);
|
||||
encode_parity_check_part_optim(c, d, BG, Zc, Kb, simd_size, ncols);
|
||||
if(impp->tparity != NULL) stop_meas(impp->tparity);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -39,17 +39,17 @@
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
|
||||
//#define DEBUG_LDPC
|
||||
|
||||
#include "ldpc_encode_parity_check.c"
|
||||
#include "ldpc_generate_coefficient.c"
|
||||
|
||||
|
||||
int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc,int Kb,short block_length, short BG, encoder_implemparams_t *impp)
|
||||
int nrLDPC_encod(unsigned char **input,unsigned char **output,int Zc,int Kb,short block_length, short BG, encoder_implemparams_t *impp)
|
||||
{
|
||||
//set_log(PHY, 4);
|
||||
|
||||
|
||||
short nrows=0,ncols=0;
|
||||
int i,i1,j,rate=3;
|
||||
int nrows=0,ncols=0;
|
||||
int rate=3;
|
||||
int no_punctured_columns,removed_bit;
|
||||
//Table of possible lifting sizes
|
||||
char temp;
|
||||
@@ -95,8 +95,8 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
}
|
||||
|
||||
#ifdef DEBUG_LDPC
|
||||
LOG_D(PHY,"ldpc_encoder_optim_8seg: BG %d, Zc %d, Kb %d, block_length %d, segments %d\n",BG,Zc,Kb,block_length,n_segments);
|
||||
LOG_D(PHY,"ldpc_encoder_optim_8seg: PDU (seg 0) %x %x %x %x\n",test_input[0][0],test_input[0][1],test_input[0][2],test_input[0][3]);
|
||||
LOG_D(PHY,"ldpc_encoder_optim_8seg: BG %d, Zc %d, Kb %d, block_length %d, segments %d\n",BG,Zc,Kb,block_length,impp->n_segments);
|
||||
LOG_D(PHY,"ldpc_encoder_optim_8seg: PDU (seg 0) %x %x %x %x\n",input[0][0],input[0][1],input[0][2],input[0][3]);
|
||||
#endif
|
||||
|
||||
AssertFatal(Zc>0,"no valid Zc found for block length %d\n",block_length);
|
||||
@@ -104,10 +104,8 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
if ((Zc&31) > 0) simd_size = 16;
|
||||
else simd_size = 32;
|
||||
|
||||
unsigned char c[22*Zc] __attribute__((aligned(32))); //padded input, unpacked, max size
|
||||
unsigned char d[46*Zc] __attribute__((aligned(32))); //coded parity part output, unpacked, max size
|
||||
|
||||
unsigned char c_extension[2*22*Zc*simd_size] __attribute__((aligned(32))); //double size matrix of c
|
||||
unsigned char cc[22*Zc] __attribute__((aligned(32))); //padded input, unpacked, max size
|
||||
unsigned char dd[46*Zc] __attribute__((aligned(32))); //coded parity part output, unpacked, max size
|
||||
|
||||
// calculate number of punctured bits
|
||||
no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*rate)/Zc;
|
||||
@@ -115,8 +113,8 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
//printf("%d\n",no_punctured_columns);
|
||||
//printf("%d\n",removed_bit);
|
||||
// unpack input
|
||||
memset(c,0,sizeof(unsigned char) * ncols * Zc);
|
||||
memset(d,0,sizeof(unsigned char) * nrows * Zc);
|
||||
memset(cc,0,sizeof(unsigned char) * ncols * Zc);
|
||||
memset(dd,0,sizeof(unsigned char) * nrows * Zc);
|
||||
|
||||
if(impp->tinput != NULL) start_meas(impp->tinput);
|
||||
#if 0
|
||||
@@ -124,29 +122,29 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
//for (j=0; j<n_segments; j++) {
|
||||
for (j=macro_segment; j < macro_segment_end; j++) {
|
||||
|
||||
temp = (test_input[j][i/8]&(1<<(i&7)))>>(i&7);
|
||||
temp = (input[j][i/8]&(1<<(i&7)))>>(i&7);
|
||||
//printf("c(%d,%d)=%d\n",j,i,temp);
|
||||
c[i] |= (temp << (j-macro_segment));
|
||||
}
|
||||
}
|
||||
#else
|
||||
#ifdef __AVX2__
|
||||
for (i=0; i<block_length>>5; i++) {
|
||||
c256 = _mm256_and_si256(_mm256_cmpeq_epi8(_mm256_andnot_si256(_mm256_shuffle_epi8(_mm256_set1_epi32(((uint32_t*)test_input[macro_segment])[i]), shufmask),andmask),zero256),masks[0]);
|
||||
for (int i=0; i<block_length>>5; i++) {
|
||||
c256 = _mm256_and_si256(_mm256_cmpeq_epi8(_mm256_andnot_si256(_mm256_shuffle_epi8(_mm256_set1_epi32(((uint32_t*)input[macro_segment])[i]), shufmask),andmask),zero256),masks[0]);
|
||||
//for (j=1; j<n_segments; j++) {
|
||||
for (j=macro_segment+1; j < macro_segment_end; j++) {
|
||||
c256 = _mm256_or_si256(_mm256_and_si256(_mm256_cmpeq_epi8(_mm256_andnot_si256(_mm256_shuffle_epi8(_mm256_set1_epi32(((uint32_t*)test_input[j])[i]), shufmask),andmask),zero256),masks[j-macro_segment]),c256);
|
||||
for (int j=macro_segment+1; j < macro_segment_end; j++) {
|
||||
c256 = _mm256_or_si256(_mm256_and_si256(_mm256_cmpeq_epi8(_mm256_andnot_si256(_mm256_shuffle_epi8(_mm256_set1_epi32(((uint32_t*)input[j])[i]), shufmask),andmask),zero256),masks[j-macro_segment]),c256);
|
||||
}
|
||||
((__m256i *)c)[i] = c256;
|
||||
((__m256i *)cc)[i] = c256;
|
||||
}
|
||||
|
||||
for (i=(block_length>>5)<<5;i<block_length;i++) {
|
||||
for (int i=(block_length>>5)<<5;i<block_length;i++) {
|
||||
//for (j=0; j<n_segments; j++) {
|
||||
for (j=macro_segment; j < macro_segment_end; j++) {
|
||||
for (int j=macro_segment; j < macro_segment_end; j++) {
|
||||
|
||||
temp = (test_input[j][i/8]&(128>>(i&7)))>>(7-(i&7));
|
||||
temp = (input[j][i/8]&(128>>(i&7)))>>(7-(i&7));
|
||||
//printf("c(%d,%d)=%d\n",j,i,temp);
|
||||
c[i] |= (temp << (j-macro_segment));
|
||||
cc[i] |= (temp << (j-macro_segment));
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -159,28 +157,14 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
if ((BG==1 && Zc>176) || (BG==2 && Zc>64)) {
|
||||
// extend matrix
|
||||
if(impp->tprep != NULL) start_meas(impp->tprep);
|
||||
for (i1=0; i1 < ncols; i1++)
|
||||
{
|
||||
memcpy(&c_extension[2*i1*Zc], &c[i1*Zc], Zc*sizeof(unsigned char));
|
||||
memcpy(&c_extension[(2*i1+1)*Zc], &c[i1*Zc], Zc*sizeof(unsigned char));
|
||||
}
|
||||
for (i1=1;i1<simd_size;i1++) {
|
||||
memcpy(&c_extension[(2*ncols*Zc*i1)], &c_extension[i1], (2*ncols*Zc*sizeof(unsigned char))-i1);
|
||||
// memset(&c_extension[(2*ncols*Zc*i1)],0,i1);
|
||||
/*
|
||||
printf("shift %d: ",i1);
|
||||
for (int j=0;j<64;j++) printf("%d ",c_extension[(2*ncols*Zc*i1)+j]);
|
||||
printf("\n");
|
||||
*/
|
||||
}
|
||||
if(impp->tprep != NULL) stop_meas(impp->tprep);
|
||||
//parity check part
|
||||
if(impp->tparity != NULL) start_meas(impp->tparity);
|
||||
encode_parity_check_part_optim(c_extension, d, BG, Zc, Kb);
|
||||
encode_parity_check_part_optim(cc, dd, BG, Zc, Kb, simd_size, ncols);
|
||||
if(impp->tparity != NULL) stop_meas(impp->tparity);
|
||||
}
|
||||
else {
|
||||
if (encode_parity_check_part_orig(c, d, BG, Zc, Kb, block_length)!=0) {
|
||||
if (encode_parity_check_part_orig(cc, dd, BG, Zc, Kb, block_length)!=0) {
|
||||
printf("Problem with encoder\n");
|
||||
return(-1);
|
||||
}
|
||||
@@ -188,8 +172,8 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
if(impp->toutput != NULL) start_meas(impp->toutput);
|
||||
// information part and puncture columns
|
||||
/*
|
||||
memcpy(&channel_input[0], &c[2*Zc], (block_length-2*Zc)*sizeof(unsigned char));
|
||||
memcpy(&channel_input[block_length-2*Zc], &d[0], ((nrows-no_punctured_columns) * Zc-removed_bit)*sizeof(unsigned char));
|
||||
memcpy(&output[0], &c[2*Zc], (block_length-2*Zc)*sizeof(unsigned char));
|
||||
memcpy(&output[block_length-2*Zc], &d[0], ((nrows-no_punctured_columns) * Zc-removed_bit)*sizeof(unsigned char));
|
||||
*/
|
||||
#ifdef __AVX2__
|
||||
if ((((2*Zc)&31) == 0) && (((block_length-(2*Zc))&31) == 0)) {
|
||||
@@ -197,34 +181,34 @@ int nrLDPC_encod(unsigned char **test_input,unsigned char **channel_input,int Zc
|
||||
//AssertFatal(((block_length-(2*Zc))&31) == 0,"block_length-(2*Zc) needs to be a multiple of 32 for now\n");
|
||||
uint32_t l1 = (block_length-(2*Zc))>>5;
|
||||
uint32_t l2 = ((nrows-no_punctured_columns) * Zc-removed_bit)>>5;
|
||||
__m256i *c256p = (__m256i *)&c[2*Zc];
|
||||
__m256i *d256p = (__m256i *)&d[0];
|
||||
__m256i *c256p = (__m256i *)&cc[2*Zc];
|
||||
__m256i *d256p = (__m256i *)&dd[0];
|
||||
// if (((block_length-(2*Zc))&31)>0) l1++;
|
||||
|
||||
for (i=0;i<l1;i++)
|
||||
//for (j=0;j<n_segments;j++) ((__m256i *)channel_input[j])[i] = _mm256_and_si256(_mm256_srai_epi16(c256p[i],j),masks[0]);
|
||||
for (j=macro_segment; j < macro_segment_end; j++) ((__m256i *)channel_input[j])[i] = _mm256_and_si256(_mm256_srai_epi16(c256p[i],j-macro_segment),masks[0]);
|
||||
for (int i=0;i<l1;i++)
|
||||
//for (j=0;j<n_segments;j++) ((__m256i *)output[j])[i] = _mm256_and_si256(_mm256_srai_epi16(c256p[i],j),masks[0]);
|
||||
for (int j=macro_segment; j < macro_segment_end; j++) ((__m256i *)output[j])[i] = _mm256_and_si256(_mm256_srai_epi16(c256p[i],j-macro_segment),masks[0]);
|
||||
|
||||
|
||||
// if ((((nrows-no_punctured_columns) * Zc-removed_bit)&31)>0) l2++;
|
||||
|
||||
for (i1=0;i1<l2;i1++,i++)
|
||||
//for (j=0;j<n_segments;j++) ((__m256i *)channel_input[j])[i] = _mm256_and_si256(_mm256_srai_epi16(d256p[i1],j),masks[0]);
|
||||
for (j=macro_segment; j < macro_segment_end; j++) ((__m256i *)channel_input[j])[i] = _mm256_and_si256(_mm256_srai_epi16(d256p[i1],j-macro_segment),masks[0]);
|
||||
for (int i1=0, i=l1;i1<l2;i1++,i++)
|
||||
//for (j=0;j<n_segments;j++) ((__m256i *)output[j])[i] = _mm256_and_si256(_mm256_srai_epi16(d256p[i1],j),masks[0]);
|
||||
for (int j=macro_segment; j < macro_segment_end; j++) ((__m256i *)output[j])[i] = _mm256_and_si256(_mm256_srai_epi16(d256p[i1],j-macro_segment),masks[0]);
|
||||
}
|
||||
else {
|
||||
#ifdef DEBUG_LDPC
|
||||
LOG_W(PHY,"using non-optimized version\n");
|
||||
#endif
|
||||
// do non-SIMD version
|
||||
for (i=0;i<(block_length-2*Zc);i++)
|
||||
for (int i=0;i<(block_length-2*Zc);i++)
|
||||
//for (j=0; j<n_segments; j++)
|
||||
for (j=macro_segment; j < macro_segment_end; j++)
|
||||
channel_input[j][i] = (c[2*Zc+i]>>(j-macro_segment))&1;
|
||||
for (i=0;i<((nrows-no_punctured_columns) * Zc-removed_bit);i++)
|
||||
for (int j=macro_segment; j < macro_segment_end; j++)
|
||||
output[j][i] = (cc[2*Zc+i]>>(j-macro_segment))&1;
|
||||
for (int i=0;i<((nrows-no_punctured_columns) * Zc-removed_bit);i++)
|
||||
//for (j=0; j<n_segments; j++)
|
||||
for (j=macro_segment; j < macro_segment_end; j++)
|
||||
channel_input[j][block_length-2*Zc+i] = (d[i]>>(j-macro_segment))&1;
|
||||
for (int j=macro_segment; j < macro_segment_end; j++)
|
||||
output[j][block_length-2*Zc+i] = (dd[i]>>(j-macro_segment))&1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/*******************************************************************************
|
||||
Copyright (c) 2009-2018, Intel Corporation
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*******************************************************************************/
|
||||
|
||||
/* Common data types, macros and functions used across the CRC library */
|
||||
|
||||
#ifndef CRC_TYPES_H_
|
||||
#define CRC_TYPES_H_
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/i387.h>
|
||||
#include <linux/types.h>
|
||||
typedef uint32_t uint_fast32_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
/* Declare variable at address aligned to a boundary */
|
||||
#define DECLARE_ALIGNED(_declaration, _boundary) \
|
||||
_declaration __attribute__((aligned(_boundary)))
|
||||
|
||||
/* Macro to make function to be always inlined */
|
||||
#ifndef DEBUG
|
||||
#define __forceinline \
|
||||
static inline __attribute__((always_inline))
|
||||
#else
|
||||
#define __forceinline \
|
||||
static
|
||||
#endif
|
||||
|
||||
/* Likely & unliekly hints for the compiler */
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
|
||||
/* Macro to get dimension of an array */
|
||||
#ifndef DIM
|
||||
#define DIM(x) (sizeof(x)/sizeof(x[0]))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Common functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Swaps bytes in 16 bit word
|
||||
*
|
||||
* @param val 16 bit data value
|
||||
*
|
||||
* @return byte swapped value
|
||||
*/
|
||||
__forceinline uint16_t bswap2(const uint16_t val)
|
||||
{
|
||||
return (uint16_t) ((val >> 8) | (val << 8));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Swaps bytes in 32 bit word
|
||||
* ABCD -> DCBA
|
||||
*
|
||||
* @param val 32 bit data value
|
||||
*
|
||||
* @return byte swapped value
|
||||
*/
|
||||
__forceinline uint32_t bswap4(const uint32_t val)
|
||||
{
|
||||
return ((val >> 24) | /**< A*/
|
||||
((val & 0xff0000) >> 8) | /**< B*/
|
||||
((val & 0xff00) << 8) | /**< C*/
|
||||
(val << 24)); /**< D*/
|
||||
}
|
||||
|
||||
#endif /* CRC_TYPES_H_ */
|
||||
@@ -458,7 +458,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
ue->decode_SIB = 1;
|
||||
|
||||
init_nr_prach_tables(839);
|
||||
|
||||
init_symbol_rotation(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,6 @@ uint32_t get_samples_per_slot(int slot, NR_DL_FRAME_PARMS* fp)
|
||||
return samp_count;
|
||||
}
|
||||
|
||||
|
||||
uint32_t get_slot_from_timestamp(openair0_timestamp timestamp_rx, NR_DL_FRAME_PARMS* fp)
|
||||
{
|
||||
uint32_t slot_idx = 0;
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
\param reset resets the generator
|
||||
\return 32 bits of the gold sequence
|
||||
*/
|
||||
uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset);
|
||||
|
||||
#include <openair1/PHY/LTE_TRANSPORT/transport_proto.h>
|
||||
|
||||
/*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL reference signals.
|
||||
@param frame_parms LTE DL Frame parameters
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "PHY/types.h"
|
||||
|
||||
/**
|
||||
\brief Gold Sequence Generation defined in 3x.211
|
||||
\param x1 x1 shift register
|
||||
\param x2 x2 shift register / cinit if reset is set
|
||||
\param reset Reset flag / reinitialize the generator
|
||||
\return c 32 bits of gold output
|
||||
*/
|
||||
extern inline uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset)
|
||||
{
|
||||
int32_t n;
|
||||
|
||||
// 3GPP 3x.211
|
||||
// Nc = 1600
|
||||
// c(n) = [x1(n+Nc) + x2(n+Nc)]mod2
|
||||
// x1(n+31) = [x1(n+3) + x1(n)]mod2
|
||||
// x2(n+31) = [x2(n+3) + x2(n+2) + x2(n+1) + x2(n)]mod2
|
||||
if (reset)
|
||||
{
|
||||
// Init value for x1: x1(0) = 1, x1(n) = 0, n=1,2,...,30
|
||||
// x1(31) = [x1(3) + x1(0)]mod2 = 1
|
||||
*x1 = 1 + (1U<<31);
|
||||
// Init value for x2: cinit = sum_{i=0}^30 x2*2^i
|
||||
// x2(31) = [x2(3) + x2(2) + x2(1) + x2(0)]mod2
|
||||
// = (*x2>>3) ^ (*x2>>2) + (*x2>>1) + *x2
|
||||
*x2 = *x2 ^ ((*x2 ^ (*x2>>1) ^ (*x2>>2) ^ (*x2>>3))<<31);
|
||||
|
||||
// x1 and x2 contain bits n = 0,1,...,31
|
||||
|
||||
// Nc = 1600 bits are skipped at the beginning
|
||||
// i.e., 1600 / 32 = 50 32bit words
|
||||
|
||||
for (n = 1; n < 50; n++)
|
||||
{
|
||||
// Compute x1(0),...,x1(27)
|
||||
*x1 = (*x1>>1) ^ (*x1>>4);
|
||||
// Compute x1(28),..,x1(31) and xor
|
||||
*x1 = *x1 ^ (*x1<<31) ^ (*x1<<28);
|
||||
// Compute x2(0),...,x2(27)
|
||||
*x2 = (*x2>>1) ^ (*x2>>2) ^ (*x2>>3) ^ (*x2>>4);
|
||||
// Compute x2(28),..,x2(31) and xor
|
||||
*x2 = *x2 ^ (*x2<<31) ^ (*x2<<30) ^ (*x2<<29) ^ (*x2<<28);
|
||||
}
|
||||
}
|
||||
|
||||
*x1 = (*x1>>1) ^ (*x1>>4);
|
||||
*x1 = *x1 ^ (*x1<<31) ^ (*x1<<28);
|
||||
*x2 = (*x2>>1) ^ (*x2>>2) ^ (*x2>>3) ^ (*x2>>4);
|
||||
*x2 = *x2 ^ (*x2<<31) ^ (*x2<<30) ^ (*x2<<29) ^ (*x2<<28);
|
||||
|
||||
// c(n) = [x1(n+Nc) + x2(n+Nc)]mod2
|
||||
return(*x1^*x2);
|
||||
}
|
||||
@@ -147,10 +147,10 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb) {
|
||||
}
|
||||
}
|
||||
|
||||
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms, uint32_t *rb_alloc, uint8_t mod_order, uint8_t subframe, uint8_t symbol) {
|
||||
int adjust_G2(int Ncp, int frame_type, int N_RB_DL, uint32_t *rb_alloc, uint8_t mod_order, uint8_t subframe, uint8_t symbol) {
|
||||
int rb,re_pbch_sss=0;
|
||||
int rb_alloc_ind,nsymb;
|
||||
nsymb = (frame_parms->Ncp==NORMAL) ? 14 : 12;
|
||||
nsymb = (Ncp==NORMAL) ? 14 : 12;
|
||||
|
||||
// printf("adjust_G2 : symbol %d, subframe %d\n",symbol,subframe);
|
||||
if ((subframe!=0) && (subframe!=5) && (subframe!=6)) // if not PBCH/SSS or SSS
|
||||
@@ -158,12 +158,12 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms, uint32_t *rb_alloc, uint8_t mod_o
|
||||
|
||||
//first half of slot and TDD (no adjustments in first slot except for subframe 6 - PSS)
|
||||
if ((symbol<(nsymb>>1))&&
|
||||
(frame_parms->frame_type == TDD)&&
|
||||
(frame_type == TDD)&&
|
||||
(subframe!=6))
|
||||
return(0);
|
||||
|
||||
// after PBCH
|
||||
if (frame_parms->frame_type==TDD) { //TDD
|
||||
if (frame_type==TDD) { //TDD
|
||||
if ((symbol>((nsymb>>1)+3)) &&
|
||||
(symbol!=(nsymb-1))) ///SSS
|
||||
return(0);
|
||||
@@ -185,9 +185,9 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms, uint32_t *rb_alloc, uint8_t mod_o
|
||||
return(0);
|
||||
}
|
||||
|
||||
if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
|
||||
for (rb=((frame_parms->N_RB_DL>>1)-3);
|
||||
rb<=((frame_parms->N_RB_DL>>1)+3);
|
||||
if ((N_RB_DL&1) == 1) { // ODD N_RB_DL
|
||||
for (rb=((N_RB_DL>>1)-3);
|
||||
rb<=((N_RB_DL>>1)+3);
|
||||
rb++) {
|
||||
if (rb < 32)
|
||||
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
|
||||
@@ -201,16 +201,16 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms, uint32_t *rb_alloc, uint8_t mod_o
|
||||
rb_alloc_ind = 0;
|
||||
|
||||
if (rb_alloc_ind==1) {
|
||||
if ((rb==(frame_parms->N_RB_DL>>1)-3) ||
|
||||
(rb==((frame_parms->N_RB_DL>>1)+3))) {
|
||||
if ((rb==(N_RB_DL>>1)-3) ||
|
||||
(rb==((N_RB_DL>>1)+3))) {
|
||||
re_pbch_sss += 6;
|
||||
} else
|
||||
re_pbch_sss += 12;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (rb=((frame_parms->N_RB_DL>>1)-3);
|
||||
rb<((frame_parms->N_RB_DL>>1)+3);
|
||||
for (rb=((N_RB_DL>>1)-3);
|
||||
rb<((N_RB_DL>>1)+3);
|
||||
rb++) {
|
||||
if (rb < 32)
|
||||
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
|
||||
|
||||
@@ -44,7 +44,7 @@ void pcfich_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
{
|
||||
uint32_t i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1=0, x2, s=0;
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
|
||||
@@ -895,7 +895,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
uint8_t pucch1_thres,
|
||||
uint8_t br_flag
|
||||
int br_flag
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
|
||||
int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe, uint8_t beamforming_mode);
|
||||
|
||||
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe);
|
||||
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol);
|
||||
int adjust_G2(int Ncp, int frame_type, int N_RB_DL, uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol);
|
||||
|
||||
|
||||
#ifndef modOrder
|
||||
|
||||
@@ -700,7 +700,51 @@ int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
|
||||
|
||||
int find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_type_t type);
|
||||
|
||||
uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset);
|
||||
static inline uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset)
|
||||
{
|
||||
int32_t n;
|
||||
|
||||
// 3GPP 3x.211
|
||||
// Nc = 1600
|
||||
// c(n) = [x1(n+Nc) + x2(n+Nc)]mod2
|
||||
// x1(n+31) = [x1(n+3) + x1(n)]mod2
|
||||
// x2(n+31) = [x2(n+3) + x2(n+2) + x2(n+1) + x2(n)]mod2
|
||||
if (reset)
|
||||
{
|
||||
// Init value for x1: x1(0) = 1, x1(n) = 0, n=1,2,...,30
|
||||
// x1(31) = [x1(3) + x1(0)]mod2 = 1
|
||||
*x1 = 1 + (1U<<31);
|
||||
// Init value for x2: cinit = sum_{i=0}^30 x2*2^i
|
||||
// x2(31) = [x2(3) + x2(2) + x2(1) + x2(0)]mod2
|
||||
// = (*x2>>3) ^ (*x2>>2) + (*x2>>1) + *x2
|
||||
*x2 = *x2 ^ ((*x2 ^ (*x2>>1) ^ (*x2>>2) ^ (*x2>>3))<<31);
|
||||
|
||||
// x1 and x2 contain bits n = 0,1,...,31
|
||||
|
||||
// Nc = 1600 bits are skipped at the beginning
|
||||
// i.e., 1600 / 32 = 50 32bit words
|
||||
|
||||
for (n = 1; n < 50; n++)
|
||||
{
|
||||
// Compute x1(0),...,x1(27)
|
||||
*x1 = (*x1>>1) ^ (*x1>>4);
|
||||
// Compute x1(28),..,x1(31) and xor
|
||||
*x1 = *x1 ^ (*x1<<31) ^ (*x1<<28);
|
||||
// Compute x2(0),...,x2(27)
|
||||
*x2 = (*x2>>1) ^ (*x2>>2) ^ (*x2>>3) ^ (*x2>>4);
|
||||
// Compute x2(28),..,x2(31) and xor
|
||||
*x2 = *x2 ^ (*x2<<31) ^ (*x2<<30) ^ (*x2<<29) ^ (*x2<<28);
|
||||
}
|
||||
}
|
||||
|
||||
*x1 = (*x1>>1) ^ (*x1>>4);
|
||||
*x1 = *x1 ^ (*x1<<31) ^ (*x1<<28);
|
||||
*x2 = (*x2>>1) ^ (*x2>>2) ^ (*x2>>3) ^ (*x2>>4);
|
||||
*x2 = *x2 ^ (*x2<<31) ^ (*x2<<30) ^ (*x2<<29) ^ (*x2<<28);
|
||||
|
||||
// c(n) = [x1(n+Nc) + x2(n+Nc)]mod2
|
||||
return(*x1^*x2);
|
||||
}
|
||||
|
||||
|
||||
/**@}*/
|
||||
|
||||
@@ -1293,7 +1293,7 @@ void compute_llr_offset(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
granted_re = nb_rb_alloc * (12-crs_re);
|
||||
pbch_pss_sss_re = adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,dlsch0_harq->Qm,subframe,symbol);
|
||||
pbch_pss_sss_re = adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,dlsch0_harq->Qm,subframe,symbol);
|
||||
pbch_pss_sss_re = (double)pbch_pss_sss_re * ((double)(12-crs_re)/12);
|
||||
data_re = granted_re - pbch_pss_sss_re;
|
||||
llr_offset = data_re * dlsch0_harq->Qm * 2;
|
||||
|
||||
@@ -837,7 +837,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
symbol,
|
||||
first_symbol_flag,
|
||||
nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
beamforming_mode);
|
||||
} else if (codeword_TB0 == -1) {
|
||||
dlsch_qpsk_llr(frame_parms,
|
||||
@@ -846,7 +846,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
symbol,
|
||||
first_symbol_flag,
|
||||
nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
beamforming_mode);
|
||||
} else if (rx_type >= rx_IC_single_stream) {
|
||||
if (dlsch1_harq->Qm == 2) {
|
||||
@@ -856,7 +856,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -866,7 +866,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
}
|
||||
} else if (dlsch1_harq->Qm == 4) {
|
||||
@@ -877,7 +877,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -888,7 +888,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
}
|
||||
} else {
|
||||
@@ -899,7 +899,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -910,7 +910,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
}
|
||||
}
|
||||
@@ -925,7 +925,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128,
|
||||
beamforming_mode);
|
||||
} else if (codeword_TB0 == -1) {
|
||||
@@ -934,7 +934,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream,
|
||||
beamforming_mode);
|
||||
} else if (rx_type >= rx_IC_single_stream) {
|
||||
@@ -946,7 +946,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -957,7 +957,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
}
|
||||
} else if (dlsch1_harq->Qm == 4) {
|
||||
@@ -969,7 +969,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -981,7 +981,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
}
|
||||
} else {
|
||||
@@ -993,7 +993,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -1005,7 +1005,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
}
|
||||
}
|
||||
@@ -1021,7 +1021,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
pdsch_vars[eNB_id]->dl_ch_magb0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
beamforming_mode);
|
||||
} else if (codeword_TB0 == -1) {
|
||||
@@ -1031,7 +1031,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
pdsch_vars[eNB_id]->dl_ch_magb0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
beamforming_mode);
|
||||
} else if (rx_type >= rx_IC_single_stream) {
|
||||
@@ -1043,7 +1043,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -1054,7 +1054,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
}
|
||||
} else if (dlsch1_harq->Qm == 4) {
|
||||
@@ -1066,7 +1066,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -1078,7 +1078,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
pdsch_vars[eNB_id]->llr[1],
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128_2ndstream);
|
||||
}
|
||||
} else {
|
||||
@@ -1090,7 +1090,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext,
|
||||
(int16_t *)pllr_symbol_cw0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol]);
|
||||
|
||||
if (rx_type==rx_IC_dual_stream) {
|
||||
@@ -1102,7 +1102,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
|
||||
(int16_t *)pllr_symbol_cw1,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch1_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol]);
|
||||
}
|
||||
}
|
||||
@@ -1124,7 +1124,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->rxdataF_comp0,
|
||||
(int16_t *)pllr_symbol_cw0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
|
||||
beamforming_mode);
|
||||
}
|
||||
|
||||
@@ -1137,7 +1137,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->llr[0],
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr128,
|
||||
beamforming_mode);
|
||||
}
|
||||
@@ -1152,7 +1152,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pdsch_vars[eNB_id]->dl_ch_mag0,
|
||||
pdsch_vars[eNB_id]->dl_ch_magb0,
|
||||
symbol,first_symbol_flag,nb_rb,
|
||||
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
beamforming_mode);
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
amp_tmp=amp_tmp<<1; // to compensate for >> 1 shift in modulation
|
||||
|
||||
|
||||
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,2,subframe,symbol);
|
||||
pbch_pss_sss_adjust=adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL ,&rb_alloc,2,subframe,symbol);
|
||||
|
||||
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
||||
if (frame_parms->nb_antenna_ports_eNB!=1)
|
||||
@@ -981,7 +981,7 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,4,subframe,symbol);
|
||||
pbch_pss_sss_adjust=adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,&rb_alloc,4,subframe,symbol);
|
||||
|
||||
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
||||
amp_tmp=0x1fff;//dlsch0->sqrt_rho_b; already taken into account
|
||||
@@ -1281,7 +1281,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,6,subframe,symbol);
|
||||
pbch_pss_sss_adjust=adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,&rb_alloc,6,subframe,symbol);
|
||||
|
||||
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
||||
amp_tmp = 0x1fff;//dlsch0->sqrt_rho_b; already taken into account
|
||||
|
||||
@@ -336,8 +336,8 @@ void generate_pucch1x(int32_t **txdataF,
|
||||
|
||||
|
||||
|
||||
inline void pucch2x_scrambling(LTE_DL_FRAME_PARMS *fp,int subframe,uint16_t rnti,uint32_t B,uint8_t *btilde) __attribute__((always_inline));
|
||||
inline void pucch2x_scrambling(LTE_DL_FRAME_PARMS *fp,int subframe,uint16_t rnti,uint32_t B,uint8_t *btilde) {
|
||||
static inline void pucch2x_scrambling(LTE_DL_FRAME_PARMS *fp,int subframe,uint16_t rnti,uint32_t B,uint8_t *btilde) __attribute__((always_inline));
|
||||
static inline void pucch2x_scrambling(LTE_DL_FRAME_PARMS *fp,int subframe,uint16_t rnti,uint32_t B,uint8_t *btilde) {
|
||||
|
||||
uint32_t x1, x2, s=0;
|
||||
int i;
|
||||
|
||||
@@ -1303,7 +1303,7 @@ uint32_t conv_nprb(uint8_t ra_header,uint32_t rb_alloc,int N_RB_DL);
|
||||
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe, uint8_t beamforming_mode);
|
||||
|
||||
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe);
|
||||
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol);
|
||||
|
||||
|
||||
|
||||
#ifndef modOrder
|
||||
|
||||
@@ -180,13 +180,15 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
|
||||
/// CRC, coding, interleaving and rate matching
|
||||
AssertFatal(harq->pdu!=NULL,"harq->pdu is null\n");
|
||||
unsigned char output[rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS] __attribute__((aligned(32)));
|
||||
bzero(output,rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS);
|
||||
start_meas(dlsch_encoding_stats);
|
||||
if (nr_dlsch_encoding(gNB,
|
||||
harq->pdu, frame, slot, dlsch, frame_parms,tinput,tprep,tparity,toutput,
|
||||
dlsch_rate_matching_stats,
|
||||
dlsch_interleaving_stats,
|
||||
dlsch_segmentation_stats) == -1)
|
||||
return;
|
||||
nr_dlsch_encoding(gNB,
|
||||
harq->pdu, frame, slot, dlsch, frame_parms, output,
|
||||
tinput,tprep,tparity,toutput,
|
||||
dlsch_rate_matching_stats,
|
||||
dlsch_interleaving_stats,
|
||||
dlsch_segmentation_stats);
|
||||
stop_meas(dlsch_encoding_stats);
|
||||
#ifdef DEBUG_DLSCH
|
||||
printf("PDSCH encoding:\nPayload:\n");
|
||||
@@ -198,7 +200,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
printf("\nEncoded payload:\n");
|
||||
for (int i=0; i<encoded_length>>3; i++) {
|
||||
for (int j=0; j<8; j++)
|
||||
printf("%d", harq->f[(i<<3)+j]);
|
||||
printf("%d", output[(i<<3)+j]);
|
||||
printf("\t");
|
||||
}
|
||||
printf("\n");
|
||||
@@ -211,7 +213,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
||||
memset((void*)scrambled_output[q], 0, (encoded_length>>5)*sizeof(uint32_t));
|
||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
||||
nr_pdsch_codeword_scrambling_optim(harq->f,
|
||||
nr_pdsch_codeword_scrambling_optim(output,
|
||||
encoded_length,
|
||||
q,
|
||||
rel15->dataScramblingId,
|
||||
@@ -248,7 +250,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
start_meas(&gNB->dlsch_layer_mapping_stats);
|
||||
/// Layer mapping
|
||||
nr_layer_mapping(mod_symbs,
|
||||
rel15->nrOfLayers,
|
||||
@@ -266,6 +268,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
}
|
||||
#endif
|
||||
|
||||
stop_meas(&gNB->dlsch_layer_mapping_stats);
|
||||
/// Resource mapping
|
||||
|
||||
// Non interleaved VRB to PRB mapping
|
||||
@@ -280,6 +283,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
start_sc, rel15->StartSymbolIndex, rel15->rbSize, nb_re,rel15->nrOfLayers);
|
||||
#endif
|
||||
|
||||
start_meas(&gNB->dlsch_resource_mapping_stats);
|
||||
for (int nl=0; nl<rel15->nrOfLayers; nl++) {
|
||||
|
||||
int dmrs_port = get_dmrs_port(nl,rel15->dmrsPorts);
|
||||
@@ -322,20 +326,13 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
dmrs_idx = (rel15->rbStart+rel15->BWPStart)*4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update l_prime in the case of double DMRS config
|
||||
if ((dmrs_symbol_map & (1 << l))){ //DMRS time occasion
|
||||
if (l==(l_overline+1)) //take into account the double DMRS symbols
|
||||
l_prime = 1;
|
||||
else if (l>(l_overline+1)) {//new DMRS pair
|
||||
l_overline = l;
|
||||
l_prime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// DMRS QPSK modulation
|
||||
if (rel15->dlDmrsSymbPos & (1 << l)) {
|
||||
/// DMRS QPSK modulation
|
||||
nr_modulation(pdsch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
|
||||
|
||||
#ifdef DEBUG_DLSCH
|
||||
@@ -356,73 +353,143 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
ptrs_symbol = is_ptrs_symbol(l,dlPtrsSymPos);
|
||||
if(ptrs_symbol) {
|
||||
/* PTRS QPSK Modulation for each OFDM symbol in a slot */
|
||||
printf("Doing ptrs modulation for symbol %d, n_ptrs %d\n",l,n_ptrs);
|
||||
nr_modulation(pdsch_dmrs[l][0], (n_ptrs<<1), DMRS_MOD_ORDER, mod_ptrs);
|
||||
}
|
||||
}
|
||||
uint16_t k = start_sc;
|
||||
// Loop Over SCs:
|
||||
for (int i=0; i<rel15->rbSize*NR_NB_SC_PER_RB; i++) {
|
||||
/* check if cuurent RE is PTRS RE*/
|
||||
is_ptrs_re=0;
|
||||
/* check for PTRS symbol and set flag for PTRS RE */
|
||||
if(ptrs_symbol){
|
||||
is_ptrs_re = is_ptrs_subcarrier(k,
|
||||
rel15->rnti,
|
||||
nl,
|
||||
rel15->dmrsConfigType,
|
||||
rel15->PTRSFreqDensity,
|
||||
rel15->rbSize,
|
||||
rel15->PTRSReOffset,
|
||||
start_sc,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
}
|
||||
if (ptrs_symbol || dmrs_symbol_map & (1 << l)) {
|
||||
|
||||
/* Map DMRS Symbol */
|
||||
if ( ( dmrs_symbol_map & (1 << l) ) && (k == ((start_sc+get_dmrs_freq_idx(n, k_prime, delta, dmrs_Type))%(frame_parms->ofdm_symbol_size)))) {
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[dmrs_idx<<1]) >> 15;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[(dmrs_idx<<1) + 1]) >> 15;
|
||||
// Loop Over SCs:
|
||||
for (int i=0; i<rel15->rbSize*NR_NB_SC_PER_RB; i++) {
|
||||
/* check if cuurent RE is PTRS RE*/
|
||||
is_ptrs_re = 0;
|
||||
if (ptrs_symbol)
|
||||
is_ptrs_re = is_ptrs_subcarrier(k,
|
||||
rel15->rnti,
|
||||
nl,
|
||||
rel15->dmrsConfigType,
|
||||
rel15->PTRSFreqDensity,
|
||||
rel15->rbSize,
|
||||
rel15->PTRSReOffset,
|
||||
start_sc,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
/* Map DMRS Symbol */
|
||||
if ( (dmrs_symbol_map & (1 << l)) &&
|
||||
(k == ((start_sc+get_dmrs_freq_idx(n, k_prime, delta, dmrs_Type))%(frame_parms->ofdm_symbol_size)))) {
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[dmrs_idx<<1]) >> 15;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[(dmrs_idx<<1) + 1]) >> 15;
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("dmrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
|
||||
dmrs_idx, l, k, k_prime, n, txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
printf("dmrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
|
||||
dmrs_idx, l, k, k_prime, n, txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
#endif
|
||||
dmrs_idx++;
|
||||
k_prime++;
|
||||
k_prime&=1;
|
||||
n+=(k_prime)?0:1;
|
||||
}
|
||||
/* Map PTRS Symbol */
|
||||
else if(is_ptrs_re){
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[ptrs_idx<<1]) >> 15;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[(ptrs_idx<<1) + 1])>> 15;
|
||||
dmrs_idx++;
|
||||
k_prime++;
|
||||
k_prime&=1;
|
||||
n+=(k_prime)?0:1;
|
||||
}
|
||||
else if(is_ptrs_re){
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[ptrs_idx<<1]) >> 15;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[(ptrs_idx<<1) + 1])>> 15;
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("ptrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
|
||||
ptrs_idx, l, k, k_prime, n, ((int16_t*)txdataF_precoding[nl])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
((int16_t*)txdataF_precoding[nl])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
printf("ptrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d, mod_ptrs: %d %d\n",
|
||||
ptrs_idx, l, k, k_prime, n, ((int16_t*)txdataF_precoding[nl])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
((int16_t*)txdataF_precoding[nl])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)],mod_ptrs[ptrs_idx<<1],mod_ptrs[(ptrs_idx<<1)+1]);
|
||||
#endif
|
||||
ptrs_idx++;
|
||||
}
|
||||
ptrs_idx++;
|
||||
}
|
||||
/* Map DATA Symbol */
|
||||
else if( (!(dmrs_symbol_map & (1 << l))) || allowed_xlsch_re_in_dmrs_symbol(k,start_sc,frame_parms->ofdm_symbol_size,rel15->numDmrsCdmGrpsNoData,dmrs_Type)) {
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (amp * tx_layers[nl][m<<1]) >> 15;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (amp * tx_layers[nl][(m<<1) + 1]) >> 15;
|
||||
else if( ptrs_symbol || allowed_xlsch_re_in_dmrs_symbol(k,start_sc,frame_parms->ofdm_symbol_size,rel15->numDmrsCdmGrpsNoData,dmrs_Type)) {
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (amp * tx_layers[nl][m<<1]) >> 15;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (amp * tx_layers[nl][(m<<1) + 1]) >> 15;
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
#endif
|
||||
m++;
|
||||
m++;
|
||||
}
|
||||
/* mute RE */
|
||||
else {
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = 0;
|
||||
}
|
||||
if (++k >= frame_parms->ofdm_symbol_size)
|
||||
k -= frame_parms->ofdm_symbol_size;
|
||||
} //RE loop
|
||||
}
|
||||
else { // no PTRS or DMRS in this symbol
|
||||
// Loop Over SCs:
|
||||
int upper_limit=rel15->rbSize*NR_NB_SC_PER_RB;
|
||||
int remaining_re = 0;
|
||||
if (start_sc + upper_limit > frame_parms->ofdm_symbol_size) {
|
||||
remaining_re = upper_limit + start_sc - frame_parms->ofdm_symbol_size;
|
||||
upper_limit = frame_parms->ofdm_symbol_size - start_sc;
|
||||
}
|
||||
// fix the alignment issues later, use 64-bit SIMD below instead of 128.
|
||||
if (0/*(frame_parms->N_RB_DL&1)==0*/) {
|
||||
__m128i *txF=(__m128i*)&txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size+start_sc+txdataF_offset)<<1)];
|
||||
|
||||
__m128i *txl = (__m128i*)&tx_layers[nl][m<<1];
|
||||
__m128i amp128=_mm_set1_epi16(amp);
|
||||
for (int i=0; i<(upper_limit>>2); i++) {
|
||||
txF[i] = _mm_mulhrs_epi16(amp128,txl[i]);
|
||||
} //RE loop, first part
|
||||
m+=upper_limit;
|
||||
if (remaining_re > 0) {
|
||||
txF = (__m128i*)&txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size+txdataF_offset)<<1)];
|
||||
txl = (__m128i*)&tx_layers[nl][m<<1];
|
||||
for (int i=0; i<(remaining_re>>2); i++) {
|
||||
txF[i] = _mm_mulhrs_epi16(amp128,txl[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* mute RE */
|
||||
else {
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = 0;
|
||||
}
|
||||
if (++k >= frame_parms->ofdm_symbol_size)
|
||||
k -= frame_parms->ofdm_symbol_size;
|
||||
} //RE loop
|
||||
__m64 *txF=(__m64*)&txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size+start_sc+txdataF_offset)<<1)];
|
||||
|
||||
__m64 *txl = (__m64*)&tx_layers[nl][m<<1];
|
||||
__m64 amp64=_mm_set1_pi16(amp);
|
||||
for (int i=0; i<(upper_limit>>1); i++) {
|
||||
|
||||
txF[i] = _mm_mulhrs_pi16(amp64,txl[i]);
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
if ((i&1) > 0)
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, start_sc+(i>>1), txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + start_sc+(i>>1))<<1) + 1 + (2*txdataF_offset)]);
|
||||
#endif
|
||||
/* handle this, mute RE */
|
||||
/*else {
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = 0;
|
||||
}*/
|
||||
} //RE loop, first part
|
||||
m+=upper_limit;
|
||||
if (remaining_re > 0) {
|
||||
txF = (__m64*)&txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size+txdataF_offset)<<1)];
|
||||
txl = (__m64*)&tx_layers[nl][m<<1];
|
||||
for (int i=0; i<(remaining_re>>1); i++) {
|
||||
txF[i] = _mm_mulhrs_pi16(amp64,txl[i]);
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
if ((i&1) > 0)
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, i>>1, txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) + (2*txdataF_offset)],
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + (i>>1))<<1) + 1 + (2*txdataF_offset)]);
|
||||
#endif
|
||||
/* handle this, mute RE */
|
||||
/*else {
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = 0;
|
||||
txdataF_precoding[nl][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = 0;
|
||||
}*/
|
||||
} //RE loop, second part
|
||||
} //
|
||||
m+=remaining_re;
|
||||
} // N_RB_DL even
|
||||
} // no DMRS/PTRS in symbol
|
||||
} // symbol loop
|
||||
}// layer loop
|
||||
stop_meas(&gNB->dlsch_resource_mapping_stats);
|
||||
|
||||
///Layer Precoding and Antenna port mapping
|
||||
// tx_layers 1-8 are mapped on antenna ports 1000-1007
|
||||
@@ -431,7 +498,9 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
// pmi = prgs_list[rbidx/prg_size].pm_idx, rbidx =0,...,rbSize-1
|
||||
// The Precoding matrix:
|
||||
// The Codebook Type I and Type II are not supported yet.
|
||||
// We adopt the precoding matrices of PUSCH for 4 layers.
|
||||
// We`adopt the precoding matrices of PUSCH for 4 layers.
|
||||
start_meas(&gNB->dlsch_precoding_stats);
|
||||
|
||||
for (int ap=0; ap<frame_parms->nb_antennas_tx; ap++) {
|
||||
|
||||
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
|
||||
@@ -506,6 +575,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
} // symbol loop
|
||||
}// port loop
|
||||
|
||||
stop_meas(&gNB->dlsch_precoding_stats);
|
||||
dlsch->slot_tx[slot]=0;
|
||||
|
||||
// TODO: handle precoding
|
||||
|
||||
@@ -43,8 +43,6 @@ void nr_check_time_alloc(uint8_t S, uint8_t L,nfapi_nr_dl_tti_pdsch_pdu_rel15_t
|
||||
|
||||
uint16_t get_RIV(uint16_t rb_start, uint16_t L, uint16_t N_RB);
|
||||
|
||||
uint16_t get_SLIV(uint8_t S, uint8_t L);
|
||||
|
||||
uint8_t nr_get_S(uint8_t row_idx, uint8_t CP, uint8_t time_alloc_type, uint8_t dmrs_typeA_position);
|
||||
|
||||
void nr_get_rbg_parms(NR_BWP_PARMS* bwp, uint8_t config_type);
|
||||
@@ -85,6 +83,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
uint8_t slot,
|
||||
NR_gNB_DLSCH_t *dlsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
unsigned char * output,
|
||||
time_stats_t *tinput,
|
||||
time_stats_t *tprep,
|
||||
time_stats_t *tparity,
|
||||
|
||||
@@ -50,70 +50,47 @@
|
||||
//#define DEBUG_DLSCH_FREE 1
|
||||
|
||||
|
||||
void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr, uint16_t N_RB)
|
||||
{
|
||||
void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr, uint16_t N_RB) {
|
||||
int r;
|
||||
|
||||
NR_gNB_DLSCH_t *dlsch = *dlschptr;
|
||||
|
||||
uint16_t a_segments = MAX_NUM_NR_DLSCH_SEGMENTS; //number of segments to be allocated
|
||||
if (dlsch) {
|
||||
|
||||
if (dlsch) {
|
||||
if (N_RB != 273) {
|
||||
a_segments = a_segments*N_RB;
|
||||
a_segments = a_segments/273 +1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_DLSCH_FREE
|
||||
LOG_D(PHY,"Freeing dlsch %p\n",dlsch);
|
||||
#endif
|
||||
NR_DL_gNB_HARQ_t *harq = &dlsch->harq_process;
|
||||
|
||||
if (harq->b) {
|
||||
free16(harq->b, a_segments * 1056);
|
||||
harq->b = NULL;
|
||||
#ifdef DEBUG_DLSCH_FREE
|
||||
LOG_D(PHY, "Freeing harq->b (%p)\n", harq->b);
|
||||
#endif
|
||||
|
||||
if (harq->e) {
|
||||
free16(harq->e, 14 * N_RB * 12 * 8);
|
||||
harq->e = NULL;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DLSCH_FREE
|
||||
printf("Freeing dlsch process %d e (%p)\n", i, harq->e);
|
||||
LOG_D(PHY, "Freeing dlsch process %d c (%p)\n", i, harq->c);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (harq->f) {
|
||||
free16(harq->f, 14 * N_RB * 12 * 8);
|
||||
harq->f = NULL;
|
||||
|
||||
for (r = 0; r < a_segments; r++) {
|
||||
#ifdef DEBUG_DLSCH_FREE
|
||||
printf("Freeing dlsch process %d f (%p)\n", i, harq->f);
|
||||
LOG_D(PHY, "Freeing dlsch process %d c[%d] (%p)\n", i, r, harq->c[r]);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DLSCH_FREE
|
||||
LOG_D(PHY, "Freeing dlsch process %d c (%p)\n", i, harq->c);
|
||||
#endif
|
||||
|
||||
for (r = 0; r < a_segments; r++) {
|
||||
#ifdef DEBUG_DLSCH_FREE
|
||||
LOG_D(PHY, "Freeing dlsch process %d c[%d] (%p)\n", i, r, harq->c[r]);
|
||||
#endif
|
||||
|
||||
if (harq->c[r]) {
|
||||
free16(harq->c[r], 1056);
|
||||
harq->c[r] = NULL;
|
||||
}
|
||||
if (harq->d[r]) {
|
||||
free16(harq->d[r], 3 * 8448);
|
||||
harq->d[r] = NULL;
|
||||
}
|
||||
|
||||
if (harq->c[r]) {
|
||||
free16(harq->c[r], 1056);
|
||||
harq->c[r] = NULL;
|
||||
}
|
||||
}
|
||||
free16(dlsch, sizeof(NR_gNB_DLSCH_t));
|
||||
*dlschptr = NULL;
|
||||
}
|
||||
|
||||
free16(dlsch, sizeof(NR_gNB_DLSCH_t));
|
||||
*dlschptr = NULL;
|
||||
}
|
||||
|
||||
NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
@@ -121,8 +98,7 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char Mdlharq,
|
||||
uint32_t Nsoft,
|
||||
uint8_t abstraction_flag,
|
||||
uint16_t N_RB)
|
||||
{
|
||||
uint16_t N_RB) {
|
||||
unsigned char i,r,aa,layer;
|
||||
int re;
|
||||
uint16_t a_segments = MAX_NUM_NR_DLSCH_SEGMENTS; //number of segments to be allocated
|
||||
@@ -133,10 +109,8 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
uint16_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||
|
||||
NR_gNB_DLSCH_t *dlsch = malloc16(sizeof(NR_gNB_DLSCH_t));
|
||||
AssertFatal(dlsch, "cannot allocate dlsch\n");
|
||||
|
||||
bzero(dlsch,sizeof(NR_gNB_DLSCH_t));
|
||||
dlsch->Kmimo = Kmimo;
|
||||
dlsch->Mdlharq = Mdlharq;
|
||||
@@ -144,11 +118,12 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
dlsch->Nsoft = Nsoft;
|
||||
|
||||
for (layer=0; layer<NR_MAX_NB_LAYERS; layer++) {
|
||||
dlsch->ue_spec_bf_weights[layer] = (int32_t**)malloc16(64*sizeof(int32_t*));
|
||||
dlsch->ue_spec_bf_weights[layer] = (int32_t **)malloc16(64*sizeof(int32_t *));
|
||||
|
||||
for (aa=0; aa<64; aa++) {
|
||||
dlsch->ue_spec_bf_weights[layer][aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
||||
for (re=0;re<OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; re++) {
|
||||
|
||||
for (re=0; re<OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; re++) {
|
||||
dlsch->ue_spec_bf_weights[layer][aa][re] = 0x00007fff;
|
||||
}
|
||||
}
|
||||
@@ -160,7 +135,8 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
for (int q=0; q<NR_MAX_NB_CODEWORDS; q++)
|
||||
dlsch->mod_symbs[q] = (int32_t *)malloc16(NR_MAX_PDSCH_ENCODED_LENGTH*sizeof(int32_t));
|
||||
|
||||
dlsch->calib_dl_ch_estimates = (int32_t**)malloc16(64*sizeof(int32_t*));
|
||||
dlsch->calib_dl_ch_estimates = (int32_t **)malloc16(64*sizeof(int32_t *));
|
||||
|
||||
for (aa=0; aa<64; aa++) {
|
||||
dlsch->calib_dl_ch_estimates[aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
||||
}
|
||||
@@ -172,7 +148,6 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
NR_DL_gNB_HARQ_t *harq = &dlsch->harq_process;
|
||||
bzero(harq, sizeof(NR_DL_gNB_HARQ_t));
|
||||
|
||||
harq->b = malloc16(dlsch_bytes);
|
||||
AssertFatal(harq->b, "cannot allocate memory for harq->b\n");
|
||||
harq->pdu = malloc16(dlsch_bytes);
|
||||
@@ -188,71 +163,33 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
||||
// In section 5.3.2 in 38.212, the for loop is up to N + 2*Zc (maximum size of N is 66*Zc, therefore 68*Zc)
|
||||
harq->c[r] = malloc16(8448);
|
||||
AssertFatal(harq->c[r], "cannot allocate harq->c[%d]\n", r);
|
||||
harq->d[r] = malloc16(68 * 384);
|
||||
AssertFatal(harq->d[r], "cannot allocate harq->d[%d]\n", r); // max size for coded output
|
||||
bzero(harq->c[r], 8448);
|
||||
bzero(harq->d[r], (3 * 8448));
|
||||
}
|
||||
|
||||
harq->e = malloc16(N_RB * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS);
|
||||
AssertFatal(harq->e, "cannot allocate harq->e\n");
|
||||
bzero(harq->e, N_RB * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS);
|
||||
harq->f = malloc16(N_RB * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS);
|
||||
AssertFatal(harq->f, "cannot allocate harq->f\n");
|
||||
bzero(harq->f, N_RB * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS);
|
||||
|
||||
return(dlsch);
|
||||
}
|
||||
|
||||
void clean_gNB_dlsch(NR_gNB_DLSCH_t *dlsch)
|
||||
{
|
||||
|
||||
unsigned char Mdlharq;
|
||||
unsigned char i,j,r;
|
||||
|
||||
void clean_gNB_dlsch(NR_gNB_DLSCH_t *dlsch) {
|
||||
AssertFatal(dlsch!=NULL,"dlsch is null\n");
|
||||
Mdlharq = dlsch->Mdlharq;
|
||||
unsigned char Mdlharq = dlsch->Mdlharq;
|
||||
dlsch->rnti = 0;
|
||||
dlsch->active = 0;
|
||||
NR_DL_gNB_HARQ_t *harq=&dlsch->harq_process;
|
||||
|
||||
for (i=0; i<10; i++) {
|
||||
for (int i=0; i<10; i++) {
|
||||
dlsch->harq_ids[0][i] = Mdlharq;
|
||||
dlsch->harq_ids[1][i] = Mdlharq;
|
||||
}
|
||||
for (i=0; i<Mdlharq; i++) {
|
||||
for (j=0; j<96; j++)
|
||||
for (r=0; r<MAX_NUM_NR_DLSCH_SEGMENTS; r++)
|
||||
if (harq->d[r])
|
||||
harq->d[r][j] = NR_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
unsigned char *a,
|
||||
int frame,
|
||||
uint8_t slot,
|
||||
NR_gNB_DLSCH_t *dlsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
time_stats_t *tinput,time_stats_t *tprep,time_stats_t *tparity,time_stats_t *toutput,
|
||||
time_stats_t *dlsch_rate_matching_stats,time_stats_t *dlsch_interleaving_stats,
|
||||
time_stats_t *dlsch_segmentation_stats)
|
||||
{
|
||||
|
||||
unsigned int G;
|
||||
unsigned int crc=1;
|
||||
NR_DL_gNB_HARQ_t *harq = &dlsch->harq_process;
|
||||
void ldpc8blocks( void *p) {
|
||||
encoder_implemparams_t *impp=(encoder_implemparams_t *) p;
|
||||
NR_DL_gNB_HARQ_t *harq = (NR_DL_gNB_HARQ_t *)impp->harq;
|
||||
uint16_t Kr= impp->K;
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &harq->pdsch_pdu.pdsch_pdu_rel15;
|
||||
uint8_t mod_order = rel15->qamModOrder[0];
|
||||
uint16_t nb_rb = rel15->rbSize;
|
||||
uint8_t nb_symb_sch = rel15->NrOfSymbols;
|
||||
uint32_t A, Kb, F=0;
|
||||
uint32_t *Zc = &dlsch->harq_process.Z;
|
||||
uint8_t mod_order = rel15->qamModOrder[0];
|
||||
uint16_t Kr=0,r;
|
||||
uint32_t r_offset=0;
|
||||
uint32_t E;
|
||||
uint8_t Ilbrm = 1;
|
||||
uint32_t Tbslbrm = 950984; //max tbs
|
||||
uint16_t length_dmrs = get_num_dmrs(rel15->dlDmrsSymbPos);
|
||||
uint32_t A = rel15->TBSize[0]<<3;
|
||||
uint8_t nb_re_dmrs;
|
||||
|
||||
if (rel15->dmrsConfigType==NFAPI_NR_DMRS_TYPE1)
|
||||
@@ -260,24 +197,115 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
else
|
||||
nb_re_dmrs = 4*rel15->numDmrsCdmGrpsNoData;
|
||||
|
||||
uint16_t length_dmrs = get_num_dmrs(rel15->dlDmrsSymbPos);
|
||||
uint16_t R=rel15->targetCodeRate[0];
|
||||
unsigned int G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,rel15->nrOfLayers);
|
||||
LOG_D(PHY,"dlsch coding A %d Kr %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d)\n",
|
||||
A,impp->K,G, nb_rb,nb_symb_sch,nb_re_dmrs,length_dmrs,(int)mod_order);
|
||||
// nrLDPC_encoder output is in "d"
|
||||
// let's make this interface happy!
|
||||
uint8_t tmp[8][68 * 384]__attribute__((aligned(32)));
|
||||
for (int rr=impp->macro_num*8, i=0; rr < impp->n_segments && rr < (impp->macro_num+1)*8; rr++,i++ )
|
||||
impp->d[rr]=tmp[i];
|
||||
nrLDPC_encoder(harq->c,impp->d,*impp->Zc, impp->Kb,Kr,impp->BG,impp);
|
||||
// Compute where to place in output buffer that is concatenation of all segments
|
||||
uint32_t r_offset=0;
|
||||
for (int i=0; i < impp->macro_num*8; i++ )
|
||||
r_offset+=nr_get_E(G, impp->n_segments, mod_order, rel15->nrOfLayers, i);
|
||||
for (int rr=impp->macro_num*8; rr < impp->n_segments && rr < (impp->macro_num+1)*8; rr++ ) {
|
||||
if (impp->F>0) {
|
||||
// writing into positions d[r][k-2Zc] as in clause 5.3.2 step 2) in 38.212
|
||||
memset(&impp->d[rr][Kr-impp->F-2*(*impp->Zc)], impp->F, NR_NULL);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
LOG_D(PHY,"rvidx in encoding = %d\n", rel15->rvIndex[0]);
|
||||
#endif
|
||||
uint32_t E = nr_get_E(G, impp->n_segments, mod_order, rel15->nrOfLayers, rr);
|
||||
//#ifdef DEBUG_DLSCH_CODING
|
||||
LOG_D(NR_PHY,"Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Filler bits %d, Filler offset %d mod_order %d, nb_rb %d)...\n",
|
||||
rr,
|
||||
impp->n_segments,
|
||||
G,
|
||||
E,
|
||||
impp->F,
|
||||
Kr-impp->F-2*(*impp->Zc),
|
||||
mod_order,nb_rb);
|
||||
// for tbslbrm calculation according to 5.4.2.1 of 38.212
|
||||
uint8_t Nl = 4;
|
||||
|
||||
if (rel15->nrOfLayers < Nl)
|
||||
Nl = rel15->nrOfLayers;
|
||||
|
||||
uint32_t Tbslbrm = nr_compute_tbslbrm(rel15->mcsTable[0],nb_rb,Nl);
|
||||
uint8_t Ilbrm = 1;
|
||||
|
||||
uint8_t e[E];
|
||||
bzero (e, E);
|
||||
nr_rate_matching_ldpc(Ilbrm,
|
||||
Tbslbrm,
|
||||
impp->BG,
|
||||
*impp->Zc,
|
||||
impp->d[rr],
|
||||
e,
|
||||
impp->n_segments,
|
||||
impp->F,
|
||||
Kr-impp->F-2*(*impp->Zc),
|
||||
rel15->rvIndex[0],
|
||||
E);
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
|
||||
for (int i =0; i<16; i++)
|
||||
printf("output ratematching e[%d]= %d r_offset %u\n", i,harq->e[i+r_offset], r_offset);
|
||||
|
||||
#endif
|
||||
nr_interleaving_ldpc(E,
|
||||
mod_order,
|
||||
e,
|
||||
impp->output+r_offset);
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
|
||||
for (int i =0; i<16; i++)
|
||||
printf("output interleaving f[%d]= %d r_offset %u\n", i,impp->output[i+r_offset], r_offset);
|
||||
|
||||
if (r==impp->n_segments-1)
|
||||
write_output("enc_output.m","enc",impp->output,G,1,4);
|
||||
|
||||
#endif
|
||||
r_offset += E;
|
||||
}
|
||||
}
|
||||
|
||||
int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
unsigned char *a,
|
||||
int frame,
|
||||
uint8_t slot,
|
||||
NR_gNB_DLSCH_t *dlsch,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char * output,
|
||||
time_stats_t *tinput,time_stats_t *tprep,time_stats_t *tparity,time_stats_t *toutput,
|
||||
time_stats_t *dlsch_rate_matching_stats,time_stats_t *dlsch_interleaving_stats,
|
||||
time_stats_t *dlsch_segmentation_stats) {
|
||||
encoder_implemparams_t impp;
|
||||
impp.output=output;
|
||||
unsigned int crc=1;
|
||||
NR_DL_gNB_HARQ_t *harq = &dlsch->harq_process;
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &harq->pdsch_pdu.pdsch_pdu_rel15;
|
||||
impp.Zc = &dlsch->harq_process.Z;
|
||||
float Coderate = 0.0;
|
||||
uint8_t Nl = 4;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
uint32_t A = rel15->TBSize[0]<<3;
|
||||
|
||||
A = rel15->TBSize[0]<<3;
|
||||
if ( dlsch->rnti != SI_RNTI )
|
||||
trace_NRpdu(DIRECTION_DOWNLINK, a, rel15->TBSize[0], 0, WS_C_RNTI, dlsch->rnti, frame, slot,0, 0);
|
||||
trace_NRpdu(DIRECTION_DOWNLINK, a, rel15->TBSize[0], 0, WS_C_RNTI, dlsch->rnti, frame, slot,0, 0);
|
||||
|
||||
NR_gNB_SCH_STATS_t *stats=NULL;
|
||||
int first_free=-1;
|
||||
for (int i=0;i<NUMBER_OF_NR_SCH_STATS_MAX;i++) {
|
||||
|
||||
for (int i=0; i<NUMBER_OF_NR_SCH_STATS_MAX; i++) {
|
||||
if (gNB->dlsch_stats[i].rnti == 0 && first_free == -1) {
|
||||
first_free = i;
|
||||
stats=&gNB->dlsch_stats[i];
|
||||
}
|
||||
|
||||
if (gNB->dlsch_stats[i].rnti == dlsch->rnti) {
|
||||
stats=&gNB->dlsch_stats[i];
|
||||
break;
|
||||
@@ -290,181 +318,94 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
stats->current_RI = rel15->nrOfLayers;
|
||||
stats->current_Qm = rel15->qamModOrder[0];
|
||||
}
|
||||
G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,rel15->nrOfLayers);
|
||||
|
||||
LOG_D(PHY,"dlsch coding A %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d)\n",
|
||||
A,G, nb_rb,nb_symb_sch,nb_re_dmrs,length_dmrs,(int)mod_order);
|
||||
|
||||
if (A > 3824) {
|
||||
// Add 24-bit crc (polynomial A) to payload
|
||||
crc = crc24a(a,A)>>8;
|
||||
a[A>>3] = ((uint8_t*)&crc)[2];
|
||||
a[1+(A>>3)] = ((uint8_t*)&crc)[1];
|
||||
a[2+(A>>3)] = ((uint8_t*)&crc)[0];
|
||||
a[A>>3] = ((uint8_t *)&crc)[2];
|
||||
a[1+(A>>3)] = ((uint8_t *)&crc)[1];
|
||||
a[2+(A>>3)] = ((uint8_t *)&crc)[0];
|
||||
//printf("CRC %x (A %d)\n",crc,A);
|
||||
//printf("a0 %d a1 %d a2 %d\n", a[A>>3], a[1+(A>>3)], a[2+(A>>3)]);
|
||||
|
||||
harq->B = A+24;
|
||||
// harq->b = a;
|
||||
|
||||
AssertFatal((A / 8) + 4 <= MAX_NR_DLSCH_PAYLOAD_BYTES,
|
||||
"A %d is too big (A/8+4 = %d > %d)\n",
|
||||
A,
|
||||
(A / 8) + 4,
|
||||
MAX_NR_DLSCH_PAYLOAD_BYTES);
|
||||
|
||||
memcpy(harq->b, a, (A / 8) + 4); // why is this +4 if the CRC is only 3 bytes?
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Add 16-bit crc (polynomial A) to payload
|
||||
crc = crc16(a,A)>>16;
|
||||
a[A>>3] = ((uint8_t*)&crc)[1];
|
||||
a[1+(A>>3)] = ((uint8_t*)&crc)[0];
|
||||
a[A>>3] = ((uint8_t *)&crc)[1];
|
||||
a[1+(A>>3)] = ((uint8_t *)&crc)[0];
|
||||
//printf("CRC %x (A %d)\n",crc,A);
|
||||
//printf("a0 %d a1 %d \n", a[A>>3], a[1+(A>>3)]);
|
||||
|
||||
harq->B = A+16;
|
||||
// harq->b = a;
|
||||
|
||||
AssertFatal((A / 8) + 3 <= MAX_NR_DLSCH_PAYLOAD_BYTES,
|
||||
"A %d is too big (A/8+3 = %d > %d)\n",
|
||||
A,
|
||||
(A / 8) + 3,
|
||||
MAX_NR_DLSCH_PAYLOAD_BYTES);
|
||||
|
||||
memcpy(harq->b, a, (A / 8) + 3); // using 3 bytes to mimic the case of 24 bit crc
|
||||
}
|
||||
if (R<1000)
|
||||
Coderate = (float) R /(float) 1024;
|
||||
|
||||
if (rel15->targetCodeRate[0]<1000)
|
||||
Coderate = (float)rel15->targetCodeRate[0] /(float) 1024;
|
||||
else // to scale for mcs 20 and 26 in table 5.1.3.1-2 which are decimal and input 2* in nr_tbs_tools
|
||||
Coderate = (float) R /(float) 2048;
|
||||
Coderate = (float)rel15->targetCodeRate[0] /(float) 2048;
|
||||
|
||||
if ((A <=292) || ((A<=3824) && (Coderate <= 0.6667)) || Coderate <= 0.25)
|
||||
harq->BG = 2;
|
||||
impp.BG = 2;
|
||||
else
|
||||
harq->BG = 1;
|
||||
impp.BG = 1;
|
||||
|
||||
start_meas(dlsch_segmentation_stats);
|
||||
Kb = nr_segmentation(harq->b, harq->c, harq->B, &harq->C, &harq->K, Zc, &harq->F, harq->BG);
|
||||
impp.Kb = nr_segmentation(harq->b, harq->c, harq->B, &impp.n_segments, &impp.K, impp.Zc, &impp.F, impp.BG);
|
||||
stop_meas(dlsch_segmentation_stats);
|
||||
F = harq->F;
|
||||
|
||||
Kr = harq->K;
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
uint16_t Kr_bytes;
|
||||
Kr_bytes = Kr>>3;
|
||||
#endif
|
||||
|
||||
//printf("segment Z %d k %d Kr %d BG %d C %d\n", *Zc,harq->K,Kr,BG,harq->C);
|
||||
|
||||
for (r=0; r<harq->C; r++) {
|
||||
for (int r=0; r<impp.n_segments; r++) {
|
||||
//d_tmp[r] = &harq->d[r][0];
|
||||
//channel_input[r] = &harq->d[r][0];
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
LOG_D(PHY,"Encoder: B %d F %d \n",harq->B, harq->F);
|
||||
LOG_D(PHY,"start ldpc encoder segment %d/%d\n",r,harq->C);
|
||||
LOG_D(PHY,"Encoder: B %d F %d \n",harq->B, impp->F);
|
||||
LOG_D(PHY,"start ldpc encoder segment %d/%d\n",r,impp.n_segments);
|
||||
LOG_D(PHY,"input %d %d %d %d %d \n", harq->c[r][0], harq->c[r][1], harq->c[r][2],harq->c[r][3], harq->c[r][4]);
|
||||
for (int cnt =0 ; cnt < 22*(*Zc)/8; cnt ++){
|
||||
|
||||
for (int cnt =0 ; cnt < 22*(*Zc)/8; cnt ++) {
|
||||
LOG_D(PHY,"%d ", harq->c[r][cnt]);
|
||||
}
|
||||
LOG_D(PHY,"\n");
|
||||
|
||||
LOG_D(PHY,"\n");
|
||||
#endif
|
||||
//ldpc_encoder_orig((unsigned char*)harq->c[r],harq->d[r],*Zc,Kb,Kr,BG,0);
|
||||
//ldpc_encoder_optim((unsigned char*)harq->c[r],(unsigned char*)&harq->d[r][0],*Zc,Kb,Kr,BG,NULL,NULL,NULL,NULL);
|
||||
}
|
||||
encoder_implemparams_t impp;
|
||||
impp.n_segments=harq->C;
|
||||
|
||||
impp.tprep = tprep;
|
||||
impp.tinput = tinput;
|
||||
impp.tparity = tparity;
|
||||
impp.toutput = toutput;
|
||||
|
||||
for(int j=0;j<(harq->C/8+1);j++) {
|
||||
impp.macro_num=j;
|
||||
nrLDPC_encoder(harq->c,harq->d,*Zc,Kb,Kr,harq->BG,&impp);
|
||||
impp.harq=harq;
|
||||
notifiedFIFO_t nf;
|
||||
initNotifiedFIFO(&nf);
|
||||
int nbJobs=0;
|
||||
for(int j=0; j<(impp.n_segments/8+((impp.n_segments&7)==0 ? 0 : 1)); j++) {
|
||||
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(impp), j, &nf, ldpc8blocks);
|
||||
encoder_implemparams_t* perJobImpp=(encoder_implemparams_t*)NotifiedFifoData(req);
|
||||
*perJobImpp=impp;
|
||||
perJobImpp->macro_num=j;
|
||||
pushTpool(gNB->threadPool,req);
|
||||
nbJobs++;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
write_output("enc_input0.m","enc_in0",&harq->c[0][0],Kr_bytes,1,4);
|
||||
write_output("enc_output0.m","enc0",&harq->d[0][0],(3*8*Kr_bytes)+12,1,4);
|
||||
#endif
|
||||
|
||||
F = harq->F;
|
||||
|
||||
Kr = harq->K;
|
||||
for (r=0; r<harq->C; r++) {
|
||||
|
||||
if (F>0) {
|
||||
for (int k=(Kr-F-2*(*Zc)); k<Kr-2*(*Zc); k++) {
|
||||
// writing into positions d[r][k-2Zc] as in clause 5.3.2 step 2) in 38.212
|
||||
harq->d[r][k] = NR_NULL;
|
||||
//if (k<(Kr-F+8))
|
||||
//printf("r %d filler bits [%d] = %d \n", r,k, harq->d[r][k]);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
LOG_D(PHY,"rvidx in encoding = %d\n", rel15->rvIndex[0]);
|
||||
#endif
|
||||
|
||||
E = nr_get_E(G, harq->C, mod_order, rel15->nrOfLayers, r);
|
||||
|
||||
//#ifdef DEBUG_DLSCH_CODING
|
||||
LOG_D(NR_PHY,"Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Filler bits %d, Filler offset %d mod_order %d, nb_rb %d)...\n",
|
||||
r,
|
||||
harq->C,
|
||||
G,
|
||||
E,
|
||||
F,
|
||||
Kr-F-2*(*Zc),
|
||||
mod_order,nb_rb);
|
||||
|
||||
// for tbslbrm calculation according to 5.4.2.1 of 38.212
|
||||
if (rel15->nrOfLayers < Nl)
|
||||
Nl = rel15->nrOfLayers;
|
||||
|
||||
Tbslbrm = nr_compute_tbslbrm(rel15->mcsTable[0],nb_rb,Nl);
|
||||
|
||||
start_meas(dlsch_rate_matching_stats);
|
||||
if (nr_rate_matching_ldpc(Ilbrm,
|
||||
Tbslbrm,
|
||||
harq->BG,
|
||||
*Zc,
|
||||
harq->d[r],
|
||||
harq->e+r_offset,
|
||||
harq->C,
|
||||
F,
|
||||
Kr-F-2*(*Zc),
|
||||
rel15->rvIndex[0],
|
||||
E) == -1)
|
||||
return -1;
|
||||
|
||||
stop_meas(dlsch_rate_matching_stats);
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
for (int i =0; i<16; i++)
|
||||
printf("output ratematching e[%d]= %d r_offset %u\n", i,harq->e[i+r_offset], r_offset);
|
||||
#endif
|
||||
|
||||
start_meas(dlsch_interleaving_stats);
|
||||
nr_interleaving_ldpc(E,
|
||||
mod_order,
|
||||
harq->e+r_offset,
|
||||
harq->f+r_offset);
|
||||
stop_meas(dlsch_interleaving_stats);
|
||||
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
for (int i =0; i<16; i++)
|
||||
printf("output interleaving f[%d]= %d r_offset %u\n", i,harq->f[i+r_offset], r_offset);
|
||||
|
||||
if (r==harq->C-1)
|
||||
write_output("enc_output.m","enc",harq->f,G,1,4);
|
||||
#endif
|
||||
|
||||
r_offset += E;
|
||||
while(nbJobs) {
|
||||
notifiedFIFO_elt_t *req=pullTpool(&nf, gNB->threadPool);
|
||||
delNotifiedFIFO_elt(req);
|
||||
nbJobs--;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -96,11 +96,6 @@ void nr_get_time_domain_allocation_type(nfapi_nr_config_request_t config,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint16_t get_SLIV(uint8_t S, uint8_t L) {
|
||||
return ( (uint16_t)(((L-1)<=7)? (14*(L-1)+S) : (14*(15-L)+(13-S))) );
|
||||
}
|
||||
|
||||
static inline uint8_t get_K0(uint8_t row_idx, uint8_t time_alloc_type) {
|
||||
return ( (time_alloc_type == NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_A)||
|
||||
(time_alloc_type == NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_C)? 0 :
|
||||
|
||||
@@ -383,7 +383,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d type %d: Pilot/Data extraction %5.2f \n",
|
||||
frame,nr_slot_rx,slot,symbol,type,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d type %d: Pilot/Data extraction %5.2f \n",
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d type %d: Pilot/Data extraction %5.2f \n",
|
||||
frame,nr_slot_rx,slot,symbol,type,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
|
||||
@@ -405,7 +405,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
if (first_symbol_flag==1) {
|
||||
@@ -466,7 +466,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,nr_slot_rx,slot,symbol,first_symbol_flag,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,nr_slot_rx,slot,symbol,first_symbol_flag,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,nr_slot_rx,slot,symbol,first_symbol_flag,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
@@ -518,7 +518,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
|
||||
@@ -577,7 +577,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
/* Store the valid DL RE's */
|
||||
@@ -660,7 +660,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
|
||||
// Please keep it: useful for debugging
|
||||
|
||||
@@ -947,7 +947,7 @@ void nr_dlsch_64qam_llr_SIC(NR_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,6,subframe,symbol);
|
||||
pbch_pss_sss_adjust=adjust_G2(frame_parms->Ncp,frame_parms->frame_type, frame_parms->N_RB_DL,&rb_alloc,6,subframe,symbol);
|
||||
|
||||
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
|
||||
amp_tmp = 0x1fff;//dlsch0->sqrt_rho_b; already taken into account
|
||||
|
||||
@@ -1286,8 +1286,8 @@ uint8_t get_transmission_mode(module_id_t Mod_id, uint8_t CC_id, rnti_t rnti);
|
||||
*/
|
||||
uint32_t conv_nprb(uint8_t ra_header,uint32_t rb_alloc,int N_RB_DL);
|
||||
|
||||
int adjust_G(NR_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe);
|
||||
int adjust_G2(NR_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol);
|
||||
//int adjust_G(NR_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe);
|
||||
//int adjust_G2(NR_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol);
|
||||
|
||||
|
||||
#ifndef modOrder
|
||||
@@ -1313,16 +1313,6 @@ uint8_t I_TBS2I_MCS(uint8_t I_TBS);
|
||||
uint8_t SE2I_TBS(float SE,
|
||||
uint8_t N_PRB,
|
||||
uint8_t symbPerRB);
|
||||
/** \brief This function generates the sounding reference symbol (SRS) for the uplink according to 36.211 v8.6.0. If IFFT_FPGA is defined, the SRS is quantized to a QPSK sequence.
|
||||
@param frame_parms LTE DL Frame Parameters
|
||||
@param soundingrs_ul_config_dedicated Dynamic configuration from RRC during Connection Establishment
|
||||
@param txdataF pointer to the frequency domain TX signal
|
||||
@returns 0 on success*/
|
||||
int generate_srs(NR_DL_FRAME_PARMS *frame_parms,
|
||||
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
|
||||
int *txdataF,
|
||||
int16_t amp,
|
||||
uint32_t subframe);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -1352,12 +1342,6 @@ int32_t generate_drs_pusch(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
uint32_t nb_rb,
|
||||
uint8_t ant);
|
||||
|
||||
/*!
|
||||
\brief This function initializes the Group Hopping, Sequence Hopping and nPRS sequences for PUCCH/PUSCH according to 36.211 v8.6.0. It should be called after configuration of UE (reception of SIB2/3) and initial configuration of eNB (or after reconfiguration of cell-specific parameters).
|
||||
@param frame_parms Pointer to a NR_DL_FRAME_PARMS structure (eNB or UE)*/
|
||||
void init_ul_hopping(NR_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
|
||||
/*!
|
||||
\brief This function implements the initialization of paging parameters for UE (See Section 7, 36.304).It must be called after setting IMSImod1024 during UE startup and after receiving SIB2
|
||||
@param ue Pointer to UE context
|
||||
@@ -1422,8 +1406,6 @@ double sinr_eff_cqi_calc(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
uint8_t sinr2cqi(double sinr,uint8_t trans_mode);
|
||||
|
||||
|
||||
int dump_dci(NR_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci);
|
||||
|
||||
int dump_ue_stats(PHY_VARS_NR_UE *phy_vars_ue, UE_nr_rxtx_proc_t *proc, char* buffer, int length, runmode_t mode, int input_level_dBm);
|
||||
|
||||
void init_transport_channels(uint8_t);
|
||||
@@ -1513,18 +1495,11 @@ int get_nCCE_offset_l1(int *CCE_table,
|
||||
const unsigned short rnti,
|
||||
const unsigned char subframe);
|
||||
|
||||
uint16_t get_nCCE(uint8_t num_pdcch_symbols,NR_DL_FRAME_PARMS *frame_parms,uint8_t mi);
|
||||
|
||||
uint16_t get_nquad(uint8_t num_pdcch_symbols,NR_DL_FRAME_PARMS *frame_parms,uint8_t mi);
|
||||
|
||||
uint8_t get_mi(NR_DL_FRAME_PARMS *frame,uint8_t subframe);
|
||||
//uint8_t get_mi(NR_DL_FRAME_PARMS *frame,uint8_t subframe);
|
||||
|
||||
uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int subframe);
|
||||
|
||||
uint8_t get_num_pdcch_symbols(uint8_t num_dci,DCI_ALLOC_t *dci_alloc,NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
|
||||
|
||||
void pdcch_interleaving(NR_DL_FRAME_PARMS *frame_parms,int32_t **z, int32_t **wbar,uint8_t n_symbols_pdcch,uint8_t mi);
|
||||
|
||||
void nr_pdcch_unscrambling(int16_t *z,
|
||||
uint16_t scrambling_RNTI,
|
||||
uint32_t length,
|
||||
@@ -1539,7 +1514,6 @@ void dlsch_unscrambling(NR_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t q,
|
||||
uint8_t Ns);
|
||||
|
||||
void init_ncs_cell(NR_DL_FRAME_PARMS *frame_parms,uint8_t ncs_cell[20][7]);
|
||||
|
||||
void generate_pucch1x(int32_t **txdataF,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
@@ -1587,7 +1561,7 @@ void init_ulsch_power_LUT(void);
|
||||
@param subframe subframe index to check
|
||||
@returns 0 on success
|
||||
*/
|
||||
int is_prach_subframe(NR_DL_FRAME_PARMS *frame_parms,frame_t frame, uint8_t subframe);
|
||||
//int is_prach_subframe(NR_DL_FRAME_PARMS *frame_parms,frame_t frame, uint8_t subframe);
|
||||
|
||||
/*!
|
||||
\brief Generate PRACH waveform
|
||||
@@ -1653,8 +1627,6 @@ void init_scrambling_lut(void);
|
||||
@param frame_parms Pointer to frame parameters
|
||||
@returns 1 if subframe is for MBSFN
|
||||
*/
|
||||
int is_pmch_subframe(frame_t frame, int subframe, NR_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2ndpilots);
|
||||
|
||||
uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode);
|
||||
@@ -1691,8 +1663,7 @@ uint8_t get_prach_prb_offset(NR_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t n_ra_prboffset,
|
||||
uint8_t tdd_mapindex, uint16_t Nf);
|
||||
|
||||
|
||||
uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset);
|
||||
#include <openair1/PHY/LTE_TRANSPORT/transport_proto.h>
|
||||
|
||||
uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
|
||||
@@ -105,7 +105,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint32_t scrambled_output[NR_MAX_NB_CODEWORDS][NR_MAX_PDSCH_ENCODED_LENGTH>>5];
|
||||
int16_t **tx_layers;
|
||||
int32_t **txdataF;
|
||||
int8_t Wf[2], Wt[2], l_prime[2], delta;
|
||||
int8_t Wf[2], Wt[2];
|
||||
int l_prime[2], delta;
|
||||
uint8_t nb_dmrs_re_per_rb;
|
||||
int ap, i;
|
||||
int sample_offsetF, N_RE_prime;
|
||||
@@ -411,7 +412,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
if (is_dmrs == 1) {
|
||||
// if transform precoding is enabled
|
||||
if (pusch_pdu->transform_precoding == 0) {
|
||||
|
||||
|
||||
((int16_t*)txdataF[ap])[(sample_offsetF)<<1] = (Wt[l_prime[0]]*Wf[k_prime]*AMP*dmrs_seq[2*dmrs_idx]) >> 15;
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1] = (Wt[l_prime[0]]*Wf[k_prime]*AMP*dmrs_seq[(2*dmrs_idx) + 1]) >> 15;
|
||||
|
||||
|
||||
@@ -805,8 +805,8 @@ void nr_generate_pucch1_old(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
#endif //0
|
||||
|
||||
inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,uint64_t *B64,uint8_t *btilde) __attribute__((always_inline));
|
||||
inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,uint64_t *B64,uint8_t *btilde) {
|
||||
static inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,uint64_t *B64,uint8_t *btilde) __attribute__((always_inline));
|
||||
static inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,uint64_t *B64,uint8_t *btilde) {
|
||||
uint32_t x1, x2, s=0;
|
||||
int i;
|
||||
uint8_t c;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user