mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-19 07:30:31 +00:00
Compare commits
4 Commits
ldpc_doc_r
...
ru-comment
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09fea055f4 | ||
|
|
231dab91d9 | ||
|
|
9d5b0df464 | ||
|
|
2cf7ac7908 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@
|
||||
cmake_targets/log/
|
||||
cmake_targets/*/build/
|
||||
cmake_targets/ran_build/
|
||||
cmake_targets/nas_sim_tools/build/
|
||||
log/
|
||||
lte_build_oai/
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ else ()
|
||||
endif()
|
||||
|
||||
# add autotools definitions that were maybe used!
|
||||
add_definitions(-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP)
|
||||
add_definitions("-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP")
|
||||
|
||||
# we need -rdynamic to incorporate all symbols in shared objects, see man page
|
||||
set(commonOpts "-pipe -fPIC -Wall -fno-strict-aliasing -rdynamic")
|
||||
@@ -715,11 +715,6 @@ add_library(NFAPI_LIB ${NFAPI_SRC})
|
||||
target_link_libraries(NFAPI_LIB PUBLIC nfapi_common)
|
||||
target_link_libraries(NFAPI_LIB PUBLIC nr_fapi_p5 nr_fapi_p7)
|
||||
|
||||
if(OAI_WLS)
|
||||
target_compile_definitions(NFAPI_LIB PRIVATE ENABLE_WLS)
|
||||
else()
|
||||
target_compile_definitions(NFAPI_LIB PRIVATE ENABLE_SOCKET)
|
||||
endif()
|
||||
include_directories(${NFAPI_DIR}/nfapi/public_inc)
|
||||
include_directories(${NFAPI_DIR}/nfapi/inc)
|
||||
|
||||
@@ -733,9 +728,6 @@ add_library(NFAPI_PNF_LIB ${NFAPI_PNF_SRC})
|
||||
target_link_libraries(NFAPI_PNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
target_link_libraries(NFAPI_PNF_LIB PUBLIC nr_fapi_p7)
|
||||
|
||||
if(OAI_WLS)
|
||||
target_compile_definitions(NFAPI_PNF_LIB PRIVATE ENABLE_WLS)
|
||||
endif()
|
||||
include_directories(${NFAPI_DIR}/pnf/public_inc)
|
||||
include_directories(${NFAPI_DIR}/pnf/inc)
|
||||
|
||||
@@ -754,9 +746,6 @@ endif()
|
||||
include_directories(${NFAPI_DIR}/vnf/public_inc)
|
||||
include_directories(${NFAPI_DIR}/vnf/inc)
|
||||
|
||||
if(OAI_WLS)
|
||||
target_compile_definitions(NFAPI_VNF_LIB PRIVATE ENABLE_WLS)
|
||||
endif()
|
||||
# nFAPI user defined code
|
||||
#############################
|
||||
set(NFAPI_USER_SRC
|
||||
@@ -766,15 +755,11 @@ set(NFAPI_USER_SRC
|
||||
${NFAPI_USER_DIR}/gnb_ind_vars.c
|
||||
)
|
||||
add_library(NFAPI_USER_LIB ${NFAPI_USER_SRC})
|
||||
if(OAI_WLS)
|
||||
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_WLS)
|
||||
elseif (OAI_AERIAL)
|
||||
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_AERIAL)
|
||||
else()
|
||||
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_SOCKET)
|
||||
endif()
|
||||
target_link_libraries(NFAPI_USER_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs UTIL)
|
||||
target_link_libraries(NFAPI_USER_LIB PRIVATE nr_fapi_p7)
|
||||
if(OAI_AERIAL)
|
||||
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_AERIAL)
|
||||
endif()
|
||||
include_directories(${NFAPI_USER_DIR})
|
||||
|
||||
# Layer 1
|
||||
@@ -848,7 +833,6 @@ set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/get_sin_cos.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/oai_arith_operations.c
|
||||
${OPENAIR1_DIR}/PHY/log_tools.c
|
||||
)
|
||||
|
||||
set(PHY_SRC
|
||||
@@ -1063,7 +1047,7 @@ add_library(PHY_NR_COMMON ${PHY_NR_SRC_COMMON})
|
||||
target_link_libraries(PHY_NR_COMMON PUBLIC UTIL)
|
||||
|
||||
add_library(PHY_NR ${PHY_NR_SRC})
|
||||
target_link_libraries(PHY_NR nr_phy_common nr_common nr_fapi_p5)
|
||||
target_link_libraries(PHY_NR nr_phy_common nr_common)
|
||||
|
||||
add_library(PHY_NR_NO_AVX_256 ${PHY_NR_SRC})
|
||||
target_link_libraries(PHY_NR_NO_AVX_256 nr_phy_common nr_common)
|
||||
@@ -1855,12 +1839,6 @@ target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt sctp)
|
||||
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
add_boolean_option(OAI_WLS OFF "Activate OAI's WLS driver" OFF)
|
||||
if (OAI_WLS)
|
||||
target_link_libraries(nr-softmodem PUBLIC wls_integration_lib)
|
||||
else()
|
||||
target_link_libraries(nr-softmodem PUBLIC nfapi_socket_lib)
|
||||
endif()
|
||||
add_boolean_option(OAI_AERIAL OFF "Activate OAI's AERIAL driver" OFF)
|
||||
if (OAI_AERIAL)
|
||||
target_compile_definitions(nr-softmodem PUBLIC ENABLE_AERIAL)
|
||||
|
||||
@@ -835,13 +835,11 @@ def finalizeSlaveJob(jobName) {
|
||||
selector: lastCompleted())
|
||||
if (fileExists(fileName)) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
|
||||
} else {
|
||||
sh "echo \"could not copy results from ${jobName}, please check pipeline ${BUILD_URL}\" > ${fileName}"
|
||||
archiveArtifacts artifacts: fileName
|
||||
// BUILD_URL is like http://server:port/jenkins/job/foo/15/
|
||||
// no need to add a prefixed '/'
|
||||
artifactUrl += 'artifact/' + fileName
|
||||
}
|
||||
archiveArtifacts artifacts: fileName
|
||||
// BUILD_URL is like http://server:port/jenkins/job/foo/15/
|
||||
// no need to add a prefixed '/'
|
||||
artifactUrl += 'artifact/' + fileName
|
||||
}
|
||||
artifactUrl = "\n * [${jobName}](${artifactUrl})"
|
||||
return artifactUrl
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{
|
||||
#define N_ANTENNA_DL 1
|
||||
#define N_ANTENNA_UL 1
|
||||
#define DL_ARFCN 627360
|
||||
#define DL_ARFCN 631296
|
||||
#define TDD 1
|
||||
|
||||
log_options: "all.level=debug,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
|
||||
@@ -65,9 +65,9 @@ oc-cn5g:
|
||||
Host: avra
|
||||
NetworkScript: echo "inet 172.21.6.102"
|
||||
RunIperf3Server: False
|
||||
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jun oaicicd-core-for-ci-ran"
|
||||
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jun oaicicd-core-for-ci-ran"
|
||||
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jun oaicicd-core-for-ci-ran %%log_dir%%"
|
||||
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
|
||||
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran"
|
||||
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ci-ran %%log_dir%%"
|
||||
|
||||
oc-cn5g-20897:
|
||||
Host: cacofonix
|
||||
@@ -89,8 +89,8 @@ matix-cn5g:
|
||||
Host: matix
|
||||
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
|
||||
RunIperf3Server: False
|
||||
Deploy: "cd /opt/oai-cn5g-fed-v2-jun-2025/docker-compose && python3 ./core-network.py --type start-basic"
|
||||
Undeploy: "cd /opt/oai-cn5g-fed-v2-jun-2025/docker-compose && python3 ./core-network.py --type stop-basic"
|
||||
Deploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type start-basic"
|
||||
Undeploy: "cd /opt/oai-cn5g-fed-v2/docker-compose && python3 ./core-network.py --type stop-basic"
|
||||
LogCollect:
|
||||
- "docker logs oai-smf > %%log_dir%%/oai-smf.log"
|
||||
- "docker logs oai-amf > %%log_dir%%/oai-amf.log"
|
||||
@@ -147,12 +147,12 @@ ltebox-nepes:
|
||||
|
||||
amarisoft_ue:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_20MHz/aw2s-multi-00102-20.cfg &
|
||||
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-00102-20.cfg &
|
||||
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
NetworkScript: ip netns exec ue1 ip a show dev pdn0
|
||||
amarisoft_ue_2x2:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_20MHz_2x2/aw2s-multi-00102-2x2-v2.cfg &
|
||||
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2-v2.cfg &
|
||||
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
NetworkScript: ip netns exec ue1 ip a show dev pdn0
|
||||
amarisoft_ue_fhi72:
|
||||
@@ -301,15 +301,6 @@ rfsim5g_ue:
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue
|
||||
MTU: 1500
|
||||
# for tests with second PDU session ID 2, needs to match requested PDU session name
|
||||
rfsim5g_ue_pdu_2:
|
||||
Host: "%%current_host%%"
|
||||
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue1p2
|
||||
CmdPrefix: docker exec rfsim5g-oai-nr-ue
|
||||
IF: oaitun_ue1p2
|
||||
AttachScript: docker start rfsim5g-oai-nr-ue
|
||||
DetachScript: docker stop rfsim5g-oai-nr-ue
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_ue2:
|
||||
Host: "%%current_host%%"
|
||||
|
||||
@@ -152,6 +152,19 @@ def GetImageName(ssh, svcName, file):
|
||||
else:
|
||||
return ret.stdout.strip()
|
||||
|
||||
def GetServiceHealth(ssh, svcName, file):
|
||||
if svcName is None:
|
||||
return False, f"Service {svcName} not found in {file}"
|
||||
image = GetImageName(ssh, svcName, file)
|
||||
if 'db_init' in svcName or 'db-init' in svcName: # exits with 0, there cannot be healthy
|
||||
return True, f"Service {svcName} healthy, image {image}"
|
||||
for _ in range(8):
|
||||
result = ssh.run(f"docker compose -f {file} ps --format json {svcName} | jq -r 'if type==\"array\" then .[0].Health else .Health end'", silent=True)
|
||||
if result.stdout == 'healthy':
|
||||
return True, f"Service {svcName} healthy, image {image}"
|
||||
time.sleep(5)
|
||||
return False, f"Failed to deploy: service {svcName}"
|
||||
|
||||
def ExistEnvFilePrint(ssh, wd, prompt='env vars in existing'):
|
||||
ret = ssh.run(f'cat {wd}/.env', silent=True, reportNonZero=False)
|
||||
if ret.returncode != 0:
|
||||
@@ -298,6 +311,7 @@ class Containerize():
|
||||
self.yamlPath = ['', '', '']
|
||||
self.services = ['', '', '']
|
||||
self.deploymentTag = ''
|
||||
self.eNB_logFile = ['', '', '']
|
||||
|
||||
self.testCase_id = ''
|
||||
|
||||
@@ -306,6 +320,17 @@ class Containerize():
|
||||
self.dockerfileprefix = ''
|
||||
self.host = ''
|
||||
|
||||
self.deployedContainers = []
|
||||
self.tsharkStarted = False
|
||||
self.pingContName = ''
|
||||
self.pingOptions = ''
|
||||
self.pingLossThreshold = ''
|
||||
self.svrContName = ''
|
||||
self.svrOptions = ''
|
||||
self.cliContName = ''
|
||||
self.cliOptions = ''
|
||||
|
||||
self.imageToCopy = ''
|
||||
#checkers from xml
|
||||
self.ran_checkers={}
|
||||
self.num_attempts = 1
|
||||
@@ -473,10 +498,10 @@ class Containerize():
|
||||
elif image != 'ran-build':
|
||||
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
|
||||
if image == 'oai-gnb-aerial':
|
||||
cmd.run('cp -f /opt/nvidia-ipc/nvipc.src.2025.05.20.tar.gz .')
|
||||
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.*.tar.gz .')
|
||||
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} {option} . > cmake_targets/log/{name}.log 2>&1', timeout=1200)
|
||||
if image == 'oai-gnb-aerial':
|
||||
cmd.run('rm -f nvipc.src.2025.05.20.tar.gz')
|
||||
cmd.run('rm -f nvipc_src.*.tar.gz')
|
||||
if image == 'ran-build' and ret.returncode == 0:
|
||||
cmd.run(f"docker run --name test-log -d {name}:{imageTag} /bin/true")
|
||||
cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/ cmake_targets/log/{name}/")
|
||||
@@ -687,7 +712,7 @@ class Containerize():
|
||||
HTML.CreateHtmlTestRowQueue("Build unit tests", 'OK', [dockerfile])
|
||||
|
||||
# it worked, build and execute tests, and close connection
|
||||
ret = cmd.run(f'docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --rm ran-unittests:{baseTag} ctest --no-label-summary -j$(nproc)')
|
||||
ret = cmd.run(f'docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --rm ran-unittests:{baseTag} ctest --output-on-failure --no-label-summary -j$(nproc)')
|
||||
cmd.run(f'docker rmi ran-unittests:{baseTag}')
|
||||
build_log_name = f'build_log_{self.testCase_id}'
|
||||
CopyLogsToExecutor(cmd, lSourcePath, build_log_name)
|
||||
@@ -847,24 +872,31 @@ class Containerize():
|
||||
if num_attempts <= 0:
|
||||
raise ValueError(f'Invalid value for num_attempts: {num_attempts}, must be greater than 0')
|
||||
for attempt in range(num_attempts):
|
||||
imagesInfo = []
|
||||
healthInfo = []
|
||||
logging.info(f'will start services {services}')
|
||||
status = ssh.run(f'docker compose -f {wd_yaml} up -d --wait --wait-timeout 60 -- {services}')
|
||||
info = ssh.run(f"docker compose -f {wd_yaml} ps --all --format=\'table {{{{.Service}}}} [{{{{.Image}}}}] {{{{.Status}}}}\' -- {services} | column -t")
|
||||
deployed = status.returncode == 0
|
||||
if not deployed:
|
||||
status = ssh.run(f'docker compose -f {wd_yaml} up -d -- {services}')
|
||||
if status.returncode != 0:
|
||||
msg = f'cannot deploy services {services}: {status.stdout}'
|
||||
logging.error(msg)
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'NOK', [msg])
|
||||
return False
|
||||
for svc in services.split():
|
||||
health, msg = GetServiceHealth(ssh, svc, f'{wd_yaml}')
|
||||
logging.info(msg)
|
||||
imagesInfo.append(msg)
|
||||
healthInfo.append(health)
|
||||
deployed = all(healthInfo)
|
||||
if deployed:
|
||||
break
|
||||
if (attempt < num_attempts - 1):
|
||||
warning_msg = (f'Failed to deploy on attempt {attempt}, restart services {services}')
|
||||
elif (attempt < num_attempts - 1):
|
||||
warning_msg = f'Restart services {services}'
|
||||
logging.warning(warning_msg)
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'NOK', [warning_msg])
|
||||
imagesInfo.append(warning_msg)
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'NOK', ['\n'.join(imagesInfo)])
|
||||
for svc in services.split():
|
||||
CopyinServiceLog(ssh, lSourcePath, yaml_dir, svc, wd_yaml, f'{svc}-{HTML.testCase_id}-attempt{attempt}.log')
|
||||
ssh.run(f'docker compose -f {wd_yaml} down -- {services}')
|
||||
imagesInfo = info.stdout.splitlines()[1:]
|
||||
logging.debug(f'{info.stdout.splitlines()[1:]}')
|
||||
if deployed:
|
||||
HTML.CreateHtmlTestRowQueue('N/A', 'OK', ['\n'.join(imagesInfo)])
|
||||
else:
|
||||
|
||||
@@ -30,7 +30,6 @@ import cls_analysis
|
||||
import constants as CONST
|
||||
|
||||
LOG_PATH_PHYSIM = 'phy_sim_logs'
|
||||
DPDK_PATH = '/opt/dpdk-t2-22.11.0'
|
||||
|
||||
class Native():
|
||||
|
||||
@@ -40,7 +39,7 @@ class Native():
|
||||
|
||||
with cls_cmd.getConnection(host) as ssh:
|
||||
base = f"{directory}/cmake_targets"
|
||||
ret = ssh.run(f"C_INCLUDE_PATH={DPDK_PATH}/include/ PKG_CONFIG_PATH={DPDK_PATH}/lib64/pkgconfig/ {base}/build_oai {options} > {base}/log/build_oai.log", timeout=900)
|
||||
ret = ssh.run(f"{base}/build_oai {options} > {base}/log/build_oai.log", timeout=900)
|
||||
success = ret.returncode == 0
|
||||
logs = ssh.run(f"cat {base}/log/build_oai.log", silent=True)
|
||||
logging.debug(f"build finished with code {ret.returncode}, output:\n{logs.stdout}")
|
||||
@@ -74,7 +73,7 @@ class Native():
|
||||
os.system(f'mkdir -p ./{LOG_PATH_PHYSIM}')
|
||||
runLogFile=f'physim_{HTML.testCase_id}.log'
|
||||
with cls_cmd.getConnection(host) as cmd:
|
||||
cmd.run(f'sudo LD_LIBRARY_PATH=.:{DPDK_PATH}/lib64/ {workSpacePath}/ran_build/build/{physim_test} {options} >> {workSpacePath}/{runLogFile}')
|
||||
cmd.run(f'sudo {workSpacePath}/ran_build/build/{physim_test} {options} >> {workSpacePath}/{runLogFile}')
|
||||
cmd.copyin(src=f'{workSpacePath}/{runLogFile}', tgt=f'{LOG_PATH_PHYSIM}/{runLogFile}')
|
||||
success, msg = cls_analysis.Analysis.analyze_physim(f'{LOG_PATH_PHYSIM}/{runLogFile}', physim_test, options, threshold)
|
||||
if success:
|
||||
|
||||
@@ -34,9 +34,11 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
absoluteFrequencySSB = 641280; # GSCN: 7929, Freq: 3619.200 MHz
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 641280;
|
||||
dl_frequencyBand = 78;
|
||||
dl_absoluteFrequencyPointA = 640752; # 3611.280 MHz
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 640008;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -45,12 +47,13 @@ gNBs =
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
initialDLBWPlocationAndBandwidth = 13750; # RBstart=0, L=51 (275*(L-1))+RBstart
|
||||
# this is RBstart=27,L=48 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 10;
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
#uplinkConfigCommon
|
||||
@@ -65,7 +68,7 @@ gNBs =
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 13750; # RBstart=0, L=51 (275*(L-1))+RBstart
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
@@ -149,18 +152,6 @@ gNBs =
|
||||
|
||||
);
|
||||
|
||||
servingCellConfigDedicated = ({
|
||||
dl_bwp-Id_1 = 1;
|
||||
dl_bwp1_locationAndBandwidth = 28875; # RBstart=0, L=106 (275*(L-1))+RBstart
|
||||
dl_bwp1_subcarrierSpacing = 1;
|
||||
firstActiveDownlinkBWP-Id = 1;
|
||||
defaultDownlinkBWP-Id = 1;
|
||||
ul_bwp-Id_1 = 1;
|
||||
ul_bwp1_locationAndBandwidth = 28875; # RBstart=0, L=106 (275*(L-1))+RBstart
|
||||
ul_bwp1_subcarrierSpacing = 1;
|
||||
firstActiveUplinkBWP-Id = 1;
|
||||
});
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
|
||||
@@ -43,12 +43,19 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# center frequency = 3350.01 MHz
|
||||
# selected SSB frequency = 3349.92 MHz
|
||||
absoluteFrequencySSB = 623328;
|
||||
# this is 3300.24 + 134*12*30e3 = 3348.48 MHz (5G NR GSCN: 7741)
|
||||
absoluteFrequencySSB = 649920;
|
||||
#652860; #should be 649920
|
||||
#647520;
|
||||
#647540;
|
||||
#649920;
|
||||
#650208;
|
||||
#647540;
|
||||
dl_frequencyBand = 78;
|
||||
# frequency point A = 3300.87 MHz
|
||||
dl_absoluteFrequencyPointA = 620058;
|
||||
# this is 3300.24 MHz
|
||||
dl_absoluteFrequencyPointA = 646724;
|
||||
#649104;
|
||||
#646724;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
|
||||
@@ -31,11 +31,11 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 4412.64 MHz
|
||||
absoluteFrequencySSB = 694176;
|
||||
dl_frequencyBand = 79;
|
||||
# this is 4400.94 MHz
|
||||
dl_absoluteFrequencyPointA = 693396;
|
||||
# this is 3319.68 MHz
|
||||
absoluteFrequencySSB = 621312;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3300.6 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -55,7 +55,7 @@ gNBs =
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 79;
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -31,11 +31,11 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 4435.68 MHz
|
||||
absoluteFrequencySSB = 695712;
|
||||
dl_frequencyBand = 79;
|
||||
# this is 4400.94 MHz
|
||||
dl_absoluteFrequencyPointA = 693396;
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 621312;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -55,7 +55,7 @@ gNBs =
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 79;
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -33,11 +33,11 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 4458.72 MHz
|
||||
absoluteFrequencySSB = 697248;
|
||||
dl_frequencyBand = 79;
|
||||
# this is 4400.94 MHz
|
||||
dl_absoluteFrequencyPointA = 693396;
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 621312;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 620040;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -57,7 +57,7 @@ gNBs =
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 79;
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -195,15 +195,6 @@ gNBs =
|
||||
}
|
||||
);
|
||||
|
||||
rlc = {
|
||||
srb = {
|
||||
t_poll_retransmit = "ms2000"
|
||||
}
|
||||
drb_am = {
|
||||
t_poll_retransmit = "ms2000"
|
||||
}
|
||||
}
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
|
||||
@@ -213,7 +213,7 @@ security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea2", "nea0" );
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
@@ -223,7 +223,7 @@ security = {
|
||||
# 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 = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
|
||||
@@ -35,8 +35,8 @@ gNBs =
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
dl_frequencyBand = 78;
|
||||
absoluteFrequencySSB = 628320;
|
||||
dl_absoluteFrequencyPointA = 627062;
|
||||
absoluteFrequencySSB = 634080;
|
||||
dl_absoluteFrequencyPointA = 632808;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
@@ -197,7 +197,7 @@ RUs = (
|
||||
local_rf = "yes";
|
||||
nb_tx = 1;
|
||||
nb_rx = 1;
|
||||
att_tx = 10;
|
||||
att_tx = 0;
|
||||
att_rx = 0;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
@@ -212,7 +212,7 @@ security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea2", "nea0" );
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
@@ -222,7 +222,7 @@ security = {
|
||||
# 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 = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
|
||||
@@ -185,7 +185,6 @@ L1s = (
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 120;
|
||||
tx_amp_backoff_dB = 30;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -34,11 +34,11 @@ gNBs =
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3410.400 MHz
|
||||
absoluteFrequencySSB = 627360;
|
||||
# this is 3469.44 MHz => 301 REs from PointA 25 PRBs + 1 RE
|
||||
absoluteFrequencySSB = 631296;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3401.220 MHz
|
||||
dl_absoluteFrequencyPointA = 626748;
|
||||
# this is 3469.44 - (51*12*30e-3/2) = 3460.26 MHz
|
||||
dl_absoluteFrequencyPointA = 630684;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
|
||||
@@ -19,9 +19,6 @@ Ref :
|
||||
DL & UL scheduling timing : 17.0
|
||||
UL Indication : 1.0
|
||||
Slot Indication : 13.0
|
||||
feprx : 151.0
|
||||
feptx_ofdm (per port, half_slot) : 57
|
||||
feptx_total : 148
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
@@ -35,6 +32,3 @@ DeviationThreshold :
|
||||
DL & UL scheduling timing : 0.25
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
feprx : 0.25
|
||||
feptx_ofdm (per port, half_slot) : 0.25
|
||||
feptx_total : 0.25
|
||||
|
||||
@@ -19,9 +19,6 @@ Ref :
|
||||
DL & UL scheduling timing : 5.0
|
||||
UL Indication : 1.0
|
||||
Slot Indication : 6.0
|
||||
feprx : 44.0
|
||||
feptx_ofdm (per port, half_slot) : 31
|
||||
feptx_total : 58
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
@@ -35,6 +32,3 @@ DeviationThreshold :
|
||||
DL & UL scheduling timing : 0.50
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
feprx : 0.25
|
||||
feptx_ofdm (per port, half_slot) : 0.25
|
||||
feptx_total : 0.25
|
||||
|
||||
@@ -19,9 +19,6 @@ Ref :
|
||||
DL & UL scheduling timing : 8.0
|
||||
UL Indication : 3.0
|
||||
Slot Indication : 9.0
|
||||
feprx : 85.0
|
||||
feptx_ofdm (per port, half_slot) : 31
|
||||
feptx_total : 92
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
@@ -35,6 +32,3 @@ DeviationThreshold :
|
||||
DL & UL scheduling timing : 0.35
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.35
|
||||
feprx : 0.25
|
||||
feptx_ofdm (per port, half_slot) : 0.25
|
||||
feptx_total : 0.25
|
||||
|
||||
@@ -19,9 +19,6 @@ Ref :
|
||||
DL & UL scheduling timing : 4.0
|
||||
UL Indication : 2.0
|
||||
Slot Indication : 5.0
|
||||
feprx : 43.0
|
||||
feptx_ofdm (per port, half_slot) : 30
|
||||
feptx_total : 57
|
||||
DeviationThreshold :
|
||||
feprx : 0.25
|
||||
feptx_prec : 0.25
|
||||
@@ -35,6 +32,3 @@ DeviationThreshold :
|
||||
DL & UL scheduling timing : 0.50
|
||||
UL Indication : 1.00
|
||||
Slot Indication : 0.50
|
||||
feprx : 0.25
|
||||
feptx_ofdm (per port, half_slot) : 0.25
|
||||
feptx_total : 0.25
|
||||
|
||||
@@ -108,16 +108,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>Ping</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -126,9 +126,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping LTE-UE from Traffic-Gen</desc>
|
||||
<id>rfsim4g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -141,8 +141,8 @@
|
||||
<iperf_args>-u -t 30 -b 2M -R</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<nodes>acamas</nodes>
|
||||
<svr_node>acamas</svr_node>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030011">
|
||||
@@ -153,8 +153,8 @@
|
||||
<iperf_args>-u -t 30 -b 1M</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<nodes>acamas</nodes>
|
||||
<svr_node>acamas</svr_node>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
|
||||
@@ -86,9 +86,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_enb_nos1</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -97,9 +97,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping LTE-UE from eNB</desc>
|
||||
<id>rfsim4g_enb_nos1</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -108,9 +108,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP DL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_enb_nos1</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 2M -R</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
@@ -120,9 +120,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP UL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_enb_nos1</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 1M</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
|
||||
@@ -108,16 +108,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>Ping</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -126,9 +126,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping LTE-UE from Traffic-Gen</desc>
|
||||
<id>rfsim4g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -137,9 +137,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP DL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 2M -R</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
@@ -149,9 +149,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP UL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 1M</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
|
||||
@@ -108,16 +108,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>Ping</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -126,9 +126,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping LTE-UE from Traffic-Gen</desc>
|
||||
<id>rfsim4g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -137,9 +137,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP DL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 2M -R</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
@@ -149,9 +149,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP UL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 1M</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
<class>Iperf2_Unidir</class>
|
||||
<desc>Iperf2 UDP DL</desc>
|
||||
<id>rfsim4g_ue_fembms</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_enb_fembms</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 2M</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP DL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_enb_nos1</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 2M -R</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
|
||||
@@ -108,9 +108,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping Traffic-Gen from LTE-UE</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -119,9 +119,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping LTE-UE from Traffic-Gen</desc>
|
||||
<id>rfsim4g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -130,9 +130,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP DL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 2M -R</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
@@ -142,9 +142,9 @@
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf UDP UL</desc>
|
||||
<id>rfsim4g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim4g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_args>-u -t 30 -b 1M</iperf_args>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
|
||||
@@ -80,16 +80,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3</id>
|
||||
<nodes>acamas acamas acamas</nodes>
|
||||
<nodes>cacofonix cacofonix cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020021">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from all NR-UEs</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3</id>
|
||||
<nodes>acamas acamas acamas</nodes>
|
||||
<nodes>cacofonix cacofonix cacofonix</nodes>
|
||||
<svr_id>rfsim5g_5gc_fixed_ip</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<testCase id="000030">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>15</idle_sleep_time_in_sec>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000031">
|
||||
@@ -106,7 +106,7 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000024">
|
||||
@@ -122,9 +122,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from all NR-UEs</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -132,8 +132,8 @@
|
||||
<testCase id="030020">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Simulate a DL radio channel with noise (3 dB)</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo channelmod modify 0 noise_power_dB 3 | ncat --send-only 192.168.71.181 8091</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo channelmod modify 0 noise_power_dB 3 | nc --send-only 192.168.71.181 8091</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030021">
|
||||
@@ -141,9 +141,9 @@
|
||||
<desc>Iperf (DL/5Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 5M -t 20 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -153,9 +153,9 @@
|
||||
<desc>Iperf (UL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 20</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -163,17 +163,17 @@
|
||||
<testCase id="040001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Trigger Reestablishment</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci force_reestab | ncat 192.168.71.171 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci force_reestab | nc 192.168.71.171 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020022">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i0.5 -w25</ping_args>
|
||||
<ping_packetloss_threshold>80</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -181,57 +181,57 @@
|
||||
<testCase id="040002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci get_reestab_count | ncat 192.168.71.150 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci get_reestab_count | nc 192.168.71.150 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040021">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Simulate a disruption of DL radio channel (ploss 55)</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo channelmod modify 0 ploss 55 | ncat 192.168.71.181 8091</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo channelmod modify 0 ploss 55 | nc 192.168.71.181 8091</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040022">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Get UE sync state (UE ID 0)</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ciUE sync_state 0 | ncat 192.168.71.181 8091 | grep -E UE_NOT_SYNC</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_NOT_SYNC</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040023">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Restoration of the original DL channel conditions (ploss 20)</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo channelmod modify 0 ploss 20 | ncat 192.168.71.181 8091</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo channelmod modify 0 ploss 20 | nc 192.168.71.181 8091</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040024">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Get UE sync state (UE ID 0)</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ciUE sync_state 0 | ncat 192.168.71.181 8091 | grep -E UE_CONNECTED</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_CONNECTED</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040025">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Trigger Handover</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci trigger_f1_ho | ncat 192.168.71.150 9090</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci trigger_f1_ho | nc 192.168.71.150 9090</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040026">
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE (1) connected to DU-PCI 0?</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3584"</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3584"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040027">
|
||||
<class>Custom_Command</class>
|
||||
<desc>UE (1) connected to DU-PCI 1?</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | ncat 192.168.71.150 9090 | grep "3585"</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3585"</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100021">
|
||||
|
||||
@@ -73,16 +73,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020011">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -91,9 +91,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -103,9 +103,9 @@
|
||||
<desc>Iperf (DL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 30 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -115,9 +115,9 @@
|
||||
<desc>Iperf (UL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 30</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -133,16 +133,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
|
||||
<nodes>acamas acamas acamas acamas acamas acamas acamas acamas acamas acamas</nodes>
|
||||
<nodes>cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -151,9 +151,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -162,9 +162,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from Second NR-UE</desc>
|
||||
<id>rfsim5g_ue2</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -173,9 +173,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping Second NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue2</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -184,9 +184,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from both UEs</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2</id>
|
||||
<nodes>acamas acamas</nodes>
|
||||
<nodes>cacofonix cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -195,9 +195,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from all UEs</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2 rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
|
||||
<nodes>acamas acamas acamas acamas acamas acamas acamas acamas acamas acamas</nodes>
|
||||
<nodes>cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25 -s 1016</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -207,9 +207,9 @@
|
||||
<desc>Iperf (DL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 20 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -219,9 +219,9 @@
|
||||
<desc>Iperf (UL/1Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 1M -t 20</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -230,21 +230,21 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE 1 and 2</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2</id>
|
||||
<nodes>acamas acamas</nodes>
|
||||
<nodes>cacofonix cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="444444">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach OAI UE 1 and 2</desc>
|
||||
<id>rfsim5g_ue rfsim5g_ue2</id>
|
||||
<nodes>acamas acamas</nodes>
|
||||
<nodes>cacofonix cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="444445">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach OAI UE 3 to 10</desc>
|
||||
<id>rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
|
||||
<nodes>acamas acamas acamas acamas acamas acamas acamas acamas</nodes>
|
||||
<nodes>cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
@@ -104,9 +104,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args> -c 20 -i0.5</ping_args>
|
||||
<ping_packetloss_threshold>80</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -115,9 +115,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -127,9 +127,9 @@
|
||||
<desc>Iperf (DL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 20 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -139,9 +139,9 @@
|
||||
<desc>Iperf (UL/1Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 1M -t 20</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -149,15 +149,15 @@
|
||||
<testCase id="040001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Force Msg3 C-RNTI RA</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ciUE force_crnti_ra | ncat 192.168.71.150 8091</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE force_crnti_ra | nc 192.168.71.150 8091</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Force RRC_IDLE (UE ID 0)</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ciUE force_RRC_IDLE | ncat 192.168.71.150 8091</command>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE force_RRC_IDLE | nc 192.168.71.150 8091</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
|
||||
@@ -73,16 +73,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -91,9 +91,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -103,21 +103,21 @@
|
||||
<desc>Iperf (DL/10Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 10M -t 20 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030002">
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf (UL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 20</iperf_args>
|
||||
<desc>Iperf (UL/4Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 4M -t 20</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<testCase id="004000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Clean-Up any residual volume</desc>
|
||||
<node>acamas</node>
|
||||
<node>cacofonix</node>
|
||||
<command>docker volume rm 5g_rfsimulator_fdd_phytest_rrc.config -f</command>
|
||||
</testCase>
|
||||
<testCase id="800813">
|
||||
@@ -80,9 +80,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping gNB from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_gnb_nos1</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c20 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>0</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -91,9 +91,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from gNB</desc>
|
||||
<id>rfsim5g_gnb_nos1</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c20 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>0</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -103,9 +103,9 @@
|
||||
<desc>Iperf (DL/30kbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 0.03M -t 20 -R -c 10.0.1.1</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_gnb_nos1</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -115,9 +115,9 @@
|
||||
<desc>Iperf (UL/30kbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 0.03M -t 20 -c 10.0.1.1</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_gnb_nos1</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
800813
|
||||
000000
|
||||
000001
|
||||
000013
|
||||
020001
|
||||
020002
|
||||
100001
|
||||
@@ -69,20 +68,13 @@
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000013">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>0</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -91,9 +83,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>0</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -33,11 +33,6 @@
|
||||
000003
|
||||
020001
|
||||
020002
|
||||
040001
|
||||
020022
|
||||
040002
|
||||
020001
|
||||
020002
|
||||
100001
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
@@ -78,16 +73,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -96,40 +91,13 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Trigger Reestablishment</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci force_reestab | ncat 192.168.71.140 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020022">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<ping_args>-c 20 -i0.5 -w25</ping_args>
|
||||
<ping_packetloss_threshold>80</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment</desc>
|
||||
<node>acamas</node>
|
||||
<command>echo ci get_reestab_count | ncat 192.168.71.140 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
<class>Undeploy_Object</class>
|
||||
<always_exec>true</always_exec>
|
||||
|
||||
@@ -73,16 +73,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -91,9 +91,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<testCase id="000005">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Check that UE synched</desc>
|
||||
<node>acamas</node>
|
||||
<node>cacofonix</node>
|
||||
<command>docker logs rfsim5g-oai-nr-ue-2 | grep -m 1 "PSBCH RX:OK"</command>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
004000
|
||||
000000
|
||||
000001
|
||||
000030
|
||||
020001
|
||||
020002
|
||||
100001
|
||||
@@ -49,7 +48,7 @@
|
||||
<testCase id="004000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Clean-Up any residual volume</desc>
|
||||
<node>acamas</node>
|
||||
<node>cacofonix</node>
|
||||
<command>docker volume rm 5g_rfsimulator_tdd_dora_rrc.config -f</command>
|
||||
</testCase>
|
||||
<testCase id="800813">
|
||||
@@ -76,19 +75,13 @@
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000030">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping gNB from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_gnb_nos1</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c20 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>0</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -97,9 +90,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from gNB</desc>
|
||||
<id>rfsim5g_gnb_nos1</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c20 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>0</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
000003
|
||||
020001
|
||||
020002
|
||||
000004
|
||||
020003
|
||||
030001
|
||||
030002
|
||||
100001
|
||||
@@ -75,16 +73,16 @@
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -93,27 +91,9 @@
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Verify 2nd PDU session is up</desc>
|
||||
<id>rfsim5g_ue_pdu_2</id>
|
||||
<nodes>acamas</nodes>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020003">
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE on PDU session ID 2</desc>
|
||||
<id>rfsim5g_ue_pdu_2</id>
|
||||
<nodes>acamas</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
@@ -123,9 +103,9 @@
|
||||
<desc>Iperf (DL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 20 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
@@ -135,9 +115,9 @@
|
||||
<desc>Iperf (UL/1Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 1M -t 20</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<nodes>acamas</nodes>
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>acamas</svr_node>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
000011
|
||||
000022
|
||||
000033
|
||||
200022
|
||||
300033
|
||||
000222
|
||||
222222
|
||||
333333
|
||||
@@ -117,28 +115,6 @@
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="200022">
|
||||
<class>Iperf</class>
|
||||
<desc>Optional iperf (DL/UDP/1000M)(30 sec)(single-ue profile)</desc>
|
||||
<may_fail>true</may_fail>
|
||||
<iperf_args>-u -b 1000M -t 30 -R</iperf_args>
|
||||
<svr_id>oc-cn5g-20897-aerial</svr_id>
|
||||
<id>up2-aerial</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="300033">
|
||||
<class>Iperf</class>
|
||||
<desc>Optional iperf (UL/UDP/90M)(30 sec)(single-ue profile)</desc>
|
||||
<may_fail>true</may_fail>
|
||||
<iperf_args>-u -b 90M -t 30 -l 1428</iperf_args>
|
||||
<svr_id>oc-cn5g-20897-aerial</svr_id>
|
||||
<id>up2-aerial</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000222">
|
||||
<class>Detach_UE</class>
|
||||
<always_exec>true</always_exec>
|
||||
|
||||
@@ -30,10 +30,11 @@
|
||||
310000
|
||||
800813
|
||||
330101
|
||||
800814
|
||||
330102
|
||||
800815
|
||||
330103
|
||||
310001
|
||||
400001
|
||||
350000
|
||||
370001
|
||||
370000
|
||||
@@ -146,13 +147,6 @@
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="400001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Check UE is on dedicated BWP ID 1</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_current_bwp | nc -N 127.0.0.1 9091 | grep 'DL BWP ID 1 (dedicated) UL BWP ID 1 (dedicated)'</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/8Mbps/UDP)(30 sec)</desc>
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
|
||||
<testCase id="000100">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/30Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1 -R</iperf_args>
|
||||
<desc>iperf (DL/20Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<id>oai_ue_caracal</id>
|
||||
<svr_id>oc-cn5g</svr_id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
@@ -115,8 +115,8 @@
|
||||
|
||||
<testCase id="000200">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/20Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 </iperf_args>
|
||||
<desc>iperf (UL/5Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 5M -t 30 -i 1 </iperf_args>
|
||||
<id>oai_ue_caracal</id>
|
||||
<svr_id>oc-cn5g</svr_id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<testCase id="090101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB USRP</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band79.106prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 106 -t 23 -D 127 -m 28 -M 106 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 106 -t 23 -D 127 -m 28 -M 106 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<rt_stats_cfg>datalog_rt_stats.default.yaml</rt_stats_cfg>
|
||||
<air_interface>NR</air_interface>
|
||||
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<testCase id="390101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB USRP</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band79.273prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 273 -t 23 -D 127 -m 23 -M 273 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 273 -t 23 -D 127 -m 23 -M 273 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<rt_stats_cfg>datalog_rt_stats.100.2x2.yaml</rt_stats_cfg>
|
||||
<air_interface>NR</air_interface>
|
||||
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<testCase id="190101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB USRP</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 162 -t 23 -D 127 -m 23 -M 162 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 162 -t 23 -D 127 -m 23 -M 162 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<rt_stats_cfg>datalog_rt_stats.1x1.60.yaml</rt_stats_cfg>
|
||||
<air_interface>NR</air_interface>
|
||||
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<testCase id="290101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize gNB USRP</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band79.162prb.usrpn300.phytest-dora.conf --phy-test --gNBs.[0].pdsch_AntennaPorts_XP 2 --RUs.[0].nb_tx 2 --RUs.[0].nb_rx 2 -q -U 768 -T 162 -t 23 -D 127 -m 23 -M 162 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf --phy-test --gNBs.[0].pdsch_AntennaPorts_XP 2 --RUs.[0].nb_tx 2 --RUs.[0].nb_rx 2 -q -U 768 -T 162 -t 23 -D 127 -m 23 -M 162 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
|
||||
<rt_stats_cfg>datalog_rt_stats.60.2x2.yaml</rt_stats_cfg>
|
||||
<air_interface>NR</air_interface>
|
||||
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>100</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m5 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m5 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010121">
|
||||
@@ -80,7 +80,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>150</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m15 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m15 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010131">
|
||||
@@ -98,7 +98,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>250</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m25 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m25 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010211">
|
||||
@@ -116,7 +116,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>150</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010221">
|
||||
@@ -134,7 +134,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>350</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010231">
|
||||
@@ -152,7 +152,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>550</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010311">
|
||||
@@ -170,7 +170,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>250</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010321">
|
||||
@@ -188,7 +188,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>650</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010331">
|
||||
@@ -206,7 +206,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_ulsim</physim_test>
|
||||
<physim_time_threshold>1100</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>100</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e5 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e5 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000121">
|
||||
@@ -81,7 +81,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>100</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e15 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e15 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000131">
|
||||
@@ -99,7 +99,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>200</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e25 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e25 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000211">
|
||||
@@ -117,7 +117,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>150</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000221">
|
||||
@@ -135,7 +135,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>250</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000231">
|
||||
@@ -153,7 +153,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>400</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000311">
|
||||
@@ -171,7 +171,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>200</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000321">
|
||||
@@ -189,7 +189,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>500</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000331">
|
||||
@@ -207,7 +207,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>500</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000411">
|
||||
@@ -225,7 +225,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>200</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000421">
|
||||
@@ -243,7 +243,7 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>300</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000431">
|
||||
@@ -261,6 +261,6 @@
|
||||
<always_exec>true</always_exec>
|
||||
<physim_test>nr_dlsim</physim_test>
|
||||
<physim_time_threshold>450</physim_time_threshold>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev af:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
<physim_run_args>-n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _t2 --nrLDPC_coding_t2.dpdk_dev d8:00.0 --nrLDPC_coding_t2.dpdk_core_list 11-12</physim_run_args>
|
||||
</testCase>
|
||||
</testCaseList>
|
||||
|
||||
@@ -10,7 +10,7 @@ services:
|
||||
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
|
||||
healthcheck:
|
||||
test: /bin/bash -c "nodetool status"
|
||||
interval: 20s
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -14,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,16 +61,13 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
@@ -85,8 +78,6 @@ services:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -96,8 +87,6 @@ services:
|
||||
container_name: rfsim5g-oai-cu
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time
|
||||
--rfsimulator.options chanmod
|
||||
@@ -114,8 +103,6 @@ services:
|
||||
- ../../conf_files/gnb-cu.sa.band78.106prb.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -125,8 +112,6 @@ services:
|
||||
container_name: rfsim5g-oai-du-pci0
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim
|
||||
--log_config.global_log_options level,nocolor,time
|
||||
@@ -145,8 +130,6 @@ services:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -156,8 +139,6 @@ services:
|
||||
container_name: rfsim5g-oai-du-pci1
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim
|
||||
--log_config.global_log_options level,nocolor,time
|
||||
@@ -180,8 +161,6 @@ services:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -194,13 +173,13 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
|
||||
-r 106 --numerology 1 -C 3619200000
|
||||
--uicc0.imsi 208990100001100
|
||||
--rfsimulator.options chanmod
|
||||
--rfsimulator.serveraddr server
|
||||
--rfsimulator.hanging-workaround 1
|
||||
--telnetsrv --telnetsrv.shrmod ciUE --telnetsrv.listenaddr 192.168.71.181 --telnetsrv.listenport 8091
|
||||
--channelmod.modellist_rfsimu_1.[0].model_name rfsimu_channel_ue0
|
||||
--channelmod.modellist_rfsimu_1.[1].model_name rfsimu_channel_ue1
|
||||
@@ -214,8 +193,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -16,8 +15,6 @@ services:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
retries: 30
|
||||
networks:
|
||||
public_net:
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,15 +61,12 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
@@ -87,8 +80,6 @@ services:
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
oai-gnb:
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
|
||||
container_name: rfsim5g-oai-gnb
|
||||
@@ -108,8 +99,6 @@ services:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
retries: 5
|
||||
ipc: host
|
||||
oai-nr-ue:
|
||||
@@ -137,8 +126,6 @@ services:
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
ipc: host
|
||||
|
||||
networks:
|
||||
|
||||
@@ -67,18 +67,6 @@ All the following commands **SHALL** be run from the `ci-scripts/yaml_files/5g_r
|
||||
For a deployment with the gNB split in CU and DU components, please refer to the `../5g_f1_rfsimulator` folder.
|
||||
For a deployment with the gNB split in CU-CP, CU-UP, and DU components, please refer to the `../5g_rfsimulator_e1` folder.
|
||||
|
||||
Note: **These instructions require `docker compose` v2.36.0 or later** due to the
|
||||
use of the `interface_name` property, which is necessary for ensuring consistent
|
||||
IP address assignment to the container interface.
|
||||
|
||||
If you're using an older version of `docker compose`, you may encounter the following
|
||||
error:
|
||||
```
|
||||
validating docker-compose.yaml: services.oai-upf.networks.public_net Additional property interface_name is not allowed
|
||||
```
|
||||
To update to the required version, you can follow the official Docker documentation:
|
||||
https://docs.docker.com/compose/install/linux/
|
||||
|
||||
## 2.1. Deploy OAI 5G Core Network ##
|
||||
|
||||
```bash
|
||||
@@ -558,7 +546,8 @@ section in the file for details. This includes an image build service as well as
|
||||
code compilation service. This is necessary as the executable has to be linked
|
||||
against the same libraries that are present in the executing image. This might
|
||||
take a while the first time but other that that is very fast. Here is a list of
|
||||
commands (wait between each command). Tested with `docker compose` v2.36.2.
|
||||
commands (wait between each command). Tested with `docker compose` v2.27.0
|
||||
|
||||
|
||||
This command deploys OAI 5G Core Network
|
||||
```bash
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -14,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,15 +61,12 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
@@ -84,16 +77,12 @@ services:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-gnb:
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
|
||||
container_name: rfsim5g-oai-gnb
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
cap_drop:
|
||||
- ALL
|
||||
environment:
|
||||
@@ -108,8 +97,6 @@ services:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.rfsim.yaml:/opt/oai-gnb/etc/gnb.yaml
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -121,7 +108,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -135,8 +121,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -148,7 +132,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001101 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -162,8 +145,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -175,7 +156,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001102 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -189,8 +169,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -202,7 +180,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001103 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -216,8 +193,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -229,7 +204,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001104 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -243,8 +217,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -256,7 +228,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001105 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -270,8 +241,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -283,7 +252,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001106 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -297,8 +265,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -310,7 +276,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001107 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -324,8 +289,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -337,7 +300,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001108 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -351,8 +313,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -364,7 +324,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001109 -C 3319680000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -378,8 +337,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -14,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,15 +61,12 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
@@ -84,8 +77,6 @@ services:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -106,8 +97,6 @@ services:
|
||||
- ../../conf_files/gnb.sa.band78.24prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -135,8 +124,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -14,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,15 +61,12 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
@@ -84,8 +77,6 @@ services:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -94,8 +85,6 @@ services:
|
||||
container_name: rfsim5g-oai-gnb
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
@@ -108,8 +97,6 @@ services:
|
||||
- ../../conf_files/gnb.sa.band78.273prb.rfsim.2x2.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -122,7 +109,6 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
- SYS_NICE
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -r 273 --numerology 1 --band 78 -C 3450720000 --ssb 1518 --ue-nb-ant-tx 2 --uicc0.imsi 208990100001100 --ue-nb-ant-rx 2 --uecap_file /opt/oai-nr-ue/etc/uecap.xml --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
@@ -137,8 +123,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -14,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,10 +61,8 @@ services:
|
||||
networks:
|
||||
core_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
|
||||
oai-cucp:
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
|
||||
@@ -93,8 +87,6 @@ services:
|
||||
- ../../conf_files/gnb-cucp.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -124,8 +116,6 @@ services:
|
||||
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-cuup"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -158,8 +148,6 @@ services:
|
||||
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-cuup"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -192,8 +180,6 @@ services:
|
||||
- ../../conf_files/gnb-cuup.sa.f1.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-cuup"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -223,8 +209,6 @@ services:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -257,8 +241,6 @@ services:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -291,8 +273,6 @@ services:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -321,8 +301,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -351,8 +329,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -382,8 +358,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -14,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,15 +61,12 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
@@ -84,8 +77,6 @@ services:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -105,8 +96,6 @@ services:
|
||||
- ../../conf_files/gnb.sa.band261.u3.32prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -135,8 +124,6 @@ services:
|
||||
ipv4_address: 192.168.71.150
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -14,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,15 +61,12 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
@@ -84,8 +77,6 @@ services:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -96,9 +87,7 @@ services:
|
||||
- ALL
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
|
||||
--telnetsrv --telnetsrv.listenaddr 192.168.71.140
|
||||
--telnetsrv.shrmod ci
|
||||
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
|
||||
ASAN_OPTIONS: detect_leaks=0
|
||||
depends_on:
|
||||
- oai-ext-dn
|
||||
networks:
|
||||
@@ -108,8 +97,6 @@ services:
|
||||
- ../../conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -135,8 +122,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -13,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -63,10 +61,8 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
@@ -81,8 +77,6 @@ services:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -103,8 +97,6 @@ services:
|
||||
- ../../conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -137,8 +129,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.ntn-leo.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -18,8 +18,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -45,8 +43,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -60,3 +56,11 @@ networks:
|
||||
- subnet: 192.168.71.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-public"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-traffic"
|
||||
|
||||
@@ -2,7 +2,6 @@ services:
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
@@ -14,8 +13,6 @@ services:
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
@@ -49,7 +46,6 @@ services:
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.9
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
@@ -65,15 +61,12 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
@@ -84,8 +77,6 @@ services:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -108,8 +99,6 @@ services:
|
||||
- ../../conf_files/gnb-vnf.sa.band66.u0.25prb.nfapi.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -132,8 +121,6 @@ services:
|
||||
- ../../conf_files/gnb-pnf.band66.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -147,7 +134,7 @@ services:
|
||||
- NET_ADMIN # for interface bringup
|
||||
- NET_RAW # for ping
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152680000 --CO -400000000 --ssb 48 --rfsimulator.serveraddr 192.168.71.141 --extra-pdu-id 2 --log_config.global_log_options level,nocolor,time
|
||||
USE_ADDITIONAL_OPTIONS: --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152680000 --CO -400000000 --ssb 48 --rfsimulator.serveraddr 192.168.71.141 --log_config.global_log_options level,nocolor,time
|
||||
depends_on:
|
||||
- oai-pnf
|
||||
networks:
|
||||
@@ -159,8 +146,6 @@ services:
|
||||
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -14,9 +14,7 @@ services:
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band77.273prb.usrpn310.2x2.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
|
||||
start_period: 15s
|
||||
start_interval: 500ms
|
||||
interval: 5s
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -14,9 +14,7 @@ services:
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band77.162prb.usrpn310.2x2.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
|
||||
start_period: 15s
|
||||
start_interval: 500ms
|
||||
interval: 5s
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -16,7 +16,7 @@ services:
|
||||
- ../../conf_files/gnb-vnf.sa.band77.162prb.nfapi.4x4.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 5s
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-pnf:
|
||||
@@ -35,9 +35,7 @@ services:
|
||||
volumes:
|
||||
- ../../conf_files/gnb-pnf.band77.usrpn310.4x4.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
|
||||
start_period: 15s
|
||||
start_interval: 500ms
|
||||
interval: 5s
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -16,9 +16,7 @@ services:
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.n310.7ds2u.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
|
||||
start_period: 15s
|
||||
start_interval: 500ms
|
||||
interval: 5s
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
retries: 5
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
#entrypoint: /bin/bash -c "sleep infinity"
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
USE_ADDITIONAL_OPTIONS: --usrp-args type=n3xx,name=ni-n3xx-31641B9,addr=192.168.10.2 -r 106 --numerology 1 --band 78 -C 3425010000 --ssb 509 --ue-fo-compensation --ue-rxgain 65 --tune-offset 20000000 -A 90 --log_config.global_log_options level,nocolor,time --uicc0.imsi 001020000000111 --uicc0.nssai_sd 16777215
|
||||
USE_ADDITIONAL_OPTIONS: --usrp-args type=n3xx,name=ni-n3xx-31641B9,addr=192.168.10.2 -r 106 --numerology 1 --band 78 -C 3511200000 --ue-fo-compensation --ue-rxgain 65 --tune-offset 20000000 -A 90 --log_config.global_log_options level,nocolor,time --uicc0.imsi 001020000000111 --uicc0.nssai_sd 16777215
|
||||
volumes:
|
||||
- ../../conf_files/ue.sa.conf:/opt/oai-nr-ue/etc/nr-ue.conf
|
||||
healthcheck:
|
||||
|
||||
@@ -22,12 +22,10 @@ services:
|
||||
oai-net:
|
||||
ipv4_address: 172.21.18.20
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
|
||||
start_period: 15s
|
||||
start_interval: 500ms
|
||||
interval: 5s
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
retries: 5
|
||||
networks:
|
||||
oai-net:
|
||||
driver: macvlan
|
||||
|
||||
@@ -21,12 +21,10 @@ services:
|
||||
oai-net:
|
||||
ipv4_address: 172.21.18.20
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
|
||||
start_period: 15s
|
||||
start_interval: 500ms
|
||||
interval: 5s
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
retries: 5
|
||||
networks:
|
||||
oai-net:
|
||||
driver: macvlan
|
||||
|
||||
@@ -21,13 +21,10 @@ services:
|
||||
oai-net:
|
||||
ipv4_address: 172.21.18.20
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/opt/oai-gnb/bin/check-prach-io.sh"
|
||||
start_period: 15s
|
||||
start_interval: 500ms
|
||||
interval: 5s
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
retries: 5
|
||||
networks:
|
||||
oai-net:
|
||||
driver: macvlan
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
- ../../../cmake_targets/share:/opt/cuBB/share
|
||||
userns_mode: host
|
||||
ipc: "shareable"
|
||||
image: cubb-build:25-1
|
||||
image: cubb-build:24-3
|
||||
environment:
|
||||
- cuBB_SDK=/opt/nvidia/cuBB
|
||||
command: bash -c "sudo rm -rf /tmp/phy.log && sudo chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
|
||||
@@ -33,7 +33,7 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-gnb-aerial:
|
||||
cpuset: "13-14"
|
||||
cpuset: "13-20"
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/oai-gnb-aerial:${TAG:-develop}
|
||||
depends_on:
|
||||
nv-cubb:
|
||||
|
||||
@@ -34,6 +34,7 @@ source "$THIS_SCRIPT_PATH"/tools/build_helper
|
||||
set_openair_env
|
||||
|
||||
# Variables for UE data generation
|
||||
gen_nvram_path=$OPENAIR_DIR/cmake_targets/ran_build/build
|
||||
conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
|
||||
|
||||
HW=""
|
||||
@@ -92,11 +93,13 @@ Options:
|
||||
Makes the NR UE softmodem
|
||||
--UE-conf-nvram [configuration file]
|
||||
Specify conf_nvram_path (default \"$conf_nvram_path\")
|
||||
--UE-gen-nvram [output path]
|
||||
Specify gen_nvram_path (default \"$gen_nvram_path\")
|
||||
-w | --hardware
|
||||
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, AERIAL, None (Default)
|
||||
Adds this RF board support (in external packages installation and in compilation)
|
||||
-t | --transport
|
||||
Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g, oran_fhlib_5g, oran_fhlib_5g_mplane, WLS
|
||||
Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g, oran_fhlib_5g, oran_fhlib_5g_mplane
|
||||
-P | --phy_simulators
|
||||
Makes the unitary tests Layer 1 simulators
|
||||
-s | --check
|
||||
@@ -241,7 +244,7 @@ function main() {
|
||||
shift;;
|
||||
--UE)
|
||||
UE=1
|
||||
TARGET_LIST="$TARGET_LIST lte-uesoftmodem conf2uedata usim nvram"
|
||||
TARGET_LIST="$TARGET_LIST lte-uesoftmodem"
|
||||
echo_info "Will compile UE"
|
||||
shift;;
|
||||
--nrUE)
|
||||
@@ -256,6 +259,9 @@ function main() {
|
||||
--UE-conf-nvram)
|
||||
conf_nvram_path=$(readlink -f "$2")
|
||||
shift 2;;
|
||||
--UE-gen-nvram)
|
||||
gen_nvram_path=$(readlink -f "$2")
|
||||
shift 2;;
|
||||
-w | --hardware)
|
||||
case "$2" in
|
||||
"USRP" | "BLADERF" | "LMSSDR" | "IRIS")
|
||||
@@ -302,9 +308,6 @@ function main() {
|
||||
TARGET_LIST="$TARGET_LIST $2"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_FHI72=ON -DOAI_FHI72_MPLANE=ON"
|
||||
;;
|
||||
"WLS"|"Wls"|"wls")
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_WLS=ON"
|
||||
;;
|
||||
"None")
|
||||
;;
|
||||
*)
|
||||
@@ -507,7 +510,18 @@ function main() {
|
||||
fi
|
||||
|
||||
if [ "$UE" = 1 ] ; then
|
||||
echo_info "Generate LTE USIM default sim content UE specific part"
|
||||
|
||||
echo_info "Compiling UE specific part"
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/nas_sim_tools/build
|
||||
mkdir -p $DIR/nas_sim_tools/build
|
||||
cd $DIR/nas_sim_tools/build
|
||||
|
||||
${CMAKE_CMD% *} ..
|
||||
compilations nas_sim_tools usim.txt "usim" "${BUILD_TOOL_OPT}"
|
||||
compilations nas_sim_tools nvram.txt "nvram" "${BUILD_TOOL_OPT}"
|
||||
compilations nas_sim_tools conf2uedata.txt "conf2uedata" "${BUILD_TOOL_OPT}"
|
||||
|
||||
# generate USIM data
|
||||
if [ -f conf2uedata ]; then
|
||||
install_nas_tools $conf_nvram_path $DIR/$BUILD_DIR/build "$DIR/$BUILD_DIR/build/conf2uedata.txt"
|
||||
|
||||
79
cmake_targets/nas_sim_tools/CMakeLists.txt
Executable file
79
cmake_targets/nas_sim_tools/CMakeLists.txt
Executable file
@@ -0,0 +1,79 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(NAS_SIM_TOOLS)
|
||||
|
||||
include(FindPkgConfig)
|
||||
pkg_search_module(CONFIG libconfig REQUIRED)
|
||||
include_directories(${CONFIG_INCLUDE_DIRS})
|
||||
add_definitions(-std=gnu99)
|
||||
include("../macros.cmake")
|
||||
|
||||
ENABLE_LANGUAGE(C)
|
||||
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -Werror -Wall -Wstrict-prototypes -g")
|
||||
|
||||
set(OPENAIR_DIR $ENV{OPENAIR_DIR})
|
||||
set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3)
|
||||
include_directories (${OPENAIR_DIR}/openair2/COMMON)
|
||||
include_directories (${OPENAIR_DIR})
|
||||
|
||||
set(CONF2UEDATA_LIB_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_user_data.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_usim.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_network.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_user_plmn.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_parser.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/fs.c
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/display.c
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c
|
||||
${OPENAIR_DIR}/common/utils/mem/memory.c
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${OPENAIR_DIR}/common/utils
|
||||
${OPENAIR_DIR}/openair3/NAS/UE
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USER
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/EMM/
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/ESM/
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/IES/
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL
|
||||
)
|
||||
|
||||
# conf2uedata binary
|
||||
|
||||
set(conf2uedata_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf2uedata.c
|
||||
${CONF2UEDATA_LIB_SRC}
|
||||
)
|
||||
|
||||
add_executable(conf2uedata ${conf2uedata_SRC} )
|
||||
target_link_libraries(conf2uedata ${CONFIG_LIBRARIES})
|
||||
|
||||
# usim binary
|
||||
|
||||
set(usim_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/usim.c
|
||||
${CONF2UEDATA_LIB_SRC}
|
||||
)
|
||||
|
||||
|
||||
add_executable(usim ${usim_SRC} )
|
||||
target_link_libraries(usim ${CONFIG_LIBRARIES})
|
||||
|
||||
# nvram binary
|
||||
|
||||
set(nvram_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/nvram.c
|
||||
${CONF2UEDATA_LIB_SRC}
|
||||
)
|
||||
|
||||
|
||||
add_executable(nvram ${nvram_SRC})
|
||||
target_link_libraries(nvram ${CONFIG_LIBRARIES})
|
||||
@@ -126,9 +126,12 @@ find_package_handle_standard_args(xran
|
||||
VERSION_VAR xran_VERSION
|
||||
)
|
||||
|
||||
# in proper usage of cmake, include directory should only contain "api", but not header files under "src" directory;
|
||||
# however, we use xran_dev_get_ctx() and xran_dev_get_ctx_by_id() functions which are defined in xran_common.h;
|
||||
# since xran_common.h is under "src" directory, we have to include it in ${xran_INCLUDE_DIRS}
|
||||
if(xran_FOUND)
|
||||
set(xran_LIBRARIES ${xran_LIBRARY})
|
||||
set(xran_INCLUDE_DIRS ${xran_INCLUDE_DIR})
|
||||
set(xran_INCLUDE_DIRS ${xran_INCLUDE_DIR} ${xran_INCLUDE_DIR}/../src)
|
||||
endif()
|
||||
|
||||
if(xran_FOUND AND NOT TARGET xran::xran)
|
||||
|
||||
@@ -177,6 +177,7 @@ clean_all_files() {
|
||||
dir=$OPENAIR_DIR/cmake_targets
|
||||
rm -rf $dir/ran_build $dir/ran_build_noLOG
|
||||
rm -rf $dir/lte-simulators/build
|
||||
rm -rf $dir/nas_sim_tools/build
|
||||
rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt
|
||||
rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build
|
||||
}
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
diff --git a/wls_lib/Makefile b/wls_lib/Makefile
|
||||
index 2f8e4b2..e657488 100644
|
||||
--- a/wls_lib/Makefile
|
||||
+++ b/wls_lib/Makefile
|
||||
@@ -1,20 +1,6 @@
|
||||
-###############################################################################
|
||||
-#
|
||||
-# Copyright (c) 2021 Intel.
|
||||
-#
|
||||
-# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
-#
|
||||
-# 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.
|
||||
-#
|
||||
-###############################################################################
|
||||
+################################################################
|
||||
+# <COPYRIGHT_TAG>
|
||||
+################################################################
|
||||
|
||||
MYCUSTOMTAB=' '
|
||||
MYCUSTOMSPACE='============================================================================================'
|
||||
@@ -24,11 +10,17 @@ MYCUSTOMSPACE1='------------------------------------------------------------'
|
||||
# Tools configuration
|
||||
##############################################################
|
||||
ifeq ($(WIRELESS_SDK_TOOLCHAIN),icc)
|
||||
-CC := icc
|
||||
+ CC := icc
|
||||
CPP := icpc
|
||||
-AS := as
|
||||
-AR := ar
|
||||
-LD := icc
|
||||
+ AS := as
|
||||
+ AR := ar
|
||||
+ LD := icc
|
||||
+else ifeq ($(WIRELESS_SDK_TOOLCHAIN),gcc)
|
||||
+ CC := gcc
|
||||
+ CPP := g++
|
||||
+ AS := as
|
||||
+ AR := ar
|
||||
+ LD := gcc
|
||||
else ifeq ($(WIRELESS_SDK_TOOLCHAIN),icx)
|
||||
CC := icx
|
||||
CPP := icx
|
||||
@@ -44,9 +36,9 @@ ifeq ($(WIRELESS_SDK_TARGET_ISA),sse)
|
||||
else ifeq ($(WIRELESS_SDK_TARGET_ISA),avx2)
|
||||
TARGET_PROCESSOR := -xCORE-AVX2
|
||||
else ifeq ($(WIRELESS_SDK_TARGET_ISA),avx512)
|
||||
- TARGET_PROCESSOR := -xCORE-AVX512
|
||||
+ TARGET_PROCESSOR := -march=skylake-avx512
|
||||
else ifeq ($(WIRELESS_SDK_TARGET_ISA),snc)
|
||||
- TARGET_PROCESSOR := -xicelake-server
|
||||
+ TARGET_PROCESSOR := -march=icelake-server
|
||||
else ifeq ($(WIRELESS_SDK_TARGET_ISA),spr)
|
||||
TARGET_PROCESSOR := -march=sapphirerapids
|
||||
endif
|
||||
@@ -66,15 +58,38 @@ PROJECT_DIR := ./
|
||||
BUILDDIR := make
|
||||
PROJECT_BINARY := $(PROJECT_NAME).so
|
||||
|
||||
+PKGCONF ?= pkg-config
|
||||
+LIBDPDK_VERSION=20.11.3
|
||||
+
|
||||
+ifeq ($(shell $(PKGCONF) --modversion "libdpdk = '$(LIBDPDK_VERSION)'"),$(LIBDPDK_VERSION))
|
||||
+ DPDK_INSTALLED=1
|
||||
+else
|
||||
+ DPDK_INSTALLED=0
|
||||
+endif
|
||||
+
|
||||
ifeq ($(RTE_SDK),)
|
||||
-$(error "Please define RTE_SDK environment variable")
|
||||
+ifeq ($(DPDK_INSTALLED),0)
|
||||
+$(error "Please define RTE_SDK environment variable OR install DPDK version $(LIBDPDK_VERSION)")
|
||||
+endif
|
||||
endif
|
||||
|
||||
-RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
+# At least one of the options is defined
|
||||
+
|
||||
+ifneq ($(RTE_SDK),)
|
||||
+ RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
+else ifeq ($(DPDK_INSTALLED),1)
|
||||
+ RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig $(PKGCONF) --cflags-only-I libdpdk)
|
||||
+endif
|
||||
|
||||
CC_SRC = wls_lib_dpdk.c \
|
||||
syslib.c
|
||||
|
||||
+CC_HDR = syslib.h \
|
||||
+ ttypes.h \
|
||||
+ wls.h \
|
||||
+ wls_debug.h \
|
||||
+ wls_lib.h
|
||||
+
|
||||
CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \
|
||||
-fdata-sections \
|
||||
-ffunction-sections \
|
||||
@@ -84,18 +99,19 @@ CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \
|
||||
-Wimplicit-function-declaration \
|
||||
-g -O3 -mcmodel=large $(TARGET_PROCESSOR)
|
||||
|
||||
-INC := -I$(RTE_INC)
|
||||
+INC := -I$(RTE_INC) -I../intel_fapi/
|
||||
DEF :=
|
||||
|
||||
AS_FLAGS :=
|
||||
AR_FLAGS := rc
|
||||
|
||||
PROJECT_OBJ_DIR := $(BUILDDIR)/obj
|
||||
+PROJECT_DEP_DIR := $(PROJECT_OBJ_DIR)/$(PROJECT_NAME).dep.d
|
||||
|
||||
CC_OBJS := $(patsubst %.c,%.o,$(CC_SRC))
|
||||
AS_OBJS := $(patsubst %.s,%.o,$(AS_SRC))
|
||||
OBJS := $(CC_OBJS) $(AS_OBJS) $(LIBS)
|
||||
-DIRLIST := $(addprefix $(PROJECT_OBJ_DIR)/,$(sort $(dir $(OBJS))))
|
||||
+DIRLIST := $(addprefix $(PROJECT_OBJ_DIR)/,$(sort $(dir $(OBJS)))) $(PROJECT_DEP_DIR)
|
||||
|
||||
CC_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(CC_OBJS))
|
||||
|
||||
@@ -104,9 +120,7 @@ CC_FLAGS_FULL := $(CC_FLAGS) $(INC) $(DEF)
|
||||
|
||||
AS_FLAGS := $(AS_FLAGS) $(INC)
|
||||
|
||||
-PROJECT_DEP_FILE := $(PROJECT_OBJ_DIR)/$(PROJECT_NAME).dep
|
||||
-
|
||||
-ifeq ($(wildcard $(PROJECT_DEP_FILE)),$(PROJECT_DEP_FILE))
|
||||
+ifeq ($(wildcard $(PROJECT_DEP_DIR)),$(PROJECT_DEP_DIR))
|
||||
GENERATE_DEPS :=
|
||||
else
|
||||
|
||||
@@ -119,11 +133,11 @@ all : welcome_line $(PROJECT_BINARY)
|
||||
|
||||
.PHONY : clear_dep
|
||||
clear_dep:
|
||||
- @$(RM) $(PROJECT_DEP_FILE)
|
||||
- @echo [DEP] $(subst $(PROJECT_OBJ_DIR)/,,$(PROJECT_DEP_FILE))
|
||||
+ @echo [DEP] rm $(PROJECT_DEP_DIR)/$(@F).dep
|
||||
+ @$(RM) $(PROJECT_DEP_DIR)/$(@F).dep
|
||||
|
||||
-$(CC_DEPS) :
|
||||
- @$(CC) -MM $(subst __up__,../,$(subst __dep__,,$@)) -MT $(PROJECT_OBJ_DIR)/$(patsubst %.c,%.o,$(subst __up__,../,$(subst __dep__,,$@))) $(CC_FLAGS_FULL) >> $(PROJECT_DEP_FILE)
|
||||
+$(CC_DEPS) : $(PROJECT_DEP_DIR)
|
||||
+ @$(CC) $(CC_FLAGS_FULL) -MM $(subst __up__,../,$(subst __dep__,,$@)) -MT $(PROJECT_OBJ_DIR)/$(patsubst %.c,%.o,$(subst __up__,../,$(subst __dep__,,$@))) >> $(PROJECT_DEP_DIR)/$(@F).dep
|
||||
|
||||
.PHONY : generate_deps
|
||||
generate_deps : clear_dep $(CC_DEPS)
|
||||
@@ -136,17 +150,17 @@ echo_start_build :
|
||||
$(DIRLIST) :
|
||||
-@$(MD) $@
|
||||
|
||||
-$(CC_OBJTARGETS) :
|
||||
+$(CC_OBJTARGETS) : $(GENERATE_DEPS)
|
||||
@echo [CC] $(subst $(PROJECT_OBJ_DIR)/,,$@)
|
||||
@$(CC) -c $(CC_FLAGS_FULL) -o"$@" $(patsubst %.o,%.c,$(subst $(PROJECT_OBJ_DIR)/,,$@))
|
||||
|
||||
-$(AS_OBJTARGETS) :
|
||||
+$(AS_OBJTARGETS) : $(CC_OBJTARGETS) $(CPP_OBJTARGETS)
|
||||
@echo [AS] $(subst $(PROJECT_OBJ_DIR)/,,$@)
|
||||
@$(AS) $(AS_FLAGS) -o"$@" $(patsubst %.o,%.s,$(subst $(PROJECT_OBJ_DIR)/,,$@))
|
||||
|
||||
-ifeq ($(wildcard $(PROJECT_DEP_FILE)),$(PROJECT_DEP_FILE))
|
||||
+ifeq ($(wildcard $(PROJECT_DEP_DIR)),$(PROJECT_DEP_DIR))
|
||||
|
||||
-include $(PROJECT_DEP_FILE)
|
||||
+include $(PROJECT_DEP_DIR)/*
|
||||
|
||||
endif
|
||||
|
||||
@@ -156,7 +170,7 @@ clean:
|
||||
@$(RM) $(CC_OBJTARGETS) $(AS_OBJTARGETS)
|
||||
ifneq ($(wildcard $(PROJECT_DIR)/$(PROJECT_MAKE)),)
|
||||
@echo [CLEAN] : $(PROJECT_NAME)
|
||||
- @$(RM) $(PROJECT_BINARY) $(PROJECT_BINARY_LIB) $(PROJECT_DEP_FILE)
|
||||
+ @$(RM) -rf $(PROJECT_BINARY) $(PROJECT_BINARY_LIB) $(PROJECT_DEP_DIR)
|
||||
endif
|
||||
|
||||
xclean: clean
|
||||
@@ -172,7 +186,24 @@ welcome_line :
|
||||
debug : all
|
||||
release : all
|
||||
|
||||
-$(PROJECT_BINARY) : $(DIRLIST) echo_start_build $(GENERATE_DEPS) $(PRE_BUILD) $(CC_OBJTARGETS) $(AS_OBJTARGETS)
|
||||
+$(PROJECT_BINARY) : $(DIRLIST) echo_start_build $(GENERATE_DEPS) $(CC_OBJTARGETS) $(AS_OBJTARGETS)
|
||||
@echo [AR] $(subst $(BUILDDIR)/,,$@)
|
||||
@$(CC) $(CC_OBJTARGETS) $(AS_OBJTARGETS) -shared -fPIC -o $@
|
||||
|
||||
+##############################################################
|
||||
+# Install configuration
|
||||
+##############################################################
|
||||
+
|
||||
+INSTALL_DIR := /usr/local
|
||||
+INCLUDE_DIR := $(INSTALL_DIR)/include/
|
||||
+
|
||||
+.PHONY : install
|
||||
+install: $(PROJECT_BINARY) install_headers
|
||||
+ @echo [INSTALL] : $(PROJECT_BINARY)
|
||||
+ @$(CP) $(PROJECT_BINARY) $(INSTALL_DIR)/lib
|
||||
+
|
||||
+.PHONY : install_headers
|
||||
+install_headers: $(CC_SRC)
|
||||
+ @echo [INSTALL] : $(PROJECT_NAME) headers
|
||||
+ @$(MD) $(INCLUDE_DIR)
|
||||
+ @$(CP) $(CC_HDR) $(INCLUDE_DIR)
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h
|
||||
index 7508117..318508b 100644
|
||||
index 7508117..ce17ebd 100644
|
||||
--- a/fhi_lib/app/src/common.h
|
||||
+++ b/fhi_lib/app/src/common.h
|
||||
@@ -28,7 +28,7 @@
|
||||
@@ -7,12 +7,12 @@ index 7508117..318508b 100644
|
||||
#include <rte_mbuf.h>
|
||||
|
||||
-#define VERSIONX "oran_e_maintenance_release_v1.0"
|
||||
+#define VERSIONX "oran_e_maintenance_release_v1.6"
|
||||
+#define VERSIONX "oran_e_maintenance_release_v1.5"
|
||||
|
||||
#define APP_O_DU 0
|
||||
#define APP_O_RU 1
|
||||
diff --git a/fhi_lib/lib/Makefile b/fhi_lib/lib/Makefile
|
||||
index de141bf..c2a448d 100644
|
||||
index de141bf..fa2923f 100644
|
||||
--- a/fhi_lib/lib/Makefile
|
||||
+++ b/fhi_lib/lib/Makefile
|
||||
@@ -23,12 +23,25 @@ MYCUSTOMSPACE1='------------------------------------------------------------'
|
||||
@@ -50,9 +50,9 @@ index de141bf..c2a448d 100644
|
||||
|
||||
-RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
+ifeq ($(TARGET), x86)
|
||||
+RTE_INC := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkg-config --cflags-only-I libdpdk)
|
||||
+RTE_INC := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
+else ifeq ($(TARGET), armv8)
|
||||
+RTE_INC := $(shell pkg-config --cflags-only-I libdpdk)
|
||||
+RTE_INC := $(pkgconf --cflags-only-I libdpdk)
|
||||
+endif
|
||||
API_DIR := $(PROJECT_DIR)/api
|
||||
SRC_DIR := $(PROJECT_DIR)/src
|
||||
@@ -85,7 +85,7 @@ index de141bf..c2a448d 100644
|
||||
|
||||
CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \
|
||||
-fdata-sections \
|
||||
@@ -112,14 +132,23 @@ CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \
|
||||
@@ -112,12 +132,21 @@ CC_FLAGS += -std=gnu11 -Wall -Wno-deprecated-declarations \
|
||||
-fPIC \
|
||||
-Wall \
|
||||
-Wimplicit-function-declaration \
|
||||
@@ -110,11 +110,8 @@ index de141bf..c2a448d 100644
|
||||
+ -Werror -Wno-unused-variable -std=c++14
|
||||
+endif
|
||||
|
||||
-INC := -I$(API_DIR) -I$(ETH_DIR) -I$(SRC_DIR) -I$(RTE_INC)
|
||||
+INC := -I$(API_DIR) -I$(ETH_DIR) -I$(SRC_DIR) $(RTE_INC)
|
||||
INC := -I$(API_DIR) -I$(ETH_DIR) -I$(SRC_DIR) -I$(RTE_INC)
|
||||
DEF :=
|
||||
ifeq ($(MLOG),1)
|
||||
INC += -I$(MLOG_DIR)/source
|
||||
@@ -150,8 +179,13 @@ CPP_SNC_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(CPP_OBJS_SNC))
|
||||
|
||||
AS_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(AS_OBJS))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h
|
||||
index ac5f471..5efcce3 100644
|
||||
index ac5f471..9ebbcab 100644
|
||||
--- a/fhi_lib/app/src/common.h
|
||||
+++ b/fhi_lib/app/src/common.h
|
||||
@@ -28,7 +28,7 @@
|
||||
@@ -7,12 +7,12 @@ index ac5f471..5efcce3 100644
|
||||
#include <rte_mbuf.h>
|
||||
|
||||
-#define VERSIONX "oran_f_release_v1.0"
|
||||
+#define VERSIONX "oran_f_release_v1.4"
|
||||
+#define VERSIONX "oran_f_release_v1.3"
|
||||
|
||||
#define APP_O_DU 0
|
||||
#define APP_O_RU 1
|
||||
diff --git a/fhi_lib/lib/Makefile b/fhi_lib/lib/Makefile
|
||||
index eccc4ae..a97fdc6 100644
|
||||
index eccc4ae..b1b8f4b 100644
|
||||
--- a/fhi_lib/lib/Makefile
|
||||
+++ b/fhi_lib/lib/Makefile
|
||||
@@ -23,24 +23,46 @@ MYCUSTOMSPACE1='------------------------------------------------------------'
|
||||
@@ -83,9 +83,9 @@ index eccc4ae..a97fdc6 100644
|
||||
RTE_TARGET ?= x86_64-native-linux-icc
|
||||
-RTE_INC := $(shell PKG_CONFIG_PATH=/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
+ifeq ($(TARGET), x86)
|
||||
+RTE_INC := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkg-config --cflags-only-I libdpdk)
|
||||
+RTE_INC := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):/usr/lib64/pkgconfig:$(RTE_SDK)/build/meson-uninstalled pkgconf --cflags-only-I libdpdk)
|
||||
+else ifeq ($(TARGET), armv8)
|
||||
+RTE_INC := $(shell pkg-config --cflags-only-I libdpdk)
|
||||
+RTE_INC := $(pkgconf --cflags-only-I libdpdk)
|
||||
+endif
|
||||
|
||||
API_DIR := $(PROJECT_DIR)/api
|
||||
@@ -147,15 +147,6 @@ index eccc4ae..a97fdc6 100644
|
||||
|
||||
ifeq ($(WIRELESS_SDK_TOOLCHAIN),icc)
|
||||
CPP_FLAGS += -fp-model fast=2 -no-prec-div -no-prec-sqrt -fast-transcendentals -restrict
|
||||
@@ -150,7 +187,7 @@ CPP_FLAGS += -fp-model fast -march=icelake-server -mintrinsic-promote -Wno-unus
|
||||
endif
|
||||
|
||||
|
||||
-INC := -I$(API_DIR) -I$(ETH_DIR) -I$(SRC_DIR) -I$(RTE_INC)
|
||||
+INC := -I$(API_DIR) -I$(ETH_DIR) -I$(SRC_DIR) $(RTE_INC)
|
||||
DEF :=
|
||||
ifeq ($(MLOG),1)
|
||||
INC += -I$(MLOG_DIR)/source
|
||||
@@ -186,8 +223,13 @@ CPP_SNC_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(CPP_OBJS_SNC))
|
||||
|
||||
AS_OBJTARGETS := $(addprefix $(PROJECT_OBJ_DIR)/,$(AS_OBJS))
|
||||
@@ -173,7 +164,7 @@ index eccc4ae..a97fdc6 100644
|
||||
CPP_FLAGS_FULL := $(CPP_FLAGS) $(CPP_COMP) $(INC) $(DEF)
|
||||
CPP_FLAGS_FULL_SNC := $(CPP_FLAGS) $(CPP_COMP_SNC) $(INC) $(DEF)
|
||||
diff --git a/fhi_lib/lib/api/xran_fh_o_du.h b/fhi_lib/lib/api/xran_fh_o_du.h
|
||||
index bacf597..1dd6d66 100644
|
||||
index bacf597..8bd7c66 100644
|
||||
--- a/fhi_lib/lib/api/xran_fh_o_du.h
|
||||
+++ b/fhi_lib/lib/api/xran_fh_o_du.h
|
||||
@@ -141,7 +141,7 @@ extern "C" {
|
||||
@@ -185,15 +176,7 @@ index bacf597..1dd6d66 100644
|
||||
#define XRAN_MAX_SET_BFWS (64) /**< Assumed 64Ant, BFP 9bit with 9K jumbo frame */
|
||||
|
||||
#define XRAN_MAX_PKT_BURST (448+4) /**< 4x14x8 symbols per ms */
|
||||
@@ -419,6 +419,7 @@ struct xran_io_cfg {
|
||||
uint16_t num_rxq; /**< number of RX queues per VF */
|
||||
char *dpdk_dev[XRAN_VF_MAX]; /**< VFs devices */
|
||||
char *bbdev_dev[1]; /**< BBDev dev name */
|
||||
+ char *bbdev_vfio_vf_token[1]; /**< BBDev dev token */
|
||||
int32_t bbdev_mode; /**< DPDK for BBDev */
|
||||
uint32_t dpdkIoVaMode; /**< IOVA Mode */
|
||||
uint32_t dpdkMemorySize; /**< DPDK max memory allocation */
|
||||
@@ -1193,6 +1194,31 @@ int32_t xran_reg_physide_cb_by_dev_id(void *pHandle, xran_fh_tti_callback_fn Cb,
|
||||
@@ -1193,6 +1193,31 @@ int32_t xran_reg_physide_cb_by_dev_id(void *pHandle, xran_fh_tti_callback_fn Cb,
|
||||
*/
|
||||
int32_t xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond);
|
||||
|
||||
@@ -276,7 +259,7 @@ index 46e0e1d..409ef4b 100644
|
||||
int xran_prepare_iq_symbol_portion(
|
||||
struct rte_mbuf *mbuf,
|
||||
diff --git a/fhi_lib/lib/ethernet/ethdi.c b/fhi_lib/lib/ethernet/ethdi.c
|
||||
index f5b2fd6..8fb0ec2 100644
|
||||
index f5b2fd6..144a65e 100644
|
||||
--- a/fhi_lib/lib/ethernet/ethdi.c
|
||||
+++ b/fhi_lib/lib/ethernet/ethdi.c
|
||||
@@ -37,7 +37,10 @@
|
||||
@@ -290,37 +273,8 @@ index f5b2fd6..8fb0ec2 100644
|
||||
#include <numa.h>
|
||||
#include <rte_config.h>
|
||||
#include <rte_common.h>
|
||||
@@ -185,14 +188,24 @@ static void check_port_link_status(uint8_t portid)
|
||||
printf("Port %d Link Up - speed %u "
|
||||
"Mbps - %s\n", (uint8_t)portid,
|
||||
(unsigned)link.link_speed,
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ (link.link_duplex == RTE_ETH_LINK_FULL_DUPLEX) ?
|
||||
+ ("full-duplex") : ("half-duplex\n")
|
||||
+#else
|
||||
(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
|
||||
- ("full-duplex") : ("half-duplex\n"));
|
||||
+ ("full-duplex") : ("half-duplex\n")
|
||||
+#endif
|
||||
+ );
|
||||
else
|
||||
printf("Port %d Link Down\n",
|
||||
(uint8_t)portid);
|
||||
}
|
||||
/* clear all_ports_up flag if any link down */
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ if (link.link_status == RTE_ETH_LINK_DOWN) {
|
||||
+#else
|
||||
if (link.link_status == ETH_LINK_DOWN) {
|
||||
+#endif
|
||||
all_ports_up = 0;
|
||||
break;
|
||||
}
|
||||
@@ -323,10 +336,11 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
uint64_t nWorkerCore = 1;
|
||||
uint32_t coreNum = sysconf(_SC_NPROCESSORS_CONF);
|
||||
@@ -325,8 +328,8 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
char bbdev_wdev[32] = "";
|
||||
+ char bbdev_vfio_vf_token[64] = "";
|
||||
char bbdev_vdev[32] = "";
|
||||
char iova_mode[32] = "--iova-mode=pa";
|
||||
- char socket_mem[32] = "--socket-mem=8192";
|
||||
@@ -330,36 +284,16 @@ index f5b2fd6..8fb0ec2 100644
|
||||
char ring_name[32] = "";
|
||||
int32_t xran_port = -1;
|
||||
queueid_t qi = 0;
|
||||
@@ -336,8 +350,8 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
@@ -336,7 +339,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
cpu = sched_getcpu();
|
||||
node = numa_node_of_cpu(cpu);
|
||||
|
||||
- char *argv[] = { name, core_mask, "-n2", iova_mode, socket_mem, socket_limit, "--proc-type=auto",
|
||||
- "--file-prefix", name, "-a0000:00:00.0", bbdev_wdev, bbdev_vdev};
|
||||
+ char *argv[] = { name, core_mask, "-n2", iova_mode, socket_mem, socket_limit, "--proc-type=auto", "--no-telemetry",
|
||||
+ "--file-prefix", name, "-a0000:00:00.0", bbdev_wdev, bbdev_vdev, bbdev_vfio_vf_token};
|
||||
"--file-prefix", name, "-a0000:00:00.0", bbdev_wdev, bbdev_vdev};
|
||||
|
||||
if (io_cfg == NULL)
|
||||
return 0;
|
||||
@@ -347,11 +361,17 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
// hw-accelerated bbdev
|
||||
printf("hw-accelerated bbdev %s\n", io_cfg->bbdev_dev[0]);
|
||||
snprintf(bbdev_wdev, RTE_DIM(bbdev_wdev), "-a%s", io_cfg->bbdev_dev[0]);
|
||||
+ if (io_cfg->bbdev_vfio_vf_token[0] != NULL) {
|
||||
+ snprintf(bbdev_vfio_vf_token, RTE_DIM(bbdev_vfio_vf_token), "--vfio-vf-token=%s", io_cfg->bbdev_vfio_vf_token[0]);
|
||||
+ }
|
||||
} else if (io_cfg->bbdev_mode == XRAN_BBDEV_MODE_HW_OFF){
|
||||
snprintf(bbdev_wdev, RTE_DIM(bbdev_wdev), "%s", "--vdev=baseband_turbo_sw");
|
||||
} else if (io_cfg->bbdev_mode == XRAN_BBDEV_MODE_HW_SW){
|
||||
printf("software and hw-accelerated bbdev %s\n", io_cfg->bbdev_dev[0]);
|
||||
snprintf(bbdev_wdev, RTE_DIM(bbdev_wdev), "-a%s", io_cfg->bbdev_dev[0]);
|
||||
+ if (io_cfg->bbdev_vfio_vf_token[0] != NULL) {
|
||||
+ snprintf(bbdev_vfio_vf_token, RTE_DIM(bbdev_vfio_vf_token), "--vfio-vf-token=%s", io_cfg->bbdev_vfio_vf_token[0]);
|
||||
+ }
|
||||
snprintf(bbdev_vdev, RTE_DIM(bbdev_vdev), "%s", "--vdev=baseband_turbo_sw");
|
||||
} else {
|
||||
rte_panic("Cannot init DPDK incorrect [bbdev_mode %d]\n", io_cfg->bbdev_mode);
|
||||
@@ -481,11 +501,13 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
@@ -481,11 +484,13 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
ctx->tx_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING_TRX,
|
||||
rte_lcore_to_socket_id(*lcore_id), RING_F_SC_DEQ);
|
||||
PANIC_ON(ctx->tx_ring[i] == NULL, "failed to allocate rx ring");
|
||||
@@ -373,7 +307,7 @@ index f5b2fd6..8fb0ec2 100644
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -555,7 +577,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
@@ -555,7 +560,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg,
|
||||
ctx->up_dl_pkt_gen_ring[i] = rte_ring_create(ring_name, NUM_MBUFS_RING,
|
||||
rte_lcore_to_socket_id(*lcore_id), /*RING_F_SC_DEQ*/0);
|
||||
PANIC_ON(ctx->up_dl_pkt_gen_ring[i] == NULL, "failed to allocate dl gen ring");
|
||||
@@ -383,7 +317,7 @@ index f5b2fd6..8fb0ec2 100644
|
||||
|
||||
return 1;
|
||||
diff --git a/fhi_lib/lib/ethernet/ethernet.c b/fhi_lib/lib/ethernet/ethernet.c
|
||||
index edda598..77e5ca7 100644
|
||||
index edda598..791256c 100644
|
||||
--- a/fhi_lib/lib/ethernet/ethernet.c
|
||||
+++ b/fhi_lib/lib/ethernet/ethernet.c
|
||||
@@ -37,7 +37,10 @@
|
||||
@@ -397,78 +331,6 @@ index edda598..77e5ca7 100644
|
||||
#include <rte_config.h>
|
||||
#include <rte_common.h>
|
||||
#include <rte_log.h>
|
||||
@@ -149,13 +152,22 @@ void xran_init_port(int p_id, uint16_t num_rxq, uint32_t mtu)
|
||||
static uint16_t nb_txd = BURST_SIZE;
|
||||
struct rte_ether_addr addr;
|
||||
struct rte_eth_rxmode rxmode = {
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ .mtu = MAX_RX_LEN,
|
||||
+#else
|
||||
.split_hdr_size = 0,
|
||||
.max_rx_pkt_len = MAX_RX_LEN,
|
||||
.offloads = DEV_RX_OFFLOAD_JUMBO_FRAME
|
||||
+#endif
|
||||
};
|
||||
struct rte_eth_txmode txmode = {
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ .mq_mode = RTE_ETH_MQ_TX_NONE,
|
||||
+ .offloads = RTE_ETH_TX_OFFLOAD_MULTI_SEGS
|
||||
+#else
|
||||
.mq_mode = ETH_MQ_TX_NONE,
|
||||
.offloads = DEV_TX_OFFLOAD_MULTI_SEGS
|
||||
+#endif
|
||||
};
|
||||
struct rte_eth_conf port_conf = {
|
||||
.rxmode = rxmode,
|
||||
@@ -174,8 +186,13 @@ void xran_init_port(int p_id, uint16_t num_rxq, uint32_t mtu)
|
||||
uint32_t num_mbufs = 0;
|
||||
|
||||
if (mtu <= 1500) {
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rxmode.offloads &= ~RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO;
|
||||
+ rxmode.mtu = RTE_ETHER_MAX_LEN;
|
||||
+#else
|
||||
rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
|
||||
rxmode.max_rx_pkt_len = RTE_ETHER_MAX_LEN;
|
||||
+#endif
|
||||
data_room_size = MBUF_POOL_ELM_SMALL;
|
||||
}
|
||||
|
||||
@@ -184,10 +201,19 @@ void xran_init_port(int p_id, uint16_t num_rxq, uint32_t mtu)
|
||||
drv_name = dev_info.driver_name;
|
||||
printf("initializing port %d for TX, drv=%s\n", p_id, drv_name);
|
||||
|
||||
- if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE){
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
|
||||
+#else
|
||||
+ if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
|
||||
+#endif
|
||||
+ {
|
||||
printf("set DEV_TX_OFFLOAD_MBUF_FAST_FREE\n");
|
||||
port_conf.txmode.offloads |=
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
|
||||
+#else
|
||||
DEV_TX_OFFLOAD_MBUF_FAST_FREE;
|
||||
+#endif
|
||||
}
|
||||
|
||||
rte_eth_macaddr_get(p_id, &addr);
|
||||
@@ -293,8 +319,13 @@ void xran_add_eth_hdr_vlan(struct rte_ether_addr *dst, uint16_t ethertype, struc
|
||||
PANIC_ON(h == NULL, "mbuf prepend of ether_hdr failed");
|
||||
|
||||
/* Fill in the ethernet header. */
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_eth_macaddr_get(mb->port, &h->src_addr); /* set source addr */
|
||||
+ h->dst_addr = *dst; /* set dst addr */
|
||||
+#else
|
||||
rte_eth_macaddr_get(mb->port, &h->s_addr); /* set source addr */
|
||||
h->d_addr = *dst; /* set dst addr */
|
||||
+#endif
|
||||
h->ether_type = rte_cpu_to_be_16(ethertype); /* ethertype too */
|
||||
#if 0
|
||||
struct rte_ether_addr *s = &h->s_addr;
|
||||
diff --git a/fhi_lib/lib/src/xran_bfp_ref.cpp b/fhi_lib/lib/src/xran_bfp_ref.cpp
|
||||
index e6d3067..8e0abee 100644
|
||||
--- a/fhi_lib/lib/src/xran_bfp_ref.cpp
|
||||
@@ -703,7 +565,7 @@ index 789c6fd..a768efb 100644
|
||||
#include <rte_common.h>
|
||||
#include <rte_eal.h>
|
||||
diff --git a/fhi_lib/lib/src/xran_delay_measurement.c b/fhi_lib/lib/src/xran_delay_measurement.c
|
||||
index 4c943c8..7db51a8 100644
|
||||
index 4c943c8..d9e7983 100644
|
||||
--- a/fhi_lib/lib/src/xran_delay_measurement.c
|
||||
+++ b/fhi_lib/lib/src/xran_delay_measurement.c
|
||||
@@ -23,7 +23,10 @@
|
||||
@@ -717,155 +579,6 @@ index 4c943c8..7db51a8 100644
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <arpa/inet.h>
|
||||
@@ -572,16 +575,28 @@ int xran_generate_delay_meas(uint16_t port_id, void* handle, uint8_t actionType,
|
||||
PANIC_ON(h == NULL, "mbuf prepend of ether_hdr failed");
|
||||
|
||||
/* Fill in the ethernet header. */
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_eth_macaddr_get(port_id, &h->src_addr); /* set source addr */
|
||||
+#else
|
||||
rte_eth_macaddr_get(port_id, &h->s_addr); /* set source addr */
|
||||
+#endif
|
||||
|
||||
if (p_xran_dev_ctx->fh_init.io_cfg.id)
|
||||
{
|
||||
// rte_ether_addr_copy( (struct rte_ether_addr *)p_xran_dev_ctx->fh_init.p_o_du_addr[port_id],&h->d_addr);
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ h->dst_addr = ctx->entities[port_id][ID_O_DU]; /* set dst addr */
|
||||
+#else
|
||||
h->d_addr = ctx->entities[port_id][ID_O_DU]; /* set dst addr */
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ h->dst_addr = ctx->entities[port_id][ID_O_RU]; /* set dst addr */
|
||||
+#else
|
||||
h->d_addr = ctx->entities[port_id][ID_O_RU]; /* set dst addr */
|
||||
+#endif
|
||||
// rte_ether_addr_copy( (struct rte_ether_addr *)p_xran_dev_ctx->fh_init.p_o_ru_addr[port_id],&h->d_addr);
|
||||
}
|
||||
|
||||
@@ -752,7 +767,11 @@ int xran_generate_delay_meas(uint16_t port_id, void* handle, uint8_t actionType,
|
||||
int8_t *pa = &p_xran_dev_ctx->fh_init.p_o_du_addr[0];
|
||||
printf("DST_MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", pa[0],pa[1],pa[2],pa[3],pa[4],pa[5]);
|
||||
#endif
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_ether_addr_copy((struct rte_ether_addr *)&p_xran_dev_ctx->fh_init.p_o_du_addr[0], (struct rte_ether_addr *)&h->dst_addr.addr_bytes[0]);
|
||||
+#else
|
||||
rte_ether_addr_copy((struct rte_ether_addr *)&p_xran_dev_ctx->fh_init.p_o_du_addr[0], (struct rte_ether_addr *)&h->d_addr.addr_bytes[0]);
|
||||
+#endif
|
||||
|
||||
}
|
||||
else
|
||||
@@ -761,13 +780,25 @@ int xran_generate_delay_meas(uint16_t port_id, void* handle, uint8_t actionType,
|
||||
int8_t *pb = &p_xran_dev_ctx->fh_init.p_o_ru_addr[0];
|
||||
printf("DST_MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", pb[0],pb[1],pb[2],pb[3],pb[4],pb[5]);
|
||||
#endif
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_ether_addr_copy((struct rte_ether_addr *)&p_xran_dev_ctx->fh_init.p_o_ru_addr[0], (struct rte_ether_addr *)&h->dst_addr.addr_bytes[0]);
|
||||
+#else
|
||||
rte_ether_addr_copy((struct rte_ether_addr *)&p_xran_dev_ctx->fh_init.p_o_ru_addr[0], (struct rte_ether_addr *)&h->d_addr.addr_bytes[0]);
|
||||
+#endif
|
||||
|
||||
}
|
||||
#ifdef XRAN_OWD_DEBUG_PKTS
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ uint8_t *pc = &h->src_addr.addr_bytes[0];
|
||||
+#else
|
||||
uint8_t *pc = &h->s_addr.addr_bytes[0];
|
||||
+#endif
|
||||
printf(" Src MAC from packet: %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", pc[0],pc[1],pc[2],pc[3],pc[4],pc[5]);
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ uint8_t *pd = &h->dst_addr.addr_bytes[0];
|
||||
+#else
|
||||
uint8_t *pd = &h->d_addr.addr_bytes[0];
|
||||
+#endif
|
||||
printf(" Dst MAC from packet: %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", pd[0],pd[1],pd[2],pd[3],pd[4],pd[5]);
|
||||
#endif
|
||||
// Copy dest address from above
|
||||
@@ -862,9 +893,15 @@ int xran_process_delmeas_request(struct rte_mbuf *pkt, void* handle, struct xran
|
||||
// 11) Fill the ethernet header properly by swapping src and dest addressed from the copied frame
|
||||
eth_hdr = rte_pktmbuf_mtod(pkt1, struct rte_ether_hdr *);
|
||||
/* Swap dest and src mac addresses. */
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_ether_addr_copy(ð_hdr->dst_addr, &addr);
|
||||
+ rte_ether_addr_copy(ð_hdr->src_addr, ð_hdr->dst_addr);
|
||||
+ rte_ether_addr_copy(&addr, ð_hdr->src_addr);
|
||||
+#else
|
||||
rte_ether_addr_copy(ð_hdr->d_addr, &addr);
|
||||
rte_ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr);
|
||||
rte_ether_addr_copy(&addr, ð_hdr->s_addr);
|
||||
+#endif
|
||||
// Still need to check ol_flags state and update if necessary
|
||||
// Compute the delay td12 and save
|
||||
// Still need to define the DB to save the info and run averages
|
||||
@@ -872,9 +909,17 @@ int xran_process_delmeas_request(struct rte_mbuf *pkt, void* handle, struct xran
|
||||
// 12) Send the response right away
|
||||
#ifdef XRAN_OWD_DEBUG_PKTS
|
||||
struct rte_ether_hdr *h = (struct rte_ether_hdr *)rte_pktmbuf_mtod(pkt1, struct rte_ether_hdr*);
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ uint8_t *pc = &h->src_addr.addr_bytes[0];
|
||||
+#else
|
||||
uint8_t *pc = &h->s_addr.addr_bytes[0];
|
||||
+#endif
|
||||
printf(" Src MAC from packet: %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", pc[0],pc[1],pc[2],pc[3],pc[4],pc[5]);
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ uint8_t *pd = &h->dst_addr.addr_bytes[0];
|
||||
+#else
|
||||
uint8_t *pd = &h->d_addr.addr_bytes[0];
|
||||
+#endif
|
||||
printf(" Dst MAC from packet: %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", pd[0],pd[1],pd[2],pd[3],pd[4],pd[5]);
|
||||
// printf("EtherType: %04"PRIx16" \n",&h->ether_type);
|
||||
#endif
|
||||
@@ -1100,9 +1145,15 @@ int xran_process_delmeas_rem_request(struct rte_mbuf *pkt, void* handle, struct
|
||||
// 9) Fill the ethernet header properly by swapping src and dest addressed from the copied frame
|
||||
eth_hdr = rte_pktmbuf_mtod(pkt1, struct rte_ether_hdr *);
|
||||
/* Swap dest and src mac addresses. */
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_ether_addr_copy(ð_hdr->dst_addr, &addr);
|
||||
+ rte_ether_addr_copy(ð_hdr->src_addr, ð_hdr->dst_addr);
|
||||
+ rte_ether_addr_copy(&addr, ð_hdr->src_addr);
|
||||
+#else
|
||||
rte_ether_addr_copy(ð_hdr->d_addr, &addr);
|
||||
rte_ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr);
|
||||
rte_ether_addr_copy(&addr, ð_hdr->s_addr);
|
||||
+#endif
|
||||
// 10) Send the response right away
|
||||
pdm = (struct xran_ecpri_del_meas_pkt*)rte_pktmbuf_mtod_offset(pkt1, struct xran_ecpri_del_meas_pkt *, sizeof(struct rte_ether_hdr) );
|
||||
pdm->cmnhdr.bits.ecpri_payl_size = 10 + powdc->owdm_PlLength; // 10 correponds to the xran_ecpri_delay_meas_pl minus the dummy_bytes field which now allows the user to select the length for this field to be sent
|
||||
@@ -1177,9 +1228,15 @@ int xran_process_delmeas_rem_request_w_fup(struct rte_mbuf* pkt, void* handle, s
|
||||
// 7) Fill the ethernet header properly by swapping src and dest addressed from the copied frame
|
||||
eth_hdr = rte_pktmbuf_mtod(pkt1, struct rte_ether_hdr *);
|
||||
/* Swap dest and src mac addresses. */
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_ether_addr_copy(ð_hdr->dst_addr, &addr);
|
||||
+ rte_ether_addr_copy(ð_hdr->src_addr, ð_hdr->dst_addr);
|
||||
+ rte_ether_addr_copy(&addr, ð_hdr->src_addr);
|
||||
+#else
|
||||
rte_ether_addr_copy(ð_hdr->d_addr, &addr);
|
||||
rte_ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr);
|
||||
rte_ether_addr_copy(&addr, ð_hdr->s_addr);
|
||||
+#endif
|
||||
// 8) Duplicate packet to be used for the follow up packet
|
||||
pkt2 = rte_pktmbuf_copy(pkt1, _eth_mbuf_pool, 0, UINT32_MAX);
|
||||
// 9) Record the current timestamp when the request with follow up is being sent
|
||||
@@ -1283,9 +1340,15 @@ int xran_process_delmeas_follow_up(struct rte_mbuf *pkt, void* handle, struct xr
|
||||
// 9) Fill the ethernet header properly by swapping src and dest addressed from the copied frame
|
||||
eth_hdr = rte_pktmbuf_mtod(pkt1, struct rte_ether_hdr *);
|
||||
/* Swap dest and src mac addresses. */
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_ether_addr_copy(ð_hdr->dst_addr, &addr);
|
||||
+ rte_ether_addr_copy(ð_hdr->src_addr, ð_hdr->dst_addr);
|
||||
+ rte_ether_addr_copy(&addr, ð_hdr->src_addr);
|
||||
+#else
|
||||
rte_ether_addr_copy(ð_hdr->d_addr, &addr);
|
||||
rte_ether_addr_copy(ð_hdr->s_addr, ð_hdr->d_addr);
|
||||
rte_ether_addr_copy(&addr, ð_hdr->s_addr);
|
||||
+#endif
|
||||
pdm = (struct xran_ecpri_del_meas_pkt*)rte_pktmbuf_mtod_offset(pkt1, struct xran_ecpri_del_meas_pkt *, sizeof(struct rte_ether_hdr) );
|
||||
pdm->cmnhdr.bits.ecpri_payl_size = 10 + powdc->owdm_PlLength; // 10 correponds to the xran_ecpri_delay_meas_pl minus the dummy_bytes field which now allows the user to select the length for this field to be sent
|
||||
pdm->cmnhdr.bits.ecpri_payl_size = rte_cpu_to_be_16(pdm->cmnhdr.bits.ecpri_payl_size);
|
||||
diff --git a/fhi_lib/lib/src/xran_dev.c b/fhi_lib/lib/src/xran_dev.c
|
||||
index 4acade1..c939edc 100644
|
||||
--- a/fhi_lib/lib/src/xran_dev.c
|
||||
@@ -1664,7 +1377,7 @@ index 72249bc..6b30084 100644
|
||||
#include <rte_config.h>
|
||||
|
||||
diff --git a/fhi_lib/lib/src/xran_tx_proc.c b/fhi_lib/lib/src/xran_tx_proc.c
|
||||
index 45a17a8..85ce6fa 100644
|
||||
index 45a17a8..28c5568 100644
|
||||
--- a/fhi_lib/lib/src/xran_tx_proc.c
|
||||
+++ b/fhi_lib/lib/src/xran_tx_proc.c
|
||||
@@ -35,7 +35,11 @@
|
||||
@@ -1679,58 +1392,6 @@ index 45a17a8..85ce6fa 100644
|
||||
|
||||
#include <rte_common.h>
|
||||
#include <rte_eal.h>
|
||||
@@ -1514,7 +1518,11 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
|
||||
mb_oran_hdr_ext->buf_addr = ext_buff;
|
||||
mb_oran_hdr_ext->buf_iova = ((struct rte_mempool_objhdr*)RTE_PTR_SUB(mb_base, rte_mempool_objhdr_size))->iova + RTE_PTR_DIFF(ext_buff, mb_base);
|
||||
mb_oran_hdr_ext->buf_len = ext_buff_len;
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ mb_oran_hdr_ext->ol_flags |= RTE_MBUF_F_EXTERNAL;
|
||||
+#else
|
||||
mb_oran_hdr_ext->ol_flags |= EXT_ATTACHED_MBUF;
|
||||
+#endif
|
||||
mb_oran_hdr_ext->shinfo = p_share_data;
|
||||
mb_oran_hdr_ext->data_off = (uint16_t)RTE_MIN((uint16_t)RTE_PKTMBUF_HEADROOM, (uint16_t)mb_oran_hdr_ext->buf_len) - rte_ether_hdr_size;
|
||||
mb_oran_hdr_ext->data_len = (uint16_t)(mb_oran_hdr_ext->data_len + rte_ether_hdr_size);
|
||||
@@ -1532,8 +1540,13 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
|
||||
|
||||
/* Fill in the ethernet header. */
|
||||
#ifndef TRANSMIT_BURST
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_eth_macaddr_get(mb_oran_hdr_ext->port, &((struct rte_ether_hdr*)pStart)->src_addr); /* set source addr */
|
||||
+ ((struct rte_ether_hdr*)pStart)->dst_addr = eth_ctx->entities[vf_id][ID_O_RU]; /* set dst addr */
|
||||
+#else
|
||||
rte_eth_macaddr_get(mb_oran_hdr_ext->port, &((struct rte_ether_hdr*)pStart)->s_addr); /* set source addr */
|
||||
((struct rte_ether_hdr*)pStart)->d_addr = eth_ctx->entities[vf_id][ID_O_RU]; /* set dst addr */
|
||||
+#endif
|
||||
((struct rte_ether_hdr*)pStart)->ether_type = ETHER_TYPE_ECPRI_BE; /* ethertype */
|
||||
#endif
|
||||
nPktSize = sizeof(struct rte_ether_hdr)
|
||||
@@ -1878,7 +1891,11 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
|
||||
mb_oran_hdr_ext->buf_addr = ext_buff;
|
||||
mb_oran_hdr_ext->buf_iova = ((struct rte_mempool_objhdr*)RTE_PTR_SUB(mb_base, rte_mempool_objhdr_size))->iova + RTE_PTR_DIFF(ext_buff, mb_base);
|
||||
mb_oran_hdr_ext->buf_len = ext_buff_len;
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ mb_oran_hdr_ext->ol_flags |= RTE_MBUF_F_EXTERNAL;
|
||||
+#else
|
||||
mb_oran_hdr_ext->ol_flags |= EXT_ATTACHED_MBUF;
|
||||
+#endif
|
||||
mb_oran_hdr_ext->shinfo = p_share_data;
|
||||
mb_oran_hdr_ext->data_off = (uint16_t)RTE_MIN((uint16_t)RTE_PKTMBUF_HEADROOM, (uint16_t)mb_oran_hdr_ext->buf_len) - rte_ether_hdr_size;
|
||||
mb_oran_hdr_ext->data_len = (uint16_t)(mb_oran_hdr_ext->data_len + rte_ether_hdr_size);
|
||||
@@ -1887,8 +1904,13 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
|
||||
pStart = (char*)((char*)mb_oran_hdr_ext->buf_addr + mb_oran_hdr_ext->data_off);
|
||||
|
||||
/* Fill in the ethernet header. */
|
||||
+#if (RTE_VER_YEAR >= 21)
|
||||
+ rte_eth_macaddr_get(mb_oran_hdr_ext->port, &((struct rte_ether_hdr*)pStart)->src_addr); /* set source addr */
|
||||
+ ((struct rte_ether_hdr*)pStart)->dst_addr = eth_ctx->entities[vf_id][ID_O_RU]; /* set dst addr */
|
||||
+#else
|
||||
rte_eth_macaddr_get(mb_oran_hdr_ext->port, &((struct rte_ether_hdr*)pStart)->s_addr); /* set source addr */
|
||||
((struct rte_ether_hdr*)pStart)->d_addr = eth_ctx->entities[vf_id][ID_O_RU]; /* set dst addr */
|
||||
+#endif
|
||||
((struct rte_ether_hdr*)pStart)->ether_type = ETHER_TYPE_ECPRI_BE; /* ethertype */
|
||||
|
||||
nPktSize = sizeof(struct rte_ether_hdr)
|
||||
diff --git a/fhi_lib/lib/src/xran_up_api.c b/fhi_lib/lib/src/xran_up_api.c
|
||||
index fe22a1f..3fd369b 100644
|
||||
--- a/fhi_lib/lib/src/xran_up_api.c
|
||||
|
||||
@@ -45,14 +45,6 @@ typedef struct nr_guami_s {
|
||||
uint8_t amf_pointer;
|
||||
} nr_guami_t;
|
||||
|
||||
typedef enum {
|
||||
PDUSessionType_ipv4 = 0,
|
||||
PDUSessionType_ipv6 = 1,
|
||||
PDUSessionType_ipv4v6 = 2,
|
||||
PDUSessionType_ethernet = 3,
|
||||
PDUSessionType_unstructured = 4
|
||||
} pdu_session_type_t;
|
||||
|
||||
typedef enum { NON_DYNAMIC, DYNAMIC } fiveQI_t;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -218,27 +218,25 @@ typedef struct nr_lcid_rb_t {
|
||||
} nr_lcid_rb_t;
|
||||
|
||||
typedef struct transport_layer_addr_s {
|
||||
/** Transport Layer Address in bytes:
|
||||
* - 4 bytes for IPv4 (RFC 791), 16 bytes for IPv6 (RFC 2460),
|
||||
* - 20 bytes for both IPv4 and IPv6, with IPv4 in the first 4 bytes. */
|
||||
/**
|
||||
* Transport Layer Address as a bitstring:
|
||||
* - 32 bits for IPv4 (RFC 791),
|
||||
* - 128 bits for IPv6 (RFC 2460),
|
||||
* - 160 bits for both IPv4 and IPv6, with IPv4 in the first 32 bits.
|
||||
* The S1AP/NGAP layer forwards this address (bitstring<1..160>)
|
||||
* to S1-U/NG-U without interpreting it.
|
||||
*/
|
||||
uint8_t length;
|
||||
/// Buffer: address in network byte order
|
||||
uint8_t buffer[20];
|
||||
} transport_layer_addr_t;
|
||||
|
||||
/** @brief GTP tunnel configuration */
|
||||
typedef struct {
|
||||
// Tunnel endpoint identifier
|
||||
uint32_t teid;
|
||||
// Transport layer address
|
||||
transport_layer_addr_t addr;
|
||||
} gtpu_tunnel_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GTPV1U TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint32_t teid_t; // tunnel endpoint identifier
|
||||
typedef uint8_t ebi_t; // eps bearer id
|
||||
typedef uint8_t pdusessionid_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -100,14 +100,12 @@ struct T_header;
|
||||
|
||||
/* T macro tricks */
|
||||
extern int T_stdout;
|
||||
#define TN(...) TN_N(__VA_ARGS__,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,\
|
||||
56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,\
|
||||
37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,\
|
||||
18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)(__VA_ARGS__)
|
||||
#define TN_N(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,\
|
||||
n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37,n38,\
|
||||
n39,n40,n41,n42,n43,n44,n45,n46,n47,n48,n49,n50,n51,n52,n53,n54,n55,n56,\
|
||||
n57,n58,n59,n60,n61,n62,n63,n64,n65,n66,n67,n68,n69,n70,n,...) T##n
|
||||
#define TN(...) TN_N(__VA_ARGS__,39,38,37,36,35,34,33,32,31,30,29,28,27,26, \
|
||||
25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7, \
|
||||
6,5,4,3,2,1,0)(__VA_ARGS__)
|
||||
#define TN_N(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17, \
|
||||
n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32, \
|
||||
n33,n34,n35,n36,n37,n38,n,...) T##n
|
||||
#define T(...) do { if (T_stdout == 0 || T_stdout == 2) TN(__VA_ARGS__); } while (0)
|
||||
|
||||
/* type used to send arbitrary buffer data */
|
||||
@@ -622,633 +620,6 @@ extern int *T_active;
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define T41(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T43(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T45(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T47(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T49(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T51(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T53(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T55(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T57(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26,t27,x27) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_PUT_##t27(29, x27); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T59(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26,t27,x27,t28,x28) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_PUT_##t27(29, x27); \
|
||||
T_PUT_##t28(30, x28); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T61(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26,t27,x27,t28,x28,t29,x29) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_PUT_##t27(29, x27); \
|
||||
T_PUT_##t28(30, x28); \
|
||||
T_PUT_##t29(31, x29); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T63(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26,t27,x27,t28,x28,t29,x29,t30,x30) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_PUT_##t27(29, x27); \
|
||||
T_PUT_##t28(30, x28); \
|
||||
T_PUT_##t29(31, x29); \
|
||||
T_PUT_##t30(32, x30); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T65(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26,t27,x27,t28,x28,t29,x29,t30,x30,t31,x31) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_PUT_##t27(29, x27); \
|
||||
T_PUT_##t28(30, x28); \
|
||||
T_PUT_##t29(31, x29); \
|
||||
T_PUT_##t30(32, x30); \
|
||||
T_PUT_##t31(33, x31); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T67(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26,t27,x27,t28,x28,t29,x29,t30,x30,t31,x31,t32,x32) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_PUT_##t27(29, x27); \
|
||||
T_PUT_##t28(30, x28); \
|
||||
T_PUT_##t29(31, x29); \
|
||||
T_PUT_##t30(32, x30); \
|
||||
T_PUT_##t31(33, x31); \
|
||||
T_PUT_##t32(34, x32); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T69(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26,t27,x27,t28,x28,t29,x29,t30,x30,t31,x31,t32,x32,t33,x33) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_PUT_##t27(29, x27); \
|
||||
T_PUT_##t28(30, x28); \
|
||||
T_PUT_##t29(31, x29); \
|
||||
T_PUT_##t30(32, x30); \
|
||||
T_PUT_##t31(33, x31); \
|
||||
T_PUT_##t32(34, x32); \
|
||||
T_PUT_##t33(35, x33); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define T71(t,t0,x0,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,\
|
||||
t10,x10,t11,x11,t12,x12,t13,x13,t14,x14,t15,x15,t16,x16,t17,x17,\
|
||||
t18,x18,t19,x19,t20,x20,t21,x21,t22,x22,t23,x23,t24,x24,t25,x25,\
|
||||
t26,x26,t27,x27,t28,x28,t29,x29,t30,x30,t31,x31,t32,x32,t33,x33,t34,x34) \
|
||||
do { \
|
||||
if (T_ACTIVE(t)) { \
|
||||
T_LOCAL_DATA \
|
||||
T_HEADER(t); \
|
||||
T_PUT_##t0(2, x0); \
|
||||
T_PUT_##t1(3, x1); \
|
||||
T_PUT_##t2(4, x2); \
|
||||
T_PUT_##t3(5, x3); \
|
||||
T_PUT_##t4(6, x4); \
|
||||
T_PUT_##t5(7, x5); \
|
||||
T_PUT_##t6(8, x6); \
|
||||
T_PUT_##t7(9, x7); \
|
||||
T_PUT_##t8(10, x8); \
|
||||
T_PUT_##t9(11, x9); \
|
||||
T_PUT_##t10(12, x10); \
|
||||
T_PUT_##t11(13, x11); \
|
||||
T_PUT_##t12(14, x12); \
|
||||
T_PUT_##t13(15, x13); \
|
||||
T_PUT_##t14(16, x14); \
|
||||
T_PUT_##t15(17, x15); \
|
||||
T_PUT_##t16(18, x16); \
|
||||
T_PUT_##t17(19, x17); \
|
||||
T_PUT_##t18(20, x18); \
|
||||
T_PUT_##t19(21, x19); \
|
||||
T_PUT_##t20(22, x20); \
|
||||
T_PUT_##t21(23, x21); \
|
||||
T_PUT_##t22(24, x22); \
|
||||
T_PUT_##t23(25, x23); \
|
||||
T_PUT_##t24(26, x24); \
|
||||
T_PUT_##t25(27, x25); \
|
||||
T_PUT_##t26(28, x26); \
|
||||
T_PUT_##t27(29, x27); \
|
||||
T_PUT_##t28(30, x28); \
|
||||
T_PUT_##t29(31, x29); \
|
||||
T_PUT_##t30(32, x30); \
|
||||
T_PUT_##t31(33, x31); \
|
||||
T_PUT_##t32(34, x32); \
|
||||
T_PUT_##t33(35, x33); \
|
||||
T_PUT_##t34(36, x34); \
|
||||
T_COMMIT(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define T_CALL_ERROR \
|
||||
do { \
|
||||
printf("%s:%d:%s: error calling T, you have to use T_INT() or T_XX()\n", \
|
||||
@@ -1274,22 +645,6 @@ extern int *T_active;
|
||||
#define T34(...) T_CALL_ERROR
|
||||
#define T36(...) T_CALL_ERROR
|
||||
#define T38(...) T_CALL_ERROR
|
||||
#define T40(...) T_CALL_ERROR
|
||||
#define T42(...) T_CALL_ERROR
|
||||
#define T44(...) T_CALL_ERROR
|
||||
#define T46(...) T_CALL_ERROR
|
||||
#define T48(...) T_CALL_ERROR
|
||||
#define T50(...) T_CALL_ERROR
|
||||
#define T52(...) T_CALL_ERROR
|
||||
#define T54(...) T_CALL_ERROR
|
||||
#define T56(...) T_CALL_ERROR
|
||||
#define T58(...) T_CALL_ERROR
|
||||
#define T60(...) T_CALL_ERROR
|
||||
#define T62(...) T_CALL_ERROR
|
||||
#define T64(...) T_CALL_ERROR
|
||||
#define T66(...) T_CALL_ERROR
|
||||
#define T68(...) T_CALL_ERROR
|
||||
#define T70(...) T_CALL_ERROR
|
||||
|
||||
/* special cases for VCD logs */
|
||||
|
||||
|
||||
@@ -111,26 +111,6 @@ ID = GNB_PHY_PUCCH_PUSCH_IQ
|
||||
DESC = gNodeB input data in the frequency domain for a slot where some PUCCH or PUSCH detection was done
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : buffer,rxdataF
|
||||
ID = GNB_PHY_UL_FD_PUSCH_IQ
|
||||
DESC = gNodeB UL PUSCH IQ Data in the frequency domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm : int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot : int,Nid_cell : int,rnti : int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols : int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers : int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols : int,dmrs_port : int,dmrs_nscid : int,nb_antennas_rx : int,number_of_bits : buffer,data
|
||||
ID = GNB_PHY_UL_FD_DMRS
|
||||
DESC = gNodeB UL DMRS Signal in the frequency domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm : int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot : int,Nid_cell : int,rnti : int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols : int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers : int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols : int,dmrs_port : int,dmrs_nscid : int,nb_antennas_rx : int,number_of_bits : buffer,data
|
||||
ID = GNB_PHY_UL_FD_CHAN_EST_DMRS_POS
|
||||
DESC = gNodeB channel estimation in the frequency domain based on DMRS and at DMRS pilots location without any further interploation.
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm : int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot : int,Nid_cell : int,rnti : int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols : int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers : int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols : int,dmrs_port : int,dmrs_nscid : int,nb_antennas_rx : int,number_of_bits : buffer,data
|
||||
ID = GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL
|
||||
DESC = gNodeB channel estimation in the frequency domain based on DMRS and interploation.
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm : int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot : int,Nid_cell : int,rnti : int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols : int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers : int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols : int,dmrs_port : int,dmrs_nscid : int,nb_antennas_rx : int,number_of_bits : buffer,dataI
|
||||
ID = GNB_PHY_UL_PAYLOAD_RX_BITS
|
||||
DESC = gNodeB slot payload after decoder
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm : int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot : int,Nid_cell : int,rnti : int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols : int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers : int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols : int,dmrs_port : int,dmrs_nscid : int,nb_antennas_rx : int,number_of_bits : buffer,data
|
||||
ID = GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE
|
||||
DESC = gNodeB channel estimation in the frequency domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
@@ -1372,14 +1352,6 @@ ID = UE_PHY_MEAS
|
||||
DESC = UE PHY measurements
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:UE
|
||||
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rsrp : int,rssi : int,snr: int,rx_power: int,noise_power: int,w_cqi: int,freq_offset
|
||||
ID = UE_PHY_UL_PAYLOAD_TX_BITS
|
||||
DESC = UE UL Tx bits in one slot before decoder and scrambler
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:UE
|
||||
FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm : int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot : int,Nid_cell : int,rnti : int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols : int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers : int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols : int,dmrs_port : int,dmrs_nscid : int,nb_antennas_tx : int,number_of_bits : buffer,data
|
||||
ID = UE_PHY_UL_SCRAMBLED_TX_BITS
|
||||
DESC = UE UL Tx bits in one slot after scrambler
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:UE
|
||||
FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm : int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot : int,Nid_cell : int,rnti : int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols : int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers : int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols : int,dmrs_port : int,dmrs_nscid : int,nb_antennas_tx : int,number_of_bits : buffer,data
|
||||
|
||||
#for debug/test - not used
|
||||
ID = first
|
||||
|
||||
@@ -8,7 +8,7 @@ XLIBS=-lX11 -lpng -lXft
|
||||
|
||||
all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
|
||||
extract_input_subframe extract_output_subframe to_vcd extract multi \
|
||||
gnb t_tracer_app_gnb t_tracer_app_ue
|
||||
gnb
|
||||
|
||||
record: utils.o record.o database.o configuration.o
|
||||
$(CC) $(CFLAGS) -o record $^ $(LIBS)
|
||||
@@ -65,14 +65,6 @@ gnb: utils.o gnb.o database.o event.o handler.o configuration.o \
|
||||
filter/filter.a
|
||||
$(CC) $(CFLAGS) -o gnb $^ $(LIBS) $(XLIBS)
|
||||
|
||||
t_tracer_app_gnb: utils.o t_tracer_app_gnb.o database.o event.o handler.o configuration.o \
|
||||
logger/logger.a filter/filter.a
|
||||
$(CC) $(CFLAGS) -o t_tracer_app_gnb $^ $(LIBS) $(XLIBS)
|
||||
|
||||
t_tracer_app_ue: utils.o t_tracer_app_ue.o database.o event.o handler.o configuration.o \
|
||||
logger/logger.a filter/filter.a
|
||||
$(CC) $(CFLAGS) -o t_tracer_app_ue $^ $(LIBS) $(XLIBS)
|
||||
|
||||
multi.o: ../incgen/T_IDs.h
|
||||
|
||||
../incgen/T_IDs.h: ../T_messages.txt
|
||||
@@ -98,7 +90,7 @@ filter/filter.a:
|
||||
clean:
|
||||
rm -f *.o core tracer_remote textlog enb ue vcd record replay
|
||||
rm -f extract_config macpdu2wireshark extract_input_subframe
|
||||
rm -f extract_output_subframe to_vcd extract multi gnb t_tracer_app_gnb t_tracer_app_ue
|
||||
rm -f extract_output_subframe to_vcd extract multi gnb
|
||||
cd gui && $(MAKE) clean
|
||||
cd view && $(MAKE) clean
|
||||
cd logger && $(MAKE) clean
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#endif
|
||||
|
||||
/* maximum number of arguments for the T macro */
|
||||
#define T_MAX_ARGS 72
|
||||
#define T_MAX_ARGS 32
|
||||
|
||||
enum event_arg_type {
|
||||
EVENT_INT,
|
||||
|
||||
@@ -1,64 +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
|
||||
*/
|
||||
|
||||
/*! \file common/utils/T/tracer/shared_memory_config.h
|
||||
* \brief shared memory to store data captured by T-Tracer services to be processed by data recording application
|
||||
* \author Abdo Gaber
|
||||
* \date 2024
|
||||
* \version 1.0
|
||||
* \company Emerson, NI Test and Measurement
|
||||
* \email:
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef _SHARED_MEMORY_CONFIG_H_
|
||||
#define _SHARED_MEMORY_CONFIG_H_
|
||||
|
||||
#define SHMSIZE ((122.88e6 / (100 * 20)) * 1000 * 8) // Assume capture in 1000, each I+Q represented by 8 byts
|
||||
// 122.88e6: 10ms at 100 MHz BW of 5G NR
|
||||
// 20: 20 slots in 10ms
|
||||
// subcarrier spacing: 30 KHz
|
||||
|
||||
// for gNB T Tracer App
|
||||
#define GETKEYDIR1_gNB ("/tmp/gnb_app1")
|
||||
#define GETKEYDIR2_gNB ("/tmp/gnb_app2")
|
||||
#define PROJECTID_gNB (2335)
|
||||
|
||||
// for UET Tracer App
|
||||
#define GETKEYDIR1_UE ("/tmp/ue_app1")
|
||||
#define GETKEYDIR2_UE ("/tmp/ue_app2")
|
||||
#define PROJECTID_UE (2336)
|
||||
|
||||
void err_exit(char *buf);
|
||||
int create_shm(char **addrN, const char *pathname, int projectId);
|
||||
void del_shm(char *addr, int shm_id);
|
||||
|
||||
#endif /* _SHARED_MEMORY_CONFIG_H_ */
|
||||
@@ -1,973 +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
|
||||
*/
|
||||
|
||||
/*! \file common/utils/T/tracer/t_tracer_app_gnb.c
|
||||
* \brief T-Tracer gnb service to capture tracee Messages from gNB, it is used by data recording application
|
||||
* \author Abdo Gaber
|
||||
* \date 2025
|
||||
* \version 1.0
|
||||
* \company Emerson, NI Test and Measurement
|
||||
* \email:
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "handler.h"
|
||||
#include "logger/logger.h"
|
||||
#include "utils.h"
|
||||
#include "event_selector.h"
|
||||
#include "configuration.h"
|
||||
#include "shared_memory_config.h"
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <poll.h>
|
||||
#define MAX_FRAME_INDEX 1023
|
||||
#define MAX_SLOT_INDEX 19
|
||||
#define DEBUG_T_Tracer
|
||||
#define DEBUG_BUFFER
|
||||
// Duration to discard recording in milliseconds to mitigate reading data from
|
||||
// the buffer in the stack from the previous record
|
||||
#define DISCARD_RECORD_DURATION_MS 10
|
||||
|
||||
// Combine bytes in - little-endian format
|
||||
int combine_bytes(const uint8_t *bytes, size_t num_bytes)
|
||||
{
|
||||
int result = 0;
|
||||
for (size_t i = 0; i < num_bytes; ++i) {
|
||||
result |= (bytes[i] << (i * 8));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Convert an integer to an array of bytes - little-endian format
|
||||
void int_to_bytes(int num, uint8_t *bytes, size_t num_bytes)
|
||||
{
|
||||
for (size_t i = 0; i < num_bytes; ++i) {
|
||||
bytes[i] = (num >> (i * 8)) & 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the message is in the list of bits messages
|
||||
bool is_bits_messages(int traces_bits_support_data_Collection_format_idx[], int n_bits_msgs, int msg_id)
|
||||
{
|
||||
for (int i = 0; i < n_bits_msgs; i++) {
|
||||
if (msg_id == traces_bits_support_data_Collection_format_idx[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the current time
|
||||
struct timespec get_current_time()
|
||||
{
|
||||
struct timespec time;
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
return time;
|
||||
}
|
||||
|
||||
// Function to convert timespec to microseconds
|
||||
long long timespec_to_microseconds(struct timespec time)
|
||||
{
|
||||
return (time.tv_sec * 1000000LL) + (time.tv_nsec / 1000);
|
||||
}
|
||||
|
||||
// Calculate the time difference in milliseconds
|
||||
double calculate_time_difference(struct timespec start, struct timespec end)
|
||||
{
|
||||
double start_ms = start.tv_sec * 1000.0 + start.tv_nsec / 1000000.0;
|
||||
double end_ms = end.tv_sec * 1000.0 + end.tv_nsec / 1000000.0;
|
||||
return end_ms - start_ms;
|
||||
}
|
||||
|
||||
// Get Time Stamp in microseconds in YYYYMMDDHHMMSSmmmuuu format
|
||||
char *get_time_stamp_usec(char time_stamp_str[])
|
||||
{
|
||||
// initialization to measure time stamp --This part should be moved to inilization part
|
||||
time_t my_time;
|
||||
struct tm *timeinfo;
|
||||
time(&my_time);
|
||||
struct timeval tv;
|
||||
|
||||
// get time stamp
|
||||
timeinfo = localtime(&my_time);
|
||||
gettimeofday(&tv, NULL);
|
||||
// Add time stamp: yyyy mm dd hh mm ss usec
|
||||
uint16_t year = timeinfo->tm_year + 1900;
|
||||
uint8_t mon = timeinfo->tm_mon + 1;
|
||||
uint8_t mday = timeinfo->tm_mday;
|
||||
uint8_t hour = timeinfo->tm_hour;
|
||||
uint8_t min = timeinfo->tm_min;
|
||||
uint8_t sec = timeinfo->tm_sec;
|
||||
uint16_t usec = (tv.tv_usec);
|
||||
// printf ("Time stamp: %d_%d_%d_%d_%d_%d_%d \n",year,mon,mday,hour,min,sec,usec);
|
||||
// sprintf(time_stamp_str, "%d_%d_%d_%d_%d_%d_%d",year,mon,mday,hour,min,sec,usec);
|
||||
sprintf(time_stamp_str, "%04d%02d%02d%02d%02d%02d%06d", year, mon, mday, hour, min, sec, usec);
|
||||
|
||||
return time_stamp_str;
|
||||
}
|
||||
|
||||
// Convert timestamp string to integer
|
||||
int convert_time_stamp_to_int(const char *timestamp)
|
||||
{
|
||||
return atoi(timestamp);
|
||||
}
|
||||
|
||||
// Split timestamp string and convert to integer
|
||||
int split_time_stamp_and_convert_to_int(char time_stamp_str[], int shift, int length)
|
||||
{
|
||||
char time_part[length + 1]; // Buffer to hold the date part YYYYMMDD or HHMMSSmmm
|
||||
// Copy the first 8 or 9 characters (YYYYMMDD) to HHMMSSmmm
|
||||
strncpy(time_part, time_stamp_str + shift, length);
|
||||
time_part[length] = '\0'; // Null-terminate the string
|
||||
// Convert timestamp string to integer
|
||||
return convert_time_stamp_to_int(time_part);
|
||||
}
|
||||
|
||||
void err_exit(char *buf)
|
||||
{
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// create shared memory
|
||||
int create_shm(char **addrN, const char *shm_path, int projectId)
|
||||
{
|
||||
key_t key;
|
||||
if (-1 != open(shm_path, O_CREAT, 0777)) {
|
||||
key = ftok(shm_path, projectId);
|
||||
} else {
|
||||
err_exit("Error: open shared memory");
|
||||
}
|
||||
|
||||
if (key < 0) {
|
||||
err_exit("Error: ftok error");
|
||||
}
|
||||
|
||||
int shm_id;
|
||||
shm_id = shmget(key, SHMSIZE, IPC_CREAT | IPC_EXCL | 0664);
|
||||
if (shm_id == -1) {
|
||||
if (errno == EEXIST) {
|
||||
printf("Error: shared memeory already exist\n");
|
||||
shm_id = shmget(key, 0, 0);
|
||||
printf("reference shm_id = %d\n", shm_id);
|
||||
} else {
|
||||
perror("errno");
|
||||
err_exit("shmget error");
|
||||
}
|
||||
}
|
||||
char *addr;
|
||||
// address to attach - attach for read & write
|
||||
if ((addr = shmat(shm_id, 0, 0)) == (void *)-1) {
|
||||
if (shmctl(shm_id, IPC_RMID, NULL) == -1)
|
||||
err_exit("Error: shmctl error");
|
||||
else {
|
||||
printf("Attach shared memory failed\n");
|
||||
printf("remove shared memory identifier successful\n");
|
||||
}
|
||||
err_exit("shmat error");
|
||||
}
|
||||
*addrN = addr;
|
||||
return shm_id;
|
||||
}
|
||||
|
||||
// delete shared memory
|
||||
void del_shm(char *addr, int shm_id)
|
||||
{
|
||||
if (shmdt(addr) < 0)
|
||||
err_exit("shmdt error");
|
||||
|
||||
if (shmctl(shm_id, IPC_RMID, NULL) == -1)
|
||||
err_exit("shmctl error");
|
||||
else {
|
||||
printf("Remove shared memory identifier successful\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* this function sends the activated traces to the nr-softmodem */
|
||||
void activate_traces(int socket, int number_of_events, int *is_on)
|
||||
{
|
||||
char t = 1;
|
||||
if (socket_send(socket, &t, 1) == -1 || socket_send(socket, &number_of_events, sizeof(int)) == -1
|
||||
|| socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
|
||||
abort();
|
||||
}
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
printf(
|
||||
"options:\n"
|
||||
" -d <database file> this option is mandatory\n"
|
||||
" -ip <host> connect to given IP address (default %s)\n"
|
||||
" -p <port> connect to given port (default %d)\n",
|
||||
DEFAULT_REMOTE_IP,
|
||||
DEFAULT_REMOTE_PORT);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// class to store the message and the action to enable capture selected data
|
||||
// 0: do not record message
|
||||
// 1: record message
|
||||
struct trace_struct {
|
||||
char on_off_name[100];
|
||||
int on_off_action;
|
||||
};
|
||||
|
||||
// struct for trace message based on Data Collection Trace Messages Structure
|
||||
// you need to define the vararibles of each message
|
||||
typedef struct {
|
||||
/* Data Collection Trace Message Structure */
|
||||
int frame;
|
||||
int slot;
|
||||
int datetime_yyyymmdd;
|
||||
int datetime_hhmmssmmm;
|
||||
int frame_type, freq_range, subcarrier_spacing, cyclic_prefix, symbols_per_slot;
|
||||
int Nid_cell, rnti;
|
||||
int rb_size, rb_start, start_symbol_index, nr_of_symbols;
|
||||
int qam_mod_order, mcs_index, mcs_table, nrOfLayers, transform_precoding;
|
||||
int dmrs_config_type, ul_dmrs_symb_pos, number_dmrs_symbols;
|
||||
int dmrs_port, dmrs_nscid, nb_antennas_rx, number_of_bits;
|
||||
int data_size, data;
|
||||
} event_trace_msg_data;
|
||||
|
||||
void setup_trace_msg_data(event_trace_msg_data *d, void *database)
|
||||
{
|
||||
database_event_format f;
|
||||
int i;
|
||||
|
||||
/* Data Collection Trace Message Structure */
|
||||
// FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm :
|
||||
// int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot :
|
||||
// int,Nid_cell : int,rnti :
|
||||
// int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols :
|
||||
// int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers :
|
||||
// int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols :
|
||||
// int,dmrs_port : int,dmrs_nscid :
|
||||
// int,nb_antennas_rx : int,number_of_bits : buffer,data
|
||||
|
||||
// Initialize the data structure
|
||||
d->frame = -1;
|
||||
d->slot = -1;
|
||||
d->datetime_yyyymmdd = -1;
|
||||
d->datetime_hhmmssmmm = -1;
|
||||
d->frame_type = -1;
|
||||
d->freq_range = -1;
|
||||
d->subcarrier_spacing = -1;
|
||||
d->cyclic_prefix = -1;
|
||||
d->symbols_per_slot = -1;
|
||||
d->Nid_cell = -1;
|
||||
d->rnti = -1;
|
||||
d->rb_size = -1;
|
||||
d->rb_start = -1;
|
||||
d->start_symbol_index = -1;
|
||||
d->nr_of_symbols = -1;
|
||||
d->qam_mod_order = -1;
|
||||
d->mcs_index = -1;
|
||||
d->mcs_table = -1;
|
||||
d->nrOfLayers = -1;
|
||||
d->transform_precoding = -1;
|
||||
d->dmrs_config_type = -1;
|
||||
d->ul_dmrs_symb_pos = -1;
|
||||
d->number_dmrs_symbols = -1;
|
||||
d->dmrs_port = -1;
|
||||
d->dmrs_nscid = -1;
|
||||
d->nb_antennas_rx = -1;
|
||||
d->number_of_bits = -1;
|
||||
d->data = -1;
|
||||
|
||||
/* this macro looks for a particular element and checks its type */
|
||||
#define G(var_name, var_type, var) \
|
||||
if (!strcmp(f.name[i], var_name)) { \
|
||||
if (strcmp(f.type[i], var_type)) { \
|
||||
printf("Error: Trace Message has a bad type for %s\n", var_name); \
|
||||
exit(1); \
|
||||
} \
|
||||
var = i; \
|
||||
continue; \
|
||||
}
|
||||
|
||||
/* ------------------------------*/
|
||||
/* Create Macro for Data Collection Trace Message */
|
||||
/* ------------------------------*/
|
||||
// Data Collection Trace Message Structure
|
||||
// Example: GNB_PHY_UL_FD_PUSCH_IQ, GNB_PHY_UL_FD_DMRS_ID,
|
||||
// GNB_PHY_UL_FD_CHAN_EST_DMRS_POS, GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL
|
||||
// GNB_PHY_UL_PAYLOAD_RX_BITS
|
||||
// UE_PHY_UL_SCRAMBLED_TX_BITS
|
||||
// UE_PHY_UL_PAYLOAD_TX_BITS
|
||||
// Get a template of any message based on Data Collection Trace Messages Structure
|
||||
int Trace_MSG_ID = event_id_from_name(database, "GNB_PHY_UL_FD_PUSCH_IQ");
|
||||
f = get_format(database, Trace_MSG_ID);
|
||||
|
||||
/* get the elements of the trace
|
||||
* the value is an index in the event, see below */
|
||||
// FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm :
|
||||
// int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot :
|
||||
// int,Nid_cell : int,rnti :
|
||||
// int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols :
|
||||
// int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers :
|
||||
// int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols :
|
||||
// int,dmrs_port : int,dmrs_nscid :
|
||||
// int,nb_antennas_rx : int,number_of_bits : buffer,data
|
||||
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("frame", "int", d->frame)
|
||||
G("slot", "int", d->slot)
|
||||
G("datetime_yyyymmdd", "int", d->datetime_yyyymmdd)
|
||||
G("datetime_hhmmssmmm", "int", d->datetime_hhmmssmmm)
|
||||
G("frame_type", "int", d->frame_type)
|
||||
G("freq_range", "int", d->freq_range)
|
||||
G("subcarrier_spacing", "int", d->subcarrier_spacing)
|
||||
G("cyclic_prefix", "int", d->cyclic_prefix)
|
||||
G("symbols_per_slot", "int", d->symbols_per_slot)
|
||||
G("Nid_cell", "int", d->Nid_cell)
|
||||
G("rnti", "int", d->rnti)
|
||||
G("rb_size", "int", d->rb_size)
|
||||
G("rb_start", "int", d->rb_start)
|
||||
G("start_symbol_index", "int", d->start_symbol_index)
|
||||
G("nr_of_symbols", "int", d->nr_of_symbols)
|
||||
G("qam_mod_order", "int", d->qam_mod_order)
|
||||
G("mcs_index", "int", d->mcs_index)
|
||||
G("mcs_table", "int", d->mcs_table)
|
||||
G("nrOfLayers", "int", d->nrOfLayers)
|
||||
G("transform_precoding", "int", d->transform_precoding)
|
||||
G("dmrs_config_type", "int", d->dmrs_config_type)
|
||||
G("ul_dmrs_symb_pos", "int", d->ul_dmrs_symb_pos)
|
||||
G("number_dmrs_symbols", "int", d->number_dmrs_symbols)
|
||||
G("dmrs_port", "int", d->dmrs_port)
|
||||
G("dmrs_nscid", "int", d->dmrs_nscid)
|
||||
G("nb_antennas_rx", "int", d->nb_antennas_rx)
|
||||
G("number_of_bits", "int", d->number_of_bits)
|
||||
G("data", "buffer", d->data)
|
||||
}
|
||||
// if (d->frame == -1 || d->slot == -1) goto error;
|
||||
#undef G
|
||||
return;
|
||||
}
|
||||
|
||||
// Function to check if a value is in the array
|
||||
int isValueInArray(int value, int arr[], int size)
|
||||
{
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (arr[i] == value) {
|
||||
return 1; // Value found
|
||||
}
|
||||
}
|
||||
return 0; // Value not found
|
||||
}
|
||||
|
||||
void reestablish_connection(int *socket, char *ip, int port, int number_of_events, int *is_on)
|
||||
{
|
||||
clear_remote_config();
|
||||
if (*socket != -1)
|
||||
close(*socket);
|
||||
|
||||
/* connect to the nr-softmodem */
|
||||
*socket = connect_to(ip, port);
|
||||
if (*socket == -1) {
|
||||
printf("\n Failed to connect to nr-softmodem. Retrying...\n");
|
||||
return;
|
||||
}
|
||||
printf("\n Connected");
|
||||
|
||||
/* activate the traces in the nr-softmodem */
|
||||
activate_traces(*socket, number_of_events, is_on);
|
||||
printf("\n Activated Traces in nr-softmodem");
|
||||
}
|
||||
|
||||
int main(int n, char **v)
|
||||
{
|
||||
// Define and initialize an array of strings to list
|
||||
// trace_msgs_support_data_Collection_format
|
||||
// it is used to parse the requested messages if it is based
|
||||
// on Data Collection Trace Messages Structure and supported tracer messages indices
|
||||
char *traces_iq_support_data_Collection_format[] = {"GNB_PHY_UL_FD_PUSCH_IQ",
|
||||
"GNB_PHY_UL_FD_DMRS",
|
||||
"GNB_PHY_UL_FD_CHAN_EST_DMRS_POS",
|
||||
"GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL"};
|
||||
char *traces_bits_support_data_Collection_format[] = {"GNB_PHY_UL_PAYLOAD_RX_BITS",
|
||||
"UE_PHY_UL_SCRAMBLED_TX_BITS",
|
||||
"UE_PHY_UL_PAYLOAD_TX_BITS"};
|
||||
// extra number of records to simlify Sync between base station and UE synchronization records.
|
||||
// if you have network delay, you can increase the number of records to capture
|
||||
int max_sync_offset = 6; // 6 frames ~ 60 ms
|
||||
// all supported messages
|
||||
// Calculate the size of the combined array
|
||||
int n_iq_msgs = sizeof(traces_iq_support_data_Collection_format) / sizeof(traces_iq_support_data_Collection_format[0]);
|
||||
int n_bits_msgs = sizeof(traces_bits_support_data_Collection_format) / sizeof(traces_bits_support_data_Collection_format[0]);
|
||||
int n_msgs_based_data_Collection_format = n_iq_msgs + n_bits_msgs;
|
||||
|
||||
// Create the combined array
|
||||
char *traces_support_data_Collection_format[n_msgs_based_data_Collection_format];
|
||||
// Copy IQ messages to the combined array
|
||||
for (int i = 0; i < n_iq_msgs; i++) {
|
||||
traces_support_data_Collection_format[i] = traces_iq_support_data_Collection_format[i];
|
||||
}
|
||||
|
||||
// Copy Bits messages to the combined array
|
||||
for (int i = 0; i < n_bits_msgs; i++) {
|
||||
traces_support_data_Collection_format[i + n_iq_msgs] = traces_bits_support_data_Collection_format[i];
|
||||
}
|
||||
|
||||
uint16_t msg_id = 0;
|
||||
uint16_t start_frame_number = 0;
|
||||
uint32_t number_records = 0; // number of records to capture, it is number of slots
|
||||
// array to store the requested tracer messages indices
|
||||
int req_tracer_msgs_indices[100] = {0};
|
||||
// define variables --> to do: add all of them to be class of pointers
|
||||
char *database_filename = NULL;
|
||||
void *database;
|
||||
char *ip = DEFAULT_REMOTE_IP;
|
||||
char ip_address[16]; // max IP address length is 15 + 1 for null terminator
|
||||
int port = DEFAULT_REMOTE_PORT;
|
||||
int *is_on;
|
||||
int number_of_events;
|
||||
int i;
|
||||
int socket = -1;
|
||||
char trace_time_stamp_str[30];
|
||||
|
||||
// data structure for the trace messages based on Data Collection Trace Messages Structure
|
||||
event_trace_msg_data trace_msg_data;
|
||||
|
||||
// initlization variables
|
||||
unsigned int bufIdx_wr = 0;
|
||||
unsigned int bufIdx_rd = 0;
|
||||
uint8_t num_req_tracer_msgs = 0;
|
||||
|
||||
// initilaze shared memory
|
||||
char *addr_wr, *addr_rd;
|
||||
printf("\n Data Collection Service: Initializing shared memory ...");
|
||||
printf("\n Directory 1: %s, Directory 2: %s", GETKEYDIR1_gNB, GETKEYDIR2_gNB);
|
||||
printf("\n Project ID: %d\n", PROJECTID_gNB);
|
||||
int shm_id_wr = create_shm(&addr_wr, GETKEYDIR1_gNB, PROJECTID_gNB);
|
||||
int shm_id_rd = create_shm(&addr_rd, GETKEYDIR2_gNB, PROJECTID_gNB);
|
||||
del_shm(addr_wr, shm_id_wr);
|
||||
del_shm(addr_rd, shm_id_rd);
|
||||
shm_id_wr = create_shm(&addr_wr, GETKEYDIR1_gNB, PROJECTID_gNB);
|
||||
shm_id_rd = create_shm(&addr_rd, GETKEYDIR2_gNB, PROJECTID_gNB);
|
||||
|
||||
/* write on a socket fails if the other end is closed and we get SIGPIPE */
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
|
||||
abort();
|
||||
|
||||
/* parse command line options */
|
||||
// Port number and IP address are given via API and not via command line
|
||||
for (i = 1; i < n; i++) {
|
||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help"))
|
||||
usage();
|
||||
if (!strcmp(v[i], "-d")) {
|
||||
if (i > n - 2)
|
||||
usage();
|
||||
database_filename = v[++i];
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(v[i], "-ip")) {
|
||||
if (i > n - 2)
|
||||
usage();
|
||||
ip = v[++i];
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(v[i], "-p")) {
|
||||
if (i > n - 2)
|
||||
usage();
|
||||
port = atoi(v[++i]);
|
||||
continue;
|
||||
}
|
||||
usage();
|
||||
}
|
||||
|
||||
if (database_filename == NULL) {
|
||||
printf("ERROR: Provide a database file (-d)\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* load the database T_messages.txt */
|
||||
database = parse_database(database_filename);
|
||||
load_config_file(database_filename);
|
||||
|
||||
/* an array of int for all the events defined in the database is needed */
|
||||
number_of_events = number_of_ids(database);
|
||||
is_on = calloc(number_of_events, sizeof(int));
|
||||
if (is_on == NULL)
|
||||
abort();
|
||||
|
||||
// Set first byte of the shared memory to 0
|
||||
addr_rd[0] = 0; // important to check if we have new requested messages
|
||||
|
||||
// read requested tracer msg indices from memory
|
||||
printf("\n Data Collection Service: Waiting for messages request ...\n");
|
||||
// 0: Wait
|
||||
// 1: config
|
||||
// 2: record
|
||||
// 3: stop
|
||||
// Wait for Action Config
|
||||
while (1) {
|
||||
if ((uint8_t)(addr_rd[0]) == 0) {
|
||||
usleep(50); // sleep for 50 us: 0.5 ms slot duration
|
||||
}
|
||||
// config state
|
||||
else if ((uint8_t)(addr_rd[0]) == 1) {
|
||||
get_time_stamp_usec(trace_time_stamp_str);
|
||||
printf("\n Received config message. Time Stamp: %s", trace_time_stamp_str);
|
||||
|
||||
// get the IP address length in bytes
|
||||
bufIdx_rd = 1;
|
||||
uint8_t ip_address_length = addr_rd[bufIdx_rd];
|
||||
bufIdx_rd += 1; // + 1 byte = IP address length
|
||||
|
||||
// read the IP address
|
||||
for (int i = 0; i < ip_address_length; i++) {
|
||||
ip_address[i] = addr_rd[bufIdx_rd];
|
||||
bufIdx_rd += 1;
|
||||
}
|
||||
|
||||
ip = ip_address;
|
||||
|
||||
// get the array bytes of the port number : 2 bytes
|
||||
uint8_t port_number_bytes[2] = {addr_rd[bufIdx_rd], addr_rd[bufIdx_rd + 1]};
|
||||
bufIdx_rd += 2; // + 2 bytes = start frame number
|
||||
|
||||
port = combine_bytes(port_number_bytes, 2);
|
||||
printf("\n Parameters: IP Address length: %d, IP Address: %s, Port Number: %d \n", ip_address_length, ip_address, port);
|
||||
addr_rd[0] = 0; // reset memory : to wait for record action
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Establish connection to the nr-softmodem
|
||||
clear_remote_config();
|
||||
if (socket != -1)
|
||||
close(socket);
|
||||
|
||||
/* connect to the nr-softmodem */
|
||||
socket = connect_to(ip, port);
|
||||
printf("\n Connected to nr-softmodem");
|
||||
|
||||
// Read Action record or stop
|
||||
printf("\n Data Collection Service: Waiting for record message ...\n");
|
||||
while (1) {
|
||||
// wait for Action record
|
||||
if ((uint8_t)(addr_rd[0]) == 0) {
|
||||
usleep(50); // sleep for 50 us: 0.5 ms slot duration
|
||||
}
|
||||
|
||||
// quit state
|
||||
else if ((uint8_t)(addr_rd[0]) == 3) {
|
||||
printf("\n Received 'stop' command. Exiting...");
|
||||
printf("\n ");
|
||||
// Clean up and exit
|
||||
break;
|
||||
}
|
||||
// record state
|
||||
else if ((uint8_t)(addr_rd[0]) == 2) {
|
||||
// clear remote buffer if there is
|
||||
clear_remote_config();
|
||||
get_time_stamp_usec(trace_time_stamp_str);
|
||||
printf("\n Received record message. Time Stamp: %s", trace_time_stamp_str);
|
||||
|
||||
// read number of requested messages
|
||||
bufIdx_rd = 1;
|
||||
num_req_tracer_msgs = addr_rd[bufIdx_rd];
|
||||
bufIdx_rd += 1;
|
||||
printf("\n Number of requested tracer messages: %d,", num_req_tracer_msgs);
|
||||
// reset memory : action to wait for next record action
|
||||
addr_rd[0] = 0;
|
||||
|
||||
// read tracer msg IDs - every message ID has been stored in two bytes
|
||||
for (uint8_t msg_n = 0; msg_n < num_req_tracer_msgs; msg_n++) {
|
||||
// get the array bytes of the tracer message ID: 2 bytes
|
||||
uint8_t msg_id_bytes[2] = {addr_rd[bufIdx_rd], addr_rd[bufIdx_rd + 1]};
|
||||
bufIdx_rd += 2; // + 2 bytes = message ID
|
||||
msg_id = combine_bytes(msg_id_bytes, 2);
|
||||
|
||||
req_tracer_msgs_indices[msg_n] = msg_id;
|
||||
printf(" msg_id: %d, ", msg_id);
|
||||
}
|
||||
// get the array bytes of the number of records: 4 bytes
|
||||
uint8_t number_records_bytes[4] = {addr_rd[bufIdx_rd],
|
||||
addr_rd[bufIdx_rd + 1],
|
||||
addr_rd[bufIdx_rd + 2],
|
||||
addr_rd[bufIdx_rd + 3]};
|
||||
bufIdx_rd += 4; // + 4 bytes = number of records
|
||||
|
||||
number_records = combine_bytes(number_records_bytes, 4);
|
||||
|
||||
printf("num_records: %d, ", number_records);
|
||||
|
||||
// get the array bytes of the start frame number : 2 bytes
|
||||
uint8_t start_frame_number_bytes[2] = {addr_rd[bufIdx_rd], addr_rd[bufIdx_rd + 1]};
|
||||
bufIdx_rd += 2; // + 2 bytes = start frame number
|
||||
|
||||
start_frame_number = combine_bytes(start_frame_number_bytes, 2);
|
||||
|
||||
printf("start_frame: %d\n", start_frame_number);
|
||||
|
||||
/* activate the trace in this array */
|
||||
printf("\n Activate Tracer messages in on_off array: ");
|
||||
for (i = 0; i < num_req_tracer_msgs; i++) {
|
||||
char *on_off_name = event_name_from_id(database, req_tracer_msgs_indices[i]);
|
||||
on_off(database, on_off_name, is_on, 1);
|
||||
printf("%d, %s, ", req_tracer_msgs_indices[i], on_off_name);
|
||||
// on_off(database, "GNB_PHY_DL_OUTPUT_SIGNAL", is_on, 1);
|
||||
}
|
||||
|
||||
// get the event IDs for the bit messages
|
||||
int traces_bits_support_data_Collection_format_idx[n_bits_msgs];
|
||||
for (int i = 0; i < n_bits_msgs; i++) {
|
||||
traces_bits_support_data_Collection_format_idx[i] =
|
||||
event_id_from_name(database, traces_bits_support_data_Collection_format[i]);
|
||||
}
|
||||
|
||||
// all supported messages
|
||||
int traces_support_data_Collection_format_idx[n_msgs_based_data_Collection_format];
|
||||
for (int i = 0; i < n_msgs_based_data_Collection_format; i++) {
|
||||
traces_support_data_Collection_format_idx[i] = event_id_from_name(database, traces_support_data_Collection_format[i]);
|
||||
}
|
||||
|
||||
// setup data for the trace messages
|
||||
setup_trace_msg_data(&trace_msg_data, database);
|
||||
printf("\n Setup Trace Data Done");
|
||||
|
||||
// Get the start time
|
||||
struct timespec start_time = get_current_time();
|
||||
|
||||
/* activate the tracee in the nr-softmodem */
|
||||
activate_traces(socket, number_of_events, is_on);
|
||||
printf("\n Activated Traces in nr-softmodem");
|
||||
|
||||
/* a buffer needed to receive events from the nr-softmodem */
|
||||
OBUF ebuf = {osize : 0, omaxsize : 0, obuf : NULL};
|
||||
|
||||
/* read events */
|
||||
int nrecord_idx = 0;
|
||||
bufIdx_wr = 0;
|
||||
// logic to be sure that we have a complete slot record
|
||||
bool start_recording = false;
|
||||
bool got_ref_frame_slot = false;
|
||||
int ref_slot = 0;
|
||||
int ref_frame = 0;
|
||||
int slot_difference = 0;
|
||||
int frame_difference = 0;
|
||||
int current_frame = 0, prev_frame = 0, current_slot = 0, prev_slot = 0;
|
||||
// offset to sync between base station and UE synchronization records or power measurements
|
||||
int sync_offset_index = 0; // increase the index only if the index of frame changes after getting all records
|
||||
// since we will use the frame differece to do extra records, we should be sure that the last slot is recorded completely
|
||||
printf("\n\n Data Collection Service: Start reading messages ...");
|
||||
struct pollfd event_poll_fd;
|
||||
event_poll_fd.fd = socket;
|
||||
event_poll_fd.events = POLLIN;
|
||||
while (1) {
|
||||
// stop if number of records is done
|
||||
if ((nrecord_idx >= number_records) && (sync_offset_index >= max_sync_offset)) {
|
||||
// We added one to the number of records to capture the last record completely if
|
||||
// we have several messages enabled per slot
|
||||
break;
|
||||
}
|
||||
int poll_ret = poll(&event_poll_fd, 1, 1); // 1 ms timeout for poll
|
||||
if (poll_ret > 0 && (event_poll_fd.revents & POLLIN)) {
|
||||
event e = get_event(socket, &ebuf, database);
|
||||
|
||||
if (e.type == -1) {
|
||||
printf("\n Link broken or unexpected message received. Re-establishing connection...\n");
|
||||
reestablish_connection(&socket, ip, port, number_of_events, is_on);
|
||||
continue; // Skip further processing and retry
|
||||
}
|
||||
//-------------------------
|
||||
// GNB_PHY_UL_FD_PUSCH_IQ, GNB_PHY_UL_FD_DMRS_ID, GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
|
||||
// UE_PHY_UL_SCRAMBLED_TX_BITS, GNB_PHY_UL_PAYLOAD_RX_BITS, UE_PHY_UL_PAYLOAD_TX_BITS
|
||||
//-------------------------
|
||||
// is it a requested message
|
||||
if (isValueInArray(e.type, req_tracer_msgs_indices, num_req_tracer_msgs)) {
|
||||
// is it based on Data Collection Trace Messages Structure
|
||||
if (isValueInArray(e.type, traces_support_data_Collection_format_idx, n_msgs_based_data_Collection_format)) {
|
||||
// Start recording from the next slot to mitigate capturing partial data
|
||||
// check if the current frame and slot are different from the previous frame and slot
|
||||
// Then, increase the record index
|
||||
if (start_recording == false) {
|
||||
if (got_ref_frame_slot == false) {
|
||||
ref_frame = e.e[trace_msg_data.frame].i;
|
||||
ref_slot = e.e[trace_msg_data.slot].i;
|
||||
printf("\nMessage Info: msg_id %s (%d) \n", event_name_from_id(database, e.type), e.type);
|
||||
got_ref_frame_slot = true;
|
||||
}
|
||||
|
||||
current_frame = e.e[trace_msg_data.frame].i;
|
||||
current_slot = e.e[trace_msg_data.slot].i;
|
||||
frame_difference = (current_frame - ref_frame + MAX_FRAME_INDEX + 1) % (MAX_FRAME_INDEX + 1);
|
||||
slot_difference = (current_slot - ref_slot + MAX_SLOT_INDEX + 1) % (MAX_SLOT_INDEX + 1);
|
||||
printf("\n First frame.slot: %d.%d, current frame.slot: %d.%d, diff frame.slot: %d.%d",
|
||||
ref_frame,
|
||||
ref_slot,
|
||||
current_frame,
|
||||
current_slot,
|
||||
frame_difference,
|
||||
slot_difference);
|
||||
|
||||
if ((ref_frame != current_frame) || (ref_slot != current_slot)) {
|
||||
start_recording = true;
|
||||
printf("\n Start recording from frame: %d, slot: %d ", e.e[trace_msg_data.frame].i, e.e[trace_msg_data.slot].i);
|
||||
}
|
||||
}
|
||||
// start recording from the next frame to mitigate capturing partial data
|
||||
if (start_recording == true) {
|
||||
/* this is how to access the elements of the Data Collection trace messages.
|
||||
* we use e.e[<element>] and then the correct suffix, here
|
||||
* it's .i for the integer and .b for the buffer and .bsize for the buffer size
|
||||
* see in event.h the structure event_arg
|
||||
*/
|
||||
unsigned char *buf = e.e[trace_msg_data.data].b;
|
||||
|
||||
printf("\n\nRecord number: %d", nrecord_idx);
|
||||
#ifdef DEBUG_BUFFER
|
||||
printf("\nBuffer index in bytes: %d", bufIdx_wr);
|
||||
#endif
|
||||
|
||||
// add general message header: message ID,
|
||||
// T-Tracer Message format
|
||||
// FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm :
|
||||
// int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot :
|
||||
// int,Nid_cell : int,rnti :
|
||||
// int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols :
|
||||
// int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers :
|
||||
// int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols :
|
||||
// int,dmrs_port : int,dmrs_nscid :
|
||||
// int,nb_antennas_rx : int,number_of_bits : buffer,data
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.type, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.frame].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.slot].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.datetime_yyyymmdd].i, sizeof(uint32_t));
|
||||
bufIdx_wr += sizeof(uint32_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.datetime_hhmmssmmm].i, sizeof(uint32_t));
|
||||
bufIdx_wr += sizeof(uint32_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.frame_type].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.freq_range].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.subcarrier_spacing].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.cyclic_prefix].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.symbols_per_slot].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.Nid_cell].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.rnti].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.rb_size].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.rb_start].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.start_symbol_index].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.nr_of_symbols].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.qam_mod_order].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.mcs_index].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.mcs_table].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.nrOfLayers].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.transform_precoding].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.dmrs_config_type].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.ul_dmrs_symb_pos].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.number_dmrs_symbols].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.dmrs_port].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.dmrs_nscid].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.nb_antennas_rx].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.number_of_bits].i, sizeof(uint32_t));
|
||||
bufIdx_wr += sizeof(uint32_t);
|
||||
|
||||
printf("\nTime Stamp: %d_%d", e.e[trace_msg_data.datetime_yyyymmdd].i, e.e[trace_msg_data.datetime_hhmmssmmm].i);
|
||||
|
||||
// add message body: length in bytes + recorded data
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.data].bsize, sizeof(uint32_t));
|
||||
bufIdx_wr += sizeof(uint32_t);
|
||||
|
||||
// read data from buffer and convert from unsigned char * array to int 16 using the right endianness
|
||||
// T-tracer: Little Endian
|
||||
// For BITS Messages, example: UE_PHY_UL_SCRAMBLED_TX_BITS: data in bytes
|
||||
|
||||
if (is_bits_messages(traces_bits_support_data_Collection_format_idx, n_bits_msgs, e.type)) {
|
||||
for (int byte_idx = 0; byte_idx < e.e[trace_msg_data.data].bsize; byte_idx += 1) {
|
||||
// printf("%d, ", buf[byte_idx]);
|
||||
memcpy(&addr_wr[bufIdx_wr], &buf[byte_idx], sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
}
|
||||
|
||||
} else {
|
||||
for (int byte_idx = 0; byte_idx < e.e[trace_msg_data.data].bsize; byte_idx += 2) {
|
||||
// For a little-endian system:
|
||||
memcpy(&addr_wr[bufIdx_wr], &buf[byte_idx], sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &buf[byte_idx + 1], sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
}
|
||||
}
|
||||
/*
|
||||
for (int byte_idx_i = 0; byte_idx_i < e.e[d.nr_ul_fd_dmrs_data].bsize; byte_idx_i+=4) {
|
||||
int16_t I = buf[byte_idx_i] | (buf[byte_idx_i+1] << 8);
|
||||
int16_t Q = buf[byte_idx_i+2] | (buf[byte_idx_i+3] << 8);
|
||||
printf ("idx %d, ", byte_idx_i);
|
||||
printf ("\n%d", I);
|
||||
printf ("\n%d", Q);
|
||||
}
|
||||
*/
|
||||
// check if the current frame and slot are different from the previous frame and slot
|
||||
// Then, increase the record index
|
||||
current_frame = e.e[trace_msg_data.frame].i;
|
||||
current_slot = e.e[trace_msg_data.slot].i;
|
||||
|
||||
// increase sync offset index if the current frame is different from the previous frame
|
||||
if ((current_frame != prev_frame) && nrecord_idx >= number_records) {
|
||||
sync_offset_index++;
|
||||
}
|
||||
|
||||
if (current_frame != prev_frame || current_slot != prev_slot) {
|
||||
nrecord_idx++;
|
||||
// Update previous frame and slot numbers
|
||||
prev_frame = current_frame;
|
||||
prev_slot = current_slot;
|
||||
}
|
||||
#ifdef DEBUG_T_Tracer
|
||||
printf("\nMessage Info: msg_id %s (%d) \n", event_name_from_id(database, e.type), e.type);
|
||||
printf("frame %d, slot %d, datetime %d_%d\n",
|
||||
e.e[trace_msg_data.frame].i,
|
||||
e.e[trace_msg_data.slot].i,
|
||||
e.e[trace_msg_data.datetime_yyyymmdd].i,
|
||||
e.e[trace_msg_data.datetime_hhmmssmmm].i);
|
||||
printf("frame_type %d, freq_range %d, subcarrier_spacing %d, cyclic_prefix %d, symbols_per_slot %d\n",
|
||||
e.e[trace_msg_data.frame_type].i,
|
||||
e.e[trace_msg_data.freq_range].i,
|
||||
e.e[trace_msg_data.subcarrier_spacing].i,
|
||||
e.e[trace_msg_data.cyclic_prefix].i,
|
||||
e.e[trace_msg_data.symbols_per_slot].i);
|
||||
printf("Nid_cell %d, rnti %d, rb_size %d, rb_start %d, start_symbol_index %d, nr_of_symbols %d\n",
|
||||
e.e[trace_msg_data.Nid_cell].i,
|
||||
e.e[trace_msg_data.rnti].i,
|
||||
e.e[trace_msg_data.rb_size].i,
|
||||
e.e[trace_msg_data.rb_start].i,
|
||||
e.e[trace_msg_data.start_symbol_index].i,
|
||||
e.e[trace_msg_data.nr_of_symbols].i);
|
||||
printf("qam_mod_order %d, mcs_index %d, mcs_table %d, nrOfLayers %d, transform_precoding %d\n",
|
||||
e.e[trace_msg_data.qam_mod_order].i,
|
||||
e.e[trace_msg_data.mcs_index].i,
|
||||
e.e[trace_msg_data.mcs_table].i,
|
||||
e.e[trace_msg_data.nrOfLayers].i,
|
||||
e.e[trace_msg_data.transform_precoding].i);
|
||||
printf("dmrs_config_type %d, ul_dmrs_symb_pos %d, number_dmrs_symbols %d, dmrs_port %d, dmrs_nscid %d\n",
|
||||
e.e[trace_msg_data.dmrs_config_type].i,
|
||||
e.e[trace_msg_data.ul_dmrs_symb_pos].i,
|
||||
e.e[trace_msg_data.number_dmrs_symbols].i,
|
||||
e.e[trace_msg_data.dmrs_port].i,
|
||||
e.e[trace_msg_data.dmrs_nscid].i);
|
||||
printf("nb_antennas_rx %d, number_of_bits %d, data size %d\n",
|
||||
e.e[trace_msg_data.nb_antennas_rx].i,
|
||||
e.e[trace_msg_data.number_of_bits].i,
|
||||
e.e[trace_msg_data.data].bsize);
|
||||
#endif
|
||||
} // End of start recording flag
|
||||
} // end of if statement for the supported messages based on Data Collection Trace Messages Structure
|
||||
else {
|
||||
printf("ERROR: Requested Message is not based on Data Collection Trace Messages Structure\n");
|
||||
printf("ERROR: Requested Message ID: %d\n", e.type);
|
||||
}
|
||||
} // end of if statement for the requested messages
|
||||
} // end while loop of reading events
|
||||
else {
|
||||
// No data, just loop and check time
|
||||
usleep(100); // optional: avoid busy-waiting
|
||||
}
|
||||
} // End of while loop to read events
|
||||
|
||||
// de-activate the tracee in the nr-softmodem
|
||||
printf("\n De-activated Tracer message:\n");
|
||||
for (i = 0; i < num_req_tracer_msgs; i++) {
|
||||
char *on_off_name = event_name_from_id(database, req_tracer_msgs_indices[i]);
|
||||
on_off(database, on_off_name, is_on, 0);
|
||||
// printf("\n %d, %s, ", req_tracer_msgs_indices[i], on_off_name);
|
||||
// on_off(database, "GNB_PHY_DL_OUTPUT_SIGNAL", is_on, 1);
|
||||
}
|
||||
// De-activate the tracee in the nr-softmodem
|
||||
activate_traces(socket, number_of_events, is_on);
|
||||
printf("\n De-activated Traces");
|
||||
// Get the end time
|
||||
struct timespec end_time = get_current_time();
|
||||
// Calculate the time difference
|
||||
double time_diff = calculate_time_difference(start_time, end_time);
|
||||
printf("Total Time difference: %.2f ms\n", time_diff);
|
||||
printf("Time difference per record: %.2f ms\n", time_diff / (number_records + max_sync_offset));
|
||||
|
||||
// discard stale or previous record data for the first DISCARD_RECORD_DURATION_MS
|
||||
struct timespec record_start, record_now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &record_start);
|
||||
|
||||
while (1) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &record_now);
|
||||
double elapsed_ms = calculate_time_difference(record_start, record_now);
|
||||
if (elapsed_ms >= DISCARD_RECORD_DURATION_MS) {
|
||||
break; // Stop after 10ms
|
||||
}
|
||||
int poll_ret = poll(&event_poll_fd, 1, 1); // 1 ms timeout for poll
|
||||
if (poll_ret > 0 && (event_poll_fd.revents & POLLIN)) {
|
||||
event e = get_event(socket, &ebuf, database);
|
||||
printf("%d", e.type);
|
||||
if (e.type == -1) {
|
||||
printf("\n Link broken or unexpected message received. Re-establishing connection...\n");
|
||||
reestablish_connection(&socket, ip, port, number_of_events, is_on);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
// No data, just loop and check time
|
||||
usleep(100); // optional: avoid busy-waiting
|
||||
}
|
||||
} // End of while loop to discard stale records
|
||||
}
|
||||
} // End a while loop to check for the "stop" command
|
||||
// de-activate the tracee in the nr-softmodem
|
||||
|
||||
free_database(database);
|
||||
free(is_on);
|
||||
close(socket);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,976 +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
|
||||
*/
|
||||
|
||||
/*! \file common/utils/T/tracer/t_tracer_app_ue.c
|
||||
* \brief T-Tracer UE service to capture tracee Messages from UE, it is used by data recording application
|
||||
* \author Abdo Gaber
|
||||
* \date 2025
|
||||
* \version 1.0
|
||||
* \company Emerson, NI Test and Measurement
|
||||
* \email:
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "handler.h"
|
||||
#include "logger/logger.h"
|
||||
#include "utils.h"
|
||||
#include "event_selector.h"
|
||||
#include "configuration.h"
|
||||
#include "shared_memory_config.h"
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <poll.h>
|
||||
#define MAX_FRAME_INDEX 1023
|
||||
#define MAX_SLOT_INDEX 19
|
||||
#define DEBUG_T_Tracer
|
||||
#define DEBUG_BUFFER
|
||||
// Duration to discard recording in milliseconds to mitigate stale or previous record data
|
||||
#define DISCARD_RECORD_DURATION_MS 10
|
||||
// #include <linux/time.h>
|
||||
|
||||
// Combine bytes in little-endian format
|
||||
int combine_bytes(const uint8_t *bytes, size_t num_bytes)
|
||||
{
|
||||
int result = 0;
|
||||
for (size_t i = 0; i < num_bytes; ++i) {
|
||||
result |= (bytes[i] << (i * 8));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Convert an integer to an array of bytes in little-endian format
|
||||
void int_to_bytes(int num, uint8_t *bytes, size_t num_bytes)
|
||||
{
|
||||
for (size_t i = 0; i < num_bytes; ++i) {
|
||||
bytes[i] = (num >> (i * 8)) & 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the message is in the list of bits messages
|
||||
bool is_bits_messages(int traces_bits_support_data_Collection_format_idx[], int n_bits_msgs, int msg_id)
|
||||
{
|
||||
for (int i = 0; i < n_bits_msgs; i++) {
|
||||
if (msg_id == traces_bits_support_data_Collection_format_idx[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the current time
|
||||
struct timespec get_current_time()
|
||||
{
|
||||
struct timespec time;
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
return time;
|
||||
}
|
||||
|
||||
// Function to convert timespec to microseconds
|
||||
long long timespec_to_microseconds(struct timespec time)
|
||||
{
|
||||
return (time.tv_sec * 1000000LL) + (time.tv_nsec / 1000);
|
||||
}
|
||||
|
||||
// Calculate the time difference in milliseconds
|
||||
double calculate_time_difference(struct timespec start, struct timespec end)
|
||||
{
|
||||
double start_ms = start.tv_sec * 1000.0 + start.tv_nsec / 1000000.0;
|
||||
double end_ms = end.tv_sec * 1000.0 + end.tv_nsec / 1000000.0;
|
||||
return end_ms - start_ms;
|
||||
}
|
||||
|
||||
// Get Time Stamp in microseconds in YYYYMMDDHHMMSSmmmuuu format
|
||||
char *get_time_stamp_usec(char time_stamp_str[])
|
||||
{
|
||||
// initialization to measure time stamp --This part should be moved to inilization part
|
||||
time_t my_time;
|
||||
struct tm *timeinfo;
|
||||
time(&my_time);
|
||||
struct timeval tv;
|
||||
|
||||
// get time stamp
|
||||
timeinfo = localtime(&my_time);
|
||||
gettimeofday(&tv, NULL);
|
||||
// Add time stamp: yyyy mm dd hh mm ss usec
|
||||
uint16_t year = timeinfo->tm_year + 1900;
|
||||
uint8_t mon = timeinfo->tm_mon + 1;
|
||||
uint8_t mday = timeinfo->tm_mday;
|
||||
uint8_t hour = timeinfo->tm_hour;
|
||||
uint8_t min = timeinfo->tm_min;
|
||||
uint8_t sec = timeinfo->tm_sec;
|
||||
uint16_t usec = (tv.tv_usec);
|
||||
// printf ("Time stamp: %d_%d_%d_%d_%d_%d_%d \n",year,mon,mday,hour,min,sec,usec);
|
||||
// sprintf(time_stamp_str, "%d_%d_%d_%d_%d_%d_%d",year,mon,mday,hour,min,sec,usec);
|
||||
sprintf(time_stamp_str, "%04d%02d%02d%02d%02d%02d%06d", year, mon, mday, hour, min, sec, usec);
|
||||
|
||||
return time_stamp_str;
|
||||
}
|
||||
|
||||
// Convert timestamp string to integer
|
||||
int convert_time_stamp_to_int(const char *timestamp)
|
||||
{
|
||||
return atoi(timestamp);
|
||||
}
|
||||
|
||||
// Split timestamp string and convert to integer
|
||||
int split_time_stamp_and_convert_to_int(char time_stamp_str[], int shift, int length)
|
||||
{
|
||||
char time_part[length + 1]; // Buffer to hold the date part YYYYMMDD or HHMMSSmmm
|
||||
// Copy the first 8 or 9 characters (YYYYMMDD) to HHMMSSmmm
|
||||
strncpy(time_part, time_stamp_str + shift, length);
|
||||
time_part[length] = '\0'; // Null-terminate the string
|
||||
// Convert timestamp string to integer
|
||||
return convert_time_stamp_to_int(time_part);
|
||||
}
|
||||
|
||||
void err_exit(char *buf)
|
||||
{
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// create shared memory
|
||||
int create_shm(char **addrN, const char *shm_path, int projectId)
|
||||
{
|
||||
key_t key;
|
||||
if (-1 != open(shm_path, O_CREAT, 0777)) {
|
||||
key = ftok(shm_path, projectId);
|
||||
} else {
|
||||
err_exit("Error: open shared memory");
|
||||
}
|
||||
|
||||
if (key < 0) {
|
||||
err_exit("Error: ftok error");
|
||||
}
|
||||
|
||||
int shm_id;
|
||||
shm_id = shmget(key, SHMSIZE, IPC_CREAT | IPC_EXCL | 0664);
|
||||
if (shm_id == -1) {
|
||||
if (errno == EEXIST) {
|
||||
printf("Error: shared memeory already exist\n");
|
||||
shm_id = shmget(key, 0, 0);
|
||||
printf("reference shm_id = %d\n", shm_id);
|
||||
} else {
|
||||
perror("errno");
|
||||
err_exit("shmget error");
|
||||
}
|
||||
}
|
||||
char *addr;
|
||||
// address to attach - attach for read & write
|
||||
if ((addr = shmat(shm_id, 0, 0)) == (void *)-1) {
|
||||
if (shmctl(shm_id, IPC_RMID, NULL) == -1)
|
||||
err_exit("Error: shmctl error");
|
||||
else {
|
||||
printf("Attach shared memory failed\n");
|
||||
printf("remove shared memory identifier successful\n");
|
||||
}
|
||||
err_exit("shmat error");
|
||||
}
|
||||
*addrN = addr;
|
||||
return shm_id;
|
||||
}
|
||||
|
||||
// delete shared memory
|
||||
void del_shm(char *addr, int shm_id)
|
||||
{
|
||||
if (shmdt(addr) < 0)
|
||||
err_exit("shmdt error");
|
||||
|
||||
if (shmctl(shm_id, IPC_RMID, NULL) == -1)
|
||||
err_exit("shmctl error");
|
||||
else {
|
||||
printf("Remove shared memory identifier successful\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* this function sends the activated traces to the nr-softmodem */
|
||||
void activate_traces(int socket, int number_of_events, int *is_on)
|
||||
{
|
||||
char t = 1;
|
||||
if (socket_send(socket, &t, 1) == -1 || socket_send(socket, &number_of_events, sizeof(int)) == -1
|
||||
|| socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
|
||||
abort();
|
||||
}
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
printf(
|
||||
"options:\n"
|
||||
" -d <database file> this option is mandatory\n"
|
||||
" -ip <host> connect to given IP address (default %s)\n"
|
||||
" -p <port> connect to given port (default %d)\n",
|
||||
DEFAULT_REMOTE_IP,
|
||||
DEFAULT_REMOTE_PORT);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// class to store the message and the action to enable capture selected data
|
||||
// 0: do not record message
|
||||
// 1: record message
|
||||
struct trace_struct {
|
||||
char on_off_name[100];
|
||||
int on_off_action;
|
||||
};
|
||||
|
||||
// struct for trace message based on Data Collection Trace Messages Structure
|
||||
// you need to define the vararibles of each message
|
||||
typedef struct {
|
||||
/* Data Collection Trace Message Structure */
|
||||
int frame;
|
||||
int slot;
|
||||
int datetime_yyyymmdd;
|
||||
int datetime_hhmmssmmm;
|
||||
int frame_type, freq_range, subcarrier_spacing, cyclic_prefix, symbols_per_slot;
|
||||
int Nid_cell, rnti;
|
||||
int rb_size, rb_start, start_symbol_index, nr_of_symbols;
|
||||
int qam_mod_order, mcs_index, mcs_table, nrOfLayers, transform_precoding;
|
||||
int dmrs_config_type, ul_dmrs_symb_pos, number_dmrs_symbols;
|
||||
int dmrs_port, dmrs_nscid, nb_antennas_tx, number_of_bits;
|
||||
int data_size, data;
|
||||
} event_trace_msg_data;
|
||||
|
||||
void setup_trace_msg_data(event_trace_msg_data *d, void *database)
|
||||
{
|
||||
database_event_format f;
|
||||
int i;
|
||||
|
||||
/* Data Collection Trace Message Structure */
|
||||
// FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm :
|
||||
// int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot :
|
||||
// int,Nid_cell : int,rnti :
|
||||
// int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols :
|
||||
// int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers :
|
||||
// int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols :
|
||||
// int,dmrs_port : int,dmrs_nscid :
|
||||
// int,nb_antennas_tx : int,number_of_bits : buffer,data
|
||||
|
||||
// Initialize the data structure
|
||||
d->frame = -1;
|
||||
d->slot = -1;
|
||||
d->datetime_yyyymmdd = -1;
|
||||
d->datetime_hhmmssmmm = -1;
|
||||
d->frame_type = -1;
|
||||
d->freq_range = -1;
|
||||
d->subcarrier_spacing = -1;
|
||||
d->cyclic_prefix = -1;
|
||||
d->symbols_per_slot = -1;
|
||||
d->Nid_cell = -1;
|
||||
d->rnti = -1;
|
||||
d->rb_size = -1;
|
||||
d->rb_start = -1;
|
||||
d->start_symbol_index = -1;
|
||||
d->nr_of_symbols = -1;
|
||||
d->qam_mod_order = -1;
|
||||
d->mcs_index = -1;
|
||||
d->mcs_table = -1;
|
||||
d->nrOfLayers = -1;
|
||||
d->transform_precoding = -1;
|
||||
d->dmrs_config_type = -1;
|
||||
d->ul_dmrs_symb_pos = -1;
|
||||
d->number_dmrs_symbols = -1;
|
||||
d->dmrs_port = -1;
|
||||
d->dmrs_nscid = -1;
|
||||
d->nb_antennas_tx = -1;
|
||||
d->number_of_bits = -1;
|
||||
d->data = -1;
|
||||
|
||||
/* this macro looks for a particular element and checks its type */
|
||||
#define G(var_name, var_type, var) \
|
||||
if (!strcmp(f.name[i], var_name)) { \
|
||||
if (strcmp(f.type[i], var_type)) { \
|
||||
printf("Error: Trace Message has a bad type for %s\n", var_name); \
|
||||
exit(1); \
|
||||
} \
|
||||
var = i; \
|
||||
continue; \
|
||||
}
|
||||
|
||||
/* ------------------------------*/
|
||||
/* Create Macro for Data Collection Trace Message */
|
||||
/* ------------------------------*/
|
||||
// Data Collection Trace Message Structure
|
||||
// Example: GNB_PHY_UL_FD_PUSCH_IQ, GNB_PHY_UL_FD_DMRS_ID,
|
||||
// GNB_PHY_UL_FD_CHAN_EST_DMRS_POS, GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL
|
||||
// GNB_PHY_UL_PAYLOAD_RX_BITS
|
||||
// UE_PHY_UL_SCRAMBLED_TX_BITS
|
||||
// UE_PHY_UL_PAYLOAD_TX_BITS
|
||||
// Get a template of any message based on Data Collection Trace Messages Structure
|
||||
int Trace_MSG_ID = event_id_from_name(database, "GNB_PHY_UL_FD_PUSCH_IQ");
|
||||
f = get_format(database, Trace_MSG_ID);
|
||||
|
||||
/* get the elements of the trace
|
||||
* the value is an index in the event, see below */
|
||||
// FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm :
|
||||
// int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot :
|
||||
// int,Nid_cell : int,rnti :
|
||||
// int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols :
|
||||
// int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers :
|
||||
// int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols :
|
||||
// int,dmrs_port : int,dmrs_nscid :
|
||||
// int,nb_antennas_tx : int,number_of_bits : buffer,data
|
||||
|
||||
for (i = 0; i < f.count; i++) {
|
||||
G("frame", "int", d->frame)
|
||||
G("slot", "int", d->slot)
|
||||
G("datetime_yyyymmdd", "int", d->datetime_yyyymmdd)
|
||||
G("datetime_hhmmssmmm", "int", d->datetime_hhmmssmmm)
|
||||
G("frame_type", "int", d->frame_type)
|
||||
G("freq_range", "int", d->freq_range)
|
||||
G("subcarrier_spacing", "int", d->subcarrier_spacing)
|
||||
G("cyclic_prefix", "int", d->cyclic_prefix)
|
||||
G("symbols_per_slot", "int", d->symbols_per_slot)
|
||||
G("Nid_cell", "int", d->Nid_cell)
|
||||
G("rnti", "int", d->rnti)
|
||||
G("rb_size", "int", d->rb_size)
|
||||
G("rb_start", "int", d->rb_start)
|
||||
G("start_symbol_index", "int", d->start_symbol_index)
|
||||
G("nr_of_symbols", "int", d->nr_of_symbols)
|
||||
G("qam_mod_order", "int", d->qam_mod_order)
|
||||
G("mcs_index", "int", d->mcs_index)
|
||||
G("mcs_table", "int", d->mcs_table)
|
||||
G("nrOfLayers", "int", d->nrOfLayers)
|
||||
G("transform_precoding", "int", d->transform_precoding)
|
||||
G("dmrs_config_type", "int", d->dmrs_config_type)
|
||||
G("ul_dmrs_symb_pos", "int", d->ul_dmrs_symb_pos)
|
||||
G("number_dmrs_symbols", "int", d->number_dmrs_symbols)
|
||||
G("dmrs_port", "int", d->dmrs_port)
|
||||
G("dmrs_nscid", "int", d->dmrs_nscid)
|
||||
// bug in T-Tracer Framework, need to be checked that is why we are getting
|
||||
// the right tx antennas only if we set to rx "nb_antennas_rx"
|
||||
G("nb_antennas_rx", "int", d->nb_antennas_tx)
|
||||
G("number_of_bits", "int", d->number_of_bits)
|
||||
G("data", "buffer", d->data)
|
||||
}
|
||||
// if (d->frame == -1 || d->slot == -1) goto error;
|
||||
#undef G
|
||||
return;
|
||||
}
|
||||
|
||||
// Function to check if a value is in the array
|
||||
int isValueInArray(int value, int arr[], int size)
|
||||
{
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (arr[i] == value) {
|
||||
return 1; // Value found
|
||||
}
|
||||
}
|
||||
return 0; // Value not found
|
||||
}
|
||||
|
||||
void reestablish_connection(int *socket, char *ip, int port, int number_of_events, int *is_on)
|
||||
{
|
||||
clear_remote_config();
|
||||
if (*socket != -1)
|
||||
close(*socket);
|
||||
|
||||
/* connect to the nr-softmodem */
|
||||
*socket = connect_to(ip, port);
|
||||
if (*socket == -1) {
|
||||
printf("\n Failed to connect to nr-softmodem. Retrying...\n");
|
||||
return;
|
||||
}
|
||||
printf("\n Connected");
|
||||
|
||||
/* activate the traces in the nr-softmodem */
|
||||
activate_traces(*socket, number_of_events, is_on);
|
||||
printf("\n Activated Traces in nr-softmodem");
|
||||
}
|
||||
|
||||
int main(int n, char **v)
|
||||
{
|
||||
// Define and initialize an array of strings to list
|
||||
// trace_msgs_support_data_Collection_format
|
||||
// it is used to parse the requested messages if it is based
|
||||
// on Data Collection Trace Messages Structure and supported tracer messages indices
|
||||
char *traces_iq_support_data_Collection_format[] = {"GNB_PHY_UL_FD_PUSCH_IQ",
|
||||
"GNB_PHY_UL_FD_DMRS",
|
||||
"GNB_PHY_UL_FD_CHAN_EST_DMRS_POS",
|
||||
"GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL"};
|
||||
char *traces_bits_support_data_Collection_format[] = {"GNB_PHY_UL_PAYLOAD_RX_BITS",
|
||||
"UE_PHY_UL_SCRAMBLED_TX_BITS",
|
||||
"UE_PHY_UL_PAYLOAD_TX_BITS"};
|
||||
// extra number of records to simlify Sync between base station and UE synchronization records.
|
||||
// if you have network delay, you can increase the number of records to capture
|
||||
int max_sync_offset = 6; // 6 frames ~ 60 ms
|
||||
// all supported messages
|
||||
// Calculate the size of the combined array
|
||||
int n_iq_msgs = sizeof(traces_iq_support_data_Collection_format) / sizeof(traces_iq_support_data_Collection_format[0]);
|
||||
int n_bits_msgs = sizeof(traces_bits_support_data_Collection_format) / sizeof(traces_bits_support_data_Collection_format[0]);
|
||||
int n_msgs_based_data_Collection_format = n_iq_msgs + n_bits_msgs;
|
||||
|
||||
// Create the combined array
|
||||
char *traces_support_data_Collection_format[n_msgs_based_data_Collection_format];
|
||||
// Copy IQ messages to the combined array
|
||||
for (int i = 0; i < n_iq_msgs; i++) {
|
||||
traces_support_data_Collection_format[i] = traces_iq_support_data_Collection_format[i];
|
||||
}
|
||||
|
||||
// Copy Bits messages to the combined array
|
||||
for (int i = 0; i < n_bits_msgs; i++) {
|
||||
traces_support_data_Collection_format[i + n_iq_msgs] = traces_bits_support_data_Collection_format[i];
|
||||
}
|
||||
|
||||
uint16_t msg_id = 0;
|
||||
uint16_t start_frame_number = 0;
|
||||
uint32_t number_records = 0; // number of records to capture, it is number of slots
|
||||
// array to store the requested tracer messages indices
|
||||
int req_tracer_msgs_indices[100] = {0};
|
||||
// define variables --> to do: add all of them to be class of pointers
|
||||
char *database_filename = NULL;
|
||||
void *database;
|
||||
char *ip = DEFAULT_REMOTE_IP;
|
||||
char ip_address[16]; // max IP address length is 15 + 1 for null terminator
|
||||
int port = DEFAULT_REMOTE_PORT;
|
||||
int *is_on;
|
||||
int number_of_events;
|
||||
int i;
|
||||
int socket = -1;
|
||||
char trace_time_stamp_str[30];
|
||||
|
||||
// data structure for the trace messages based on Data Collection Trace Messages Structure
|
||||
event_trace_msg_data trace_msg_data;
|
||||
|
||||
// initlization variables
|
||||
unsigned int bufIdx_wr = 0;
|
||||
unsigned int bufIdx_rd = 0;
|
||||
uint8_t num_req_tracer_msgs = 0;
|
||||
|
||||
// initilaze shared memory
|
||||
char *addr_wr, *addr_rd;
|
||||
printf("\n Data Collection Service: Initializing shared memory ...");
|
||||
printf("\n Directory 1: %s, Directory 2: %s", GETKEYDIR1_UE, GETKEYDIR2_UE);
|
||||
printf("\n Project ID: %d\n", PROJECTID_UE);
|
||||
int shm_id_wr = create_shm(&addr_wr, GETKEYDIR1_UE, PROJECTID_UE);
|
||||
int shm_id_rd = create_shm(&addr_rd, GETKEYDIR2_UE, PROJECTID_UE);
|
||||
del_shm(addr_wr, shm_id_wr);
|
||||
del_shm(addr_rd, shm_id_rd);
|
||||
shm_id_wr = create_shm(&addr_wr, GETKEYDIR1_UE, PROJECTID_UE);
|
||||
shm_id_rd = create_shm(&addr_rd, GETKEYDIR2_UE, PROJECTID_UE);
|
||||
|
||||
/* write on a socket fails if the other end is closed and we get SIGPIPE */
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
|
||||
abort();
|
||||
|
||||
/* parse command line options */
|
||||
// Port number and IP address are given via API and not via command line
|
||||
for (i = 1; i < n; i++) {
|
||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help"))
|
||||
usage();
|
||||
if (!strcmp(v[i], "-d")) {
|
||||
if (i > n - 2)
|
||||
usage();
|
||||
database_filename = v[++i];
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(v[i], "-ip")) {
|
||||
if (i > n - 2)
|
||||
usage();
|
||||
ip = v[++i];
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(v[i], "-p")) {
|
||||
if (i > n - 2)
|
||||
usage();
|
||||
port = atoi(v[++i]);
|
||||
continue;
|
||||
}
|
||||
usage();
|
||||
}
|
||||
|
||||
if (database_filename == NULL) {
|
||||
printf("ERROR: Provide a database file (-d)\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* load the database T_messages.txt */
|
||||
database = parse_database(database_filename);
|
||||
load_config_file(database_filename);
|
||||
|
||||
/* an array of int for all the events defined in the database is needed */
|
||||
number_of_events = number_of_ids(database);
|
||||
is_on = calloc(number_of_events, sizeof(int));
|
||||
if (is_on == NULL)
|
||||
abort();
|
||||
|
||||
// Set first byte of the shared memory to 0
|
||||
addr_rd[0] = 0; // important to check if we have new requested messages
|
||||
|
||||
// read requested tracer msg indices from memory
|
||||
printf("\n Data Collection Service: Waiting for messages request ...\n");
|
||||
// 0: Wait
|
||||
// 1: config
|
||||
// 2: record
|
||||
// 3: stop
|
||||
// Wait for Action Config
|
||||
while (1) {
|
||||
if ((uint8_t)(addr_rd[0]) == 0) {
|
||||
usleep(50); // sleep for 50 us: 0.5 ms slot duration
|
||||
}
|
||||
// config state
|
||||
else if ((uint8_t)(addr_rd[0]) == 1) {
|
||||
get_time_stamp_usec(trace_time_stamp_str);
|
||||
printf("\n Received config message. Time Stamp: %s", trace_time_stamp_str);
|
||||
|
||||
// get the IP address length in bytes
|
||||
bufIdx_rd = 1;
|
||||
uint8_t ip_address_length = addr_rd[bufIdx_rd];
|
||||
bufIdx_rd += 1; // + 1 byte = IP address length
|
||||
|
||||
// read the IP address
|
||||
for (int i = 0; i < ip_address_length; i++) {
|
||||
ip_address[i] = addr_rd[bufIdx_rd];
|
||||
bufIdx_rd += 1;
|
||||
}
|
||||
|
||||
ip = ip_address;
|
||||
|
||||
// get the array bytes of the port number : 2 bytes
|
||||
uint8_t port_number_bytes[2] = {addr_rd[bufIdx_rd], addr_rd[bufIdx_rd + 1]};
|
||||
bufIdx_rd += 2; // + 2 bytes = start frame number
|
||||
|
||||
port = combine_bytes(port_number_bytes, 2);
|
||||
printf("\n Parameters: IP Address length: %d, IP Address: %s, Port Number: %d \n", ip_address_length, ip_address, port);
|
||||
addr_rd[0] = 0; // reset memory : to wait for record action
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Establish connection to the nr-softmodem
|
||||
clear_remote_config();
|
||||
if (socket != -1)
|
||||
close(socket);
|
||||
|
||||
/* connect to the nr-softmodem */
|
||||
socket = connect_to(ip, port);
|
||||
printf("\n Connected to nr-UEsoftmodem");
|
||||
|
||||
// Read Action record or stop
|
||||
printf("\n Data Collection Service: Waiting for record message ...\n");
|
||||
while (1) {
|
||||
// wait for Action record
|
||||
if ((uint8_t)(addr_rd[0]) == 0) {
|
||||
usleep(50); // sleep for 50 us: 0.5 ms slot duration
|
||||
}
|
||||
|
||||
// quit state
|
||||
else if ((uint8_t)(addr_rd[0]) == 3) {
|
||||
printf("\n Received 'stop' command. Exiting...");
|
||||
printf("\n ");
|
||||
// Clean up and exit
|
||||
break;
|
||||
}
|
||||
// record state
|
||||
else if ((uint8_t)(addr_rd[0]) == 2) {
|
||||
// clear remote buffer if there is
|
||||
clear_remote_config();
|
||||
get_time_stamp_usec(trace_time_stamp_str);
|
||||
printf("\n Received record message. Time Stamp: %s", trace_time_stamp_str);
|
||||
|
||||
// read number of requested messages
|
||||
bufIdx_rd = 1;
|
||||
num_req_tracer_msgs = addr_rd[bufIdx_rd];
|
||||
bufIdx_rd += 1;
|
||||
printf("\n Number of requested tracer messages: %d,", num_req_tracer_msgs);
|
||||
// reset memory : action to wait for next record action
|
||||
addr_rd[0] = 0;
|
||||
|
||||
// read tracer msg IDs - every message ID has been stored in two bytes
|
||||
for (uint8_t msg_n = 0; msg_n < num_req_tracer_msgs; msg_n++) {
|
||||
// get the array bytes of the tracer message ID: 2 bytes
|
||||
uint8_t msg_id_bytes[2] = {addr_rd[bufIdx_rd], addr_rd[bufIdx_rd + 1]};
|
||||
bufIdx_rd += 2; // + 2 bytes = message ID
|
||||
msg_id = combine_bytes(msg_id_bytes, 2);
|
||||
|
||||
req_tracer_msgs_indices[msg_n] = msg_id;
|
||||
printf(" msg_id: %d, ", msg_id);
|
||||
}
|
||||
// get the array bytes of the number of records: 4 bytes
|
||||
uint8_t number_records_bytes[4] = {addr_rd[bufIdx_rd],
|
||||
addr_rd[bufIdx_rd + 1],
|
||||
addr_rd[bufIdx_rd + 2],
|
||||
addr_rd[bufIdx_rd + 3]};
|
||||
bufIdx_rd += 4; // + 4 bytes = number of records
|
||||
|
||||
number_records = combine_bytes(number_records_bytes, 4);
|
||||
|
||||
printf("num_records: %d, ", number_records);
|
||||
|
||||
// get the array bytes of the start frame number : 2 bytes
|
||||
uint8_t start_frame_number_bytes[2] = {addr_rd[bufIdx_rd], addr_rd[bufIdx_rd + 1]};
|
||||
bufIdx_rd += 2; // + 2 bytes = start frame number
|
||||
|
||||
start_frame_number = combine_bytes(start_frame_number_bytes, 2);
|
||||
|
||||
printf("start_frame: %d\n", start_frame_number);
|
||||
|
||||
/* activate the trace in this array */
|
||||
printf("\n Activate Tracer messages in on_off array: \n");
|
||||
for (i = 0; i < num_req_tracer_msgs; i++) {
|
||||
char *on_off_name = event_name_from_id(database, req_tracer_msgs_indices[i]);
|
||||
on_off(database, on_off_name, is_on, 1);
|
||||
printf("%d, %s, ", req_tracer_msgs_indices[i], on_off_name);
|
||||
// on_off(database, "GNB_PHY_DL_OUTPUT_SIGNAL", is_on, 1);
|
||||
}
|
||||
|
||||
// get the event IDs for the bit messages
|
||||
int traces_bits_support_data_Collection_format_idx[n_bits_msgs];
|
||||
for (int i = 0; i < n_bits_msgs; i++) {
|
||||
traces_bits_support_data_Collection_format_idx[i] =
|
||||
event_id_from_name(database, traces_bits_support_data_Collection_format[i]);
|
||||
}
|
||||
|
||||
// all supported messages
|
||||
int traces_support_data_Collection_format_idx[n_msgs_based_data_Collection_format];
|
||||
for (int i = 0; i < n_msgs_based_data_Collection_format; i++) {
|
||||
traces_support_data_Collection_format_idx[i] = event_id_from_name(database, traces_support_data_Collection_format[i]);
|
||||
}
|
||||
|
||||
// setup data for the trace messages
|
||||
setup_trace_msg_data(&trace_msg_data, database);
|
||||
printf("\n Setup Trace Data Done");
|
||||
|
||||
// Get the start time
|
||||
struct timespec start_time = get_current_time();
|
||||
|
||||
/* activate the tracee in the nr-softmodem */
|
||||
activate_traces(socket, number_of_events, is_on);
|
||||
printf("\n Activated Traces in nr-UEsoftmodem");
|
||||
|
||||
/* a buffer needed to receive events from the nr-softmodem */
|
||||
OBUF ebuf = {osize : 0, omaxsize : 0, obuf : NULL};
|
||||
/* read events */
|
||||
int nrecord_idx = 0;
|
||||
bufIdx_wr = 0;
|
||||
// logic to be sure that we have a complete slot record
|
||||
bool start_recording = false;
|
||||
bool got_ref_frame_slot = false;
|
||||
int ref_slot = 0;
|
||||
int ref_frame = 0;
|
||||
int slot_difference = 0;
|
||||
int frame_difference = 0;
|
||||
int current_frame = 0, prev_frame = 0, current_slot = 0, prev_slot = 0;
|
||||
// offset to sync between base station and UE synchronization records or power measurements
|
||||
int sync_offset_index = 0; // increase the index only if the index of frame changes after getting all records
|
||||
// since we will use the frame differece to do extra records, we should be sure that the last slot is recorded completely
|
||||
printf("\n\n Data Collection Service: Start reading messages ...");
|
||||
struct pollfd event_poll_fd;
|
||||
event_poll_fd.fd = socket;
|
||||
event_poll_fd.events = POLLIN;
|
||||
while (1) {
|
||||
// stop if number of records is done
|
||||
if ((nrecord_idx >= number_records) && (sync_offset_index >= max_sync_offset)) {
|
||||
// We added one to the number of records to capture the last record completely
|
||||
// if we have several messages enabled per slot
|
||||
break;
|
||||
}
|
||||
int poll_ret = poll(&event_poll_fd, 1, 1); // 1 ms timeout for poll
|
||||
if (poll_ret > 0 && (event_poll_fd.revents & POLLIN)) {
|
||||
event e = get_event(socket, &ebuf, database);
|
||||
if (e.type == -1) {
|
||||
printf("\n Link broken or unexpected message received. Re-establishing connection...\n");
|
||||
reestablish_connection(&socket, ip, port, number_of_events, is_on);
|
||||
continue; // Skip further processing and retry
|
||||
}
|
||||
|
||||
//-------------------------
|
||||
// GNB_PHY_UL_FD_PUSCH_IQ, GNB_PHY_UL_FD_DMRS_ID, GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
|
||||
// UE_PHY_UL_SCRAMBLED_TX_BITS, GNB_PHY_UL_PAYLOAD_RX_BITS, UE_PHY_UL_PAYLOAD_TX_BITS
|
||||
//-------------------------
|
||||
// is it a requested message
|
||||
if (isValueInArray(e.type, req_tracer_msgs_indices, num_req_tracer_msgs)) {
|
||||
// is it based on Data Collection Trace Messages Structure
|
||||
if (isValueInArray(e.type, traces_support_data_Collection_format_idx, n_msgs_based_data_Collection_format)) {
|
||||
// Start recording from the next slot to mitigate capturing partial data
|
||||
// check if the current frame and slot are different from the previous frame and slot
|
||||
// Then, increase the record index
|
||||
if (start_recording == false) {
|
||||
if (got_ref_frame_slot == false) {
|
||||
ref_frame = e.e[trace_msg_data.frame].i;
|
||||
ref_slot = e.e[trace_msg_data.slot].i;
|
||||
printf("\nMessage Info: msg_id %s (%d) \n", event_name_from_id(database, e.type), e.type);
|
||||
got_ref_frame_slot = true;
|
||||
}
|
||||
|
||||
current_frame = e.e[trace_msg_data.frame].i;
|
||||
current_slot = e.e[trace_msg_data.slot].i;
|
||||
frame_difference = (current_frame - ref_frame + MAX_FRAME_INDEX + 1) % (MAX_FRAME_INDEX + 1);
|
||||
slot_difference = (current_slot - ref_slot + MAX_SLOT_INDEX + 1) % (MAX_SLOT_INDEX + 1);
|
||||
printf("\n First frame.slot: %d.%d, current frame.slot: %d.%d, diff frame.slot: %d.%d",
|
||||
ref_frame,
|
||||
ref_slot,
|
||||
current_frame,
|
||||
current_slot,
|
||||
frame_difference,
|
||||
slot_difference);
|
||||
|
||||
if ((ref_frame != current_frame) || (ref_slot != current_slot)) {
|
||||
start_recording = true;
|
||||
printf("\n Start recording from frame: %d, slot: %d ", e.e[trace_msg_data.frame].i, e.e[trace_msg_data.slot].i);
|
||||
}
|
||||
}
|
||||
// start recording from the next frame to mitigate capturing partial data
|
||||
if (start_recording == true) {
|
||||
/* this is how to access the elements of the Data Collection trace messages.
|
||||
* we use e.e[<element>] and then the correct suffix, here
|
||||
* it's .i for the integer and .b for the buffer and .bsize for the buffer size
|
||||
* see in event.h the structure event_arg
|
||||
*/
|
||||
unsigned char *buf = e.e[trace_msg_data.data].b;
|
||||
|
||||
printf("\n\nRecord number: %d", nrecord_idx);
|
||||
#ifdef DEBUG_BUFFER
|
||||
printf("\nBuffer index in bytes: %d", bufIdx_wr);
|
||||
#endif
|
||||
|
||||
// add general message header: message ID,
|
||||
// T-Tracer Message format
|
||||
// FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm :
|
||||
// int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot :
|
||||
// int,Nid_cell : int,rnti :
|
||||
// int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols :
|
||||
// int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers :
|
||||
// int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols :
|
||||
// int,dmrs_port : int,dmrs_nscid :
|
||||
// int,nb_antennas_tx : int,number_of_bits : buffer,data
|
||||
// printf("\nTX : %d", e.e[trace_msg_data.nb_antennas_tx].i);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.type, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.frame].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.slot].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.datetime_yyyymmdd].i, sizeof(uint32_t));
|
||||
bufIdx_wr += sizeof(uint32_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.datetime_hhmmssmmm].i, sizeof(uint32_t));
|
||||
bufIdx_wr += sizeof(uint32_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.frame_type].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.freq_range].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.subcarrier_spacing].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.cyclic_prefix].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.symbols_per_slot].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.Nid_cell].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.rnti].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.rb_size].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.rb_start].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.start_symbol_index].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.nr_of_symbols].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.qam_mod_order].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.mcs_index].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.mcs_table].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.nrOfLayers].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.transform_precoding].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.dmrs_config_type].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.ul_dmrs_symb_pos].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.number_dmrs_symbols].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.dmrs_port].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.dmrs_nscid].i, sizeof(uint16_t));
|
||||
bufIdx_wr += sizeof(uint16_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.nb_antennas_tx].i, sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.number_of_bits].i, sizeof(uint32_t));
|
||||
bufIdx_wr += sizeof(uint32_t);
|
||||
|
||||
printf("\nTime Stamp: %d_%d", e.e[trace_msg_data.datetime_yyyymmdd].i, e.e[trace_msg_data.datetime_hhmmssmmm].i);
|
||||
|
||||
// add message body: length in bytes + recorded data
|
||||
memcpy(&addr_wr[bufIdx_wr], &e.e[trace_msg_data.data].bsize, sizeof(uint32_t));
|
||||
bufIdx_wr += sizeof(uint32_t);
|
||||
|
||||
// read data from buffer and convert from unsigned char * array to int 16 using the right endianness
|
||||
// T-tracer: Little Endian
|
||||
// For BITS Messages, example: UE_PHY_UL_SCRAMBLED_TX_BITS: data in bytes
|
||||
|
||||
if (is_bits_messages(traces_bits_support_data_Collection_format_idx, n_bits_msgs, e.type)) {
|
||||
for (int byte_idx = 0; byte_idx < e.e[trace_msg_data.data].bsize; byte_idx += 1) {
|
||||
// printf("%d, ", buf[byte_idx]);
|
||||
memcpy(&addr_wr[bufIdx_wr], &buf[byte_idx], sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
}
|
||||
|
||||
} else {
|
||||
for (int byte_idx = 0; byte_idx < e.e[trace_msg_data.data].bsize; byte_idx += 2) {
|
||||
// For a little-endian system:
|
||||
memcpy(&addr_wr[bufIdx_wr], &buf[byte_idx], sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
memcpy(&addr_wr[bufIdx_wr], &buf[byte_idx + 1], sizeof(uint8_t));
|
||||
bufIdx_wr += sizeof(uint8_t);
|
||||
}
|
||||
}
|
||||
/*
|
||||
for (int byte_idx_i = 0; byte_idx_i < e.e[d.nr_ul_fd_dmrs_data].bsize; byte_idx_i+=4) {
|
||||
int16_t I = buf[byte_idx_i] | (buf[byte_idx_i+1] << 8);
|
||||
int16_t Q = buf[byte_idx_i+2] | (buf[byte_idx_i+3] << 8);
|
||||
printf ("idx %d, ", byte_idx_i);
|
||||
printf ("\n%d", I);
|
||||
printf ("\n%d", Q);
|
||||
}
|
||||
*/
|
||||
// check if the current frame and slot are different from the previous frame and slot
|
||||
// Then, increase the record index
|
||||
current_frame = e.e[trace_msg_data.frame].i;
|
||||
current_slot = e.e[trace_msg_data.slot].i;
|
||||
|
||||
// increase sync offset index if the current frame is different from the previous frame
|
||||
if ((current_frame != prev_frame) && nrecord_idx >= number_records) {
|
||||
sync_offset_index++;
|
||||
}
|
||||
|
||||
if (current_frame != prev_frame || current_slot != prev_slot) {
|
||||
nrecord_idx++;
|
||||
// Update previous frame and slot numbers
|
||||
prev_frame = current_frame;
|
||||
prev_slot = current_slot;
|
||||
}
|
||||
#ifdef DEBUG_T_Tracer
|
||||
printf("\nMessage Info: msg_id %s (%d) \n", event_name_from_id(database, e.type), e.type);
|
||||
printf("frame %d, slot %d, datetime %d_%d\n",
|
||||
e.e[trace_msg_data.frame].i,
|
||||
e.e[trace_msg_data.slot].i,
|
||||
e.e[trace_msg_data.datetime_yyyymmdd].i,
|
||||
e.e[trace_msg_data.datetime_hhmmssmmm].i);
|
||||
printf("frame_type %d, freq_range %d, subcarrier_spacing %d, cyclic_prefix %d, symbols_per_slot %d\n",
|
||||
e.e[trace_msg_data.frame_type].i,
|
||||
e.e[trace_msg_data.freq_range].i,
|
||||
e.e[trace_msg_data.subcarrier_spacing].i,
|
||||
e.e[trace_msg_data.cyclic_prefix].i,
|
||||
e.e[trace_msg_data.symbols_per_slot].i);
|
||||
printf("Nid_cell %d, rnti %d, rb_size %d, rb_start %d, start_symbol_index %d, nr_of_symbols %d\n",
|
||||
e.e[trace_msg_data.Nid_cell].i,
|
||||
e.e[trace_msg_data.rnti].i,
|
||||
e.e[trace_msg_data.rb_size].i,
|
||||
e.e[trace_msg_data.rb_start].i,
|
||||
e.e[trace_msg_data.start_symbol_index].i,
|
||||
e.e[trace_msg_data.nr_of_symbols].i);
|
||||
printf("qam_mod_order %d, mcs_index %d, mcs_table %d, nrOfLayers %d, transform_precoding %d\n",
|
||||
e.e[trace_msg_data.qam_mod_order].i,
|
||||
e.e[trace_msg_data.mcs_index].i,
|
||||
e.e[trace_msg_data.mcs_table].i,
|
||||
e.e[trace_msg_data.nrOfLayers].i,
|
||||
e.e[trace_msg_data.transform_precoding].i);
|
||||
printf("dmrs_config_type %d, ul_dmrs_symb_pos %d, number_dmrs_symbols %d, dmrs_port %d, dmrs_nscid %d\n",
|
||||
e.e[trace_msg_data.dmrs_config_type].i,
|
||||
e.e[trace_msg_data.ul_dmrs_symb_pos].i,
|
||||
e.e[trace_msg_data.number_dmrs_symbols].i,
|
||||
e.e[trace_msg_data.dmrs_port].i,
|
||||
e.e[trace_msg_data.dmrs_nscid].i);
|
||||
printf("nb_antennas_tx %d, number_of_bits %d, data size %d\n",
|
||||
e.e[trace_msg_data.nb_antennas_tx].i,
|
||||
e.e[trace_msg_data.number_of_bits].i,
|
||||
e.e[trace_msg_data.data].bsize);
|
||||
#endif
|
||||
} // End of start recording flag
|
||||
} // end of if statement for the supported messages based on Data Collection Trace Messages Structure
|
||||
else {
|
||||
printf("ERROR: Requested Message is not based on Data Collection Trace Messages Structure\n");
|
||||
printf("ERROR: Requested Message ID: %d\n", e.type);
|
||||
}
|
||||
} // end of if statement for the requested messages
|
||||
} // end while loop of reading events
|
||||
else {
|
||||
// No data, just loop and check time
|
||||
usleep(100); // optional: avoid busy-waiting
|
||||
}
|
||||
} // End of while loop to read messages
|
||||
|
||||
// de-activate the tracee in the nr-softmodem
|
||||
printf("\n De-activated Tracer message:\n");
|
||||
for (i = 0; i < num_req_tracer_msgs; i++) {
|
||||
char *on_off_name = event_name_from_id(database, req_tracer_msgs_indices[i]);
|
||||
on_off(database, on_off_name, is_on, 0);
|
||||
// printf("\n %d, %s, ", req_tracer_msgs_indices[i], on_off_name);
|
||||
// on_off(database, "GNB_PHY_DL_OUTPUT_SIGNAL", is_on, 1);
|
||||
}
|
||||
// De-activate the tracee in the nr-softmodem
|
||||
activate_traces(socket, number_of_events, is_on);
|
||||
printf("\n De-activated Traces");
|
||||
|
||||
// Get the end time
|
||||
struct timespec end_time = get_current_time();
|
||||
// Calculate the time difference
|
||||
double time_diff = calculate_time_difference(start_time, end_time);
|
||||
printf("Total Time difference: %.2f ms\n", time_diff);
|
||||
printf("Time difference per record: %.2f ms\n", time_diff / (number_records + max_sync_offset));
|
||||
|
||||
// discard stale or previous record data for the first DISCARD_RECORD_DURATION_MS
|
||||
struct timespec record_start, record_now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &record_start);
|
||||
|
||||
while (1) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &record_now);
|
||||
double elapsed_ms = calculate_time_difference(record_start, record_now);
|
||||
if (elapsed_ms >= DISCARD_RECORD_DURATION_MS) {
|
||||
break; // Stop after 10ms
|
||||
}
|
||||
int poll_ret = poll(&event_poll_fd, 1, 1); // 1 ms timeout for poll
|
||||
if (poll_ret > 0 && (event_poll_fd.revents & POLLIN)) {
|
||||
event e = get_event(socket, &ebuf, database);
|
||||
printf("%d", e.type);
|
||||
if (e.type == -1) {
|
||||
printf("\n Link broken or unexpected message received. Re-establishing connection...\n");
|
||||
reestablish_connection(&socket, ip, port, number_of_events, is_on);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
// No data, just loop and check time
|
||||
usleep(100); // optional: avoid busy-waiting
|
||||
}
|
||||
} // End of while loop to discard stale records
|
||||
}
|
||||
} // End a while loop to check for the "stop" command
|
||||
// de-activate the tracee in the nr-softmodem
|
||||
|
||||
// free_database(database); //Do on one app, for example on gNB App
|
||||
free(is_on);
|
||||
close(socket);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
{
|
||||
"id": 0,
|
||||
"test_config": {
|
||||
"test_scenario_id": "",
|
||||
"test_name": "phy_ul_bler_test",
|
||||
"test_mode": "rf_real_time",
|
||||
"dut_type": "trad_rx"
|
||||
},
|
||||
"environment_emulation": {
|
||||
"target_link_config": {
|
||||
"ran_config": {
|
||||
"uplink": {
|
||||
"ul_used_signal_BW_MHz": 2.16
|
||||
}
|
||||
},
|
||||
"wireless_channel": {
|
||||
"downlink": {
|
||||
"type": "rf_cable"
|
||||
},
|
||||
"uplink": {
|
||||
"type": "statistical_var",
|
||||
"statistical": {
|
||||
"var_power_delay_profile": "tdl_d",
|
||||
"speed_mps": 5.0,
|
||||
"delay_spread_ns": 50.0,
|
||||
"snr_db": 20.0,
|
||||
"predef_channel_profile": null
|
||||
}
|
||||
},
|
||||
"carrierFreqValueList_hz": [
|
||||
3319680000.0
|
||||
],
|
||||
"ul_used_signal_BW_MHz": 2.16
|
||||
}
|
||||
}
|
||||
},
|
||||
"data_recording_config": {
|
||||
"data_storage_path": "/home/user/workarea/oai_recorded_data/",
|
||||
"data_file_format": "SigMF",
|
||||
"enable_saving_tracer_messages_sigmf": true,
|
||||
"num_records": 5,
|
||||
"t_tracer_message_definition_file": "../T/T_messages.txt",
|
||||
"parameter_map_file": "config/wireless_link_parameter_map.yaml",
|
||||
"start_frame_number": 5,
|
||||
"base_station": {
|
||||
"requested_tracer_messages": [
|
||||
"GNB_PHY_UL_FD_PUSCH_IQ",
|
||||
"GNB_PHY_UL_FD_DMRS",
|
||||
"GNB_PHY_UL_FD_CHAN_EST_DMRS_POS",
|
||||
"GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL",
|
||||
"GNB_PHY_UL_PAYLOAD_RX_BITS"
|
||||
],
|
||||
"meta_data":{
|
||||
"num_rx_antennas": 1,
|
||||
"tx_gain": 48.0,
|
||||
"rx_gain": 30.0,
|
||||
"hw_type": "USRP X410",
|
||||
"hw_subtype": "ZBX",
|
||||
"seid": "328AB35"
|
||||
}
|
||||
},
|
||||
"user_equipment": {
|
||||
"requested_tracer_messages": [
|
||||
"UE_PHY_UL_SCRAMBLED_TX_BITS",
|
||||
"UE_PHY_UL_PAYLOAD_TX_BITS"
|
||||
],
|
||||
"meta_data":{
|
||||
"num_tx_antennas": 1,
|
||||
"tx_gain": 48.0,
|
||||
"rx_gain": 40.0,
|
||||
"hw_type": "USRP X410",
|
||||
"hw_subtype": "ZBX",
|
||||
"seid": "323F75F"
|
||||
}
|
||||
},
|
||||
"common_meta_data": {
|
||||
"sample_rate": 61440000.0,
|
||||
"bandwidth": 40000000.0,
|
||||
"clock_reference": "external"
|
||||
},
|
||||
"tracer_service_baseStation_address": "127.0.0.1:2021",
|
||||
"tracer_service_userEquipment_address": "127.0.0.1:2023"
|
||||
}
|
||||
}
|
||||
@@ -1,375 +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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/config/wireless_link_parameter_map.yaml
|
||||
# brief Wireless Link Parameter Map Dictionary
|
||||
# author Abdo Gaber
|
||||
# date 2024
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
|
||||
# Wireless Link Parameter Map
|
||||
# Components:
|
||||
# Transmitter: list of waveform configuration based on standard
|
||||
# Parameters pair is given via this parameter map dictionary (Parameter name in Waveform creator vs that in the API ~ SigMF meta-data)
|
||||
# Having a separate dictionary ease of adoption in case of:
|
||||
# - Adding new parameters
|
||||
# - Use different waveform creator that has Different naming scheme
|
||||
# - Define your own customized standard or new wireless system
|
||||
# - All changes are limited to parameter map dictionary
|
||||
# the parameter name of waveform generator has the following style:
|
||||
# StandardName_WaveformGenerator_parameter, i.e.
|
||||
# if standard = 5gnr, WaveformGenerator: ni_rfmx_rfws, then the parameter name: 5gnr_ni_rfmx_rfws_parameter
|
||||
# =====================================================================================
|
||||
# ======== list of parameter pairs between waveform config and API ~ SigMF Meta-Data ===
|
||||
# =====================================================================================
|
||||
|
||||
# List of waveform generators that generate waveforms
|
||||
# key:
|
||||
# standard: "name"
|
||||
# generator: "link or text ... etc"
|
||||
# key: Used to create parameter names in wireless_link_parameter_map
|
||||
# Recommended name for each waveform generator to be given as: standard_WaveformGenerator
|
||||
# Example: 5g NR waveform created using RFmx with RFWS config file: "5gnr_ni_rfmx_rfws"
|
||||
# Note: The suffix "_parameter" will be added automatically
|
||||
# standard name: occur in meta-data
|
||||
# generator: generator description to occur in meta-data
|
||||
|
||||
waveform_generator:
|
||||
# waveform_source: standard
|
||||
5gnr_oai: # Generated using OAI
|
||||
standard: "5gnr"
|
||||
generator: "OpenAirInterface: https://www.openairinterface.org/"
|
||||
5gnr_ni_rfmx_rfws: # Generated using NI RFmx Tool
|
||||
standard: "5gnr"
|
||||
generator: "NI RFmx Waveform Creator: https://www.ni.com/en-ca/shop/wireless-design-test/application-software-for-wireless-design-test-category/what-is-rfmx.html"
|
||||
transmitter:
|
||||
# 5G NR subfield
|
||||
5gnr:
|
||||
# frame number
|
||||
- sigmf_parameter_name: "frame"
|
||||
description: "5G NR frame number"
|
||||
5gnr_oai_parameter:
|
||||
name: "frame"
|
||||
# slot number
|
||||
- sigmf_parameter_name: "slot"
|
||||
description: "5G NR slot number"
|
||||
5gnr_oai_parameter:
|
||||
name: "slot"
|
||||
# bandwidth
|
||||
- sigmf_parameter_name: "bandwidth"
|
||||
description: "5G NR bandwidth"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "Bandwidth (Hz)"
|
||||
5gnr_oai_parameter:
|
||||
name: "bandwidth"
|
||||
# Frame structure
|
||||
- sigmf_parameter_name: "frame_structure"
|
||||
description: "5G NR duplexing scheme FDD, TDD, user defined"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "Duplex Scheme" # not exact, since it depends if the waveform is for UL or DL
|
||||
5gnr_oai_parameter:
|
||||
name: "frame_type"
|
||||
value_map: # simu value : SigMF value
|
||||
0: "fdd"
|
||||
1: "tdd"
|
||||
# Link direction
|
||||
- sigmf_parameter_name: "link_direction"
|
||||
description: "Link direction"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "Link Direction"
|
||||
# Frequency Range
|
||||
- sigmf_parameter_name: "frequency_range"
|
||||
description: "Frequency Range"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "Frequency Range"
|
||||
value_map: # simu value : SigMF value
|
||||
"Range 1": "fr1"
|
||||
"Range 2": "fr2"
|
||||
5gnr_oai_parameter:
|
||||
name: "freq_range"
|
||||
value_map: # simu value : SigMF value
|
||||
0: "fr1"
|
||||
1: "fr2"
|
||||
# Subcarrier spacing in Hz
|
||||
- sigmf_parameter_name: "subcarrier_spacing"
|
||||
description: "Subcarrier spacing in Hz"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: Subcarrier Spacing (Hz)
|
||||
5gnr_oai_parameter:
|
||||
name: subcarrier_spacing
|
||||
value_map: # simu value : SigMF value
|
||||
0: 15000
|
||||
1: 30000
|
||||
2: 60000
|
||||
3: 120000
|
||||
# Sampling rate in Hz
|
||||
- sigmf_parameter_name: "sample_rate"
|
||||
description: "Sampling rate in Hz"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "sample_rate_hz"
|
||||
5gnr_oai_parameter:
|
||||
name: "sample_rate"
|
||||
# Cyclic prefix mode
|
||||
- sigmf_parameter_name: "cp_mode"
|
||||
description: "Cyclic prefix mode"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "Cyclic Prefix Mode"
|
||||
5gnr_oai_parameter:
|
||||
name: "cyclic_prefix"
|
||||
value_map: # simu value : SigMF value
|
||||
0: "normal"
|
||||
1: "extended"
|
||||
# cell ID
|
||||
- sigmf_parameter_name: "cell_id"
|
||||
description: "cell ID"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "Cell ID"
|
||||
5gnr_oai_parameter:
|
||||
name: "Nid_cell"
|
||||
# rnti
|
||||
- sigmf_parameter_name: "rnti"
|
||||
description: "RNTI"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "rnti"
|
||||
5gnr_oai_parameter:
|
||||
name: "rnti"
|
||||
# Symbols per slot
|
||||
- sigmf_parameter_name: "symbols_per_slot"
|
||||
description: "Symbols per slot"
|
||||
5gnr_oai_parameter:
|
||||
name: "symbols_per_slot"
|
||||
# PUSCH: content
|
||||
- sigmf_parameter_name: "pusch:content"
|
||||
description: "PUSCH: content"
|
||||
# PUSCH: channel code
|
||||
- sigmf_parameter_name: "pusch:channel_code"
|
||||
description: "PUSCH: channel code"
|
||||
# PUSCH: number of PRBs
|
||||
- sigmf_parameter_name: "pusch:num_prb"
|
||||
description: "PUSCH Resource Block Size"
|
||||
5gnr_oai_parameter:
|
||||
name: "rb_size"
|
||||
# PUSCH RB Start index
|
||||
- sigmf_parameter_name: "pusch:start_prb"
|
||||
description: "PUSCH Resource Block Start"
|
||||
5gnr_oai_parameter:
|
||||
name: "rb_start"
|
||||
# PUSCH MAPPING type
|
||||
- sigmf_parameter_name: "pusch:mapping_type"
|
||||
description: "PUSCH Mapping Type"
|
||||
5gnr_oai_parameter:
|
||||
name: "mappingType"
|
||||
value_map: # simu value : SigMF value
|
||||
"NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeA": "A"
|
||||
"NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB": "B"
|
||||
# PUSCH: OFDM symbol start index within slot
|
||||
- sigmf_parameter_name: "pusch:start_ofdm_symbol"
|
||||
description: "PUSCH: OFDM symbol start index within slot"
|
||||
5gnr_oai_parameter:
|
||||
name: "start_symbol_index"
|
||||
# PUSCH: number of OFDM symbols in one slot
|
||||
- sigmf_parameter_name: "pusch:num_ofdm_symbols"
|
||||
description: "PUSCH: number of OFDM symbols in one slot"
|
||||
5gnr_oai_parameter:
|
||||
name: "nr_of_symbols"
|
||||
# PUSCH: modulation
|
||||
- sigmf_parameter_name: "pusch:modulation"
|
||||
description: "PUSCH: modulation"
|
||||
5gnr_ni_rfmx_rfws_parameter:
|
||||
name: "UL Modulation Type"
|
||||
value_map: # simu value : SigMF value
|
||||
"8PSK": "8_psk"
|
||||
"QPSK": "qpsk"
|
||||
"QAM16": "16_qam"
|
||||
"QAM64": "64_qam"
|
||||
"QAM256": "256_qam"
|
||||
"QAM1024": "1024_qam"
|
||||
"Standard": ""
|
||||
5gnr_oai_parameter:
|
||||
name: "qam_mod_order"
|
||||
value_map: # simu value : SigMF value
|
||||
2 : "qpsk"
|
||||
4 : "16_qam"
|
||||
6 : "64_qam"
|
||||
8 : "256_qam"
|
||||
"Standard": ""
|
||||
# PUSCH MCS Index
|
||||
- sigmf_parameter_name: "pusch:mcs"
|
||||
description: "PUSCH MCS Index"
|
||||
5gnr_oai_parameter:
|
||||
name: "mcs_index"
|
||||
# PUSCH MCS Index Table
|
||||
- sigmf_parameter_name: "pusch:mcs_table_index"
|
||||
description: "PUSCH MCS Table Index"
|
||||
5gnr_oai_parameter:
|
||||
name: "mcs_table"
|
||||
# PUSCH: number of transmission layers
|
||||
- sigmf_parameter_name: "pusch:num_layer"
|
||||
description: "PUSCH: number of transmission layers"
|
||||
5gnr_oai_parameter:
|
||||
name: "nrOfLayers"
|
||||
# Transform Precoding
|
||||
- sigmf_parameter_name: "pusch:transform_precoding"
|
||||
description: "PUSCH Transform Precoding"
|
||||
5gnr_oai_parameter:
|
||||
name: "transform_precoding"
|
||||
value_map: # simu value : SigMF value
|
||||
0: "enabled"
|
||||
1: "disabled"
|
||||
# PUSCH DMRS: content
|
||||
- sigmf_parameter_name: "pusch_dmrs:content"
|
||||
description: "PUSCH DMRS: content"
|
||||
#"none": "none"
|
||||
#"random_qpsk": "random_qpsk"
|
||||
#"compliant": "compliant"
|
||||
# PUSCH DMRS: resource map configuration
|
||||
- sigmf_parameter_name: "pusch_dmrs:resource_map_config"
|
||||
description: "PUSCH DMRS: resource map configuration"
|
||||
5gnr_oai_parameter:
|
||||
name: "dmrs_config_type"
|
||||
value_map:
|
||||
0: "5g nr type 1"
|
||||
1: "5g nr type 2"
|
||||
# PUSCH DMRS: OFDM symbol start index within slot
|
||||
- sigmf_parameter_name: "pusch_dmrs:start_ofdm_symbol"
|
||||
description: "PUSCH DMRS: OFDM symbol start index within slot"
|
||||
5gnr_oai_parameter:
|
||||
# to be derived from this OAI parameter
|
||||
name: "ul_dmrs_symb_pos"
|
||||
# PUSCH DMRS: DMRS duration in number of OFDM symbols
|
||||
- sigmf_parameter_name: "pusch_dmrs:duration_num_ofdm_symbols"
|
||||
description: "PUSCH DMRS: DMRS duration in number of OFDM symbols"
|
||||
5gnr_oai_parameter:
|
||||
# to be derived from this OAI parameter
|
||||
name: "ul_dmrs_symb_pos"
|
||||
# PUSCH DMRS: OFDM symbol indices within resource grid
|
||||
- sigmf_parameter_name: "pusch_dmrs:ofdm_symbol_idx"
|
||||
description: "PUSCH DMRS: OFDM symbol indices within resource grid"
|
||||
5gnr_oai_parameter:
|
||||
# to be derived from this OAI parameter
|
||||
name: "ul_dmrs_symb_pos"
|
||||
# PUSCH DMRS: number of additional PUSCH DMRS positions
|
||||
- sigmf_parameter_name: "pusch_dmrs:num_add_positions"
|
||||
description: "PUSCH DMRS: number of additional PUSCH DMRS positions"
|
||||
5gnr_oai_parameter:
|
||||
# to be derived from this OAI parameter
|
||||
name: "ul_dmrs_symb_pos"
|
||||
# PUSCH DMRS: antenna port
|
||||
- sigmf_parameter_name: "pusch_dmrs:antennna_port"
|
||||
description: "PUSCH DMRS: antenna port"
|
||||
5gnr_oai_parameter:
|
||||
name: "dmrs_port"
|
||||
# PUSCH DMRS: scrambler initialization
|
||||
- sigmf_parameter_name: "pusch_dmrs:nscid"
|
||||
description: "PUSCH DMRS: scrambler initialization"
|
||||
5gnr_oai_parameter:
|
||||
name: "dmrs_nscid"
|
||||
# number of rx antennas
|
||||
- sigmf_parameter_name: "num_rx_antennas"
|
||||
description: "Number of Rx antennas"
|
||||
5gnr_oai_parameter:
|
||||
name: "nb_antennas_rx"
|
||||
# number of tx antennas
|
||||
- sigmf_parameter_name: "num_tx_antennas"
|
||||
description: "Number of Tx antennas"
|
||||
5gnr_oai_parameter:
|
||||
name: "nb_antennas_tx"
|
||||
|
||||
channel:
|
||||
# Signal-to-noise ratio (Es/N0) in dB
|
||||
- sigmf_parameter_name: "snr_esn0_db"
|
||||
description: "Signal-to-noise ratio (Es/N0) in dB"
|
||||
# Signal-to-noise ratio (Eb/N0) in dB
|
||||
- sigmf_parameter_name: "snr_ebn0_db"
|
||||
description: "Signal-to-noise ratio (Eb/N0) in dB"
|
||||
# Channel model
|
||||
- sigmf_parameter_name: "channel_model"
|
||||
description: "Fading channel model"
|
||||
# Number of channel taps
|
||||
- sigmf_parameter_name: "num_channel_taps"
|
||||
description: "Number of channel taps"
|
||||
# Channel attenuation level in dB
|
||||
- sigmf_parameter_name: "channel_attenuation_db"
|
||||
description: "Channel attenuation level in dB"
|
||||
# Nominal delay spread in s
|
||||
- sigmf_parameter_name: "delay_spread"
|
||||
description: "Nominal delay spread in s"
|
||||
# UE speed in m/s
|
||||
- sigmf_parameter_name: "speed"
|
||||
description: "UE speed in m/s"
|
||||
# Carrier frequency in Hz
|
||||
- sigmf_parameter_name: "carrier_frequency"
|
||||
description: "Carrier frequency in Hz"
|
||||
receiver:
|
||||
# Frequency domain interpolation method for channel estimation
|
||||
- sigmf_parameter_name: "channel_estimation_freq_interpolation"
|
||||
description: "Frequency domain interpolation method for channel estimation"
|
||||
# Time domain interpolation method for channel estimation
|
||||
- sigmf_parameter_name: "channel_estimation_time_interpolation"
|
||||
description: "Time domain interpolation method for channel estimation"
|
||||
# Channel equalization method
|
||||
- sigmf_parameter_name: "channel_equalization_method"
|
||||
description: "Channel equalization method"
|
||||
# Symbol demapping method
|
||||
- sigmf_parameter_name: "symbol_demapping_method"
|
||||
description: "Symbol demapping method"
|
||||
# Manufacturer of the hardware used to receive the signal
|
||||
- sigmf_parameter_name: "manufacturer"
|
||||
description: "Manufacturer"
|
||||
# Unique ID of the emitter, USRP serial number --> usrp_mboard_serial
|
||||
- sigmf_parameter_name: "seid"
|
||||
description: "Emitter ID (USRP serial number)"
|
||||
# For USRP, use “daughterboard ID, a string read out from the device shortened by the hex ID e.g. ‘(0x0085)’
|
||||
- sigmf_parameter_name: "hw_subtype"
|
||||
description: "Hardware subtype (for USRP: daughterboard ID)"
|
||||
# RX sync reference source ("internal", "external", "gpsdo")
|
||||
- sigmf_parameter_name: "clock_reference"
|
||||
description: "RX clock reference"
|
||||
required_field: false
|
||||
# Estimated SNR in dB
|
||||
- sigmf_parameter_name: "snr_estimate_db"
|
||||
description: "SNR estimate in dB"
|
||||
required_field: false
|
||||
# Result of coarse PSS-based timing estimation (used for synchronization)
|
||||
- sigmf_parameter_name: "timing_estimate_coarse"
|
||||
description: "Coarse timing estimate in samples"
|
||||
required_field: false"
|
||||
# Result of coarse PSS-based frequency offset estimation (used for synchronization)
|
||||
- sigmf_parameter_name: "cfo_estimate_coarse"
|
||||
description: "Coarse frequency estimate in Hz"
|
||||
required_field: false
|
||||
# Result of fine CRS-based frequency offset estimation (used for synchronization)
|
||||
- sigmf_parameter_name: "cfo_estimate_fine"
|
||||
description: "Fine frequency estimate in Hz"
|
||||
required_field: false
|
||||
# Number of transmitted payload bits
|
||||
- sigmf_parameter_name: "num_payload_bits"
|
||||
description: "Number of transmitted payload bits"
|
||||
required_field: false
|
||||
# Number of bit errors when applying traditional RX processing
|
||||
- sigmf_parameter_name: "bit_errors_trad_rx"
|
||||
description: "Bit errors"
|
||||
required_field: false
|
||||
@@ -1,829 +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
|
||||
# */
|
||||
# ---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/data_recording_app_v1.0.py
|
||||
# brief main application of synchronized real-time data recording
|
||||
# author Abdo Gaber
|
||||
# date 2025
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
import sysv_ipc as ipc
|
||||
import struct
|
||||
import time
|
||||
from datetime import datetime
|
||||
from termcolor import colored
|
||||
import numpy as np
|
||||
import json
|
||||
import concurrent.futures
|
||||
# from concurrent import futures
|
||||
import threading
|
||||
# import related functions
|
||||
from lib import sigmf_interface
|
||||
# import library functions
|
||||
from lib import sync_service
|
||||
from lib import data_recording_messages_def
|
||||
from lib import common_utils
|
||||
from lib import config_interface
|
||||
|
||||
DEBUG_WIRELESS_RECORDED_DATA = True
|
||||
DEBUG_BUFFER_READING = False
|
||||
|
||||
# globally applicable metadata
|
||||
global_info = {
|
||||
"author": "Abdo Gaber",
|
||||
"description": "Synchronized Real-Time Data Recording",
|
||||
"timestamp": 0,
|
||||
"collection_file_prefix": "data-collection", # collection file name prefix "deap-rx + str(...)"
|
||||
"collection_file": "", # Reserved to be created in the code: “data-collection_rec-0_TIME-STAMP”
|
||||
"datetime_offset": "", # datetime offset between current location and UTC/Zulu timezone
|
||||
# Example: "+01:00" for Berlin, Germany
|
||||
"save_config_data_recording_app_json": True,
|
||||
"waveform_generator": "5gnr_oai",
|
||||
"extensions": {},
|
||||
}
|
||||
|
||||
# Supported OAI Trace messages
|
||||
# UL receiver messages
|
||||
# gNB IQ Msgs: "GNB_PHY_UL_FD_PUSCH_IQ", "GNB_PHY_UL_FD_DMRS", "GNB_PHY_UL_FD_CHAN_EST_DMRS_POS",
|
||||
# "GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL"
|
||||
# gNB BITS Msgs: "GNB_PHY_UL_PAYLOAD_RX_BITS"
|
||||
# UE BITS Msgs: "UE_PHY_UL_SCRAMBLED_TX_BITS", "UE_PHY_UL_PAYLOAD_TX_BITS"
|
||||
|
||||
supported_oai_tracer_messages = {
|
||||
# gNB messages
|
||||
"GNB_PHY_UL_FD_PUSCH_IQ": {
|
||||
"file_name_prefix": "rx-fd-data",
|
||||
"scope": "gNB",
|
||||
"description": "Frequency-domain RX data",
|
||||
"serialization_scheme": ["subcarriers", "ofdm_symbols"],
|
||||
},
|
||||
"GNB_PHY_UL_FD_DMRS": {
|
||||
"file_name_prefix": "tx-pilots-fd-data",
|
||||
"scope": "gNB",
|
||||
"description": "Frequency-domain TX PUSCH DMRS data",
|
||||
"serialization_scheme": ["subcarriers", "ofdm_symbols"],
|
||||
},
|
||||
"GNB_PHY_UL_FD_CHAN_EST_DMRS_POS": {
|
||||
"file_name_prefix": "raw-ce-fd-data",
|
||||
"scope": "gNB",
|
||||
"description": "Frequency-domain raw channel estimates (at DMRS positions)",
|
||||
"serialization_scheme": ["subcarriers", "ofdm_symbols"],
|
||||
},
|
||||
"GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL": {
|
||||
"file_name_prefix": "raw-inter-ce-fd-data",
|
||||
"scope": "gNB",
|
||||
"description": "Interpolcated Frequency-domain raw channel estimates",
|
||||
"serialization_scheme": ["subcarriers", "ofdm_symbols"],
|
||||
},
|
||||
"GNB_PHY_UL_PAYLOAD_RX_BITS": {
|
||||
"file_name_prefix": "rx-payload-bits",
|
||||
"scope": "gNB",
|
||||
"description": "Received PUSCH payload bits",
|
||||
"serialization_scheme": ["bits", "subcarriers", "ofdm_symbols"],
|
||||
},
|
||||
# UE messages
|
||||
"UE_PHY_UL_SCRAMBLED_TX_BITS": {
|
||||
"file_name_prefix": "tx-scrambled-bits",
|
||||
"scope": "UE",
|
||||
"description": "Transmitted scrambled PUSCH bits",
|
||||
"serialization_scheme": ["bits", "subcarriers", "ofdm_symbols"],
|
||||
},
|
||||
"UE_PHY_UL_PAYLOAD_TX_BITS": {
|
||||
"file_name_prefix": "tx-payload-bits",
|
||||
"scope": "UE",
|
||||
"description": "Transmitted PUSCH payload bits",
|
||||
"serialization_scheme": ["bits", "subcarriers", "ofdm_symbols"],
|
||||
},
|
||||
}
|
||||
# -------------------------------------------
|
||||
# System configuration: gNB
|
||||
project_id_gnb = 2335
|
||||
read_shm_path_gnb = "/tmp/gnb_app1"
|
||||
write_shm_path_gnb = "/tmp/gnb_app2"
|
||||
|
||||
# System configuration: UE
|
||||
project_id_ue = 2336
|
||||
read_shm_path_ue = "/tmp/ue_app1"
|
||||
write_shm_path_ue = "/tmp/ue_app2"
|
||||
|
||||
|
||||
# initialize shared memory
|
||||
def attach_shm(shm_path, project_id):
|
||||
key = ipc.ftok(shm_path, project_id)
|
||||
shm = ipc.SharedMemory(key, 0, 0)
|
||||
# I found if we do not attach ourselves
|
||||
# it will attach as ReadOnly.
|
||||
shm.attach(0, 0)
|
||||
return shm
|
||||
|
||||
|
||||
def detach_shm(shm):
|
||||
try:
|
||||
shm.detach()
|
||||
print("Shared memory detached successfully.")
|
||||
except ipc.ExistentialError:
|
||||
print("Shared memory segment does not exist.")
|
||||
|
||||
|
||||
def remove_shm(shm):
|
||||
try:
|
||||
shm.remove()
|
||||
print("Shared memory removed successfully.")
|
||||
except ipc.ExistentialError:
|
||||
print("Shared memory segment does not exist.")
|
||||
|
||||
|
||||
# check data if avalible in the shared memory
|
||||
def is_data_available_in_memory(shm, bufIdx, general_message_header_length, timeout=20):
|
||||
start_time = time.time()
|
||||
while True:
|
||||
buf = shm.read(bufIdx + general_message_header_length)
|
||||
n_bytes = sum(buf)
|
||||
print("Data Recording App: Waiting for Measurements!")
|
||||
if n_bytes > 0:
|
||||
print("There is data in memory, n_bytes: ", n_bytes)
|
||||
return True
|
||||
if (time.time() - start_time) > timeout:
|
||||
break
|
||||
time.sleep(1)
|
||||
return False
|
||||
|
||||
|
||||
# Read data from Shared memory based Data Conversion Service message structure
|
||||
def read_data_from_shm(shm, bufIdx, tracer_msgs_identities):
|
||||
# print buffer index
|
||||
if DEBUG_BUFFER_READING:
|
||||
print("Buffer Index: ", bufIdx)
|
||||
# get general message header list
|
||||
general_msg_header_list, general_message_header_length = data_recording_messages_def.get_general_msg_header_list()
|
||||
buf = shm.read(bufIdx + general_message_header_length)
|
||||
n_bytes = sum(buf)
|
||||
if n_bytes == 0:
|
||||
raise Exception('ERROR: No data available in memory')
|
||||
msg_id = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("msg_id")])[0]
|
||||
bufIdx += general_msg_header_list.get("msg_id")
|
||||
frame = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("frame")])[0]
|
||||
bufIdx += general_msg_header_list.get("frame")
|
||||
slot = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("slot")])[0]
|
||||
bufIdx += general_msg_header_list.get("slot")
|
||||
# get time stamp: yyyy mm dd hh mm ss msec
|
||||
nr_trace_time_stamp_yyymmdd = \
|
||||
struct.unpack('<i', buf[bufIdx:bufIdx+general_msg_header_list.get("datetime_yyyymmdd")])[0]
|
||||
bufIdx += general_msg_header_list.get("datetime_yyyymmdd")
|
||||
nr_trace_time_stamp_hhmmssmmm = \
|
||||
struct.unpack('<i', buf[bufIdx:bufIdx+general_msg_header_list.get("datetime_hhmmssmmm")])[0]
|
||||
bufIdx += general_msg_header_list.get("datetime_hhmmssmmm")
|
||||
time_stamp_milli_sec = str(nr_trace_time_stamp_yyymmdd)+"_"+str(nr_trace_time_stamp_hhmmssmmm)
|
||||
# get frame type
|
||||
frame_type = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("frame_type")])[0]
|
||||
bufIdx += general_msg_header_list.get("frame_type")
|
||||
# get frequency range
|
||||
freq_range = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("freq_range")])[0]
|
||||
bufIdx += general_msg_header_list.get("freq_range")
|
||||
# get subcarrier spacing
|
||||
subcarrier_spacing = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("subcarrier_spacing")])[0]
|
||||
bufIdx += general_msg_header_list.get("subcarrier_spacing")
|
||||
# get cyclic prefix
|
||||
cyclic_prefix = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("cyclic_prefix")])[0]
|
||||
bufIdx += general_msg_header_list.get("cyclic_prefix")
|
||||
# get symbols per slot
|
||||
symbols_per_slot = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("symbols_per_slot")])[0]
|
||||
bufIdx += general_msg_header_list.get("symbols_per_slot")
|
||||
# get Nid cell
|
||||
Nid_cell = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("Nid_cell")])[0]
|
||||
bufIdx += general_msg_header_list.get("Nid_cell")
|
||||
# get rnti
|
||||
rnti = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("rnti")])[0]
|
||||
bufIdx += general_msg_header_list.get("rnti")
|
||||
# get rb size
|
||||
rb_size = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("rb_size")])[0]
|
||||
bufIdx += general_msg_header_list.get("rb_size")
|
||||
# get rb start
|
||||
rb_start = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("rb_start")])[0]
|
||||
bufIdx += general_msg_header_list.get("rb_start")
|
||||
# get start symbol index
|
||||
start_symbol_index = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("start_symbol_index")])[0]
|
||||
bufIdx += general_msg_header_list.get("start_symbol_index")
|
||||
# get number of symbols
|
||||
nr_of_symbols = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("nr_of_symbols")])[0]
|
||||
bufIdx += general_msg_header_list.get("nr_of_symbols")
|
||||
# get qam modulation order
|
||||
qam_mod_order = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("qam_mod_order")])[0]
|
||||
bufIdx += general_msg_header_list.get("qam_mod_order")
|
||||
# get mcs index
|
||||
mcs_index = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("mcs_index")])[0]
|
||||
bufIdx += general_msg_header_list.get("mcs_index")
|
||||
# get mcs table
|
||||
mcs_table = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("mcs_table")])[0]
|
||||
bufIdx += general_msg_header_list.get("mcs_table")
|
||||
# get number of layers
|
||||
nrOfLayers = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("nrOfLayers")])[0]
|
||||
bufIdx += general_msg_header_list.get("nrOfLayers")
|
||||
# get transform precoding
|
||||
transform_precoding = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("transform_precoding")])[0]
|
||||
bufIdx += general_msg_header_list.get("transform_precoding")
|
||||
# get dmrs config type
|
||||
dmrs_config_type = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("dmrs_config_type")])[0]
|
||||
bufIdx += general_msg_header_list.get("dmrs_config_type")
|
||||
# get ul dmrs symb pos
|
||||
ul_dmrs_symb_pos = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("ul_dmrs_symb_pos")])[0]
|
||||
bufIdx += general_msg_header_list.get("ul_dmrs_symb_pos")
|
||||
# get number dmrs symbols
|
||||
number_dmrs_symbols = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("number_dmrs_symbols")])[0]
|
||||
bufIdx += general_msg_header_list.get("number_dmrs_symbols")
|
||||
# get dmrs port
|
||||
dmrs_port = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("dmrs_port")])[0]
|
||||
bufIdx += general_msg_header_list.get("dmrs_port")
|
||||
# get dmrs scid
|
||||
dmrs_scid = struct.unpack('<H', buf[bufIdx:bufIdx+general_msg_header_list.get("dmrs_scid")])[0]
|
||||
bufIdx += general_msg_header_list.get("dmrs_scid")
|
||||
# get nb antennas rx for gNB or nb antennas tx for UE
|
||||
nb_antennas = struct.unpack('B', buf[bufIdx:bufIdx+general_msg_header_list.get("nb_antennas")])[0]
|
||||
bufIdx += general_msg_header_list.get("nb_antennas")
|
||||
# get number of bits
|
||||
number_of_bits = struct.unpack('<I', buf[bufIdx:bufIdx+general_msg_header_list.get("number_of_bits")])[0]
|
||||
bufIdx += general_msg_header_list.get("number_of_bits")
|
||||
# get length of bytes
|
||||
length_bytes = struct.unpack('<I', buf[bufIdx:bufIdx+general_msg_header_list.get("length_bytes")])[0]
|
||||
bufIdx += general_msg_header_list.get("length_bytes")
|
||||
|
||||
# print all captured data
|
||||
if DEBUG_WIRELESS_RECORDED_DATA:
|
||||
print(" ")
|
||||
print(f"Time stamp: {time_stamp_milli_sec}")
|
||||
print(f"MSG ID: {msg_id:<5} MSG Name: {tracer_msgs_identities[msg_id]}")
|
||||
print(f"Frame: {frame:<5} Slot: {slot:<5}")
|
||||
print(f"Frame Type: {frame_type:<5} Frequency Range: {freq_range:<5}"
|
||||
f"Subcarrier Spacing: {subcarrier_spacing:<5} Cyclic Prefix: {cyclic_prefix:<5} "
|
||||
f"Symbols per Slot: {symbols_per_slot:<5}")
|
||||
print(f"Nid Cell: {Nid_cell:<5} RNTI: {rnti:<5}")
|
||||
print(f"RB Size: {rb_size:<5} RB Start: {rb_start:<5} Start Symbol Index: {start_symbol_index:<5} "
|
||||
f"Number of Symbols: {nr_of_symbols:<5}")
|
||||
print(f"QAM Modulation Order: {qam_mod_order:<5} MCS Index: {mcs_index:<5} "
|
||||
f"MCS Table: {mcs_table:<5}")
|
||||
print(f"Number of Layers: {nrOfLayers:<5} Transform Precoding: {transform_precoding:<5}")
|
||||
print(f"DMRS Config Type: {dmrs_config_type:<5} UL DMRS Symbol Position: {ul_dmrs_symb_pos:<5} "
|
||||
f"Number of DMRS Symbols: {number_dmrs_symbols:<5}")
|
||||
print(f"DMRS Port: {dmrs_port:<5} DMRS SCID: {dmrs_scid:<5} "
|
||||
f"Number of Antennas: {nb_antennas:<5}")
|
||||
print(f"Number of bits: {number_of_bits:<5} Length of bytes: {length_bytes:<5}")
|
||||
# raise exception if time stamp is zero, it means that the data is not recorded yet
|
||||
if nr_trace_time_stamp_yyymmdd == 0 and nr_trace_time_stamp_hhmmssmmm == 0:
|
||||
raise Exception("ERROR: Time stamp is zero, data is not recorded yet or something wrong, check logs!")
|
||||
# get recorded data
|
||||
buf = shm.read(bufIdx + length_bytes)
|
||||
# bit_msg_index = get_index_of_id(tracer_msgs_identities, "GNB_PHY_UL_PAYLOAD_RX_BITS")
|
||||
captured_data = {}
|
||||
# If message is bit message, store data in bytes
|
||||
# then the field number_of_bits should be not zero
|
||||
if "_BITS" in tracer_msgs_identities[msg_id]:
|
||||
# recorded_data = buf[bufIdx:bufIdx + length_bytes]
|
||||
recorded_data = struct.unpack("<" + int(length_bytes) * 'B', buf[bufIdx:bufIdx + length_bytes])
|
||||
bufIdx += length_bytes
|
||||
# convert data in bytes to bits
|
||||
bits_vector = []
|
||||
for byte in recorded_data:
|
||||
bits_vector.extend([int(bit) for bit in format(int(byte), '08b')])
|
||||
captured_data["sigmf_data_type"] = "ri8_le"
|
||||
# convert to uint8
|
||||
captured_data["recorded_data"] = np.asarray(bits_vector).astype(np.uint8)
|
||||
# recorded_data_formated = recorded_data.astype(np.complex64) # convert to complex64
|
||||
else:
|
||||
recorded_data = struct.unpack("<" + int(length_bytes/2) * 'h', buf[bufIdx:bufIdx + length_bytes])
|
||||
bufIdx += length_bytes
|
||||
# print("IQ data I/Q: ", recorded_data)
|
||||
# Convert real data to complext data
|
||||
# converting list to array
|
||||
recorded_data = np.asarray(recorded_data)
|
||||
# recorded_data_complex = recorded_data
|
||||
recorded_data_complex = common_utils.real_to_complex(recorded_data)
|
||||
captured_data["sigmf_data_type"] = "cf32_le"
|
||||
# convert to complex64
|
||||
captured_data["recorded_data"] = recorded_data_complex.astype(np.complex64)
|
||||
# print("Recorded Data: ", captured_data["recorded_data"])
|
||||
# store data in dictonary
|
||||
captured_data["message_id"] = msg_id
|
||||
captured_data["message_type"] = tracer_msgs_identities[msg_id]
|
||||
captured_data["frame"] = frame
|
||||
captured_data["slot"] = slot
|
||||
captured_data["time_stamp"] = time_stamp_milli_sec
|
||||
captured_data["frame_type"] = frame_type
|
||||
captured_data["freq_range"] = freq_range
|
||||
captured_data["subcarrier_spacing"] = subcarrier_spacing
|
||||
captured_data["cyclic_prefix"] = cyclic_prefix
|
||||
# captured_data["symbols_per_slot"] = symbols_per_slot ... not used
|
||||
captured_data["Nid_cell"] = Nid_cell
|
||||
captured_data["rnti"] = rnti
|
||||
captured_data["rb_size"] = rb_size
|
||||
captured_data["rb_start"] = rb_start
|
||||
captured_data["start_symbol_index"] = start_symbol_index
|
||||
captured_data["nr_of_symbols"] = nr_of_symbols
|
||||
captured_data["qam_mod_order"] = qam_mod_order
|
||||
captured_data["mcs_index"] = mcs_index
|
||||
captured_data["mcs_table"] = mcs_table
|
||||
captured_data["nrOfLayers"] = nrOfLayers
|
||||
captured_data["transform_precoding"] = transform_precoding
|
||||
captured_data["dmrs_config_type"] = dmrs_config_type
|
||||
captured_data["ul_dmrs_symb_pos"] = ul_dmrs_symb_pos
|
||||
captured_data["number_dmrs_symbols"] = number_dmrs_symbols
|
||||
captured_data["dmrs_port"] = dmrs_port
|
||||
captured_data["dmrs_scid"] = dmrs_scid
|
||||
captured_data["nb_antennas"] = nb_antennas
|
||||
captured_data["number_of_bits"] = number_of_bits
|
||||
return captured_data, bufIdx
|
||||
|
||||
|
||||
# Synchronize data between gNB and UE
|
||||
def sync_data_conversion_service(
|
||||
shm_reading_gnb, shm_reading_ue, sync_info, config_meta_data, gnb_args, ue_args):
|
||||
# Initialize variables
|
||||
record_idx = 0
|
||||
prev_frame = -1
|
||||
prev_slot = -1
|
||||
ue_bufIdx = 0
|
||||
gnb_bufIdx = 0
|
||||
|
||||
gnb_args.num_requested_tracer_msgs = len(
|
||||
config_meta_data["data_recording_config"]["base_station"][
|
||||
"requested_tracer_messages"])
|
||||
ue_args.num_requested_tracer_msgs = len(
|
||||
config_meta_data["data_recording_config"]["user_equipment"][
|
||||
"requested_tracer_messages"])
|
||||
tracer_msgs_identities = config_meta_data["data_recording_config"][
|
||||
"tracer_msgs_identities"]
|
||||
|
||||
global_info = config_meta_data["data_recording_config"]["global_info"]
|
||||
|
||||
# Get UE data based on the sync data
|
||||
bufIdx = 0
|
||||
timeout_sync = time.time() + 5 # 5 seconds if no sync data found, stop the process
|
||||
while True:
|
||||
# wait for the next record
|
||||
# To do: check if we need to add exta waiting times between different events in case of
|
||||
# data streaming via network such as on UE side or gNB side
|
||||
time.sleep(0.0035) # 2.3 ms = latency of T tracer to capture data from the RAN
|
||||
ue_bufIdx = bufIdx
|
||||
captured_data, bufIdx = read_data_from_shm(shm_reading_ue, bufIdx, tracer_msgs_identities)
|
||||
if (captured_data["frame"] == sync_info["frame"]
|
||||
and captured_data["slot"] == sync_info["slot"]):
|
||||
break
|
||||
if time.time() > timeout_sync:
|
||||
raise Exception(
|
||||
"ERROR: Data Recording NO Sync Found, check Tracer Services if they are connected!")
|
||||
|
||||
# Get gNB data based on the sync data
|
||||
bufIdx = 0
|
||||
while True:
|
||||
time.sleep(0.0035)
|
||||
gnb_bufIdx = bufIdx
|
||||
captured_data, bufIdx = read_data_from_shm(
|
||||
shm_reading_gnb, bufIdx, tracer_msgs_identities)
|
||||
if (captured_data["frame"] == sync_info["frame"]
|
||||
and captured_data["slot"] == sync_info["slot"]):
|
||||
break
|
||||
|
||||
# Read Synchronized data between gNB and UE
|
||||
while True: # read all records
|
||||
print("\nRecord number: ", record_idx)
|
||||
if DEBUG_BUFFER_READING:
|
||||
print(f"Buffer Index gNB: {gnb_bufIdx}, Buffer Index UE: {ue_bufIdx}")
|
||||
# wait for the next record
|
||||
# To do: check if we need to add exta waiting times between different events in case of
|
||||
# data streaming via network such as on UE side or gNB side
|
||||
time.sleep(0.0035) # 2.3 ms = latency of T tracer to capture data from the RAN
|
||||
|
||||
collected_metafiles = []
|
||||
# Read data from gNB T-tracer Application
|
||||
for idx in range(gnb_args.num_requested_tracer_msgs):
|
||||
time.sleep(0.0015)
|
||||
if DEBUG_WIRELESS_RECORDED_DATA:
|
||||
print(f"\nRecord number: {record_idx}, Reading MSG data ", idx)
|
||||
captured_data, gnb_bufIdx = read_data_from_shm(
|
||||
shm_reading_gnb, gnb_bufIdx, tracer_msgs_identities)
|
||||
# drive the collection file time stamp from the first message per record
|
||||
if idx == 0:
|
||||
# Get time stamp
|
||||
time_stamp_ms, time_stamp_ms_file_name = (
|
||||
sigmf_interface.time_stamp_formating(
|
||||
captured_data["time_stamp"], global_info["datetime_offset"]))
|
||||
global_info["collection_file"] = (
|
||||
global_info["collection_file_prefix"]
|
||||
+ "-rec-"
|
||||
+ str(record_idx)
|
||||
+ "-"
|
||||
+ str(time_stamp_ms_file_name)
|
||||
)
|
||||
global_info["timestamp"] = time_stamp_ms
|
||||
|
||||
# Write data into files with the given format
|
||||
if config_meta_data["data_recording_config"]["enable_saving_tracer_messages_sigmf"]:
|
||||
collected_metafiles.append(
|
||||
sigmf_interface.write_recorded_data_to_sigmf(
|
||||
captured_data, config_meta_data, global_info, record_idx))
|
||||
|
||||
# Read data from UE T-tracer Application
|
||||
for idx in range(ue_args.num_requested_tracer_msgs):
|
||||
time.sleep(0.0015)
|
||||
if DEBUG_WIRELESS_RECORDED_DATA:
|
||||
print(f"\nRecord number: {record_idx}, Reading MSG data ", idx)
|
||||
captured_data, ue_bufIdx = read_data_from_shm(
|
||||
shm_reading_ue, ue_bufIdx, tracer_msgs_identities)
|
||||
|
||||
# Write data into files with the given format
|
||||
if config_meta_data["data_recording_config"]["enable_saving_tracer_messages_sigmf"]:
|
||||
collected_metafiles.append(
|
||||
sigmf_interface.write_recorded_data_to_sigmf(
|
||||
captured_data, config_meta_data, global_info, record_idx))
|
||||
|
||||
# generate SigMF collection file
|
||||
if config_meta_data["data_recording_config"]["enable_saving_tracer_messages_sigmf"]:
|
||||
data_storage_path = config_meta_data["data_recording_config"][
|
||||
"data_storage_path"]
|
||||
description = global_info["description"]
|
||||
sigmf_interface.save_sigmf_collection(
|
||||
collected_metafiles, global_info, description, data_storage_path)
|
||||
|
||||
frame = captured_data["frame"]
|
||||
slot = captured_data["slot"]
|
||||
|
||||
# Check for changes in frame or slot
|
||||
if frame != prev_frame or slot != prev_slot:
|
||||
record_idx += 1
|
||||
# We have reached the end of the data. Break the loop
|
||||
if record_idx >= config_meta_data["data_recording_config"]["num_records"]:
|
||||
break
|
||||
# Update previous frame and slot
|
||||
prev_frame = frame
|
||||
prev_slot = slot
|
||||
|
||||
|
||||
# data conversion service
|
||||
def data_conversion_service(shm_reading, config_meta_data, args, sync_info, do_sync):
|
||||
# Initialize variables
|
||||
record_idx = 0
|
||||
prev_frame = -1
|
||||
prev_slot = -1
|
||||
bufIdx = 0
|
||||
# Read data from T-tracer Application
|
||||
print("Data Conversion Service: Reading data from T-tracer Application")
|
||||
print("Requested Tracer Messages: ", args.num_requested_tracer_msgs)
|
||||
if args.num_requested_tracer_msgs > 0:
|
||||
num_requested_tracer_msgs = args.num_requested_tracer_msgs
|
||||
else:
|
||||
raise Exception("ERROR: No requested tracer messages found!")
|
||||
|
||||
tracer_msgs_identities = config_meta_data["data_recording_config"][
|
||||
"tracer_msgs_identities"]
|
||||
global_info = config_meta_data["data_recording_config"]["global_info"]
|
||||
|
||||
if do_sync:
|
||||
print(" Find Memory Index of NR MSGs based on Sync info")
|
||||
while True:
|
||||
time.sleep(0.0035)
|
||||
station_bufIdx = bufIdx
|
||||
captured_data, bufIdx = read_data_from_shm(
|
||||
shm_reading, bufIdx, tracer_msgs_identities)
|
||||
print("*Sync Status: NR Captured Data (Frame, slot): (", captured_data["frame"],
|
||||
", ", captured_data["slot"], "), Sync Info (Frame, slot): (", sync_info["frame"],
|
||||
", ", sync_info["slot"]," )")
|
||||
if (captured_data["frame"] == sync_info["frame"]
|
||||
and captured_data["slot"] == sync_info["slot"]):
|
||||
print("*sync Pass")
|
||||
break
|
||||
print("*sync Fail")
|
||||
bufIdx = station_bufIdx
|
||||
|
||||
# Read data from T-tracer Application
|
||||
while True: # read all records
|
||||
print("\nRecord number: ", record_idx)
|
||||
if DEBUG_BUFFER_READING:
|
||||
print(f"Buffer Index: {bufIdx}")
|
||||
# wait for the next record
|
||||
# To do: check if we need to add exta waiting times between different events in case of
|
||||
# data streaming via network such as on UE side or gNB side
|
||||
time.sleep(0.0035) # 2.3 ms = latency of T tracer to capture data from the RAN
|
||||
|
||||
collected_metafiles = []
|
||||
for idx in range(num_requested_tracer_msgs):
|
||||
time.sleep(0.0015)
|
||||
if DEBUG_WIRELESS_RECORDED_DATA:
|
||||
print(f"\nRecord number: {record_idx}, Reading MSG data ", idx)
|
||||
captured_data, bufIdx = read_data_from_shm(
|
||||
shm_reading, bufIdx, tracer_msgs_identities)
|
||||
# derive the collection file time stamp from the first message per record
|
||||
if idx == 0:
|
||||
# Get time stamp
|
||||
time_stamp_ms, time_stamp_ms_file_name = (
|
||||
sigmf_interface.time_stamp_formating(
|
||||
captured_data["time_stamp"], global_info["datetime_offset"]))
|
||||
global_info["collection_file"] = (
|
||||
global_info["collection_file_prefix"]
|
||||
+ "-rec-"
|
||||
+ str(record_idx)
|
||||
+ "-"
|
||||
+ str(time_stamp_ms_file_name))
|
||||
global_info["timestamp"] = time_stamp_ms
|
||||
# Write data into files with the given format
|
||||
if config_meta_data["data_recording_config"]["enable_saving_tracer_messages_sigmf"]:
|
||||
collected_metafiles.append(
|
||||
sigmf_interface.write_recorded_data_to_sigmf(
|
||||
captured_data, config_meta_data, global_info, record_idx))
|
||||
|
||||
frame = captured_data["frame"]
|
||||
slot = captured_data["slot"]
|
||||
|
||||
# generate SigMF collection file
|
||||
if config_meta_data["data_recording_config"]["enable_saving_tracer_messages_sigmf"]:
|
||||
data_storage_path = config_meta_data["data_recording_config"][
|
||||
"data_storage_path"]
|
||||
description = global_info["description"]
|
||||
sigmf_interface.save_sigmf_collection(
|
||||
collected_metafiles, global_info, description, data_storage_path)
|
||||
|
||||
# Check for changes in frame or slot
|
||||
if frame != prev_frame or slot != prev_slot:
|
||||
record_idx += 1
|
||||
# We have reached the end of the data. Break the loop
|
||||
if record_idx >= config_meta_data["data_recording_config"]["num_records"]:
|
||||
break
|
||||
# Update previous frame and slot
|
||||
prev_frame = frame
|
||||
prev_slot = slot
|
||||
|
||||
|
||||
# Write Tracer Control Message
|
||||
def write_shm(shm, args):
|
||||
# Note: Big Endian >, Little Endian <
|
||||
# Note: unsigned char B, signed char b, short h, int I, long long q
|
||||
# Note: float f, double d, string s, char c, bool ?
|
||||
# 1: config
|
||||
# 2: record
|
||||
# 3: quit
|
||||
print("Write Shared Memory: ", args.action)
|
||||
if args.action == "config":
|
||||
# Determine the length of the IP address
|
||||
ip_length = len(args.bytes_IPaddress) + 1 # String terminator
|
||||
# Construct the format string dynamically
|
||||
format_string = f"{ip_length}s"
|
||||
shm.write(
|
||||
# Config action
|
||||
struct.pack("<B", 1) +
|
||||
struct.pack("<B", ip_length) +
|
||||
struct.pack(format_string, args.bytes_IPaddress) +
|
||||
struct.pack("<h", int(args.port))
|
||||
)
|
||||
print("T-Tracer Config IP: ", args.bytes_IPaddress, " port: ", args.port)
|
||||
elif args.action == "record":
|
||||
shm.write(
|
||||
# Record action
|
||||
struct.pack("<B", int(2)) +
|
||||
struct.pack("<B", args.num_requested_tracer_msgs) +
|
||||
struct.pack(
|
||||
"<{}h".format(len(args.req_tracer_msgs_indices)),
|
||||
*args.req_tracer_msgs_indices,) +
|
||||
struct.pack("<I", args.num_records) +
|
||||
struct.pack("<h", args.start_frame_number)
|
||||
)
|
||||
print("T-Tracer Record: N Messags: ", args.num_requested_tracer_msgs,
|
||||
", Msg IDs: ", args.req_tracer_msgs_indices,
|
||||
", Num records: ", args.num_records,
|
||||
", Start Frame: ", args.start_frame_number,
|
||||
)
|
||||
elif args.action == "quit":
|
||||
shm.write(struct.pack("<B", int(3))) # Quit action
|
||||
print("T-Tracer Quit")
|
||||
else:
|
||||
print("Unknown action for data recording system!")
|
||||
|
||||
|
||||
# write shared memory task
|
||||
def write_shm_task(barrier, shm_id, args):
|
||||
# Wait for threads to be ready
|
||||
barrier.wait()
|
||||
# send request to related T-Tracer Application
|
||||
write_shm(shm_id, args)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# -------------------------------------------
|
||||
# ------------- Configuration --------------
|
||||
# ------------------------------------------
|
||||
# Data Recording Configuration
|
||||
data_recording_config_file = "config/config_data_recording.json"
|
||||
# -------------------------------------------
|
||||
# Configuration
|
||||
# -------------------------------------------
|
||||
# First: get the configuration mode either local or remote
|
||||
# Second: get data recording configuration
|
||||
# Read and parse the JSON file
|
||||
with open(data_recording_config_file, "r") as file:
|
||||
config_meta_data = json.load(file)
|
||||
|
||||
# get Configuration parameters
|
||||
config_meta_data, gnb_args, ue_args = config_interface.get_data_recording_config(config_meta_data)
|
||||
|
||||
# check if lists of requested tracer messages IDs are not empty
|
||||
if not gnb_args.requested_tracer_messages and \
|
||||
not ue_args.requested_tracer_messages:
|
||||
raise Exception("ERROR: No requested tracer messages are provided")
|
||||
|
||||
# check if gnb_requested_tracer_messages is not empty, attach to the shared memory
|
||||
if gnb_args.requested_tracer_messages:
|
||||
# attach to the shared memory
|
||||
shm_writing_gnb = attach_shm(write_shm_path_gnb, project_id_gnb)
|
||||
shm_reading_gnb = attach_shm(read_shm_path_gnb, project_id_gnb)
|
||||
|
||||
# check if ue_requested_tracer_messages is not empty, attach to the shared memory
|
||||
if ue_args.requested_tracer_messages:
|
||||
# attach to the shared memory
|
||||
shm_writing_ue = attach_shm(write_shm_path_ue, project_id_ue)
|
||||
shm_reading_ue = attach_shm(read_shm_path_ue, project_id_ue)
|
||||
|
||||
# get general message header list
|
||||
general_msg_header_list, general_message_header_length = \
|
||||
data_recording_messages_def.get_general_msg_header_list()
|
||||
|
||||
# Add supported OAI Tracer Messages
|
||||
config_meta_data["data_recording_config"]["supported_oai_tracer_messages"] = supported_oai_tracer_messages
|
||||
# Add global info
|
||||
config_meta_data["data_recording_config"]["global_info"] = global_info
|
||||
|
||||
# -------------------------------------------
|
||||
# Initialization
|
||||
# -------------------------------------------
|
||||
# -------------------------------------------
|
||||
# send Tracer Control Message request to T-Tracers Apps
|
||||
# -------------------------------------------
|
||||
# It consists of the following fields:
|
||||
# Config action
|
||||
# IP address length
|
||||
# IP address
|
||||
# Port Number
|
||||
# check if gnb_requested_tracer_messages is not empty, config T-Tracer gNB via shared memory
|
||||
if gnb_args.requested_tracer_messages:
|
||||
# Config T-Tracer via shared memory
|
||||
gnb_args.action = "config"
|
||||
write_shm(shm_writing_gnb, gnb_args)
|
||||
|
||||
# check if ue_requested_tracer_messages is not empty, config T-Tracer UE via shared memory
|
||||
if ue_args.requested_tracer_messages:
|
||||
# Config T-Tracer via shared memory
|
||||
ue_args.action = "config"
|
||||
write_shm(shm_writing_ue, ue_args)
|
||||
|
||||
time.sleep(0.5) # wait for the config to be applied
|
||||
|
||||
# -------------------------------------------
|
||||
# Execution
|
||||
# -------------------------------------------
|
||||
# send Tracer Control Message request to T-Tracers Apps
|
||||
# -------------------------------------------
|
||||
# It consists of the following fields:
|
||||
# Record action
|
||||
# Number of requested Tracer Messages
|
||||
# Requested Tracer Messages ID 1, …, ID N
|
||||
# Number of records to be recorded in slots
|
||||
# Start SFN: Frame Index to start data collection from it, useful for future
|
||||
# data sync between gNB and UE but not yet used
|
||||
print("Args:")
|
||||
if gnb_args.requested_tracer_messages:
|
||||
gnb_args.action = "record"
|
||||
print("gnb_args: ", gnb_args)
|
||||
if ue_args.requested_tracer_messages:
|
||||
ue_args.action = "record"
|
||||
print("ue_args: ", ue_args)
|
||||
|
||||
start_time = time.time()
|
||||
print("Send data logging request us:", datetime.now().strftime("%Y%m%d-%H%M%S%f"))
|
||||
|
||||
# if requested: gNB and UE Tracer Messages
|
||||
# gNB + UE Tracer Messages
|
||||
if gnb_args.requested_tracer_messages and ue_args.requested_tracer_messages:
|
||||
# Create a barrier to synchronize the threads
|
||||
barrier = threading.Barrier(2)
|
||||
with concurrent.futures.ThreadPoolExecutor() as executor:
|
||||
tracer_ue = executor.submit(write_shm_task, barrier, shm_writing_ue, ue_args)
|
||||
tracer_gnb = executor.submit(write_shm_task, barrier, shm_writing_gnb, gnb_args)
|
||||
# Wait for both functions to complete
|
||||
concurrent.futures.wait([tracer_ue, tracer_gnb])
|
||||
|
||||
# gNB Tracer Messages
|
||||
elif gnb_args.requested_tracer_messages:
|
||||
write_shm(shm_writing_gnb, gnb_args)
|
||||
|
||||
# UE Tracer Messages
|
||||
elif ue_args.requested_tracer_messages:
|
||||
write_shm(shm_writing_ue, ue_args)
|
||||
else:
|
||||
raise Exception("ERROR: No requested tracer messages IDs are provided")
|
||||
|
||||
# -------------------------------------------
|
||||
# Read data from gNB and UE T-tracer Application
|
||||
# -------------------------------------------
|
||||
# Check if data is available in memory
|
||||
# Initialize variables
|
||||
bufIdx = 0
|
||||
timeout = 10 # 10 seconds from now
|
||||
|
||||
# If gNB MSGs are requested
|
||||
if gnb_args.requested_tracer_messages:
|
||||
# Check if data is available in gNB memory
|
||||
is_gnb_data_in_memory = is_data_available_in_memory(
|
||||
shm_reading_gnb, bufIdx, general_message_header_length, timeout)
|
||||
# Report the status of gNB T-Tracer APP locally
|
||||
if not is_gnb_data_in_memory:
|
||||
print("Error: gNB: Check t-Tracer APP of gNB, check IPs and Ports")
|
||||
print("Error: gNB: If IPs and Ports are correct, re-run the hanging app.")
|
||||
print("It seems the socket was not closed properly")
|
||||
raise Exception("ERROR: Time out, check if gNB T-Tracer APP connected to stack")
|
||||
# If UE MSGs are requested
|
||||
if ue_args.requested_tracer_messages:
|
||||
# Check if data is available in UE memory
|
||||
is_ue_data_in_memory = is_data_available_in_memory(
|
||||
shm_reading_ue, bufIdx, general_message_header_length, timeout)
|
||||
# Report the status of UE T-Tracer APP locally
|
||||
if not is_ue_data_in_memory:
|
||||
print("Error: UE: Check t-Tracer APP of UE, check IPs and Ports")
|
||||
print("Error: UE: If IPs and Ports are correct, re-run the hanging app.")
|
||||
print("It seems the socket was not closed properly")
|
||||
raise Exception("ERROR: Time out, check if UE T-Tracer APP connected to stack")
|
||||
|
||||
# -------------------------------------------
|
||||
# Sync data between gNB and UE
|
||||
# -------------------------------------------
|
||||
# write JSON file
|
||||
common_utils.write_config_data_recording_app_json(config_meta_data)
|
||||
sync_info = {}
|
||||
if gnb_args.requested_tracer_messages and ue_args.requested_tracer_messages:
|
||||
# Sync data between gNB and UE
|
||||
sync_info = sync_service.sync_gnb_ue_captured_data(shm_reading_gnb, shm_reading_ue)
|
||||
print("\n***Sync data between gNB and UE: ", sync_info)
|
||||
# Read data from gNB and UE T-tracer Applications
|
||||
sync_data_conversion_service(
|
||||
shm_reading_gnb, shm_reading_ue, sync_info, config_meta_data, gnb_args, ue_args)
|
||||
elif gnb_args.requested_tracer_messages:
|
||||
# Read data from gNB T-tracer Application
|
||||
data_conversion_service(
|
||||
shm_reading_gnb, config_meta_data, gnb_args, sync_info, do_sync=False)
|
||||
elif ue_args.requested_tracer_messages:
|
||||
# Read data from UE T-tracer Application
|
||||
data_conversion_service(
|
||||
shm_reading_ue, config_meta_data, ue_args, sync_info, do_sync=False)
|
||||
else:
|
||||
raise Exception("ERROR: No requested tracer messages IDs are provided")
|
||||
|
||||
# measure Elapsed time
|
||||
time_elapsed = time.time() - start_time
|
||||
time_elapsed_ms = int(time_elapsed * 1000)
|
||||
print(
|
||||
"Elapsed time of getting Requested Messages and writing data and meta data files:",
|
||||
colored(time_elapsed_ms, "yellow"), "ms",)
|
||||
|
||||
# Stop T-Tracer Application function
|
||||
if gnb_args.requested_tracer_messages:
|
||||
gnb_args.action = "quit"
|
||||
write_shm(shm_writing_gnb, gnb_args)
|
||||
# Add Sleep time to ensure that the message sent to the UE T-tracer application is received
|
||||
# before the shared memory is detached
|
||||
time.sleep(0.5)
|
||||
# Clean shared memory
|
||||
detach_shm(shm_reading_gnb)
|
||||
detach_shm(shm_writing_gnb)
|
||||
remove_shm(shm_reading_gnb)
|
||||
remove_shm(shm_writing_gnb)
|
||||
if ue_args.requested_tracer_messages:
|
||||
ue_args.action = "quit"
|
||||
write_shm(shm_writing_ue, ue_args)
|
||||
# Add Sleep time to ensure that the message sent to the UE T-tracer application is received
|
||||
# before the shared memory is detached
|
||||
time.sleep(0.5)
|
||||
# Clean shared memory
|
||||
detach_shm(shm_reading_ue)
|
||||
detach_shm(shm_writing_ue)
|
||||
remove_shm(shm_reading_ue)
|
||||
remove_shm(shm_writing_ue)
|
||||
|
||||
print("End of the RF Data Recording API")
|
||||
pass
|
||||
@@ -1,32 +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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/lib/__init__.py
|
||||
# brief for package initialization and code execution
|
||||
# author Abdo Gaber
|
||||
# date 2024
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
# This file is important in python to call functions from the lib folder.
|
||||
@@ -1,74 +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
|
||||
# */
|
||||
# ---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/lib/common_utils.py
|
||||
# brief Data Recording common utilities
|
||||
# author Abdo Gaber
|
||||
# date 2025
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
import os
|
||||
import json
|
||||
|
||||
|
||||
def real_to_complex(real_vector):
|
||||
# Ensure the length of the real vector is even
|
||||
if len(real_vector) % 2 != 0:
|
||||
raise ValueError("The length of the real vector must be even.")
|
||||
|
||||
# Split the real vector into real and imaginary parts
|
||||
real_part = real_vector[::2]
|
||||
imag_part = real_vector[1::2]
|
||||
|
||||
# Combine the real and imaginary parts to form a complex vector
|
||||
complex_vector = real_part + 1j * imag_part
|
||||
|
||||
return complex_vector
|
||||
|
||||
|
||||
def write_config_data_recording_app_json(config_meta_data):
|
||||
if config_meta_data["data_recording_config"]["global_info"][
|
||||
"save_config_data_recording_app_json"
|
||||
]:
|
||||
try:
|
||||
json.dumps(config_meta_data)
|
||||
except (TypeError, ValueError) as e:
|
||||
print(f"data_recording_config_meta_json is not JSON serializable: {e}")
|
||||
|
||||
# Specify the file name
|
||||
output_file = (
|
||||
config_meta_data["data_recording_config"]["data_storage_path"]
|
||||
+ "config_data_recording_app.json"
|
||||
)
|
||||
# Ensure the directory exists
|
||||
os.makedirs(os.path.dirname(output_file), exist_ok=True)
|
||||
|
||||
# Write the JSON data to the file
|
||||
with open(output_file, "w") as file:
|
||||
try:
|
||||
json.dump(config_meta_data, file, indent=4)
|
||||
print(f"JSON file created successfully at {output_file}")
|
||||
except Exception as e:
|
||||
print(f"Failed to create JSON file: {e}")
|
||||
@@ -1,150 +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
|
||||
# */
|
||||
# ---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/lib/config_interface.py
|
||||
# brief Data Recording App Configuration Interface
|
||||
# author Abdo Gaber
|
||||
# date 2025
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
import yaml
|
||||
import json
|
||||
import argparse
|
||||
|
||||
|
||||
# Function to read the main configuration file in JSON format
|
||||
def read_main_config_file_json(main_config_file: str) -> dict:
|
||||
"""
|
||||
Reads main config file.
|
||||
"""
|
||||
# read general parameter set from yaml config file
|
||||
with open(main_config_file, "r") as file:
|
||||
main_config = json.load(file)
|
||||
|
||||
return main_config
|
||||
|
||||
|
||||
# Function to read the main configuration file in YAML format
|
||||
def read_main_config_file(main_config_file: str) -> dict:
|
||||
"""
|
||||
Reads main config file.
|
||||
"""
|
||||
# read general parameter set from yaml config file
|
||||
with open(main_config_file, "r") as file:
|
||||
main_config = yaml.load(file, Loader=yaml.Loader)
|
||||
|
||||
return main_config
|
||||
|
||||
|
||||
# Function to parse the OAI T_messages file and get the index of a given string
|
||||
def parse_message_file(file_path):
|
||||
with open(file_path, "r") as file:
|
||||
content = file.readlines()
|
||||
# Extract lines that start with 'ID' and remove the 'ID = ' prefix
|
||||
tracer_msgs_identities = [
|
||||
line.strip().replace("ID = ", "")
|
||||
for line in content
|
||||
if line.strip().startswith("ID")
|
||||
]
|
||||
|
||||
return tracer_msgs_identities
|
||||
|
||||
|
||||
# Function to get the index of a given string in the list of ID lines
|
||||
def get_index_of_id(tracer_msgs_identities, message_id):
|
||||
try:
|
||||
return tracer_msgs_identities.index(message_id)
|
||||
except ValueError:
|
||||
return -1 # Return -1 if the string is not found
|
||||
|
||||
|
||||
# Function to get the indices of requested tracer messages
|
||||
def get_requested_tracer_msgs_indices(requested_tracer_messages, tracer_msgs_identities):
|
||||
# get requested tracer messages indices
|
||||
req_tracer_msgs_indices = []
|
||||
for idx, value in enumerate(requested_tracer_messages):
|
||||
msg_index = get_index_of_id(tracer_msgs_identities, value)
|
||||
req_tracer_msgs_indices.append(msg_index)
|
||||
print("Requested Traces IDs: ", req_tracer_msgs_indices)
|
||||
return req_tracer_msgs_indices
|
||||
|
||||
|
||||
# Function to get the data recording configuration
|
||||
def get_data_recording_config(config_meta_data):
|
||||
parser = argparse.ArgumentParser(description="request messages IDs")
|
||||
ue_args = parser.parse_args()
|
||||
gnb_args = parser.parse_args()
|
||||
|
||||
# get Tracer Messages IDs from the T-Tracer Messages file
|
||||
# MSG list order should be similar to the T-Tracer Messages txt file
|
||||
# Be sure that you are using the same T_messages file that is used in the OAI project
|
||||
# OAI Path: .../common/utils/T/T_messages.txt
|
||||
|
||||
# Parse the T_messages file
|
||||
tracer_msgs_identities = parse_message_file(
|
||||
config_meta_data["data_recording_config"]["t_tracer_message_definition_file"])
|
||||
config_meta_data["data_recording_config"]["tracer_msgs_identities"] = tracer_msgs_identities
|
||||
|
||||
# get requested tracer messages indices for gNB
|
||||
gnb_args.requested_tracer_messages = \
|
||||
config_meta_data["data_recording_config"]["base_station"]["requested_tracer_messages"]
|
||||
# get requested tracer messages indices for UE
|
||||
ue_args.requested_tracer_messages = \
|
||||
config_meta_data["data_recording_config"]["user_equipment"]["requested_tracer_messages"]
|
||||
|
||||
# check if gnb_requested_tracer_messages is not empty
|
||||
if gnb_args.requested_tracer_messages:
|
||||
config_meta_data["data_recording_config"]["base_station"][
|
||||
"req_tracer_msgs_indices"] = get_requested_tracer_msgs_indices(
|
||||
gnb_args.requested_tracer_messages, tracer_msgs_identities)
|
||||
|
||||
# get gNB Trace Messages
|
||||
gnb_args.num_records = config_meta_data["data_recording_config"]["num_records"]
|
||||
gnb_args.start_frame_number = config_meta_data["data_recording_config"]["start_frame_number"]
|
||||
gnb_args.req_tracer_msgs_indices = \
|
||||
config_meta_data["data_recording_config"]["base_station"]["req_tracer_msgs_indices"]
|
||||
gnb_args.num_requested_tracer_msgs = len(gnb_args.req_tracer_msgs_indices)
|
||||
# Split the string into IP and port
|
||||
gnb_args.IPaddress, gnb_args.port = config_meta_data["data_recording_config"][
|
||||
"tracer_service_baseStation_address"].split(":")
|
||||
gnb_args.bytes_IPaddress = bytes(gnb_args.IPaddress, "utf-8")
|
||||
|
||||
# check if ue_requested_tracer_messages is not empty
|
||||
if ue_args.requested_tracer_messages:
|
||||
config_meta_data["data_recording_config"]["user_equipment"][
|
||||
"req_tracer_msgs_indices"] = get_requested_tracer_msgs_indices(
|
||||
ue_args.requested_tracer_messages, tracer_msgs_identities)
|
||||
|
||||
# get UE Trace Messages
|
||||
ue_args.num_records = config_meta_data["data_recording_config"]["num_records"]
|
||||
ue_args.start_frame_number = config_meta_data["data_recording_config"]["start_frame_number"]
|
||||
ue_args.req_tracer_msgs_indices = \
|
||||
config_meta_data["data_recording_config"]["user_equipment"]["req_tracer_msgs_indices"]
|
||||
ue_args.num_requested_tracer_msgs = len(ue_args.req_tracer_msgs_indices)
|
||||
ue_args.IPaddress, ue_args.port = config_meta_data["data_recording_config"][
|
||||
"tracer_service_userEquipment_address"].split(":")
|
||||
ue_args.bytes_IPaddress = bytes(ue_args.IPaddress, "utf-8")
|
||||
|
||||
return config_meta_data, gnb_args, ue_args
|
||||
@@ -1,107 +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
|
||||
# */
|
||||
# ---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/lib/data_recording_messages_def.py
|
||||
# brief defination of captured data recording messages
|
||||
# author Abdo Gaber
|
||||
# date 2025
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
|
||||
# Data Collection Trace Messages - General message structure - number of bytes
|
||||
def get_general_msg_header_list():
|
||||
"""
|
||||
shared memory layout written from the app:
|
||||
=================================
|
||||
msg_id (uint8) message type ID
|
||||
frame (uint16)
|
||||
slot (uint8)
|
||||
datetime_yyyymmdd (uint32)
|
||||
datetime_hhmmssmmm (uint32)
|
||||
frame_type (uint8)
|
||||
freq_range (uint8)
|
||||
subcarrier_spacing (uint8)
|
||||
cyclic_prefix (uint8)
|
||||
symbols_per_slot (uint8)
|
||||
Nid_cell (uint16)
|
||||
rnti (uint16)
|
||||
rb_size (uint16)
|
||||
rb_start (uint16)
|
||||
start_symbol_index (uint8)
|
||||
nr_of_symbols (uint8)
|
||||
qam_mod_order (uint8)
|
||||
mcs_index (uint8)
|
||||
mcs_table (uint8)
|
||||
nrOfLayers (uint8)
|
||||
transform_precoding (uint8)
|
||||
dmrs_config_type (uint8)
|
||||
ul_dmrs_symb_pos (uint16)
|
||||
number_dmrs_symbols (uint8)
|
||||
dmrs_port (uint16)
|
||||
dmrs_scid (uint16)
|
||||
nb_antennas (uint8)
|
||||
number_of_bits (uint32)
|
||||
length_bytes (uint32)
|
||||
For IQ Data: IQ samples: I0, Q0, I1, Q1, ... I_x, Q_x (int16)
|
||||
For bit data: bits: b0, b1, b2, ... b_x (uint8)
|
||||
|
||||
"""
|
||||
# Data Collection Trace Messages - General message structure - number of bytes
|
||||
general_msg_header_list = {
|
||||
"msg_id": 2,
|
||||
"frame": 2,
|
||||
"slot": 1,
|
||||
"datetime_yyyymmdd": 4,
|
||||
"datetime_hhmmssmmm": 4,
|
||||
"frame_type": 1,
|
||||
"freq_range": 1,
|
||||
"subcarrier_spacing": 1,
|
||||
"cyclic_prefix": 1,
|
||||
"symbols_per_slot": 1,
|
||||
"Nid_cell": 2,
|
||||
"rnti": 2,
|
||||
"rb_size": 2,
|
||||
"rb_start": 2,
|
||||
"start_symbol_index": 1,
|
||||
"nr_of_symbols": 1,
|
||||
"qam_mod_order": 1,
|
||||
"mcs_index": 1,
|
||||
"mcs_table": 1,
|
||||
"nrOfLayers": 1,
|
||||
"transform_precoding": 1,
|
||||
"dmrs_config_type": 1,
|
||||
"ul_dmrs_symb_pos": 2,
|
||||
"number_dmrs_symbols": 1,
|
||||
"dmrs_port": 2,
|
||||
"dmrs_scid": 2,
|
||||
"nb_antennas": 1, # for gNB or nb_antennas_tx for UE
|
||||
"number_of_bits": 4,
|
||||
"length_bytes": 4,
|
||||
}
|
||||
# initial number of bytes to read to get data
|
||||
general_message_header_length = 0
|
||||
for key, value in general_msg_header_list.items():
|
||||
general_message_header_length = general_message_header_length + value
|
||||
return general_msg_header_list, general_message_header_length
|
||||
@@ -1,580 +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
|
||||
# */
|
||||
# ---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/lib/sigmf_interface.py
|
||||
# brief SigMF Interface to Write data and meta-data to files in SigMF format
|
||||
# author Abdo Gaber
|
||||
# date 2025
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
import os
|
||||
import sigmf
|
||||
from sigmf import SigMFFile
|
||||
# from sigmf.utils import get_data_type_str
|
||||
import numpy as np
|
||||
from datetime import datetime
|
||||
import yaml
|
||||
from sigmf import SigMFCollection
|
||||
|
||||
"""
|
||||
SERIALIZATION_SCHEMES = {
|
||||
# gnb
|
||||
"rx-fd-data": ["subcarriers", "ofdm_symbols"],
|
||||
"tx-pilots-fd-data": ["subcarriers", "ofdm_symbols"],
|
||||
"raw-ce-fd-data": ["subcarriers", "ofdm_symbols"],
|
||||
"rx-payload-bits": ["bits", "subcarriers", "ofdm_symbols"],
|
||||
# ue
|
||||
"tx-scrambled-bits": ["bits", "subcarriers", "ofdm_symbols"],
|
||||
"tx-payload-bits": ["bits", "subcarriers", "ofdm_symbols"],
|
||||
}
|
||||
"""
|
||||
STANDARDS = {"5gnr_oai": "5gnr"}
|
||||
|
||||
|
||||
def time_stamp_formating(time_stamp, datetime_offset):
|
||||
# Parse the input string into a datetime object
|
||||
time_stamp_ms_obj = datetime.strptime(time_stamp, "%Y%m%d_%H%M%S%f")
|
||||
|
||||
# Format the datetime object into the desired output format with milliseconds
|
||||
time_stamp_ms_iso = (
|
||||
time_stamp_ms_obj.strftime("%Y_%m_%dT%H:%M:%S.%f")[:-3] + datetime_offset
|
||||
)
|
||||
time_stamp_ms = time_stamp_ms_iso
|
||||
time_stamp_ms_file_name = time_stamp_ms_iso.replace(":", "_").replace(".", "_")
|
||||
|
||||
return time_stamp_ms, time_stamp_ms_file_name
|
||||
|
||||
|
||||
def create_serialization_metadata(serialization_scheme, data_source: str,
|
||||
link_sim_parameters: dict) -> dict:
|
||||
"""Creates dict that specifies the serialization metadata."""
|
||||
|
||||
# retrieve parameter from LinkSimulator config
|
||||
if data_source == "5gnr_oai":
|
||||
num_ofdm_symbol = link_sim_parameters["nr_of_symbols"]
|
||||
num_subcarriers = link_sim_parameters["rb_size"] * 12
|
||||
num_bits_per_symbol = link_sim_parameters["qam_mod_order"]
|
||||
else:
|
||||
raise Exception(
|
||||
f"Invalid data source string '{data_source}'! Only '5gnr_oai' is valid!"
|
||||
)
|
||||
|
||||
# create array with scheme dimensions
|
||||
if len(serialization_scheme) == 2:
|
||||
counts = [num_subcarriers, num_ofdm_symbol]
|
||||
elif len(serialization_scheme) == 3:
|
||||
counts = [num_bits_per_symbol, num_subcarriers, num_ofdm_symbol]
|
||||
else:
|
||||
raise Exception(
|
||||
f"Invalid number of elements in serialization scheme: {len(serialization_scheme)}")
|
||||
|
||||
# create metadata dict
|
||||
serialization_dict = {
|
||||
"serialization:scheme": serialization_scheme,
|
||||
"serialization:counts": counts,
|
||||
}
|
||||
|
||||
return serialization_dict
|
||||
|
||||
|
||||
def map_metadata_to_sigmf_format(scope, waveform_generator, parameter_map_file, captured_data):
|
||||
"""
|
||||
Maps metadata from Waveform creator to API and SigMF format.
|
||||
The used parameters and the mapping pairs are specified in a separate YAML file
|
||||
that must be provided as well.
|
||||
"""
|
||||
# read waveform parameter map from yaml file
|
||||
dir_path = os.path.dirname(__file__)
|
||||
src_path = os.path.split(dir_path)[0]
|
||||
|
||||
with open(os.path.join(src_path, parameter_map_file), "r") as file:
|
||||
parameter_map_dic = yaml.load(file, Loader=yaml.Loader)
|
||||
# preallocate target dict
|
||||
sigmf_metadata_dict = {}
|
||||
|
||||
# get standard and name of generator
|
||||
standard_key = parameter_map_dic["waveform_generator"][waveform_generator]
|
||||
generator = standard_key["generator"]
|
||||
|
||||
if scope == "tx":
|
||||
parameter_map_dic = parameter_map_dic["transmitter"][
|
||||
STANDARDS[waveform_generator]
|
||||
]
|
||||
elif scope == "channel":
|
||||
parameter_map_dic = parameter_map_dic["channel"]
|
||||
elif scope == "rx":
|
||||
parameter_map_dic = parameter_map_dic["receiver"]
|
||||
else:
|
||||
raise Exception(
|
||||
f"Invalid mapping scope '{scope}'! Only 'tx', 'channel' and 'rx' are valid!"
|
||||
)
|
||||
|
||||
# check if standard key is given
|
||||
if parameter_map_dic is None:
|
||||
raise Exception(
|
||||
"Invalid standard key: "
|
||||
"Name should be corrected or added to wireless_link_parameter_map.yaml, given: "
|
||||
f"{waveform_generator}"
|
||||
)
|
||||
|
||||
for parameter_pair in parameter_map_dic:
|
||||
# check if key for chosen simulator even exists
|
||||
if waveform_generator + "_parameter" in parameter_pair.keys():
|
||||
# only continue with mapping from file if direct equivalent exists
|
||||
if parameter_pair[waveform_generator + "_parameter"]["name"]:
|
||||
# It is not necessary to get all parameters from wireless_link_parameter_map.yaml
|
||||
# in captured_data since some parameters related to DL or UL only
|
||||
if (parameter_pair[waveform_generator + "_parameter"]["name"] in captured_data.keys()):
|
||||
# extract value from waveform config source
|
||||
value = captured_data[
|
||||
parameter_pair[waveform_generator + "_parameter"]["name"]]
|
||||
# additional mapping if parameter values should come from a discrete set of values
|
||||
if ("value_map" in parameter_pair[waveform_generator + "_parameter"].keys()):
|
||||
value = parameter_pair[waveform_generator + "_parameter"]["value_map"][value]
|
||||
# write to target dictionary for SigMF
|
||||
sigmf_metadata_dict[parameter_pair["sigmf_parameter_name"]] = value
|
||||
else:
|
||||
raise Exception(
|
||||
f"Incomplete specification in field '{waveform_generator}_parameter'!")
|
||||
# else: # fill_non_explicit_fields
|
||||
# waveform_config[parameter_pair["sigmf_parameter_name"]] = "none"
|
||||
if not sigmf_metadata_dict:
|
||||
raise Exception(
|
||||
"""ERROR: Check captured meta-data or provided config and meta data """)
|
||||
|
||||
# check for non-JSON-serializable data types
|
||||
def isfloat(NumberString):
|
||||
try:
|
||||
float(NumberString)
|
||||
return True
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
for key, value in sigmf_metadata_dict.items():
|
||||
if isinstance(value, np.integer):
|
||||
sigmf_metadata_dict[key] = int(value)
|
||||
elif isinstance(value, (np.float16, np.float32, np.float64)):
|
||||
sigmf_metadata_dict[key] = np.format_float_positional(value, trim="-")
|
||||
elif isinstance(value, int):
|
||||
sigmf_metadata_dict[key] = int(value)
|
||||
elif isinstance(value, float):
|
||||
# store value in decimal and not in scientific notation
|
||||
sigmf_metadata_dict[key] = float(value)
|
||||
elif isinstance(value, str) and key != "standard":
|
||||
# convert string to lower case
|
||||
sigmf_metadata_dict[key] = value.lower()
|
||||
if isfloat(value):
|
||||
if value.isdigit():
|
||||
sigmf_metadata_dict[key] = int(float(value))
|
||||
elif value.replace(".", "", 1).isdigit() and value.count(".") < 2:
|
||||
sigmf_metadata_dict[key] = float(value)
|
||||
|
||||
return sigmf_metadata_dict, generator
|
||||
|
||||
|
||||
def create_system_components_metadata(waveform_generator, parameter_map_file, captured_data):
|
||||
"""Creates system components (TX, channel, RX) metadata that will reside in the annotations."""
|
||||
# map metadata of waveform generator to SigMF format
|
||||
signal_info, generator = map_metadata_to_sigmf_format(
|
||||
"tx", waveform_generator, parameter_map_file, captured_data
|
||||
)
|
||||
tx_metadata = {
|
||||
"signal:detail": {
|
||||
"standard": STANDARDS[waveform_generator],
|
||||
"generator": generator,
|
||||
STANDARDS[waveform_generator]: signal_info,
|
||||
}
|
||||
}
|
||||
|
||||
channel_metadata = {} # will be filled later
|
||||
rx_metadata = {} # will be filled later
|
||||
|
||||
return tx_metadata, channel_metadata, rx_metadata
|
||||
|
||||
|
||||
def write_recorded_data_to_sigmf(captured_data, config_meta_data, global_info, idx):
|
||||
"""
|
||||
Compiles and saves provided data and metadata into SigMF file format.
|
||||
"""
|
||||
# get meta data from config file
|
||||
base_station_meta_data = config_meta_data["data_recording_config"]["base_station"][
|
||||
"meta_data"]
|
||||
user_equipment_meta_data = config_meta_data["data_recording_config"][
|
||||
"user_equipment"]["meta_data"]
|
||||
|
||||
# Check the receive target path is valid, else create folder
|
||||
data_storage_path = config_meta_data["data_recording_config"]["data_storage_path"]
|
||||
if not os.path.isdir(data_storage_path):
|
||||
print("Create new folder for recorded data: " + str(data_storage_path))
|
||||
os.makedirs(data_storage_path)
|
||||
|
||||
# Write recorded data to file
|
||||
# Get time stamp
|
||||
time_stamp_ms, time_stamp_ms_file_name = time_stamp_formating(
|
||||
captured_data["time_stamp"], global_info["datetime_offset"])
|
||||
# Map OAI Message Name to SigMF Message Name
|
||||
file_name_prefix = config_meta_data["data_recording_config"][
|
||||
"supported_oai_tracer_messages"][captured_data["message_type"]]["file_name_prefix"]
|
||||
recorded_data_file_name = (
|
||||
file_name_prefix + "-rec-" + str(idx) + "-" + time_stamp_ms_file_name)
|
||||
|
||||
dataset_filename = recorded_data_file_name + ".sigmf-data"
|
||||
dataset_file_path = os.path.join(data_storage_path, dataset_filename)
|
||||
print(dataset_file_path)
|
||||
captured_data["recorded_data"].tofile(dataset_file_path)
|
||||
|
||||
# map OAI config data to SigMF metadata
|
||||
waveform_generator = config_meta_data["data_recording_config"]["global_info"][
|
||||
"waveform_generator"]
|
||||
parameter_map_file = config_meta_data["data_recording_config"]["parameter_map_file"]
|
||||
tx_metadata, channel_metadata, rx_metadata = create_system_components_metadata(
|
||||
waveform_generator, parameter_map_file, captured_data)
|
||||
|
||||
# Add other OAI metadata to SigMF metadata
|
||||
# ----------------------------------------------------
|
||||
# Set 1: Parameters needs to be derived from OAI message
|
||||
# ----------------------------------------------------
|
||||
# PUSCH DMRS: OFDM symbol start index within slot
|
||||
get_pusch_dmrs_start_ofdm_symbol = 0
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch_dmrs:ofdm_symbol_idx"] = []
|
||||
|
||||
for symbol in range(captured_data["start_symbol_index"],
|
||||
captured_data["start_symbol_index"] + captured_data["nr_of_symbols"]):
|
||||
|
||||
dmrs_symbol_flag = (captured_data["ul_dmrs_symb_pos"] >> symbol) & 0x01
|
||||
if dmrs_symbol_flag and not get_pusch_dmrs_start_ofdm_symbol:
|
||||
get_pusch_dmrs_start_ofdm_symbol = 1
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch_dmrs:start_ofdm_symbol"] = symbol
|
||||
if dmrs_symbol_flag:
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch_dmrs:ofdm_symbol_idx"].append(symbol) # Append symbol to the list
|
||||
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch_dmrs:duration_num_ofdm_symbols"] = 1
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch_dmrs:num_add_positions"] = (captured_data["number_dmrs_symbols"] - 1)
|
||||
|
||||
# If the message is a BIT message, add number of bits to the signal info
|
||||
# "UE_PHY_UL_SCRAMBLED_TX_BITS", "GNB_PHY_UL_PAYLOAD_RX_BITS", "UE_PHY_UL_PAYLOAD_TX_BITS"
|
||||
if "_BITS" in captured_data["message_type"]:
|
||||
# if "BIT" in captured_data["message_type"]:
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]]["num_bits"] = (
|
||||
captured_data["number_of_bits"])
|
||||
|
||||
# If the message is captured from UE, it is UPLink message,
|
||||
# so number of antennas is num of Tx antennas
|
||||
# number of antennas on Rx side should be read from global_info given by user
|
||||
if "UE" in captured_data["message_type"]:
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"num_tx_antennas"
|
||||
] = captured_data["nb_antennas"]
|
||||
rx_metadata.update(
|
||||
{"num_rx_antennas": base_station_meta_data["num_rx_antennas"]}
|
||||
)
|
||||
# If the message is captured from gNB, it is UPLink message,
|
||||
# so number of antennas is num of Rx antennas
|
||||
# number of antennas on Tx side should be read from global_info given by user
|
||||
else:
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"num_tx_antennas"] = user_equipment_meta_data["num_tx_antennas"]
|
||||
rx_metadata.update({"num_rx_antennas": captured_data["nb_antennas"]})
|
||||
|
||||
# Check if the message type contains "UL"
|
||||
if "UL" in captured_data["message_type"]:
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"link_direction"] = "uplink"
|
||||
else:
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"link_direction"] = "downlink"
|
||||
# ----------------------------------------------------
|
||||
# Set 2: Parameters that is hardcoded
|
||||
# ----------------------------------------------------
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch:content"] = "compliant"
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch:mapping_type"] = "B"
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]]["num_slots"] = 1
|
||||
if config_meta_data["test_config"]["test_mode"] == "rf_simulation":
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch:payload_bit_pattern"] = "random"
|
||||
elif config_meta_data["test_config"]["test_mode"] == "rf_real_time":
|
||||
tx_metadata["signal:detail"][STANDARDS[waveform_generator]][
|
||||
"pusch:payload_bit_pattern"] = "zeros"
|
||||
else:
|
||||
raise Exception("ERROR: Test mode is not supported in SigMF formatting")
|
||||
# ----------------------------------------------------
|
||||
# Read mean parameters
|
||||
freq = config_meta_data["environment_emulation"]["target_link_config"][
|
||||
"wireless_channel"]["carrierFreqValueList_hz"][0]
|
||||
bandwidth = config_meta_data["data_recording_config"]["common_meta_data"][
|
||||
"bandwidth"]
|
||||
# used_signal_bandwidth = (
|
||||
# pow(10, 6) * config_meta_data["environment_emulation"]["target_link_config"]["ran_config"][
|
||||
# "uplink"]["ul_used_signal_BW_MHz"])
|
||||
sample_rate = config_meta_data["data_recording_config"]["common_meta_data"][
|
||||
"sample_rate"]
|
||||
|
||||
# get signal emitter info
|
||||
signal_emitter = {
|
||||
"manufacturer": "NI",
|
||||
"seid": user_equipment_meta_data["seid"], # Unique ID of the emitter
|
||||
"hw": user_equipment_meta_data["hw_type"],
|
||||
"hw_subtype": user_equipment_meta_data["hw_subtype"],
|
||||
"frequency": freq,
|
||||
"sample_rate": sample_rate,
|
||||
"bandwidth": bandwidth,
|
||||
"gain_tx": user_equipment_meta_data["tx_gain"],
|
||||
"clock_reference": config_meta_data["data_recording_config"][
|
||||
"common_meta_data"
|
||||
]["clock_reference"],
|
||||
}
|
||||
|
||||
# ----------------------------------------------------
|
||||
# get channel metadata
|
||||
# ----------------------------------------------------
|
||||
# get downlink channel info
|
||||
# ch_downlink_config = config_meta_data["environment_emulation"]["target_link_config"]["wireless_channel"]["downlink"]
|
||||
# ch_downlink ={"channel_model": ch_downlink_config["type"]}
|
||||
|
||||
# ch_downlink_model = {"channel_model": "AWGN"}
|
||||
# get uplink channel info
|
||||
ch_uplink_config = config_meta_data["environment_emulation"]["target_link_config"][
|
||||
"wireless_channel"
|
||||
]["uplink"]
|
||||
# Real Time RF Emulation
|
||||
if config_meta_data["test_config"]["test_mode"] == "rf_real_time":
|
||||
channel_metadata.update({"emulation_mode": "ni rf real time"})
|
||||
if ch_uplink_config["type"] == "statistical_predefined":
|
||||
channel_metadata.update(
|
||||
{
|
||||
"channel_model": ch_uplink_config["statistical"]["predef_channel_profile"],
|
||||
"snr_esn0_db": ch_uplink_config["statistical"]["snr_db"],
|
||||
}
|
||||
)
|
||||
|
||||
elif ch_uplink_config["type"] == "statistical_var":
|
||||
channel_metadata.update(
|
||||
{
|
||||
"channel_model": ch_uplink_config["statistical"]["var_power_delay_profile"],
|
||||
"snr_esn0_db": ch_uplink_config["statistical"]["snr_db"],
|
||||
"delay_spread": ch_uplink_config["statistical"]["delay_spread_ns"] * pow(10, -9),
|
||||
"speed": ch_uplink_config["statistical"]["speed_mps"],
|
||||
}
|
||||
)
|
||||
else:
|
||||
raise Exception("ERROR: channel type is not supported in SigMF formatting")
|
||||
# RF Simulation
|
||||
elif config_meta_data["test_config"]["test_mode"] == "rf_simulation":
|
||||
channel_metadata.update({"emulation_mode": "oai rf simulation"})
|
||||
channel_metadata.update(
|
||||
{
|
||||
"channel_model": ch_uplink_config["statistical"]["predef_channel_profile"],
|
||||
"snr_esn0_db": ch_uplink_config["statistical"]["snr_db"],
|
||||
"delay_spread": ch_uplink_config["statistical"]["delay_spread_ns"]
|
||||
* pow(10, -9), "speed": ch_uplink_config["statistical"]["speed_mps"],
|
||||
}
|
||||
)
|
||||
else:
|
||||
raise Exception(
|
||||
"ERROR: Channel Emulation mode is not supported in SigMF formatting")
|
||||
|
||||
channel_metadata["carrier_frequency"] = config_meta_data["environment_emulation"][
|
||||
"target_link_config"]["wireless_channel"]["carrierFreqValueList_hz"][0]
|
||||
|
||||
# ----------------------------------------------------
|
||||
# get rx metadata
|
||||
# ----------------------------------------------------
|
||||
rx_metadata.update(
|
||||
{
|
||||
"bandwidth": bandwidth,
|
||||
"gain": base_station_meta_data["rx_gain"],
|
||||
"manufacturer": "NI",
|
||||
"seid": base_station_meta_data["seid"],
|
||||
"hw_subtype": base_station_meta_data["hw_subtype"],
|
||||
"clock_reference": config_meta_data["data_recording_config"][
|
||||
"common_meta_data"
|
||||
]["clock_reference"],
|
||||
"phy_freq_domain_receiver_type": config_meta_data["test_config"][
|
||||
"dut_type"
|
||||
],
|
||||
}
|
||||
)
|
||||
# ----------------------------------------------------
|
||||
# get test config
|
||||
# ----------------------------------------------------
|
||||
"""
|
||||
test_config = {
|
||||
"test_name": config_meta_data["test_config"]["test_name"],
|
||||
"test_mode": config_meta_data["test_config"]["test_mode"],
|
||||
"dut_type": config_meta_data["test_config"]["dut_type"],
|
||||
}
|
||||
"""
|
||||
# Create sigmf metadata
|
||||
# ----------------------
|
||||
# Add global parameters to SigMF metadata
|
||||
# ----------------------
|
||||
meta = SigMFFile(
|
||||
data_file=dataset_file_path, # extension is optional
|
||||
global_info={
|
||||
SigMFFile.DATATYPE_KEY: captured_data[
|
||||
"sigmf_data_type"
|
||||
], # "cf32_le", # get_data_type_str(rx_data) - 'cf64_le' is not supported yet
|
||||
SigMFFile.SAMPLE_RATE_KEY: sample_rate,
|
||||
SigMFFile.NUM_CHANNELS_KEY: 1,
|
||||
SigMFFile.AUTHOR_KEY: global_info["author"],
|
||||
SigMFFile.DESCRIPTION_KEY: config_meta_data["data_recording_config"][
|
||||
"supported_oai_tracer_messages"
|
||||
][captured_data["message_type"]]["description"],
|
||||
SigMFFile.RECORDER_KEY: "NI Data Recording Application for OAI",
|
||||
SigMFFile.LICENSE_KEY: "MIT License",
|
||||
# Since we are focusing on 5G NR UL, the base station is the receiver
|
||||
SigMFFile.HW_KEY: base_station_meta_data["hw_type"],
|
||||
# Disable DATASET key to mitigate the warning when read SIGMF data although it is given in the spec.
|
||||
# It seems SIGMF still has bug here
|
||||
SigMFFile.DATASET_KEY: dataset_filename,
|
||||
SigMFFile.VERSION_KEY: sigmf.__version__,
|
||||
sigmf.SigMFFile.COLLECTION_KEY: global_info["collection_file"],
|
||||
},
|
||||
)
|
||||
|
||||
# ----------------------
|
||||
# Add capture parameters to SigMF metadata
|
||||
# ----------------------
|
||||
serialization_scheme = config_meta_data["data_recording_config"][
|
||||
"supported_oai_tracer_messages"
|
||||
][captured_data["message_type"]]["serialization_scheme"]
|
||||
capture_metadata = {
|
||||
sigmf.SigMFFile.DATETIME_KEY: time_stamp_ms,
|
||||
SigMFFile.FREQUENCY_KEY: freq,
|
||||
**create_serialization_metadata(
|
||||
serialization_scheme, waveform_generator, captured_data
|
||||
),
|
||||
}
|
||||
meta.add_capture(start_index=0, metadata=capture_metadata) # Sample Start
|
||||
|
||||
# create annotations dict
|
||||
system_components_dict = {
|
||||
"system_components:transmitter": [
|
||||
{
|
||||
"transmitter_id": "tx_0",
|
||||
**tx_metadata,
|
||||
"signal:emitter": signal_emitter,
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
system_components_dict["system_components:channel"] = [
|
||||
{"transmitter_id": "tx_0", **channel_metadata}]
|
||||
|
||||
system_components_dict["system_components:receiver"] = rx_metadata
|
||||
# ----------------------
|
||||
# Add annotation parameters to SigMF metadata
|
||||
# ----------------------
|
||||
meta.add_annotation(
|
||||
start_index=0, # Sample Start
|
||||
length=len(captured_data["recorded_data"]), # Sample count
|
||||
metadata={
|
||||
# SigMFFile.FLO_KEY: freq - sample_rate/ 2, # args.freq - args.rate / 2,
|
||||
# SigMFFile.FHI_KEY: freq + sample_rate/ 2, # args.freq + args.rate / 2,
|
||||
# SigMFFile.LABEL_KEY: label,
|
||||
# SigMFFile.COMMENT_KEY: general_config["comment"],
|
||||
"num_transmitters": 1,
|
||||
**system_components_dict,
|
||||
},
|
||||
)
|
||||
|
||||
# Write Meta Data to file
|
||||
dataset_meta_filename = recorded_data_file_name + ".sigmf-meta"
|
||||
dataset_meta_file_path = os.path.join(data_storage_path, dataset_meta_filename)
|
||||
meta.tofile(dataset_meta_file_path) # extension is optional
|
||||
|
||||
print(dataset_meta_file_path)
|
||||
|
||||
return dataset_meta_file_path
|
||||
|
||||
|
||||
def save_sigmf_collection(streams: list, global_info: dict, description: str, storage_path: str):
|
||||
"""Save metadata and links to SigMF data/metadata files to SigMF collection file."""
|
||||
# construct path
|
||||
storage_path = os.path.expanduser(storage_path)
|
||||
collection_filepath = os.path.join(storage_path, global_info["collection_file"])
|
||||
# statically configure Collection metadata
|
||||
collection = SigMFCollection(
|
||||
streams,
|
||||
metadata={
|
||||
SigMFCollection.COLLECTION_KEY: {
|
||||
SigMFCollection.VERSION_KEY: sigmf.__version__,
|
||||
SigMFCollection.DESCRIPTION_KEY: description,
|
||||
SigMFCollection.AUTHOR_KEY: global_info["author"],
|
||||
# SigMFCollection.LICENSE_KEY: "License",
|
||||
# SigMFCollection.EXTENSIONS_KEY: global_info["extensions"],
|
||||
SigMFCollection.STREAMS_KEY: [],
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
# save collection file
|
||||
collection.tofile(collection_filepath)
|
||||
print("")
|
||||
print(collection_filepath + ".sigmf-collection")
|
||||
|
||||
|
||||
def load_sigmf(filename: str, storage_path: str, scope: str):
|
||||
"""
|
||||
Loads metadata and data from SigMF file.
|
||||
"""
|
||||
# construct path
|
||||
storage_path = os.path.expanduser(storage_path)
|
||||
filepath = os.path.join(storage_path, filename)
|
||||
# load SigMF file
|
||||
signal = sigmf.sigmffile.fromfile(filepath)
|
||||
|
||||
# get metadata fields
|
||||
global_metadata = signal.get_global_info()
|
||||
annotations_metadata = signal.get_annotations()
|
||||
|
||||
# we only consider single annotations metadata element per SigMF file
|
||||
annotation_start_idx = annotations_metadata[0][sigmf.SigMFFile.START_INDEX_KEY]
|
||||
annotation_length = annotations_metadata[0][sigmf.SigMFFile.LENGTH_INDEX_KEY]
|
||||
|
||||
# get capture metadata
|
||||
capture_metadata = signal.get_capture_info(annotation_start_idx)
|
||||
|
||||
# from source code: sigmffile.py
|
||||
# "autoscale : bool, default True
|
||||
# If dataset is in a fixed-point representation, scale samples from (min, max) to (-1.0, 1.0)
|
||||
# raw_components : bool, default False
|
||||
# If True read and return the sample components (individual I & Q for complex, samples for real)
|
||||
# with no conversions or interleaved channels.""
|
||||
# TODO: problem: raw_components flag is not used at all! changes in source code required!
|
||||
# TODO: data is always converted to float32 after being read
|
||||
|
||||
# read actual data
|
||||
data = signal.read_samples(
|
||||
annotation_start_idx, annotation_length, autoscale=False, raw_components=True)
|
||||
|
||||
return data, global_metadata, annotations_metadata
|
||||
@@ -1,150 +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
|
||||
# */
|
||||
# ---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/lib/sync_service.py
|
||||
# brief Sync service between captured Data from 5GNR gNB and UE
|
||||
# author Abdo Gaber
|
||||
# date 2025
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
import struct
|
||||
from lib import data_recording_messages_def
|
||||
|
||||
DEBUG_POW_MEAS_SYNC = True
|
||||
|
||||
|
||||
# check if first frame ahead:
|
||||
def is_frame_ahead(frame1, frame2, max_frame=1023):
|
||||
"""
|
||||
Check if frame1 is ahead of frame2, considering wrap-around from max_frame to 0.
|
||||
|
||||
Args:
|
||||
frame1 (int): The first frame number.
|
||||
frame2 (int): The second frame number.
|
||||
max_frame (int): The maximum frame number before wrap-around. Default is 1023.
|
||||
|
||||
Returns:
|
||||
bool: True if frame1 is ahead of frame2, False otherwise.
|
||||
"""
|
||||
# Calculate the difference considering wrap-around
|
||||
diff = (frame1 - frame2 + (max_frame + 1)) % (max_frame + 1)
|
||||
# If the difference is less than half the range, frame1 is ahead
|
||||
return diff < (max_frame + 1) // 2
|
||||
|
||||
|
||||
# find the frame and slot start
|
||||
def find_frame_slot_start(dataset1_start, dataset2_start):
|
||||
"""
|
||||
Function to find the frame and slot start for data sync
|
||||
Args:
|
||||
dataset1_start_info: Dictionary containing the start information of dataset1
|
||||
dataset2_start_info: Dictionary containing the start information of dataset2
|
||||
Returns:
|
||||
sync_info: Dictionary containing the sync information
|
||||
sync_info["frame"] = frame_start
|
||||
sync_info["slot"] = slot_start
|
||||
|
||||
"""
|
||||
sync_info = {}
|
||||
|
||||
if dataset1_start["frame"] == dataset2_start["frame"]:
|
||||
frame_diff = 0
|
||||
frame_start = dataset1_start["frame"]
|
||||
slot_start = max(dataset1_start["slot"], dataset2_start["slot"])
|
||||
|
||||
elif is_frame_ahead(dataset1_start["frame"], dataset2_start["frame"]):
|
||||
frame_start = dataset1_start["frame"]
|
||||
slot_start = dataset1_start["slot"]
|
||||
frame_diff = (dataset1_start["frame"]- dataset2_start["frame"] + 1024) % 1024
|
||||
elif is_frame_ahead(dataset2_start["frame"], dataset1_start["frame"]):
|
||||
frame_start = dataset2_start["frame"]
|
||||
slot_start = dataset2_start["slot"]
|
||||
frame_diff = (dataset2_start["frame"] - dataset1_start["frame"] + 1024) % 1024
|
||||
# check first if the delta time between the two datasets is larger than expected offset time.
|
||||
# So, the sync will not be applied
|
||||
# check during the calculation of the frame the ramp-around from 1023 to 0
|
||||
if abs(frame_diff) > 6:
|
||||
raise Exception(
|
||||
f"Frame difference between dataset1 and dataset2 is too large: {frame_diff}. "
|
||||
"This may indicate a problem with the data collection or synchronization."
|
||||
)
|
||||
|
||||
# Determine the starting frame and slot for data sync
|
||||
sync_info["frame"] = frame_start
|
||||
sync_info["slot"] = slot_start
|
||||
return sync_info
|
||||
|
||||
|
||||
# Read data from gNB T-tracer Application
|
||||
def get_frame_slot_start(shm_reading, bufIdx, general_msg_header_list,
|
||||
general_message_header_length):
|
||||
buf = shm_reading.read(bufIdx + general_message_header_length)
|
||||
msg_id = struct.unpack("<H", buf[bufIdx: bufIdx + general_msg_header_list.get("msg_id")])[0]
|
||||
bufIdx += general_msg_header_list.get("msg_id")
|
||||
frame = struct.unpack("<H", buf[bufIdx: bufIdx + general_msg_header_list.get("frame")])[0]
|
||||
bufIdx += general_msg_header_list.get("frame")
|
||||
slot = struct.unpack("B", buf[bufIdx: bufIdx + general_msg_header_list.get("slot")])[0]
|
||||
return frame, slot
|
||||
|
||||
|
||||
# Sync data between gNB and UE
|
||||
def sync_gnb_ue_captured_data(shm_reading_gnb, shm_reading_ue):
|
||||
"""
|
||||
Function to get the sync (frame, slot) data between gNB and UE
|
||||
Args:
|
||||
shm_reading_gnb: Shared memory for gNB
|
||||
shm_reading_ue: Shared memory for UE
|
||||
Returns:
|
||||
sync_info: Dictionary containing the sync information between gNB and UE
|
||||
sync_info["frame"] = frame_start
|
||||
sync_info["slot"] = slot_start
|
||||
"""
|
||||
# get general message header list
|
||||
general_msg_header_list, general_message_header_length = (
|
||||
data_recording_messages_def.get_general_msg_header_list())
|
||||
|
||||
# Read data from gNB T-tracer Application
|
||||
bufIdx = 0
|
||||
frame_gnb, slot_gnb = get_frame_slot_start(
|
||||
shm_reading_gnb, bufIdx, general_msg_header_list, general_message_header_length)
|
||||
# Read data from UE T-tracer Application
|
||||
bufIdx = 0
|
||||
frame_ue, slot_ue = get_frame_slot_start(
|
||||
shm_reading_ue, bufIdx, general_msg_header_list, general_message_header_length)
|
||||
dataset1_start = {}
|
||||
dataset1_start["frame"] = frame_gnb
|
||||
dataset1_start["slot"] = slot_gnb
|
||||
dataset2_start = {}
|
||||
dataset2_start["frame"] = frame_ue
|
||||
dataset2_start["slot"] = slot_ue
|
||||
# Sync data between gNB and UE
|
||||
# We noticed that the maximum difference between the frame number of gNB and UE is 3 frames
|
||||
# Calculate the frame difference considering the wrap-around from 1023 to 0
|
||||
sync_info = find_frame_slot_start(dataset1_start, dataset2_start)
|
||||
print(" gNB Start info: ", dataset1_start)
|
||||
print(" UE Start info: ", dataset2_start)
|
||||
print(" gNB and UE Sync info: ", sync_info)
|
||||
return sync_info
|
||||
@@ -1,5 +0,0 @@
|
||||
sigmf==1.2.1
|
||||
termcolor
|
||||
bitarray
|
||||
pandas
|
||||
numpy==1.23
|
||||
@@ -1,150 +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
|
||||
# */
|
||||
# ---------------------------------------------------------------------
|
||||
# file common/utils/data_recording/sync_validation_demo.py
|
||||
# brief simple application to validate sync between payload captured on gNB and UE
|
||||
# author Abdo Gaber
|
||||
# date 2025
|
||||
# version 1.0
|
||||
# company Emerson, NI Test and Measurement
|
||||
# email:
|
||||
# note
|
||||
# warning
|
||||
|
||||
import numpy as np
|
||||
import os
|
||||
import glob
|
||||
import matplotlib.pyplot as plt
|
||||
from lib import sigmf_interface
|
||||
from lib import config_interface
|
||||
import sigmf
|
||||
|
||||
|
||||
def calculate_ber(capture_subdir: str, scope: str):
|
||||
"""
|
||||
Iteratively counts all bit errors from data and finally calculates the BER for a given Eb/N0.
|
||||
"""
|
||||
|
||||
print("Start to calculate BER for subdirectory", capture_subdir)
|
||||
|
||||
# get all collection files in the specified directory
|
||||
file_list = glob.glob(os.path.join(capture_subdir, "*.sigmf-collection"))
|
||||
print("Found Collection files:", len(file_list))
|
||||
|
||||
bit_errors_total = 0
|
||||
num_bits_total = 0
|
||||
|
||||
for idx, file in enumerate(file_list):
|
||||
print("Processing file:", file)
|
||||
|
||||
# read SigMF collection file
|
||||
collection_file = sigmf.sigmffile.fromfile(file)
|
||||
print(" ")
|
||||
print("Collection file:", file)
|
||||
# extract filenames
|
||||
stream_files = collection_file.get_stream_names()
|
||||
print("Stream files:", stream_files)
|
||||
# extract filename from list of streams
|
||||
tx_bits_filename = next(
|
||||
filename for filename in stream_files if "tx-payload-bits" in filename
|
||||
)
|
||||
|
||||
rx_bits_ref_rx_real_ce_filename = next(
|
||||
filename for filename in stream_files if "rx-payload-bits" in filename
|
||||
)
|
||||
# extract data and deserialized data (not used here)
|
||||
tx_bits, _, _ = sigmf_interface.load_sigmf(
|
||||
tx_bits_filename, capture_subdir, scope="tx-payload-bits"
|
||||
)
|
||||
rx_bits, _, rx_annotations = (
|
||||
sigmf_interface.load_sigmf(
|
||||
rx_bits_ref_rx_real_ce_filename, capture_subdir, scope="rx-payload-bits"
|
||||
)
|
||||
)
|
||||
|
||||
# calculate bit errors
|
||||
bit_diffs = np.logical_xor(tx_bits, rx_bits)
|
||||
bit_errors = np.count_nonzero(bit_diffs)
|
||||
# increment total bit/symbol errors
|
||||
print("Current bit errors:", bit_errors / len(tx_bits))
|
||||
bit_errors_total += bit_errors
|
||||
num_bits_total += len(tx_bits)
|
||||
# plot "tx_bits" and "rx_bits_ref_rx_real_ce" for debugging purposes
|
||||
# Calculate the differences
|
||||
differences = np.array(tx_bits) - np.array(rx_bits)
|
||||
|
||||
# Plot TX and RX bits using a scatter plot
|
||||
fig = plt.figure(figsize=(15, 6))
|
||||
indices = np.arange(len(tx_bits))
|
||||
|
||||
plt.scatter(indices, tx_bits, label="TX bits", color="blue", marker="o", s=80)
|
||||
plt.scatter(indices, rx_bits, label="RX bits", color="red", marker="x", s=80)
|
||||
|
||||
# Highlight differences
|
||||
for i in range(len(differences)):
|
||||
if differences[i] != 0:
|
||||
plt.scatter(i, 1.1, color="red", marker="|", s=100)
|
||||
|
||||
plt.xlabel("Bit Index")
|
||||
plt.ylabel("Bit Value")
|
||||
plt.title(
|
||||
"TX vs RX Bits, Record "
|
||||
+ str(idx)
|
||||
+ ", Number of bits mismatchs: "
|
||||
+ str(bit_errors),
|
||||
fontsize=16,
|
||||
)
|
||||
plt.legend()
|
||||
plt.grid(True)
|
||||
plt.ylim(-0.1, 1.2)
|
||||
plt.xlim(200, 250)
|
||||
plt.show(block=False)
|
||||
# Sleep for a specified amount of time (e.g., 5 seconds)
|
||||
plt.pause(6)
|
||||
plt.close(plt.gcf()) # Close the figure
|
||||
# Keep the script running to display the plots
|
||||
# input("Press Enter to continue...")
|
||||
|
||||
# calculate BER
|
||||
ber = bit_errors_total / num_bits_total
|
||||
print("Total bit errors = ", ber)
|
||||
|
||||
|
||||
def calculate_stats(main_config_file: str):
|
||||
|
||||
scope = "real-world"
|
||||
|
||||
print(f"Starting to generate statistics with data scope: {scope}")
|
||||
|
||||
# read main config
|
||||
main_config = config_interface.read_main_config_file_json(main_config_file)
|
||||
|
||||
# get paths for recorded captures
|
||||
capture_path = main_config["data_recording_config"]["data_storage_path"]
|
||||
calculate_ber(capture_path, scope)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
main_config = "/home/user/workarea/oai_recorded_data/config_data_recording_app.json"
|
||||
|
||||
# calculate BER stats
|
||||
calculate_stats(main_config)
|
||||
@@ -123,10 +123,11 @@ void seq_arr_erase_it(seq_arr_t* arr, void* start_it, void* end_it, void (*free_
|
||||
return;
|
||||
|
||||
if (free_func != NULL) {
|
||||
void* it = start_it;
|
||||
while (it != end_it) {
|
||||
free_func(it);
|
||||
it = seq_arr_next(arr, it);
|
||||
void* start_it = seq_arr_front(arr);
|
||||
void* end_it = seq_arr_end(arr);
|
||||
while (start_it != end_it) {
|
||||
free_func(start_it);
|
||||
start_it = seq_arr_next(arr, start_it);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user