diff --git a/CMakeLists.txt b/CMakeLists.txt index d608d99c53..8cdc796a5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -682,7 +682,6 @@ set(SCHED_SRC_NR_UE ${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c ${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue_sl.c ${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c - ${OPENAIR1_DIR}/SCHED_NR_UE/phy_frame_config_nr_ue.c ${OPENAIR1_DIR}/SCHED_NR_UE/harq_nr.c ${OPENAIR1_DIR}/SCHED_NR_UE/pucch_uci_ue_nr.c ) @@ -1182,7 +1181,6 @@ set(NR_L2_SRC_UE ${NR_SDAP_SRC} ${NR_UE_RRC_DIR}/L2_interface_ue.c ${NR_UE_RRC_DIR}/main_ue.c - ${NR_RRC_DIR}/nr_rrc_config.c ${NR_UE_RRC_DIR}/rrc_UE.c ${NR_UE_RRC_DIR}/rrc_nsa.c ${NR_UE_RRC_DIR}/rrc_timers_and_constants.c @@ -1336,10 +1334,9 @@ if(E2_AGENT) endif() add_library(L2_LTE_NR - ${L2_RRC_SRC} - ${MAC_SRC} + # temporary solution until 4G/5G code completely untangled (as evidenced by deletion of the following file) + ${MAC_DIR}/dummy_functions.c ${ENB_APP_SRC} - ${MCE_APP_SRC} ) target_link_libraries(L2_LTE_NR PRIVATE f1ap s1ap nr_rrc) @@ -1351,12 +1348,6 @@ add_library(L2_UE target_link_libraries(L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(L2_UE PRIVATE GTPV1U) -add_library(L2_UE_LTE_NR - ${L2_RRC_SRC_UE} - ${MAC_SRC_UE} -) -target_link_libraries(L2_UE_LTE_NR PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) - target_link_libraries(L2_UE PRIVATE asn1_lte_rrc_hdrs) add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} ) @@ -1894,12 +1885,13 @@ add_executable(nr-uesoftmodem ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c ${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c + ${PHY_INTERFACE_DIR}/queue_t.c ) target_link_libraries(nr-uesoftmodem PRIVATE -Wl,--start-group nr_rrc SECURITY UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB - PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_LIB NFAPI_PNF_LIB + PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_NR_LIB ITTI SIMU shlib_loader -Wl,--end-group z dl) @@ -1971,29 +1963,25 @@ target_link_libraries(ldpctest PRIVATE -Wl,--whole-archive crc_byte -Wl,--no-whole-archive ) -add_executable(nr_dlschsim - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c - ) +add_library(physim_common OBJECT ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_unitary_common.c) +target_link_libraries(physim_common PRIVATE UTIL) + +add_executable(nr_dlschsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c) target_link_libraries(nr_dlschsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group - m pthread ${T_LIB} ITTI dl shlib_loader + m pthread ${T_LIB} ITTI dl shlib_loader physim_common ) target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs) -add_executable(nr_pbchsim - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c - ) +add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c) target_link_libraries(nr_pbchsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group - m pthread ${T_LIB} ITTI dl shlib_loader + m pthread ${T_LIB} ITTI dl shlib_loader physim_common ) target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(nr_psbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/executables/softmodem-common.c ${NR_UE_RRC_DIR}/rrc_nsa.c ${NFAPI_USER_DIR}/nfapi.c @@ -2002,24 +1990,19 @@ add_executable(nr_psbchsim ) target_link_libraries(nr_psbchsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -lz -Wl,--end-group - m pthread ${T_LIB} ITTI dl shlib_loader + m pthread ${T_LIB} ITTI dl shlib_loader physim_common ) target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) -#PUCCH ---> Prashanth -add_executable(nr_pucchsim - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c - ) +add_executable(nr_pucchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c) target_link_libraries(nr_pucchsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group - m pthread ${T_LIB} ITTI dl shlib_loader + m pthread ${T_LIB} ITTI dl shlib_loader physim_common ) target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(nr_dlsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/executables/softmodem-common.c ${NR_UE_RRC_DIR}/rrc_nsa.c ${NFAPI_USER_DIR}/nfapi.c @@ -2028,33 +2011,28 @@ add_executable(nr_dlsim ) target_link_libraries(nr_dlsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group - m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas + m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common ) target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) -add_executable(nr_prachsim - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c -) +add_executable(nr_prachsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c) target_link_libraries(nr_prachsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB CONFIG_LIB -lz -Wl,--end-group - m pthread ${T_LIB} ITTI dl shlib_loader) + m pthread ${T_LIB} ITTI dl shlib_loader physim_common) target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(nr_ulschsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${PHY_INTERFACE_DIR}/queue_t.c ) target_link_libraries(nr_ulschsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group - m pthread ${T_LIB} ITTI dl shlib_loader + m pthread ${T_LIB} ITTI dl shlib_loader physim_common ) target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(nr_ulsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/executables/softmodem-common.c ${NR_UE_RRC_DIR}/rrc_nsa.c ${NFAPI_USER_DIR}/nfapi.c @@ -2064,7 +2042,7 @@ add_executable(nr_ulsim target_link_libraries(nr_ulsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group - m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas + m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common ) target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) @@ -2121,7 +2099,7 @@ if (${T_TRACER}) NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB MISC_NFAPI_NR_LIB PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU - L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_UE_NR ngap + L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_UE_NR ngap CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU OPENAIR0_LIB dfts config_internals nr_common crc_byte) if (TARGET ${i}) diff --git a/ci-scripts/Jenkinsfile-GitLab-Container b/ci-scripts/Jenkinsfile-GitLab-Container index 3ad376f3da..a4da765bf5 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Container +++ b/ci-scripts/Jenkinsfile-GitLab-Container @@ -153,6 +153,28 @@ pipeline { } } } + stage ("Ubuntu-ARM-Image-Builder") { + steps { + script { + triggerSlaveJob ('RAN-Ubuntu-ARM-Image-Builder', 'Ubuntu-ARM-Image-Builder') + } + } + post { + always { + script { + // Using a unique variable name for each test stage to avoid overwriting on a global variable + // due to parallel-time concurrency + ubuntuArmBuildStatus = finalizeSlaveJob('RAN-Ubuntu-ARM-Image-Builder') + } + } + failure { + script { + currentBuild.result = 'FAILURE' + failingStages += ubuntuArmBuildStatus + } + } + } + } stage ("RHEL-Cluster-Image-Builder") { steps { script { diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index bfa315b28e..0b80f5884e 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -226,7 +226,7 @@ class Cluster: def _undeploy_pod(self, filename): self.cmd.run(f'oc delete -f {filename}') - def PullClusterImage(self, HTML, node, images): + def PullClusterImage(self, HTML, node, images, tag_prefix): logging.debug(f'Pull OC image {images} to server {node}') self.testCase_id = HTML.testCase_id with cls_cmd.getConnection(node) as cmd: @@ -242,7 +242,7 @@ class Cluster: return False tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge) registry = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}' - success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, registry, None, None) + success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, None, None) OC_logout(cmd) param = f"on node {node}" if success: diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index b1c5120097..dc461dfe7e 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -93,7 +93,7 @@ def CopyLogsToExecutor(cmd, sourcePath, log_name): os.remove(f'./{log_name}.zip') if (os.path.isdir(f'./{log_name}')): shutil.rmtree(f'./{log_name}') - cmd.copyin(f'{sourcePath}/cmake_targets/{log_name}.zip', f'./{log_name}.zip') + cmd.copyin(src=f'{sourcePath}/cmake_targets/{log_name}.zip', tgt=f'{os.getcwd()}/{log_name}.zip') cmd.run(f'rm -f {log_name}.zip') ZipFile(f'{log_name}.zip').extractall('.') @@ -359,7 +359,7 @@ class Containerize(): svr = self.eNB_serverId[self.eNB_instance] lIpAddr, lSourcePath = self.GetCredentials(svr) logging.debug('Building on server: ' + lIpAddr) - cmd = cls_cmd.RemoteCmd(lIpAddr) + cmd = cls_cmd.getConnection(lIpAddr) # Checking the hostname to get adapted on cli and dockerfileprefixes cmd.run('hostnamectl') @@ -407,6 +407,12 @@ class Containerize(): result = re.search('build_cross_arm64', self.imageKind) if result is not None: self.dockerfileprefix = '.ubuntu22.cross-arm64' + result = re.search('native_arm', self.imageKind) + if result is not None: + imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', '')) + imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup', '')) + imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue', '')) + imageNames.append(('oai-gnb-aerial', 'gNB.aerial', 'oai-gnb-aerial', '')) self.testCase_id = HTML.testCase_id cmd.cd(lSourcePath) @@ -491,10 +497,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.2024.05.23.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.2024.05.23.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}/") @@ -720,9 +726,9 @@ class Containerize(): HTML.CreateHtmlTabFooter(False) return False - def Push_Image_to_Local_Registry(self, HTML, svr_id): + def Push_Image_to_Local_Registry(self, HTML, svr_id, tag_prefix=""): lIpAddr, lSourcePath = self.GetCredentials(svr_id) - logging.debug('Pushing images from server: ' + lIpAddr) + logging.debug('Pushing images to server: ' + lIpAddr) ssh = cls_cmd.getConnection(lIpAddr) imagePrefix = 'porcepix.sboai.cs.eurecom.fr' ret = ssh.run(f'docker login -u oaicicd -p oaicicd {imagePrefix}') @@ -737,7 +743,7 @@ class Containerize(): if self.ranAllowMerge: orgTag = 'ci-temp' for image in IMAGES: - tagToUse = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge) + tagToUse = tag_prefix + CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge) imageTag = f"{image}:{tagToUse}" ret = ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{imageTag}') if ret.returncode != 0: @@ -751,9 +757,10 @@ class Containerize(): return False # Creating a develop tag on the local private registry if not self.ranAllowMerge: - ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{image}:develop') - ssh.run(f'docker push {imagePrefix}/{image}:develop') - ssh.run(f'docker rmi {imagePrefix}/{image}:develop') + devTag = f"{tag_prefix}develop" + ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{image}:{devTag}') + ssh.run(f'docker push {imagePrefix}/{image}:{devTag}') + ssh.run(f'docker rmi {imagePrefix}/{image}:{devTag}') ssh.run(f'docker rmi {imagePrefix}/{imageTag} {image}:{orgTag}') ret = ssh.run(f'docker logout {imagePrefix}') @@ -768,7 +775,7 @@ class Containerize(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) return True - def Pull_Image(cmd, images, tag, registry, username, password): + def Pull_Image(cmd, images, tag, tag_prefix, registry, username, password): if username is not None and password is not None: logging.info(f"logging into registry {username}@{registry}") response = cmd.run(f'docker login -u {username} -p {password} {registry}', silent=True, reportNonZero=False) @@ -778,14 +785,15 @@ class Containerize(): return False, msg pulled_images = [] for image in images: + imagePrefTag = f"{image}:{tag_prefix}{tag}" imageTag = f"{image}:{tag}" - response = cmd.run(f'docker pull {registry}/{imageTag}') + response = cmd.run(f'docker pull {registry}/{imagePrefTag}') if response.returncode != 0: - msg = f'Could not pull {image} from local registry: {imageTag}' + msg = f'Could not pull {image} from local registry: {imagePrefTag}' logging.error(msg) return False, msg - cmd.run(f'docker tag {registry}/{imageTag} oai-ci/{imageTag}') - cmd.run(f'docker rmi {registry}/{imageTag}') + cmd.run(f'docker tag {registry}/{imagePrefTag} oai-ci/{imageTag}') + cmd.run(f'docker rmi {registry}/{imagePrefTag}') pulled_images += [f"oai-ci/{imageTag}"] if username is not None and password is not None: response = cmd.run(f'docker logout {registry}') @@ -793,13 +801,13 @@ class Containerize(): msg = "Pulled Images:\n" + '\n'.join(pulled_images) return True, msg - def Pull_Image_from_Registry(self, HTML, svr_id, images, tag=None, registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"): + def Pull_Image_from_Registry(self, HTML, svr_id, images, tag=None, tag_prefix="", registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"): lIpAddr, lSourcePath = self.GetCredentials(svr_id) logging.debug('\u001B[1m Pulling image(s) on server: ' + lIpAddr + '\u001B[0m') if not tag: tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge) with cls_cmd.getConnection(lIpAddr) as cmd: - success, msg = Containerize.Pull_Image(cmd, images, tag, registry, username, password) + success, msg = Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, username, password) param = f"on node {lIpAddr}" if success: HTML.CreateHtmlTestRowQueue(param, 'OK', [msg]) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index cafcb24313..472cb2665f 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -387,20 +387,22 @@ def ExecuteActionWithParam(action): elif action == 'Push_Local_Registry': svr_id = test.findtext('svr_id') - success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id) + tag_prefix = test.findtext('tag_prefix') or "" + success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id, tag_prefix) elif action == 'Pull_Local_Registry' or action == 'Clean_Test_Server_Images': if force_local: # Do not pull or remove images when running locally. User is supposed to handle image creation & cleanup return True svr_id = test.findtext('svr_id') + tag_prefix = test.findtext('tag_prefix') or "" images = test.findtext('images').split() # hack: for FlexRIC, we need to overwrite the tag to use tag = None if len(images) == 1 and images[0] == "oai-flexric": tag = CONTAINERS.flexricTag if action == "Pull_Local_Registry": - success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag) + success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag, tag_prefix=tag_prefix) if action == "Clean_Test_Server_Images": success = CONTAINERS.Clean_Test_Server_Images(HTML, svr_id, images, tag=tag) @@ -420,9 +422,10 @@ def ExecuteActionWithParam(action): success = cls_oaicitest.Custom_Script(HTML, node, script, command_fail) elif action == 'Pull_Cluster_Image': + tag_prefix = test.findtext('tag_prefix') or "" images = test.findtext('images').split() node = test.findtext('node') - success = CLUSTER.PullClusterImage(HTML, node, images) + success = CLUSTER.PullClusterImage(HTML, node, images, tag_prefix=tag_prefix) else: logging.warning(f"unknown action {action}, skip step") diff --git a/ci-scripts/xml_files/container_image_build_arm.xml b/ci-scripts/xml_files/container_image_build_arm.xml new file mode 100644 index 0000000000..722d23ddcf --- /dev/null +++ b/ci-scripts/xml_files/container_image_build_arm.xml @@ -0,0 +1,55 @@ + + + build-tab + Build Container Images for ARM + wrench + + 800813 + 000001 + 000010 + + + + + Create_Workspace + Create new Workspace for server 0 + 0 + 0 + + + Build_Image + Build all Images + native_arm + 0 + 0 + + + + Push_Local_Registry + Push Images to Local Registry + 0 + arm_ + + + diff --git a/ci-scripts/xml_files/container_sa_gh_aerial_quectel.xml b/ci-scripts/xml_files/container_sa_gh_aerial_quectel.xml new file mode 100644 index 0000000000..ea60cb2b6f --- /dev/null +++ b/ci-scripts/xml_files/container_sa_gh_aerial_quectel.xml @@ -0,0 +1,49 @@ + + + TEST-GH-AERIAL-SA + Gracehopper AERIAL 100 MHz TDD SA + tasks + + 111111 + 333333 + + + + + Pull_Local_Registry + Pull Images from Local Registry + 0 + oai-gnb-aerial + arm_ + + + + Clean_Test_Server_Images + true + Clean Test Images on Test Server + 0 + oai-gnb-aerial + + + diff --git a/common/config/yaml/config_yaml.cpp b/common/config/yaml/config_yaml.cpp index eb510c94f5..108dee1ac2 100644 --- a/common/config/yaml/config_yaml.cpp +++ b/common/config/yaml/config_yaml.cpp @@ -63,7 +63,7 @@ void SetDefault(configmodule_interface_t *cfg, paramdef_t *param) *param->i8ptr = param->defintval; break; case TYPE_UINT8: - *param->i8ptr = param->defuintval; + *param->u8ptr = param->defuintval; break; case TYPE_INT16: *param->i16ptr = param->defintval; @@ -120,8 +120,11 @@ void SetNonDefault(configmodule_interface_t *cfg, const YAML::Node &node, paramd sprintf(*param->strptr, "%s", setting.c_str()); break; } + case TYPE_INT8: + *param->i8ptr = node[optname].as(); + break; case TYPE_UINT8: - *param->i8ptr = node[optname].as(); + *param->u8ptr = node[optname].as(); break; case TYPE_INT16: *param->i16ptr = node[optname].as(); diff --git a/common/utils/LOG/CMakeLists.txt b/common/utils/LOG/CMakeLists.txt index c525969015..ff224329de 100644 --- a/common/utils/LOG/CMakeLists.txt +++ b/common/utils/LOG/CMakeLists.txt @@ -1,10 +1,15 @@ +add_library(log_headers INTERFACE) +target_include_directories(log_headers INTERFACE .) +target_link_libraries(log_headers INTERFACE T_headers) + set(log_sources log.c) if (ENABLE_LTTNG) set(log_sources ${log_sources} lttng-tp.c) endif() add_library(LOG ${log_sources}) target_include_directories(LOG PUBLIC .) -target_link_libraries(LOG PRIVATE ${T_LIB}) +target_link_libraries(LOG PRIVATE CONFIG_LIB) +target_link_libraries(LOG PUBLIC log_headers) if (ENABLE_LTTNG) target_link_libraries(LOG PUBLIC lttng-ust) endif() diff --git a/common/utils/T/CMakeLists.txt b/common/utils/T/CMakeLists.txt index 01dda120ca..5425a564b1 100644 --- a/common/utils/T/CMakeLists.txt +++ b/common/utils/T/CMakeLists.txt @@ -49,7 +49,7 @@ add_custom_target(generate_T DEPENDS T_IDs.h check_vcd) # headers have really been created, we make this headers library explicitly # depend on the generated headers. add_library(T_headers INTERFACE) -add_dependencies(T_headers T_IDs.h T_messages.txt.h) +add_dependencies(T_headers T_IDs.h generate_T) target_include_directories(T_headers INTERFACE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) if(T_TRACER) diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c index 58c18bfd36..f389fbf33b 100644 --- a/common/utils/nr/nr_common.c +++ b/common/utils/nr/nr_common.c @@ -1441,3 +1441,32 @@ unsigned short get_m_srs(int c_srs, int b_srs) { unsigned short get_N_b_srs(int c_srs, int b_srs) { return srs_bandwidth_config[c_srs][b_srs][1]; } + +frequency_range_t get_freq_range_from_freq(uint64_t freq) +{ + // 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges + if (freq >= 410000000 && freq <= 7125000000) + return FR1; + + if (freq >= 24250000000 && freq <= 71000000000) + return FR2; + + AssertFatal(false, "Undefined Frequency Range for frequency %ld Hz\n", freq); +} + +frequency_range_t get_freq_range_from_arfcn(uint32_t arfcn) +{ + // 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges + if (arfcn >= 82000 && arfcn <= 875000) + return FR1; + + if (arfcn >= 2016667 && arfcn <= 2795832) + return FR2; + + AssertFatal(false, "Undefined Frequency Range for ARFCN %d\n", arfcn); +} + +frequency_range_t get_freq_range_from_band(uint16_t band) +{ + return band <= 256 ? FR1 : FR2; +} diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h index 1dc6a1169d..dcacea4ff0 100644 --- a/common/utils/nr/nr_common.h +++ b/common/utils/nr/nr_common.h @@ -299,6 +299,10 @@ unsigned int get_prach_K(int prach_sequence_length, int prach_fmt_id, int pusch_ int get_slot_idx_in_period(const int slot, const frame_structure_t *fs); +frequency_range_t get_freq_range_from_freq(uint64_t freq); +frequency_range_t get_freq_range_from_arfcn(uint32_t arfcn); +frequency_range_t get_freq_range_from_band(uint16_t band); + #define CEILIDIV(a,b) ((a+b-1)/b) #define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1)) diff --git a/doc/Doxyfile b/doc/Doxyfile index e4fcaa0fe8..c2a4f20245 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -2283,10 +2283,8 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/phase_noise.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/channel_sim.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/sim.h \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_frame_config_nr.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/harq_nr.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/fapi_nr_ue_l1.c \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/pucch_uci_ue_nr.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/harq_nr.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_procedures_nr_ue.c \ diff --git a/doc/FEATURE_SET.md b/doc/FEATURE_SET.md index 567187ac60..5dd5d8b8b3 100644 --- a/doc/FEATURE_SET.md +++ b/doc/FEATURE_SET.md @@ -139,6 +139,7 @@ These modes of operation are supported: - evaluation of CQI report - MAC scheduling of SR reception - Intra-frequency handover +- Initial support for RedCap ## gNB RLC @@ -185,6 +186,7 @@ These modes of operation are supported: - Interface with NGAP for the interactions with the AMF - Interface with F1AP for CU/DU split deployment option - Periodic RRC measurements of serving cell (no A/B events) +- Initial support for RedCap ## gNB X2AP diff --git a/doc/ORAN_FHI7.2_Tutorial.md b/doc/ORAN_FHI7.2_Tutorial.md index 8e2058f5c1..c28f75a2cf 100644 --- a/doc/ORAN_FHI7.2_Tutorial.md +++ b/doc/ORAN_FHI7.2_Tutorial.md @@ -1059,10 +1059,10 @@ section](.#build-oai-gnb)) to see if it resolves the problem. # Operation with multiple RUs It is possible to connect up to 4 RUs to one DU at the same time and operate -them as a (single) distributed antenna (array). This works since all RUs and -the DU are synchronized onto a common clock using PTP. The assumed -configuration is that with N RUs each having an M×M configuration, we -effectively reach an (N×M)×(N×M) configuration. +them either with a single antenna array or a distributed antenna array. This +works since all RUs and the DU are synchronized onto a common clock using PTP. +The assumed configuration is that with N RUs each having an M×M configuration, +we effectively reach an (N×M)×(N×M) configuration. Some caveats: - Since it's a distributed antenna, this implies that this setup will deploy a diff --git a/doc/README.md b/doc/README.md index 13028479cd..4786458a66 100644 --- a/doc/README.md +++ b/doc/README.md @@ -117,6 +117,7 @@ Some directories under `radio` contain READMEs: - [USRP](../radio/USRP/README.md) - [BladeRF](../radio/BLADERF/README) - [IQPlayer](../radio/iqplayer/DOC/iqrecordplayer_usage.md), and [general documentation](./iqrecordplayer_usage.md) +- [fhi_72](../radio/fhi_72/README.md) The other SDRs (AW2S, LimeSDR, ...) have no READMEs. diff --git a/doc/TESTBenches.md b/doc/TESTBenches.md index 0782852843..2ab379c88c 100644 --- a/doc/TESTBenches.md +++ b/doc/TESTBenches.md @@ -25,6 +25,7 @@ | aerial2 | 172.21.16.131 | CI-Aerial2-Usage | gNB (PNF/Nvidia CUBB + VNF) | Foxconn RU, _Nvidia Aerial SDK integrated_ | | cacofonix | 172.21.16.150 | CI-Cacofonix-Usage | gNB (n78, FHI7.2) | | | matix | 172.21.19.58 | CI-Matix-Usage | gNB (n77) | N310 | +| gracehopper1-oai | -- | Gracehopper1 | build, gNB/Aerial | _Nvidia Aerial SDK integrated_ | Note: The available resources, and their current usage, is indicated here: - [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/): @@ -122,6 +123,15 @@ information on how the images are built. - target image from `Dockerfile.lteUE.ubuntu22` - target image from `Dockerfile.lteRU.ubuntu22` - build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu22`, and run them +- [RAN-Ubuntu-ARM-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-ARM-Image-Builder/) + ~BUILD-ONLY ~4G-LTE ~5G-NR + - gracehopper1-oai: ARM Ubuntu 22 image build using docker + - base image from `Dockerfile.base.ubuntu22` + - build image from `Dockerfile.build.ubuntu22`, followed by + - target image from `Dockerfile.gNB.ubuntu22` + - target image from `Dockerfile.nr-cuup.ubuntu22` + - target image from `Dockerfile.nrUE.ubuntu22` + - target image from `Dockerfile.gNB.aerial.ubuntu22` #### Image Test pipelines diff --git a/docker/Dockerfile.gNB.ubuntu22 b/docker/Dockerfile.gNB.ubuntu22 index 35e442f93d..da2074c64b 100644 --- a/docker/Dockerfile.gNB.ubuntu22 +++ b/docker/Dockerfile.gNB.ubuntu22 @@ -77,7 +77,18 @@ RUN apt-get update && \ # library version. Installing it above would install the wrong version. Hence, # copy the right version from ran-build. When upgrading to Ubuntu24, install # the correct one above! -COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ +# note: this dockerfile should work for both x86 and arm, hence the glob below +# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target +# directory needs to be also one of those two, but globs don't work in target +# directories, work around this with mv +COPY --from=gnb-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/ +ARG TARGETPLATFORM +RUN case "${TARGETPLATFORM}" in \ + "linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \ + "linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \ + *) exit 1 ;; \ + esac; \ + mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0 WORKDIR /opt/oai-gnb/bin COPY --from=gnb-build \ diff --git a/docker/Dockerfile.nr-cuup.ubuntu22 b/docker/Dockerfile.nr-cuup.ubuntu22 index 242fac61b8..2952afa34b 100644 --- a/docker/Dockerfile.nr-cuup.ubuntu22 +++ b/docker/Dockerfile.nr-cuup.ubuntu22 @@ -54,7 +54,18 @@ RUN apt-get update && \ # library version. Installing it above would install the wrong version. Hence, # copy the right version from ran-build. When upgrading to Ubuntu24, install # the correct one above! -COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ +# note: this dockerfile should work for both x86 and arm, hence the glob below +# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target +# directory needs to be also one of those two, but globs don't work in target +# directories, work around this with mv +COPY --from=gnb-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/ +ARG TARGETPLATFORM +RUN case "${TARGETPLATFORM}" in \ + "linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \ + "linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \ + *) exit 1 ;; \ + esac; \ + mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0 ## Copy E2 SM models COPY --from=gnb-build /usr/local/lib/flexric /usr/local/lib/flexric diff --git a/docker/Dockerfile.nrUE.ubuntu22 b/docker/Dockerfile.nrUE.ubuntu22 index dc0d425956..45ad4bbe03 100644 --- a/docker/Dockerfile.nrUE.ubuntu22 +++ b/docker/Dockerfile.nrUE.ubuntu22 @@ -77,7 +77,18 @@ RUN apt-get update && \ # library version. Installing it above would install the wrong version. Hence, # copy the right version from ran-build. When upgrading to Ubuntu24, install # the correct one above! -COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ +# note: this dockerfile should work for both x86 and arm, hence the glob below +# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target +# directory needs to be also one of those two, but globs don't work in target +# directories, work around this with mv +COPY --from=nr-ue-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/ +ARG TARGETPLATFORM +RUN case "${TARGETPLATFORM}" in \ + "linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \ + "linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \ + *) exit 1 ;; \ + esac; \ + mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0 WORKDIR /opt/oai-nr-ue/bin COPY --from=nr-ue-build \ diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 41032a3d42..d1b9ba648f 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -28,7 +28,6 @@ #include "NR_MAC_UE/mac_proto.h" #include "RRC/NR_UE/rrc_proto.h" #include "RRC/NR_UE/L2_interface_ue.h" -#include "SCHED_NR_UE/phy_frame_config_nr.h" #include "SCHED_NR_UE/defs.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "executables/softmodem-common.h" @@ -466,6 +465,38 @@ static void UE_synch(void *arg) { } } +static int nr_ue_slot_select(const fapi_nr_config_request_t *cfg, int nr_slot) +{ + if (cfg->cell_config.frame_duplex_type == FDD) + return NR_UPLINK_SLOT | NR_DOWNLINK_SLOT; + + const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table; + int rel_slot = nr_slot % tdd_table->tdd_period_in_slots; + + if (tdd_table->max_tdd_periodicity_list == NULL) // this happens before receiving TDD configuration + return NR_DOWNLINK_SLOT; + + const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot]; + + // if the 1st symbol is UL the whole slot is UL + if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 1) + return NR_UPLINK_SLOT; + + // if the 1st symbol is flexible the whole slot is mixed + if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 2) + return NR_MIXED_SLOT; + + for (int i = 1; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT; i++) { + // if the 1st symbol is DL and any other is not, the slot is mixed + if (current_slot->max_num_of_symbol_per_slot_list[i].slot_config != 0) { + return NR_MIXED_SLOT; + } + } + + // if here, all the symbols where DL + return NR_DOWNLINK_SLOT; +} + static void RU_write(nr_rxtx_thread_data_t *rxtxD, bool sl_tx_action) { PHY_VARS_NR_UE *UE = rxtxD->UE; diff --git a/openair1/PHY/CODING/CMakeLists.txt b/openair1/PHY/CODING/CMakeLists.txt index e4e8d43a95..4eee35a2cd 100644 --- a/openair1/PHY/CODING/CMakeLists.txt +++ b/openair1/PHY/CODING/CMakeLists.txt @@ -7,6 +7,8 @@ add_library(coding MODULE 3gpplte_turbo_decoder.c ) set_target_properties(coding PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +#ensure that the T header files are generated before targets depending on them +target_link_libraries(coding PRIVATE log_headers) add_library(ldpc_orig MODULE nrLDPC_decoder/nrLDPC_decoder.c diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index 451144dfee..d94d2ba493 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -204,19 +204,14 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB) NR_gNB_PUSCH *pusch = &gNB->pusch_vars[ULSCH_id]; pusch->ul_ch_estimates = (int32_t **)malloc16(n_buf * sizeof(int32_t *)); pusch->ptrs_phase_per_slot = (int32_t **)malloc16(n_buf * sizeof(int32_t *)); - pusch->ul_ch_estimates_time = (int32_t **)malloc16(n_buf * sizeof(int32_t *)); pusch->rxdataF_comp = (int32_t **)malloc16(n_buf * sizeof(int32_t *)); - pusch->llr_layers = (int16_t **)malloc16(max_ul_mimo_layers * sizeof(int32_t *)); for (int i = 0; i < n_buf; i++) { pusch->ul_ch_estimates[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * fp->ofdm_symbol_size * fp->symbols_per_slot); - pusch->ul_ch_estimates_time[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * fp->ofdm_symbol_size); pusch->ptrs_phase_per_slot[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * fp->symbols_per_slot); // symbols per slot pusch->rxdataF_comp[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * fp->symbols_per_slot); } for (int i = 0; i < max_ul_mimo_layers; i++) { - pusch->llr_layers[i] = (int16_t *)malloc16_clear((8 * ((3 * 8 * 6144) + 12)) - * sizeof(int16_t)); // [hna] 6144 is LTE and (8*((3*8*6144)+12)) is not clear } pusch->llr = (int16_t *)malloc16_clear((8 * ((3 * 8 * 6144) + 12)) * sizeof(int16_t)); // [hna] 6144 is LTE and (8*((3*8*6144)+12)) is not clear @@ -275,18 +270,13 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB) for (int ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) { NR_gNB_PUSCH *pusch_vars = &gNB->pusch_vars[ULSCH_id]; - for (int i=0; i< max_ul_mimo_layers; i++) - free_and_zero(pusch_vars->llr_layers[i]); for (int i = 0; i < n_buf; i++) { free_and_zero(pusch_vars->ul_ch_estimates[i]); - free_and_zero(pusch_vars->ul_ch_estimates_time[i]); free_and_zero(pusch_vars->ptrs_phase_per_slot[i]); free_and_zero(pusch_vars->rxdataF_comp[i]); } - free_and_zero(pusch_vars->llr_layers); free_and_zero(pusch_vars->ul_ch_estimates); free_and_zero(pusch_vars->ptrs_phase_per_slot); - free_and_zero(pusch_vars->ul_ch_estimates_time); free_and_zero(pusch_vars->ul_valid_re_per_slot); free_and_zero(pusch_vars->rxdataF_comp); @@ -354,7 +344,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB, } fp->threequarter_fs = 0; - frequency_range_t frequency_range = fp->nr_band > 256 ? FR2 : FR1; + frequency_range_t frequency_range = get_freq_range_from_band(fp->nr_band); int bw_index = get_supported_band_index(mu, frequency_range, N_RB_DL); gNB_config->carrier_config.dl_bandwidth.value = get_supported_bw_mhz(frequency_range, bw_index); diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index 1f5c22c71e..5163ab3bb8 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -321,7 +321,7 @@ void nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg, NR_DL_FRAME_PARMS * fp->get_samples_slot_timestamp = &get_samples_slot_timestamp; fp->get_slot_from_timestamp = &get_slot_from_timestamp; fp->samples_per_frame = 10 * fp->samples_per_subframe; - fp->freq_range = (fp->dl_CarrierFreq < 6e9) ? FR1 : FR2; + fp->freq_range = get_freq_range_from_freq(fp->dl_CarrierFreq); fp->Ncp = Ncp; @@ -405,7 +405,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, fp->get_samples_per_slot = &get_samples_per_slot; fp->get_samples_slot_timestamp = &get_samples_slot_timestamp; fp->samples_per_frame = 10 * fp->samples_per_subframe; - fp->freq_range = (fp->dl_CarrierFreq < 6e9) ? FR1 : FR2; + fp->freq_range = get_freq_range_from_freq(fp->dl_CarrierFreq); uint8_t sco = 0; if (((fp->freq_range == FR1) && (config->ssb_table.ssb_subcarrier_offset < 24)) || @@ -439,7 +439,9 @@ void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink frame_parms->numerology_index = mu; frame_parms->dl_CarrierFreq = downlink_frequency; frame_parms->ul_CarrierFreq = downlink_frequency + delta_duplex; - frame_parms->freq_range = (frame_parms->dl_CarrierFreq < 6e9)? FR1 : FR2; + if (get_softmodem_params()->sl_mode == 0) { + frame_parms->freq_range = get_freq_range_from_freq(frame_parms->dl_CarrierFreq); + } frame_parms->N_RB_UL = frame_parms->N_RB_DL; frame_parms->nr_band = nr_band; @@ -570,7 +572,7 @@ int nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *fp, fp->get_samples_per_slot = &get_samples_per_slot; fp->get_samples_slot_timestamp = &get_samples_slot_timestamp; fp->samples_per_frame = 10 * fp->samples_per_subframe; - fp->freq_range = (fp->sl_CarrierFreq < 6e9) ? FR1 : FR2; + fp->freq_range = get_freq_range_from_freq(fp->sl_CarrierFreq); // ssb_offset_pointa points to the first RE where Sidelink-PSBCH starts fp->ssb_start_subcarrier = config->sl_bwp_config.sl_ssb_offset_point_a; diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index 8ef3cb1b0c..5d318d6fd8 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -33,6 +33,7 @@ #include "PHY/NR_REFSIG/ul_ref_seq_nr.h" #include "executables/softmodem-common.h" #include "nr_phy_common.h" +#include "openair1/PHY/TOOLS/phy_scope_interface.h" //#define DEBUG_CH //#define DEBUG_PUSCH @@ -41,6 +42,29 @@ #define NO_INTERP 1 #define dBc(x, y) (dB_fixed(((int32_t)(x)) * (x) + ((int32_t)(y)) * (y))) +typedef struct puschAntennaProc_s { + unsigned char Ns; + int nl; + unsigned short p; + unsigned char symbol; + unsigned short bwp_start_subcarrier; + int aarx; + int beam_nb; + int numAntennas; + nfapi_nr_pusch_pdu_t *pusch_pdu; + int *max_ch; + c16_t *pilot; + int *nest_count; + uint64_t *noise_amp2; + delay_t *delay; + int chest_freq; + NR_gNB_PUSCH *pusch_vars; + NR_DL_FRAME_PARMS *frame_parms; + c16_t ***rxdataF; + task_ans_t *ans; + scopeData_t *scope; +} puschAntennaProc_t; + __attribute__((always_inline)) inline c16_t c32x16cumulVectVectWithSteps(c16_t *in1, int *offset1, const int step1, @@ -142,8 +166,13 @@ static void nr_pusch_antenna_processing(void *arg) } pilot_cnt += 2; } - - nr_est_delay(frame_parms->ofdm_symbol_size, ul_ls_est, (c16_t *)pusch_vars->ul_ch_estimates_time[antenna], delay); + c16_t ch_estimates_time[frame_parms->ofdm_symbol_size] __attribute__((aligned(32))); + nr_est_delay(frame_parms->ofdm_symbol_size, ul_ls_est, ch_estimates_time, delay); + if (rdata->scope && antenna == 0) { + metadata mt = {.slot = -1, .frame = -1}; + scopeData_t *tmp = rdata->scope; + tmp->copyData(tmp, gNBulDelay, ch_estimates_time, sizeof(c16_t), 1, frame_parms->ofdm_symbol_size, 0, &mt); + } int delay_idx = get_delay_idx(delay->est_delay, MAX_DELAY_COMP); c16_t *ul_delay_table = frame_parms->delay_table[delay_idx]; @@ -231,7 +260,13 @@ static void nr_pusch_antenna_processing(void *arg) } // Delay compensation - nr_est_delay(frame_parms->ofdm_symbol_size, ul_ls_est, (c16_t *)pusch_vars->ul_ch_estimates_time[antenna], delay); + c16_t ch_estimates_time[frame_parms->ofdm_symbol_size] __attribute__((aligned(32))); + nr_est_delay(frame_parms->ofdm_symbol_size, ul_ls_est, ch_estimates_time, delay); + if (rdata->scope && antenna == 0) { + metadata mt = {.slot = -1, .frame = -1}; + scopeData_t *tmp = rdata->scope; + tmp->copyData(tmp, gNBulDelay, ch_estimates_time, sizeof(c16_t), 1, frame_parms->ofdm_symbol_size, 0, &mt); + } int delay_idx = get_delay_idx(-delay->est_delay, MAX_DELAY_COMP); c16_t *ul_delay_table = frame_parms->delay_table[delay_idx]; for (int n = 0; n < nb_rb_pusch * NR_NB_SC_PER_RB; n++) { @@ -531,6 +566,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, rdata->pusch_vars = &gNB->pusch_vars[ul_id]; rdata->chest_freq = gNB->chest_freq; rdata->rxdataF = gNB->common_vars.rxdataF; + rdata->scope = gNB->scopeData; rdata->ans = &ans; // Call the nr_pusch_antenna_processing function if (job_id == num_jobs - 1) { diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h index c1f769b34c..437a3c20db 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h @@ -239,14 +239,14 @@ void reset_active_ulsch(PHY_VARS_gNB *gNB, int frame); void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, uint32_t symbol, - c16_t* rxdataF_comp0, - c16_t* rxdataF_comp1, - c16_t* ul_ch_mag0, - c16_t* ul_ch_mag1, - c16_t* llr_layers0, - c16_t* llr_layers1, - c16_t* rho0, - c16_t* rho1, + c16_t *rxdataF_comp0, + c16_t *rxdataF_comp1, + c16_t *ul_ch_mag0, + c16_t *ul_ch_mag1, + int16_t *llr_layers0, + int16_t *llr_layers1, + c16_t *rho0, + c16_t *rho1, uint32_t nb_re, uint8_t mod_order); diff --git a/openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c b/openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c index b6b56ec79f..73ba90e62f 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c +++ b/openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c @@ -52,12 +52,10 @@ void nr_group_sequence_hopping(pucch_GroupHopping_t PUCCH_GroupHopping, * n_hop=1 for the second hop */ // depending on the value of the PUCCH_GroupHopping, we will obtain different values for u,v - //pucch_GroupHopping_t PUCCH_GroupHopping = ue->pucch_config_common_nr->pucch_GroupHopping; // from higher layers FIXME!!! // n_id defined as per TS 38.211 subclause 6.3.2.2.1 (is given by the higher-layer parameter hoppingId) // it is hoppingId from PUCCH-ConfigCommon: // Cell-Specific scrambling ID for group hoppping and sequence hopping if enabled // Corresponds to L1 parameter 'HoppingID' (see 38.211, section 6.3.2.2) BIT STRING (SIZE (10)) - //uint16_t n_id = ue->pucch_config_common_nr->hoppingId; // from higher layers FIXME!!! #ifdef DEBUG_NR_PUCCH_TX printf("\t\t [nr_group_sequence_hopping] PUCCH_GroupHopping=%u, n_id=%u \n",PUCCH_GroupHopping,n_id); #endif diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index c3b4f4dd75..59c459561b 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -1030,8 +1030,8 @@ static void inner_rx(PHY_VARS_gNB *gNB, c16_t rxFext[nb_rx_ant][buffer_length] __attribute__((aligned(32))); c16_t chFext[nb_layer][nb_rx_ant][buffer_length] __attribute__((aligned(32))); - memset(rxFext, 0, sizeof(c16_t) * nb_rx_ant * buffer_length); - memset(chFext, 0, sizeof(c16_t) * nb_layer * nb_rx_ant* buffer_length); + memset(rxFext, 0, sizeof(rxFext)); + memset(chFext, 0, sizeof(chFext)); int dmrs_symbol; if (gNB->chest_time == 0) dmrs_symbol = dmrs_symbol_flag ? symbol : get_valid_dmrs_idx_for_channel_est(rel15_ul->ul_dmrs_symb_pos, symbol); @@ -1059,10 +1059,10 @@ static void inner_rx(PHY_VARS_gNB *gNB, c16_t rxF_ch_magb [nb_layer][buffer_length] __attribute__((aligned(32))); c16_t rxF_ch_magc [nb_layer][buffer_length] __attribute__((aligned(32))); - memset(rho, 0, sizeof(c16_t) * nb_layer * nb_layer* buffer_length); - memset(rxF_ch_maga, 0, sizeof(c16_t) * nb_layer * buffer_length); - memset(rxF_ch_magb, 0, sizeof(c16_t) * nb_layer * buffer_length); - memset(rxF_ch_magc, 0, sizeof(c16_t) * nb_layer * buffer_length); + memset(rho, 0, sizeof(rho)); + memset(rxF_ch_maga, 0, sizeof(rxF_ch_maga)); + memset(rxF_ch_magb, 0, sizeof(rxF_ch_magb)); + memset(rxF_ch_magc, 0, sizeof(rxF_ch_magc)); for (int i = 0; i < nb_layer; i++) memset(&pusch_vars->rxdataF_comp[i*nb_rx_ant][symbol * buffer_length], 0, sizeof(int32_t) * buffer_length); @@ -1105,12 +1105,12 @@ static void inner_rx(PHY_VARS_gNB *gNB, if (rel15_ul->qam_mod_order <= 6) { nr_ulsch_compute_ML_llr(pusch_vars, symbol, - (c16_t*)&pusch_vars->rxdataF_comp[0][symbol * buffer_length], - (c16_t*)&pusch_vars->rxdataF_comp[nb_rx_ant][symbol * buffer_length], + (c16_t *)&pusch_vars->rxdataF_comp[0][symbol * buffer_length], + (c16_t *)&pusch_vars->rxdataF_comp[nb_rx_ant][symbol * buffer_length], rxF_ch_maga[0], rxF_ch_maga[1], - (c16_t*)&llr[0][pusch_vars->llr_offset[symbol]], - (c16_t*)&llr[1][pusch_vars->llr_offset[symbol]], + llr[0], + llr[1], rho[0][1], rho[1][0], pusch_vars->ul_valid_re_per_slot[symbol], @@ -1134,15 +1134,15 @@ static void inner_rx(PHY_VARS_gNB *gNB, } } if (nb_layer != 2 || rel15_ul->qam_mod_order > 6) - for (int aatx = 0; aatx < nb_layer; aatx++) - nr_ulsch_compute_llr((int32_t*)&pusch_vars->rxdataF_comp[aatx * nb_rx_ant][symbol * buffer_length], - (int32_t*)rxF_ch_maga[aatx], - (int32_t*)rxF_ch_magb[aatx], - (int32_t*)rxF_ch_magc[aatx], - &llr[aatx][pusch_vars->llr_offset[symbol]], - pusch_vars->ul_valid_re_per_slot[symbol], - symbol, - rel15_ul->qam_mod_order); + for (int aatx = 0; aatx < nb_layer; aatx++) + nr_ulsch_compute_llr((int32_t *)&pusch_vars->rxdataF_comp[aatx * nb_rx_ant][symbol * buffer_length], + (int32_t *)rxF_ch_maga[aatx], + (int32_t *)rxF_ch_magb[aatx], + (int32_t *)rxF_ch_magc[aatx], + llr[aatx], + pusch_vars->ul_valid_re_per_slot[symbol], + symbol, + rel15_ul->qam_mod_order); } typedef struct puschSymbolProc_s { @@ -1154,7 +1154,6 @@ typedef struct puschSymbolProc_s { int startSymbol; int numSymbols; int16_t *llr; - int16_t **llr_layers; int16_t *scramblingSequence; uint32_t nvar; int beam_nb; @@ -1175,6 +1174,12 @@ static void nr_pusch_symbol_processing(void *arg) if (gNB->pusch_vars[ulsch_id].ul_valid_re_per_slot[symbol] == 0) continue; int soffset = (slot % RU_RX_SLOT_DEPTH) * frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size; + int buffer_length = ceil_mod(pusch_vars->ul_valid_re_per_slot[symbol] * NR_NB_SC_PER_RB, 16); + int16_t llrs[rel15_ul->nrOfLayers][ceil_mod(buffer_length * rel15_ul->qam_mod_order, 64)]; + int16_t *llrss[rel15_ul->nrOfLayers]; + for (int l = 0; l < rel15_ul->nrOfLayers; l++) + llrss[l] = llrs[l]; + inner_rx(gNB, ulsch_id, slot, @@ -1182,8 +1187,8 @@ static void nr_pusch_symbol_processing(void *arg) pusch_vars, rel15_ul, gNB->common_vars.rxdataF[rdata->beam_nb], - (c16_t**)gNB->pusch_vars[ulsch_id].ul_ch_estimates, - rdata->llr_layers, + (c16_t **)gNB->pusch_vars[ulsch_id].ul_ch_estimates, + llrss, soffset, gNB->pusch_vars[ulsch_id].ul_valid_re_per_slot[symbol], symbol, @@ -1192,13 +1197,14 @@ static void nr_pusch_symbol_processing(void *arg) int nb_re_pusch = gNB->pusch_vars[ulsch_id].ul_valid_re_per_slot[symbol]; // layer de-mapping - int16_t* llr_ptr = &rdata->llr_layers[0][pusch_vars->llr_offset[symbol]]; + int16_t *llr_ptr = llrs[0]; if (rel15_ul->nrOfLayers != 1) { llr_ptr = &rdata->llr[pusch_vars->llr_offset[symbol] * rel15_ul->nrOfLayers]; - for (int i = 0; i < (nb_re_pusch); i++) - for (int l = 0; l < rel15_ul->nrOfLayers; l++) - for (int m = 0; m < rel15_ul->qam_mod_order; m++) - llr_ptr[i*rel15_ul->nrOfLayers*rel15_ul->qam_mod_order+l*rel15_ul->qam_mod_order+m] = rdata->llr_layers[l][pusch_vars->llr_offset[symbol] + i*rel15_ul->qam_mod_order+m]; + for (int i = 0; i < (nb_re_pusch); i++) + for (int l = 0; l < rel15_ul->nrOfLayers; l++) + for (int m = 0; m < rel15_ul->qam_mod_order; m++) + llr_ptr[i * rel15_ul->nrOfLayers * rel15_ul->qam_mod_order + l * rel15_ul->qam_mod_order + m] = + llrss[l][i * rel15_ul->qam_mod_order + m]; } // unscrambling int16_t *llr16 = (int16_t*)&rdata->llr[pusch_vars->llr_offset[symbol] * rel15_ul->nrOfLayers]; @@ -1499,7 +1505,6 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, rdata->numSymbols = task_index == loop_iter - 1 ? rel15_ul->nr_of_symbols - (loop_iter - 1) * numSymbols : numSymbols; rdata->ulsch_id = ulsch_id; rdata->llr = pusch_vars->llr; - rdata->llr_layers = pusch_vars->llr_layers; rdata->scramblingSequence = scramblingSequence; rdata->nvar = nvar; rdata->beam_nb = beam_nb; diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c index 286386297f..ef935e4269 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c @@ -79,7 +79,7 @@ void nr_ulsch_compute_llr(int32_t *rxdataF_comp, * Output: * stream0_out: Output LLRs for 1st stream */ -void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, c16_t *stream0_out, c16_t *rho01, uint32_t length) +void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, int16_t *stream0_out, c16_t *rho01, uint32_t length) { #ifdef USE_128BIT simde__m128i *rho01_128i = (simde__m128i *)rho01; @@ -610,7 +610,7 @@ void nr_ulsch_qam16_qam16(c16_t *stream0_in, c16_t *stream1_in, c16_t *ch_mag, c16_t *ch_mag_i, - c16_t *stream0_out, + int16_t *stream0_out, c16_t *rho01, uint32_t length) { @@ -1076,7 +1076,7 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in, c16_t *stream1_in, c16_t *ch_mag, c16_t *ch_mag_i, - c16_t *stream0_out, + int16_t *stream0_out, c16_t *rho01, uint32_t length) { @@ -1415,15 +1415,13 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in, simde__m128i y2i = simde_mm_subs_epi16(logmax_num_re0, logmax_den_re0); // Map to output stream, difficult to do in SIMD since we have 6 16bit LLRs - int idx0 = 12 * i; for (int re = 0; re < 8; re++) { - stream0_out[idx0 + 0].r = ((short *)&y0r)[re]; - stream0_out[idx0 + 0].i = ((short *)&y1r)[re]; - stream0_out[idx0 + 1].r = ((short *)&y2r)[re]; - stream0_out[idx0 + 1].i = ((short *)&y0i)[re]; - stream0_out[idx0 + 2].r = ((short *)&y1i)[re]; - stream0_out[idx0 + 2].i = ((short *)&y2i)[re]; - idx0 += 3; + *stream0_out++ = ((short *)&y0r)[re]; + *stream0_out++ = ((short *)&y1r)[re]; + *stream0_out++ = ((short *)&y2r)[re]; + *stream0_out++ = ((short *)&y0i)[re]; + *stream0_out++ = ((short *)&y1i)[re]; + *stream0_out++ = ((short *)&y2i)[re]; } } #else @@ -1763,36 +1761,39 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in, simde__m256i y2i = simde_mm256_subs_epi16(logmax_num_re0, logmax_den_re0); // Map to output stream, difficult to do in SIMD since we have 6 16bit LLRs - int idx0 = 24 * i; for (int re = 0; re < 16; re++) { - stream0_out[idx0 + 0].r = ((short *)&y0r)[re]; - stream0_out[idx0 + 0].i = ((short *)&y1r)[re]; - stream0_out[idx0 + 1].r = ((short *)&y2r)[re]; - stream0_out[idx0 + 1].i = ((short *)&y0i)[re]; - stream0_out[idx0 + 2].r = ((short *)&y1i)[re]; - stream0_out[idx0 + 2].i = ((short *)&y2i)[re]; - idx0 += 3; + *stream0_out++ = ((short *)&y0r)[re]; + *stream0_out++ = ((short *)&y1r)[re]; + *stream0_out++ = ((short *)&y2r)[re]; + *stream0_out++ = ((short *)&y0i)[re]; + *stream0_out++ = ((short *)&y1i)[re]; + *stream0_out++ = ((short *)&y2i)[re]; } } #endif } -static void nr_ulsch_shift_llr(int16_t **llr_layers, uint32_t nb_re, uint32_t rxdataF_ext_offset, uint8_t mod_order, int shift) +static void nr_ulsch_shift_llr(int16_t *llr_layer0, + int16_t *llr_layer1, + uint32_t nb_re, + uint32_t rxdataF_ext_offset, + uint8_t mod_order, + int shift) { - simde__m128i *llr_layers0 = (simde__m128i *)&llr_layers[0][rxdataF_ext_offset * mod_order]; - simde__m128i *llr_layers1 = (simde__m128i *)&llr_layers[1][rxdataF_ext_offset * mod_order]; + simde__m128i *llr_layers0 = (simde__m128i *)llr_layer0; + simde__m128i *llr_layers1 = (simde__m128i *)llr_layer1; uint8_t mem_offset = ((16 - ((long)llr_layers0)) & 0xF) >> 2; if (mem_offset > 0) { - c16_t *llr_layers0_c16 = (c16_t *)&llr_layers[0][rxdataF_ext_offset * mod_order]; - c16_t *llr_layers1_c16 = (c16_t *)&llr_layers[1][rxdataF_ext_offset * mod_order]; + c16_t *llr_layers0_c16 = (c16_t *)llr_layer0; + c16_t *llr_layers1_c16 = (c16_t *)llr_layer1; for (int i = 0; i < mem_offset; i++) { llr_layers0_c16[i] = c16Shift(llr_layers0_c16[i], shift); llr_layers1_c16[i] = c16Shift(llr_layers1_c16[i], shift); } - llr_layers0 = (simde__m128i *)&llr_layers[0][rxdataF_ext_offset * mod_order + (mem_offset << 1)]; - llr_layers1 = (simde__m128i *)&llr_layers[1][rxdataF_ext_offset * mod_order + (mem_offset << 1)]; + llr_layers0 = (simde__m128i *)&llr_layer0[mem_offset * 2]; + llr_layers1 = (simde__m128i *)&llr_layer1[mem_offset * 2]; } for (int i = 0; i < nb_re >> 2; i++) { @@ -1803,14 +1804,14 @@ static void nr_ulsch_shift_llr(int16_t **llr_layers, uint32_t nb_re, uint32_t rx void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, uint32_t symbol, - c16_t* rxdataF_comp0, - c16_t* rxdataF_comp1, - c16_t* ul_ch_mag0, - c16_t* ul_ch_mag1, - c16_t* llr_layers0, - c16_t* llr_layers1, - c16_t* rho0, - c16_t* rho1, + c16_t *rxdataF_comp0, + c16_t *rxdataF_comp1, + c16_t *ul_ch_mag0, + c16_t *ul_ch_mag1, + int16_t *llr_layers0, + int16_t *llr_layers1, + c16_t *rho0, + c16_t *rho1, uint32_t nb_re, uint8_t mod_order) { @@ -1818,7 +1819,7 @@ void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, case 2: nr_ulsch_qpsk_qpsk(rxdataF_comp0, rxdataF_comp1, llr_layers0, rho0, nb_re); nr_ulsch_qpsk_qpsk(rxdataF_comp1, rxdataF_comp0, llr_layers1, rho1, nb_re); - nr_ulsch_shift_llr(pusch_vars->llr_layers, nb_re, pusch_vars->llr_offset[symbol] >> 1, 2, 4); + nr_ulsch_shift_llr((int16_t *)llr_layers0, (int16_t *)llr_layers1, nb_re, pusch_vars->llr_offset[symbol] >> 1, 2, 4); break; case 4: nr_ulsch_qam16_qam16(rxdataF_comp0, rxdataF_comp1, ul_ch_mag0, ul_ch_mag1, llr_layers0, rho0, nb_re); diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 2ec081d825..1f7fe8707d 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1096,7 +1096,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, *ch_ls_ptr++ = rdmrs_gold[i]; } } - c16_t ch_temp[128] __attribute__((aligned(32))) = {0}; + c16_t ch_temp[128] __attribute__((aligned(32))); delay_t delay = {0}; nr_est_delay(128, ch_ls, ch_temp, &delay); diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 40bae6eac7..e585c28d04 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -1121,7 +1121,6 @@ void NFAPI_NR_DMRS_TYPE1_linear_interp(NR_DL_FRAME_PARMS *frame_parms, } c16_t ch_estimates_time[frame_parms->ofdm_symbol_size] __attribute__((aligned(32))); - memset(ch_estimates_time, 0, sizeof(ch_estimates_time)); nr_est_delay(frame_parms->ofdm_symbol_size, dl_ls_est, ch_estimates_time, delay); int delay_idx = get_delay_idx(delay->est_delay, MAX_DELAY_COMP); c16_t *dl_delay_table = frame_parms->delay_table[delay_idx]; @@ -1282,7 +1281,6 @@ void NFAPI_NR_DMRS_TYPE2_linear_interp(NR_DL_FRAME_PARMS *frame_parms, } c16_t ch_estimates_time[frame_parms->ofdm_symbol_size] __attribute__((aligned(32))); - memset(ch_estimates_time, 0, sizeof(ch_estimates_time)); nr_est_delay(frame_parms->ofdm_symbol_size, dl_ls_est, ch_estimates_time, delay); int delay_idx = get_delay_idx(delay->est_delay, MAX_DELAY_COMP); c16_t *dl_delay_table = frame_parms->delay_table[delay_idx]; diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index da89b41960..abf3db9451 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -456,9 +456,8 @@ static void timeSignal (OAIgraph_t *graph, PHY_VARS_gNB *phy_vars_gnb, RU_t *phy */ static void timeResponse (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { - const int len = p->gNB->frame_parms.ofdm_symbol_size; - if (!len) - // gnb not yet initialized, many race conditions in the scope + scopeGraphData_t *val = p->liveData[gNBulDelay]; + if (!val || !val->dataSize) return; #ifdef WEBSRVSCOPE websrv_scopedata_msg_t *msg = NULL; @@ -466,38 +465,25 @@ static void timeResponse (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { float *values = (float *)msg->data_xy; #else float *values, *time; - oai_xygraph_getbuff(graph, &time, &values, len, 0); + oai_xygraph_getbuff(graph, &time, &values, val->lineSz, 0); #endif - const int ant = 0; // display antenna 0 for each UE + // We display UEs randomly, with one buffer + c16_t *samples = (c16_t *)(val + 1); + for (int i = 0; i < val->lineSz; i++) { + values[i] = SquaredNorm(samples[i]); + } #ifdef WEBSRVSCOPE int uestart = nb_UEs - 1; // web scope shows one UE signal, that can be selected from GUI + msg->header.msgtype = SCOPEMSG_TYPE_DATA; + msg->header.chartid = graph->chartid; + msg->header.datasetid = graph->datasetid; + msg->header.msgseg = 0; + msg->header.update = 1; + websrv_scope_senddata(val->lineSz, 4, msg); #else - int uestart = 0; // xforms scope designed to display nb_UEs signals + oai_xygraph(graph, time, values, val->lineSz, 0, 10); #endif - for (int ue = uestart; ue < nb_UEs; ue++) { - if (p->gNB->pusch_vars && - p->gNB->pusch_vars[ue].ul_ch_estimates_time && - p->gNB->pusch_vars[ue].ul_ch_estimates_time[ant] ) { - scopeSample_t *data= (scopeSample_t *)p->gNB->pusch_vars[ue].ul_ch_estimates_time[ant]; - - if (data != NULL) { - for (int i=0; iheader.msgtype = SCOPEMSG_TYPE_DATA; - msg->header.chartid = graph->chartid; - msg->header.datasetid = graph->datasetid; - msg->header.msgseg = 0; - msg->header.update = 1; - websrv_scope_senddata(len, 4, msg); -#else - oai_xygraph(graph,time,values, len, ue, 10); -#endif - } - } - } } static void gNBfreqWaterFall (OAIgraph_t *graph, scopeData_t *p, int nb_UEs) { diff --git a/openair1/PHY/TOOLS/phy_scope_interface.h b/openair1/PHY/TOOLS/phy_scope_interface.h index 59e7d93dd9..181bf5985b 100644 --- a/openair1/PHY/TOOLS/phy_scope_interface.h +++ b/openair1/PHY/TOOLS/phy_scope_interface.h @@ -70,6 +70,7 @@ enum scopeDataType { psbchDlChEstimateTime, psbchLlr, psbchRxdataF_comp, + gNBulDelay, MAX_SCOPE_TYPES, gNBPuschRxIq = MAX_SCOPE_TYPES, gNBPuschLlr, diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 47d41db44b..0c5a96e6db 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -296,12 +296,7 @@ typedef struct { int32_t debugBuff_sample_offset; } NR_gNB_COMMON; - typedef struct { - /// \brief Hold the channel estimates in time domain based on DRS. - /// - first index: rx antenna id [0..nb_antennas_rx[ - /// - second index: ? [0..4*ofdm_symbol_size[ - int32_t **ul_ch_estimates_time; /// \brief Hold the channel estimates in frequency domain based on DRS. /// - first index: rx antenna id [0..nb_antennas_rx[ /// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ @@ -323,10 +318,6 @@ typedef struct { /// \brief llr values. /// - first index: ? [0..1179743] (hard coded) int16_t *llr; - /// \brief llr values per layer. - /// - first index: ? [0..3] (hard coded) - /// - first index: ? [0..1179743] (hard coded) - int16_t **llr_layers; // PTRS symbol index, to be updated every PTRS symbol within a slot. uint8_t ptrs_symbol_index; /// bit mask of PT-RS ofdm symbol indicies @@ -577,28 +568,6 @@ union puschSymbolReqUnion { uint64_t p; }; -typedef struct puschAntennaProc_s { - unsigned char Ns; - int nl; - unsigned short p; - unsigned char symbol; - unsigned short bwp_start_subcarrier; - int aarx; - int beam_nb; - int numAntennas; - nfapi_nr_pusch_pdu_t *pusch_pdu; - int *max_ch; - c16_t *pilot; - int *nest_count; - uint64_t *noise_amp2; - delay_t *delay; - int chest_freq; - NR_gNB_PUSCH *pusch_vars; - NR_DL_FRAME_PARMS *frame_parms; - c16_t ***rxdataF; - task_ans_t* ans; -} puschAntennaProc_t; - struct puschAntennaReqId { uint16_t ul_id; uint16_t spare; diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index ecd863de0c..2cb2b3d8e6 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -237,8 +237,6 @@ typedef struct { /// estimated frequency offset (in radians) for all subcarriers int32_t freq_offset; - /// nid2 is the PSS value, the PCI (physical cell id) will be: 3*NID1 (SSS value) + NID2 (PSS value) - int32_t nid2; } NR_UE_COMMON; #define NR_PRS_IDFT_OVERSAMP_FACTOR 1 // IDFT oversampling factor for NR PRS channel estimates in time domain, ALLOWED value 16x, and 1x is default(ie. IDFT size is frame_params->ofdm_symbol_size) @@ -413,12 +411,6 @@ typedef struct PHY_VARS_NR_UE_s { uint32_t PF; uint32_t PO; -#if defined(UPGRADE_RAT_NR) - - /// demodulation reference signal for NR PBCH - uint32_t dmrs_pbch_bitmap_nr[DMRS_PBCH_I_SSB][DMRS_PBCH_N_HF][DMRS_BITMAP_SIZE]; - -#endif // Scrambling IDs used in PUSCH DMRS c16_t X_u[64][839]; @@ -476,15 +468,6 @@ typedef struct PHY_VARS_NR_UE_s { int ta_slot; int ta_command; - /// Flag to tell if UE is secondary user (cognitive mode) - unsigned char is_secondary_ue; - /// Flag to tell if secondary gNB has channel estimates to create NULL-beams from. - unsigned char has_valid_precoder; - /// hold the precoder for NULL beam to the primary gNB - int **ul_precoder_S_UE; - /// holds the maximum channel/precoder coefficient - char log2_maxp; - /// Flag to initialize averaging of PHY measurements int init_averaging; @@ -504,17 +487,6 @@ typedef struct PHY_VARS_NR_UE_s { /// CSI variables nr_csi_info_t *nr_csi_info; - //#if defined(UPGRADE_RAT_NR) -#if 1 - SystemInformationBlockType1_nr_t systemInformationBlockType1_nr; -#endif - - //#if defined(UPGRADE_RAT_NR) -#if 1 - scheduling_request_config_t scheduling_request_config_nr[NUMBER_OF_CONNECTED_gNB_MAX]; - -#endif - uint32_t use_ia_receiver; // TODO: move this out of phy time_stats_t ue_ul_indication_stats; nr_ue_phy_cpu_stat_t phy_cpu_stats; @@ -522,11 +494,6 @@ typedef struct PHY_VARS_NR_UE_s { /// RF and Interface devices per CC openair0_device rfdevice; -#if ENABLE_RAL - hash_table_t *ral_thresholds_timed; - SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX]; - SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX]; -#endif void* scopeData; // Pointers to hold PDSCH data only for phy simulators void *phy_sim_rxdataF; diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index da01d7e639..7a3f59504d 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -218,16 +218,8 @@ struct NR_DL_FRAME_PARMS { c16_t delay_table[2 * MAX_DELAY_COMP + 1][NR_MAX_OFDM_SYMBOL_SIZE]; /// Table used to apply the delay compensation in PUCCH2 c16_t delay_table128[2 * MAX_DELAY_COMP + 1][128]; - /// SRS configuration from TS 38.331 RRC - SRS_NR srs_nr; /// Power used by SSB in order to estimate signal strength and path loss int ss_PBCH_BlockPower; - /// for NR TDD management - TDD_UL_DL_configCommon_t *p_tdd_UL_DL_Configuration; - - TDD_UL_DL_configCommon_t *p_tdd_UL_DL_ConfigurationCommon2; - - TDD_UL_DL_SlotConfig_t *p_TDD_UL_DL_ConfigDedicated; /// TDD configuration uint16_t tdd_uplink_nr[2*NR_MAX_SLOTS_PER_FRAME]; /* this is a bitmap of symbol of each slot given for 2 frames */ diff --git a/openair1/PHY/nr_phy_common/src/nr_phy_common.c b/openair1/PHY/nr_phy_common/src/nr_phy_common.c index 9aa45e20b3..140d6a043a 100644 --- a/openair1/PHY/nr_phy_common/src/nr_phy_common.c +++ b/openair1/PHY/nr_phy_common/src/nr_phy_common.c @@ -20,7 +20,6 @@ */ #include "nr_phy_common.h" - #ifdef __aarch64__ #define USE_128BIT #endif @@ -363,7 +362,7 @@ void freq2time(uint16_t ofdm_symbol_size, int16_t *freq_signal, int16_t *time_si void nr_est_delay(int ofdm_symbol_size, const c16_t *ls_est, c16_t *ch_estimates_time, delay_t *delay) { - freq2time(ofdm_symbol_size, (int16_t *)ls_est, (int16_t *)ch_estimates_time); + idft(get_idft(ofdm_symbol_size), (int16_t *)ls_est, (int16_t *)ch_estimates_time, 1); int max_pos = delay->delay_max_pos; int max_val = delay->delay_max_val; diff --git a/openair1/SCHED_NR/phy_frame_config_nr.c b/openair1/SCHED_NR/phy_frame_config_nr.c index 63fd570b4c..085ce8e087 100644 --- a/openair1/SCHED_NR/phy_frame_config_nr.c +++ b/openair1/SCHED_NR/phy_frame_config_nr.c @@ -152,147 +152,6 @@ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs } } -/******************************************************************* -* -* NAME : add_tdd_dedicated_configuration_nr -* -* PARAMETERS : pointer to frame configuration -* -* OUTPUT: table of uplink symbol for each slot for several frames -* -* RETURN : 0 if tdd has been properly configurated -* -1 tdd configuration can not be done -* -* DESCRIPTION : generate bit map for uplink symbol for each slot for several frames -* see TS 38.213 11.1 Slot configuration -* -*********************************************************************/ - -void add_tdd_dedicated_configuration_nr(NR_DL_FRAME_PARMS *frame_parms, int slotIndex, int nrofDownlinkSymbols, int nrofUplinkSymbols) { - TDD_UL_DL_SlotConfig_t *p_TDD_UL_DL_ConfigDedicated = frame_parms->p_TDD_UL_DL_ConfigDedicated; - TDD_UL_DL_SlotConfig_t *p_previous_TDD_UL_DL_ConfigDedicated=NULL; - int next = 0; - - while (p_TDD_UL_DL_ConfigDedicated != NULL) { - p_previous_TDD_UL_DL_ConfigDedicated = p_TDD_UL_DL_ConfigDedicated; - p_TDD_UL_DL_ConfigDedicated = (TDD_UL_DL_SlotConfig_t *)(p_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig); - next = 1; - } - - p_TDD_UL_DL_ConfigDedicated = calloc( 1, sizeof(TDD_UL_DL_SlotConfig_t)); - - //printf("allocate pt %p \n", p_TDD_UL_DL_ConfigDedicated); - if (p_TDD_UL_DL_ConfigDedicated == NULL) { - printf("Error test_frame_configuration: memory allocation problem \n"); - assert(0); - } - - if (next == 0) { - frame_parms->p_TDD_UL_DL_ConfigDedicated = p_TDD_UL_DL_ConfigDedicated; - } else { - p_previous_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig = (TDD_UL_DL_SlotConfig_t *)p_TDD_UL_DL_ConfigDedicated; - } - - p_TDD_UL_DL_ConfigDedicated->slotIndex = slotIndex; - p_TDD_UL_DL_ConfigDedicated->nrofDownlinkSymbols = nrofDownlinkSymbols; - p_TDD_UL_DL_ConfigDedicated->nrofUplinkSymbols = nrofUplinkSymbols; -} - -/******************************************************************* -* -* NAME : set_tdd_configuration_dedicated_nr -* -* PARAMETERS : pointer to frame configuration -* -* OUTPUT: table of uplink symbol for each slot for several frames -* -* RETURN : 0 if tdd has been properly configurated -* -1 tdd configuration can not be done -* -* DESCRIPTION : generate bit map for uplink symbol for each slot for several frames -* see TS 38.213 11.1 Slot configuration -* -*********************************************************************/ - -int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms) { - TDD_UL_DL_SlotConfig_t *p_current_TDD_UL_DL_SlotConfig; - p_current_TDD_UL_DL_SlotConfig = frame_parms->p_TDD_UL_DL_ConfigDedicated; - NR_TST_PHY_PRINTF("\nSet tdd dedicated configuration\n "); - - while(p_current_TDD_UL_DL_SlotConfig != NULL) { - int slot_index = p_current_TDD_UL_DL_SlotConfig->slotIndex; - - if (slot_index < frame_parms->slots_per_frame) { - if (p_current_TDD_UL_DL_SlotConfig->nrofDownlinkSymbols != 0) { - if (p_current_TDD_UL_DL_SlotConfig->nrofDownlinkSymbols == NR_TDD_SET_ALL_SYMBOLS) { - if (p_current_TDD_UL_DL_SlotConfig->nrofUplinkSymbols == 0) { - frame_parms->tdd_uplink_nr[slot_index] = NR_TDD_DOWNLINK_SLOT; - NR_TST_PHY_PRINTF(" DL[%d] ", slot_index); - } else { - LOG_E(PHY,"set_tdd_configuration_dedicated_nr: tdd downlink & uplink symbol configuration is not supported \n"); - return (-1); - } - } else { - LOG_E(PHY,"set_tdd_configuration_dedicated_nr: tdd downlink symbol configuration is not supported \n"); - return (-1); - } - } else if (p_current_TDD_UL_DL_SlotConfig->nrofUplinkSymbols != 0) { - if (p_current_TDD_UL_DL_SlotConfig->nrofUplinkSymbols == NR_TDD_SET_ALL_SYMBOLS) { - frame_parms->tdd_uplink_nr[slot_index] = NR_TDD_UPLINK_SLOT; - NR_TST_PHY_PRINTF(" UL[%d] ", slot_index); - } else { - LOG_E(PHY,"set_tdd_configuration_dedicated_nr: tdd uplink symbol configuration is not supported \n"); - return (-1); - } - } else { - LOG_E(PHY,"set_tdd_configuration_dedicated_nr: no tdd symbol configuration is specified \n"); - return (-1); - } - } else { - LOG_E(PHY,"set_tdd_configuration_dedicated_nr: tdd slot index exceeds maximum value \n"); - return (-1); - } - - p_current_TDD_UL_DL_SlotConfig = (TDD_UL_DL_SlotConfig_t *)(p_current_TDD_UL_DL_SlotConfig->p_next_TDD_UL_DL_SlotConfig); - } - - NR_TST_PHY_PRINTF("\n"); - return (0); -} - -/******************************************************************* -* -* NAME : set_tdd_configuration -* -* PARAMETERS : pointer to tdd common configuration -* pointer to tdd common configuration2 -* pointer to tdd dedicated configuration -* -* OUTPUT: table of uplink symbol for each slot for 2 frames -* -* RETURN : 0 if srs sequence has been successfully generated -* -1 if sequence can not be properly generated -* -* DESCRIPTION : generate bit map for uplink symbol for each slot for 2 frames -* see TS 38.213 11.1 Slot configuration -* -*********************************************************************/ - -int get_next_downlink_slot(PHY_VARS_gNB *gNB, nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot) { - - int slot = nr_slot; - int frame = nr_frame; - int slots_per_frame = gNB->frame_parms.slots_per_frame; - while (true) { - slot++; - if (slot/slots_per_frame) frame++; - slot %= slots_per_frame; - int slot_type = nr_slot_select(cfg, frame, slot); - if (slot_type == NR_DOWNLINK_SLOT || slot_type == NR_MIXED_SLOT) return slot; - AssertFatal(frame < (nr_frame+2), "Something went worng. This shouldn't happen\n"); - } -} - int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot) { (void) nr_frame; @@ -329,70 +188,6 @@ int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot } } -/******************************************************************* -* -* NAME : free_tdd_configuration_nr -* -* PARAMETERS : pointer to frame configuration -* -* RETURN : none -* -* DESCRIPTION : free structure related to tdd configuration -* -*********************************************************************/ - -void free_tdd_configuration_nr(NR_DL_FRAME_PARMS *frame_parms) { - TDD_UL_DL_configCommon_t *p_tdd_UL_DL_Configuration = frame_parms->p_tdd_UL_DL_Configuration; - free_tdd_configuration_dedicated_nr(frame_parms); - - if (p_tdd_UL_DL_Configuration != NULL) { - frame_parms->p_tdd_UL_DL_Configuration = NULL; - free(p_tdd_UL_DL_Configuration); - } - - for (int number_of_slot = 0; number_of_slot < NR_MAX_SLOTS_PER_FRAME; number_of_slot++) { - frame_parms->tdd_uplink_nr[number_of_slot] = NR_TDD_DOWNLINK_SLOT; - } -} - -/******************************************************************* -* -* NAME : free_tdd_configuration_dedicated_nr -* -* PARAMETERS : pointer to frame configuration -* -* RETURN : none -* -* DESCRIPTION : free structure related to tdd dedicated configuration -* -*********************************************************************/ - -void free_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms) { - TDD_UL_DL_SlotConfig_t *p_current_TDD_UL_DL_ConfigDedicated = frame_parms->p_TDD_UL_DL_ConfigDedicated; - TDD_UL_DL_SlotConfig_t *p_next_TDD_UL_DL_ConfigDedicated; - int next = 0; - - if (p_current_TDD_UL_DL_ConfigDedicated != NULL) { - do { - if (p_current_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig != NULL) { - next = 1; - p_next_TDD_UL_DL_ConfigDedicated = (TDD_UL_DL_SlotConfig_t *)(p_current_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig); - p_current_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig = NULL; - //printf("free pt %p \n", p_current_TDD_UL_DL_ConfigDedicated); - free(p_current_TDD_UL_DL_ConfigDedicated); - p_current_TDD_UL_DL_ConfigDedicated = p_next_TDD_UL_DL_ConfigDedicated; - } else { - if (p_current_TDD_UL_DL_ConfigDedicated != NULL) { - frame_parms->p_TDD_UL_DL_ConfigDedicated = NULL; - //printf("free pt %p \n", p_current_TDD_UL_DL_ConfigDedicated); - free(p_current_TDD_UL_DL_ConfigDedicated); - next = 0; - } - } - } while (next); - } -} - void do_tdd_config_sim(PHY_VARS_gNB *gNB, int mu) { frame_structure_t fs = {.frame_type = TDD}; diff --git a/openair1/SCHED_NR/phy_frame_config_nr.h b/openair1/SCHED_NR/phy_frame_config_nr.h index 0caf612f37..11ae4bf5c6 100644 --- a/openair1/SCHED_NR/phy_frame_config_nr.h +++ b/openair1/SCHED_NR/phy_frame_config_nr.h @@ -47,27 +47,6 @@ */ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs); -/** \brief This function adds a slot configuration to current dedicated configuration for nr - * @param frame_parms NR DL Frame parameters - * @param slotIndex - * @param nrofDownlinkSymbols - * @param nrofUplinkSymbols - @returns none */ - -void add_tdd_dedicated_configuration_nr(NR_DL_FRAME_PARMS *frame_parms, int slotIndex, - int nrofDownlinkSymbols, int nrofUplinkSymbols); - -/** \brief This function processes tdd dedicated configuration for nr - * @param frame_parms nr frame parameters - * @param dl_UL_TransmissionPeriodicity periodicity - * @param nrofDownlinkSlots number of downlink slots - * @param nrofDownlinkSymbols number of downlink symbols - * @param nrofUplinkSlots number of uplink slots - * @param nrofUplinkSymbols number of uplink symbols - @returns 0 if tdd dedicated configuration has been properly set or -1 on error with message */ - -int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms); - /** \brief This function checks nr slot direction : downlink or uplink * @param frame_parms NR DL Frame parameters * @param nr_frame : frame number @@ -76,20 +55,6 @@ int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms); int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot); -/** \brief This function frees tdd configuration for nr - * @param frame_parms NR DL Frame parameters - @returns none */ - -void free_tdd_configuration_nr(NR_DL_FRAME_PARMS *frame_parms); - -/** \brief This function frees tdd dedicated configuration for nr - * @param frame_parms NR DL Frame parameters - @returns none */ - -void free_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms); - -int get_next_downlink_slot(PHY_VARS_gNB *gNB, nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot); - void do_tdd_config_sim(PHY_VARS_gNB *gNB, int mu); #endif /* PHY_FRAME_CONFIG_NR_H */ diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 4f1f8ff010..f0d5d95fb3 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -316,7 +316,7 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; int nb_pusch = 0; - for (uint8_t ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) { + for (int ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) { if (ulsch_to_decode[ULSCH_id]) { nb_pusch++; } @@ -329,7 +329,7 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo uint8_t ULSCH_ids[nb_pusch]; uint32_t G[nb_pusch]; int pusch_id = 0; - for (uint8_t ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) { + for (int ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) { if (ulsch_to_decode[ULSCH_id]) { diff --git a/openair1/SCHED_NR_UE/phy_frame_config_nr.h b/openair1/SCHED_NR_UE/phy_frame_config_nr.h deleted file mode 100644 index 359722a7be..0000000000 --- a/openair1/SCHED_NR_UE/phy_frame_config_nr.h +++ /dev/null @@ -1,90 +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 - */ - -/*********************************************************************** -* -* FILENAME : phy_frame_configuration_nr.h -* -* DESCRIPTION : functions related to FDD/TDD configuration for NR -* see TS 38.213 11.1 Slot configuration -* and TS 38.331 for RRC configuration -* -************************************************************************/ - -#ifndef PHY_FRAME_CONFIG_NR_UE_H -#define PHY_FRAME_CONFIG_NR_UE_H - -/************** DEFINE ********************************************/ - -/*************** FUNCTIONS *****************************************/ - - -/** \brief This function adds a slot configuration to current dedicated configuration for nr - * @param frame_parms NR DL Frame parameters - * @param slotIndex - * @param nrofDownlinkSymbols - * @param nrofUplinkSymbols - @returns none */ - -void add_tdd_dedicated_configuration_nr(NR_DL_FRAME_PARMS *frame_parms, int slotIndex, - int nrofDownlinkSymbols, int nrofUplinkSymbols); - -/** \brief This function processes tdd dedicated configuration for nr - * @param frame_parms nr frame parameters - * @param dl_UL_TransmissionPeriodicity periodicity - * @param nrofDownlinkSlots number of downlink slots - * @param nrofDownlinkSymbols number of downlink symbols - * @param nrofUplinkSlots number of uplink slots - * @param nrofUplinkSymbols number of uplink symbols - @returns 0 if tdd dedicated configuration has been properly set or -1 on error with message */ - -int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms); - -/** \brief This function checks nr slot direction : downlink or uplink - * @param frame_parms NR DL Frame parameters - * @param nr_frame : frame number - * @param nr_slot : slot number - @returns int : downlink or uplink */ - -int slot_select_nr(NR_DL_FRAME_PARMS *frame_parms, int nr_frame, int nr_slot); - -/** \brief This function checks nr UE slot direction : downlink or uplink - * @param cfg : FAPI Config Request - * @param nr_frame : frame number - * @param nr_slot : slot number - @returns int : downlink, uplink or mixed slot type */ - -int nr_ue_slot_select(const fapi_nr_config_request_t *cfg, int nr_slot); - -/** \brief This function frees tdd configuration for nr - * @param frame_parms NR DL Frame parameters - @returns none */ - -void free_tdd_configuration_nr(NR_DL_FRAME_PARMS *frame_parms); - -/** \brief This function frees tdd dedicated configuration for nr - * @param frame_parms NR DL Frame parameters - @returns none */ - -void free_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms); - -#endif /* PHY_FRAME_CONFIG_NR_H */ - diff --git a/openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c b/openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c deleted file mode 100644 index 6f7391bd68..0000000000 --- a/openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c +++ /dev/null @@ -1,136 +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 - */ - -/*********************************************************************** -* -* FILENAME : phy_frame_configuration_nr_ue.c -* -* DESCRIPTION : functions related to FDD/TDD configuration for NR -* see TS 38.213 11.1 Slot configuration -* and TS 38.331 for RRC configuration -* -************************************************************************/ - -#include "PHY/defs_nr_UE.h" - -/******************************************************************* -* -* NAME : nr_ue_slot_select -* -* DESCRIPTION : function for the UE equivalent to nr_slot_select -* -*********************************************************************/ - -int nr_ue_slot_select(const fapi_nr_config_request_t *cfg, int nr_slot) -{ - if (cfg->cell_config.frame_duplex_type == FDD) - return NR_UPLINK_SLOT | NR_DOWNLINK_SLOT; - - const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table; - int rel_slot = nr_slot % tdd_table->tdd_period_in_slots; - - if (tdd_table->max_tdd_periodicity_list == NULL) // this happens before receiving TDD configuration - return NR_DOWNLINK_SLOT; - - const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot]; - - // if the 1st symbol is UL the whole slot is UL - if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 1) - return NR_UPLINK_SLOT; - - // if the 1st symbol is flexible the whole slot is mixed - if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 2) - return NR_MIXED_SLOT; - - for (int i = 1; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT; i++) { - // if the 1st symbol is DL and any other is not, the slot is mixed - if (current_slot->max_num_of_symbol_per_slot_list[i].slot_config != 0) { - return NR_MIXED_SLOT; - } - } - - // if here, all the symbols where DL - return NR_DOWNLINK_SLOT; -} - -/* - * This function determines if the mixed slot is a Sidelink slot - */ -uint8_t sl_determine_if_sidelink_slot(uint8_t sl_startsym, uint8_t sl_lensym, uint8_t num_ulsym) -{ - uint8_t ul_startsym = NR_NUMBER_OF_SYMBOLS_PER_SLOT - num_ulsym; - - if ((sl_startsym >= ul_startsym) && (sl_lensym <= NR_NUMBER_OF_SYMBOLS_PER_SLOT)) { - LOG_D(MAC, - "MIXED SLOT is a SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n", - sl_startsym, - sl_lensym - 1, - ul_startsym, - ul_startsym + num_ulsym - 1); - return NR_SIDELINK_SLOT; - } else { - LOG_D(MAC, - "MIXED SLOT is NOT SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n", - sl_startsym, - sl_lensym - 1, - ul_startsym, - ul_startsym + num_ulsym - 1); - return 0; - } -} - -/* - * This function determines if the Slot is a SIDELINK SLOT - * Every Uplink Slot is a Sidelink slot - * Mixed Slot is a sidelink slot if the uplink symbols in Mixed slot - * overlaps with Sidelink start symbol and number of symbols. - */ -int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int slot, uint8_t frame_duplex_type) -{ - int ul_sym = 0, slot_type = 0; - - // All PC5 bands are TDD bands , hence handling only TDD in this function. - AssertFatal(frame_duplex_type == TDD, "No Sidelink operation defined for FDD in 3GPP rel16\n"); - - if (cfg->tdd_table.max_tdd_periodicity_list == NULL) { // this happens before receiving TDD configuration - return slot_type; - } - - int period = cfg->tdd_table.tdd_period_in_slots; - int rel_slot = slot % period; - const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table; - - const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot]; - - for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) { - if (current_slot->max_num_of_symbol_per_slot_list[symbol_count].slot_config == 1) { - ul_sym++; - } - } - - if (ul_sym == NR_NUMBER_OF_SYMBOLS_PER_SLOT) { - slot_type = NR_SIDELINK_SLOT; - } else if (ul_sym) { - slot_type = sl_determine_if_sidelink_slot(cfg->sl_bwp_config.sl_start_symbol, cfg->sl_bwp_config.sl_num_symbols, ul_sym); - } - - return slot_type; -} diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index 977970c9f7..14adffad9b 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -100,6 +100,10 @@ configmodule_interface_t *uniqCfg = NULL; int main(int argc, char **argv) { + stop = false; + __attribute__((unused)) struct sigaction oldaction; + sigaction(SIGINT, &sigint_action, &oldaction); + int i; double SNR, SNR_lin, snr0 = -2.0, snr1 = 2.0; double snr_step = 0.1; @@ -519,11 +523,11 @@ int main(int argc, char **argv) nr_dlsch_encoding(gNB, &msgDataTx, frame, slot, frame_parms, output, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } - for (SNR = snr0; SNR < snr1; SNR += snr_step) { + for (SNR = snr0; SNR < snr1 && !stop; SNR += snr_step) { n_errors = 0; n_false_positive = 0; - for (trial = 0; trial < n_trials; trial++) { + for (trial = 0; trial < n_trials && !stop; trial++) { for (i = 0; i < available_bits; i++) { #ifdef DEBUG_CODER if ((i&0xf)==0) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 76c8881945..95c32bdb94 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -266,6 +266,10 @@ int NB_UE_INST = 1; configmodule_interface_t *uniqCfg = NULL; int main(int argc, char **argv) { + stop = false; + __attribute__((unused)) struct sigaction oldaction; + sigaction(SIGINT, &sigint_action, &oldaction); + FILE *csv_file = NULL; char *filename_csv = NULL; setbuf(stdout, NULL); @@ -955,7 +959,7 @@ printf("%d\n", slot); fprintf(csv_file,"avg_round,eff_rate,eff_throughput,TBS\n"); } //--------------- - for (SNR = snr0; SNR < snr1; SNR += .2) { + for (SNR = snr0; SNR < snr1 && !stop; SNR += .2) { varArray_t *table_tx=initVarArray(1000,sizeof(double)); reset_meas(&gNB->phy_proc_tx); @@ -985,7 +989,7 @@ printf("%d\n", slot); n_false_positive = 0; if (n_trials== 1) num_rounds = 1; - for (trial = 0; trial < n_trials; trial++) { + for (trial = 0; trial < n_trials && !stop; trial++) { errors_bit = 0; //multipath channel @@ -1016,7 +1020,7 @@ printf("%d\n", slot); memset(Sched_INFO, 0, sizeof(*Sched_INFO)); Sched_INFO->sched_response_id = -1; - while (round < num_rounds && !UE_harq_process->decodeResult) { + while (round < num_rounds && !UE_harq_process->decodeResult && !stop) { round_trials[round]++; clear_nr_nfapi_information(RC.nrmac[0], 0, frame, slot, &Sched_INFO->DL_req, &Sched_INFO->TX_req, &Sched_INFO->UL_dci_req); diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c deleted file mode 100644 index 973aa60930..0000000000 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c +++ /dev/null @@ -1,75 +0,0 @@ -#include "nfapi/oai_integration/vendor_ext.h" -#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h" -#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" -#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h" -#include "openair1/PHY/defs_nr_UE.h" -#include "position_interface.h" - -int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return (0); } -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) { return (0); } -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) { return (0); } -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) { return (0); } -int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return (0); } -int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return (0); } -int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return (0); } -int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return (0); } -int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return 0; } - -void handle_nr_slot_ind(uint16_t sfn, uint16_t slot) { } - -int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; } -int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; } -int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; } -int unpack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; } -void get_position_coordinates(int Mod_id, position_t *position) {} -int32_t get_uldl_offset(int nr_bandP) { return (0); } - -void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) {} -void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) {} -int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen, nfapi_p7_codec_config_t* config) { return 0; } -int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t* config) { return 0; } -int nfapi_p7_message_header_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config) { return 0; } - -void nr_mac_rrc_sync_ind(const module_id_t module_id, - const frame_t frame, - const bool in_sync) {} - -void nr_mac_rrc_msg3_ind(const module_id_t mod_id, int rnti, int gnb_id) {} - -void nr_mac_rrc_ra_ind(const module_id_t mod_id, bool success) {} - -void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id) {} - -void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP, - const rb_id_t Srb_id, - const sdu_size_t sdu_sizeP, - const uint8_t *const buffer_pP) { } - -typedef uint32_t channel_t; -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, - const uint8_t gNB_index, - const frame_t frame, - const int slot, - const rnti_t rnti, - const uint32_t cellid, - const long arfcn, - const channel_t channel, - const uint8_t* pduP, - const sdu_size_t pdu_len) { return 0; } -void *rrc_nrue(void *notUsed) -{ - return NULL; -} -int8_t nr_mac_rrc_sl_mib_ind(const module_id_t module_id, - const int CC_id, - const uint8_t gNB_index, - const frame_t frame, - const int slot, - const int channel, - const uint8_t *pduP, - const sdu_size_t pdu_len, - const uint16_t rx_slss_id) -{ - return 1; -} diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_common.c b/openair1/SIMULATION/NR_PHY/nr_unitary_common.c new file mode 100644 index 0000000000..6e23a67d25 --- /dev/null +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_common.c @@ -0,0 +1,192 @@ +/* + * 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 openair1/SIMULATION/NR_PHY/nr_unitary_common.c + * \brief common functions to NR PHY unitary tests + * \company EURECOM + */ +#include "nfapi/oai_integration/vendor_ext.h" +#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h" +#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" +#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h" +#include "openair1/PHY/defs_nr_UE.h" +#include "position_interface.h" + +// Define signal handler to attempt graceful termination +bool stop = false; + +void sigint_handler(int arg) +{ + static const char msg[] = "\nCaught SIGINT, shutting down\nPress again CTRL+C to force shutdown\n"; + __attribute__((unused)) int unused = write(STDOUT_FILENO, msg, sizeof(msg) - 1); + + stop = true; +} + +int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) +{ + return (0); +} +int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) +{ + return (0); +} +int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) +{ + return (0); +} +int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) +{ + return (0); +} +int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) +{ + return (0); +} +int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) +{ + return (0); +} +int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) +{ + return (0); +} +int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) +{ + return (0); +} +int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) +{ + return 0; +} + +void handle_nr_slot_ind(uint16_t sfn, uint16_t slot) +{ +} + +int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) +{ + return 0; +} +int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) +{ + return 0; +} +int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) +{ + return 0; +} +int unpack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, + uint32_t messageBufLen, + void *pUnpackedBuf, + uint32_t unpackedBufLen) +{ + return 0; +} +void get_position_coordinates(int Mod_id, position_t *position) +{ +} +int32_t get_uldl_offset(int nr_bandP) +{ + return (0); +} + +void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) +{ +} +void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) +{ +} +int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen, nfapi_p7_codec_config_t *config) +{ + return 0; +} +int nfapi_nr_p7_message_unpack(void *pMessageBuf, + uint32_t messageBufLen, + void *pUnpackedBuf, + uint32_t unpackedBufLen, + nfapi_p7_codec_config_t *config) +{ + return 0; +} +int nfapi_p7_message_header_unpack(void *pMessageBuf, + uint32_t messageBufLen, + void *pUnpackedBuf, + uint32_t unpackedBufLen, + nfapi_p7_codec_config_t *config) +{ + return 0; +} + +void nr_mac_rrc_sync_ind(const module_id_t module_id, const frame_t frame, const bool in_sync) +{ +} + +void nr_mac_rrc_msg3_ind(const module_id_t mod_id, int rnti, int gnb_id) +{ +} + +void nr_mac_rrc_ra_ind(const module_id_t mod_id, bool success) +{ +} + +void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id) +{ +} + +void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP, + const rb_id_t Srb_id, + const sdu_size_t sdu_sizeP, + const uint8_t *const buffer_pP) +{ +} + +typedef uint32_t channel_t; +int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, + const int CC_id, + const uint8_t gNB_index, + const frame_t frame, + const int slot, + const rnti_t rnti, + const uint32_t cellid, + const long arfcn, + const channel_t channel, + const uint8_t *pduP, + const sdu_size_t pdu_len) +{ + return 0; +} +void *rrc_nrue(void *notUsed) +{ + return NULL; +} +int8_t nr_mac_rrc_sl_mib_ind(const module_id_t module_id, + const int CC_id, + const uint8_t gNB_index, + const frame_t frame, + const int slot, + const int channel, + const uint8_t *pduP, + const sdu_size_t pdu_len, + const uint16_t rx_slss_id) +{ + return 1; +} diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h index 504b6a8ed5..74fbf1051b 100644 --- a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h @@ -28,7 +28,7 @@ * \email turker.yilmaz@eurecom.fr * \note * \warning -*/ + */ #ifndef __NR_UNITARY_DEFS__H__ #define __NR_UNITARY_DEFS__H__ @@ -36,15 +36,26 @@ #include "NR_ServingCellConfigCommon.h" #include "NR_ServingCellConfig.h" -int oai_exit=0; +// Define signal handler to attempt graceful termination +extern bool stop; -void exit_function(const char* file, const char* function, const int line, const char *s, const int assert) { - const char * msg= s==NULL ? "no comment": s; +void sigint_handler(int arg); + +const struct sigaction sigint_action = {.sa_handler = sigint_handler, + // restore handler to default upon entry to the signal handler + .sa_flags = SA_RESETHAND}; + +int oai_exit = 0; + +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ + const char *msg = s == NULL ? "no comment" : s; printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); exit(-1); } -signed char quantize(double D, double x, unsigned char B) { +signed char quantize(double D, double x, unsigned char B) +{ double qxd; short maxlev; qxd = floor(x / D); @@ -55,18 +66,27 @@ signed char quantize(double D, double x, unsigned char B) { else if (qxd >= maxlev) qxd = maxlev - 1; - return ((char) qxd); + return ((char)qxd); } -int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind) {return(0);} -//NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);} -int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); } +int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind) +{ + return (0); +} +// NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);} +int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) +{ + return (0); +} -void fill_scc_sim(NR_ServingCellConfigCommon_t *scc,uint64_t *ssb_bitmap,int N_RB_DL,int N_RB_UL,int mu_dl,int mu_ul); -void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap); +void fill_scc_sim(NR_ServingCellConfigCommon_t *scc, uint64_t *ssb_bitmap, int N_RB_DL, int N_RB_UL, int mu_dl, int mu_ul); +void fix_scc(NR_ServingCellConfigCommon_t *scc, uint64_t ssbmap); void prepare_scc(NR_ServingCellConfigCommon_t *scc); void prepare_msgA_scc(NR_ServingCellConfigCommon_t *scc); void prepare_scd(NR_ServingCellConfig_t *scd); -uint32_t ngap_generate_gNB_id(void) {return 0;} +uint32_t ngap_generate_gNB_id(void) +{ + return 0; +} #endif diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index b8ebf2bb30..d032a9d53c 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -126,6 +126,10 @@ int nr_ue_pdcch_procedures(PHY_VARS_NR_UE *ue, configmodule_interface_t *uniqCfg = NULL; int main(int argc, char **argv) { + stop = false; + __attribute__((unused)) struct sigaction oldaction; + sigaction(SIGINT, &sigint_action, &oldaction); + int i,aa,start_symbol; double sigma2, sigma2_dB=10,SNR,snr0=-2.0,snr1=2.0; double cfo=0; @@ -623,12 +627,12 @@ int main(int argc, char **argv) printf("txlev %d (%f)\n",txlev,10*log10(txlev));*/ - for (SNR=snr0; SNRnb_antennas_tx; aa++) { diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index eb3537650b..93f77649e2 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -129,6 +129,10 @@ int NB_UE_INST = 1; configmodule_interface_t *uniqCfg = NULL; int main(int argc, char **argv){ + stop = false; + __attribute__((unused)) struct sigaction oldaction; + sigaction(SIGINT, &sigint_action, &oldaction); + get_softmodem_params()->sl_mode = 0; double sigma2, sigma2_dB = 0, SNR, snr0 = -2.0, snr1 = 0.0, ue_speed0 = 0.0, ue_speed1 = 0.0; double **s_re, **s_im, **r_re, **r_im, iqim = 0.0, delay_avg = 0, ue_speed = 0, fs=-1, bw; @@ -481,7 +485,7 @@ int main(int argc, char **argv){ gNB->gNB_config.prach_config.num_prach_fd_occasions_list = (nfapi_nr_num_prach_fd_occasions_t *) malloc(num_prach_fd_occasions*sizeof(nfapi_nr_num_prach_fd_occasions_t)); gNB->proc.slot_rx = slot; - frequency_range_t freq_range = absoluteFrequencyPointA > 2016666 ? FR2 : FR1; + frequency_range_t freq_range = get_freq_range_from_arfcn(absoluteFrequencyPointA); nr_prach_info_t prach_info = get_nr_prach_occasion_info_from_index(config_index, freq_range, frame_parms->frame_type); int ret = get_nr_prach_sched_from_info(prach_info, config_index, @@ -716,15 +720,15 @@ int main(int argc, char **argv){ uint16_t preamble_rx, preamble_energy; - for (SNR=snr0; SNRmax_Doppler = 1.9076e9*(ue_speed/3.6)/3e8; printf("n_frames %d SNR %f\n",n_frames,SNR); prach_errors=0; - for (trial=0; trialofdm_offset_divisor = 8; nr_dump_frame_parms(fp); @@ -307,6 +304,10 @@ double cpuf; configmodule_interface_t *uniqCfg = NULL; int main(int argc, char **argv) { + stop = false; + __attribute__((unused)) struct sigaction oldaction; + sigaction(SIGINT, &sigint_action, &oldaction); + int test_freqdomain_loopback = 0, test_slss_search = 0; int frame = 5, slot = 10, frame_tx = 0, slot_tx = 0; int loglvl = OAILOG_INFO; @@ -578,8 +579,8 @@ int main(int argc, char **argv) phy_procedures_nrUE_SL_TX(UE_TX, &proc, &phy_data_tx); - for (SNR = snr0; SNR >= snr1; SNR -= 1) { - for (int trial = 0; trial < n_trials; trial++) { + for (SNR = snr0; SNR >= snr1 && !stop; SNR -= 1) { + for (int trial = 0; trial < n_trials && !stop; trial++) { for (int i = 0; i < frame_length_complex_samples; i++) { for (int aa = 0; aa < frame_parms->nb_antennas_tx; aa++) { struct complex16 *txdata_ptr = (struct complex16 *)&UE_TX->common_vars.txData[aa][i]; diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index bc022d5bc1..2d97a6a536 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -95,6 +95,10 @@ nrUE_params_t *get_nrUE_params(void) { configmodule_interface_t *uniqCfg = NULL; int main(int argc, char **argv) { + stop = false; + __attribute__((unused)) struct sigaction oldaction; + sigaction(SIGINT, &sigint_action, &oldaction); + int i;//,l; double sigma2, sigma2_dB=10,SNR,snr0=-2.0,snr1=2.0; double cfo=0; @@ -546,12 +550,12 @@ int main(int argc, char **argv) pucch_GroupHopping_t PUCCH_GroupHopping = pucch_tx_pdu.group_hop_flag + (pucch_tx_pdu.sequence_hop_flag<<1); double tx_level_fp = 100.0; c16_t **rxdataF = gNB->common_vars.rxdataF[0]; - for(SNR = snr0; SNR <= snr1; SNR += 1) { + for(SNR = snr0; SNR <= snr1 && !stop; SNR += 1) { ack_nack_errors=0; sr_errors = 0; n_errors = 0; c16_t **txdataF = gNB->common_vars.txdataF[0]; - for (trial=0; trialofdm_symbol_size*sizeof(int)); if(format==0 && do_DTX==0){ diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index fcc986e92c..6e157ac57e 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -99,6 +99,10 @@ nrUE_params_t *get_nrUE_params(void) { configmodule_interface_t *uniqCfg = NULL; int main(int argc, char **argv) { + stop = false; + __attribute__((unused)) struct sigaction oldaction; + sigaction(SIGINT, &sigint_action, &oldaction); + int i; double SNR, snr0 = -2.0, snr1 = 2.0, SNR_lin; double snr_step = 0.1; @@ -444,6 +448,7 @@ int main(int argc, char **argv) NR_gNB_ULSCH_t *ulsch_gNB = &gNB->ulsch[UE_id]; NR_UL_gNB_HARQ_t *harq_process_gNB = ulsch_gNB->harq_process; nfapi_nr_pusch_pdu_t *rel15_ul = &harq_process_gNB->ulsch_pdu; + NR_gNB_PUSCH *pusch_vars = &gNB->pusch_vars[UE_id]; nr_phy_data_tx_t phy_data = {0}; NR_UE_ULSCH_t *ulsch_ue = &phy_data.ulsch; @@ -471,7 +476,6 @@ int main(int argc, char **argv) /////////////////////////////////////////////////// double modulated_input[16 * 68 * 384]; // [hna] 16 segments, 68*Zc - short channel_output_fixed[16 * 68 * 384]; short channel_output_uncoded[16 * 68 * 384]; unsigned int errors_bit_uncoded = 0; @@ -521,13 +525,14 @@ int main(int argc, char **argv) /////////// //////////////////////////////////////////////////////////////////// - for (SNR = snr0; SNR < snr1; SNR += snr_step) { + for (SNR = snr0; SNR < snr1 && !stop; SNR += snr_step) { + errors_bit_uncoded = 0; n_errors = 0; n_false_positive = 0; - for (trial = 0; trial < n_trials; trial++) { - - errors_bit_uncoded = 0; + for (trial = 0; trial < n_trials && !stop; trial++) { + memset(pusch_vars->llr, 0, (8 * ((3 * 8 * 6144) + 12)) * sizeof(int16_t)); + harq_process_gNB->harq_to_be_cleared = true; for (i = 0; i < available_bits; i++) { @@ -551,16 +556,16 @@ int main(int argc, char **argv) #if 1 SNR_lin = pow(10, SNR / 10.0); sigma = 1.0 / sqrt(2 * SNR_lin); - channel_output_fixed[i] = (short) quantize(sigma / 4.0 / 4.0, - modulated_input[i] + sigma * gaussdouble(0.0, 1.0), - qbits); + pusch_vars->llr[i] = (int16_t) quantize(sigma / 4.0 / 4.0, + modulated_input[i] + sigma * gaussdouble(0.0, 1.0), + qbits); #else - channel_output_fixed[i] = (short) quantize(0.01, modulated_input[i], qbits); + pusch_vars->llr[i] = (int16_t) quantize(0.01, modulated_input[i], qbits); #endif - //printf("channel_output_fixed[%d]: %d\n",i,channel_output_fixed[i]); + //printf("pusch_vars->llr[%d]: %d\n", i, pusch_vars->llr[i]); //Uncoded BER - if (channel_output_fixed[i] < 0) + if (pusch_vars->llr[i] < 0) channel_output_uncoded[i] = 1; //QPSK demod else channel_output_uncoded[i] = 0; @@ -577,14 +582,19 @@ int main(int argc, char **argv) exit(-1); #endif nr_ulsch_decoding(gNB, frame_parms, frame, subframe, &G, &UE_id, 1); - bool crc_valid = check_crc(harq_process_gNB->b, lenWithCrc(1, (harq_process_gNB->TBS) << 3), crcType(1, (harq_process_gNB->TBS) << 3)); - if (!crc_valid) { + if (harq_process_gNB->processedSegments == harq_process_gNB->C) { + bool crc_valid = check_crc(harq_process_gNB->b, lenWithCrc(1, (harq_process_gNB->TBS) << 3), crcType(1, (harq_process_gNB->TBS) << 3)); + if (!crc_valid) { + n_false_positive++; + } + } else { n_errors++; } } printf("*****************************************\n"); - printf("SNR %f, BLER %f (false positive %f)\n", SNR, + printf("SNR %f, uncoded BER %f, BLER %f (false positive %f)\n", SNR, + (float) errors_bit_uncoded / (float) available_bits / (float) n_trials, (float) n_errors / (float) n_trials, (float) n_false_positive / (float) n_trials); printf("*****************************************\n"); diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 4013951cab..276b1f3500 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -166,6 +166,10 @@ int NB_UE_INST = 1; configmodule_interface_t *uniqCfg = NULL; int main(int argc, char *argv[]) { + stop = false; + __attribute__((unused)) struct sigaction oldaction; + sigaction(SIGINT, &sigint_action, &oldaction); + FILE *csv_file = NULL; char *filename_csv = NULL; int i; @@ -973,7 +977,7 @@ int main(int argc, char *argv[]) //--------------- int ret = 1; int srs_ret = do_SRS; - for (SNR = snr0; SNR <= snr1; SNR += snr_step) { + for (SNR = snr0; SNR <= snr1 && !stop; SNR += snr_step) { varArray_t *table_rx=initVarArray(1000,sizeof(double)); int error_flag = 0; @@ -1012,13 +1016,13 @@ int main(int argc, char *argv[]) int64_t sum_srs_snr = 0; int srs_snr_count = 0; - for (trial = 0; trial < n_trials; trial++) { + for (trial = 0; trial < n_trials && !stop; trial++) { uint8_t round = 0; crc_status = 1; errors_decoding = 0; - while (round < max_rounds && crc_status) { + while (round < max_rounds && crc_status && !stop) { round_trials[round]++; rv_index = nr_get_rv(round % 4); @@ -1322,13 +1326,6 @@ int main(int argc, char *argv[]) 1, 1); - LOG_M("rxsigF0_llrlayers0.m", - "rxsF0_llrlayers0", - &pusch_vars->llr_layers[0][0], - (nb_symb_sch - 1) * NR_NB_SC_PER_RB * pusch_pdu->rb_size * mod_order, - 1, - 0); - if (precod_nbr_layers == 2) { LOG_M("chestF3.m", @@ -1344,13 +1341,6 @@ int main(int argc, char *argv[]) nb_symb_sch * (off + (NR_NB_SC_PER_RB * pusch_pdu->rb_size)), 1, 1); - - LOG_M("rxsigF0_llrlayers1.m", - "rxsF0_llrlayers1", - &pusch_vars->llr_layers[1][0], - (nb_symb_sch - 1) * NR_NB_SC_PER_RB * pusch_pdu->rb_size * mod_order, - 1, - 0); } if (precod_nbr_layers == 4) { @@ -1392,24 +1382,6 @@ int main(int argc, char *argv[]) nb_symb_sch * (off + (NR_NB_SC_PER_RB * pusch_pdu->rb_size)), 1, 1); - LOG_M("rxsigF0_llrlayers1.m", - "rxsF0_llrlayers1", - &pusch_vars->llr_layers[1][0], - (nb_symb_sch - 1) * NR_NB_SC_PER_RB * pusch_pdu->rb_size * mod_order, - 1, - 0); - LOG_M("rxsigF0_llrlayers2.m", - "rxsF0_llrlayers2", - &pusch_vars->llr_layers[2][0], - (nb_symb_sch - 1) * NR_NB_SC_PER_RB * pusch_pdu->rb_size * mod_order, - 1, - 0); - LOG_M("rxsigF0_llrlayers3.m", - "rxsF0_llrlayers3", - &pusch_vars->llr_layers[3][0], - (nb_symb_sch - 1) * NR_NB_SC_PER_RB * pusch_pdu->rb_size * mod_order, - 1, - 0); } LOG_M("rxsigF0_llr.m", diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeLists.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeLists.txt deleted file mode 100644 index 849b483ec6..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeLists.txt +++ /dev/null @@ -1,103 +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 -# */ - -cmake_minimum_required(VERSION 2.8) - -set(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} -O0 -g -Wextra -march=native" -) - -add_definitions("-DUPGRADE_RAT_NR") -add_definitions("-DDEBUG_PSS_NR") -add_definitions("-DDEBUG_SSS_NR") -add_definitions("-DNR_UNIT_TEST") - -set(PACKAGE_NAME "Testbench for unitary tests") -set(PHYSIM True) -set(RF_BOARD None) -set(XFORMS False) -set(ENABLE_ITTI False) -set(DEBUG_PHY False) -set(DEBUG_PSS True) -set(DEBUG_PHY True) -set(DEBUG_PHY_PROC False) -set(DEBUG_DLSCH True) -set(T_TRACER False) - -# standard cmake file for nr ue build -include(../../../../../CMakeLists.txt) - - -set(SRC_UNIT_TESTS - ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c - ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c - ) - -set(INC_UNIT_TESTS - ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.h - ) - -add_executable(pss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_test.c ${SRC_UNIT_TESTS} ) -target_link_libraries(pss_test - -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group - pthread m ${ATLAS_LIBRARIES} - ) - -add_executable(sss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c ${SRC_UNIT_TESTS} ) -target_link_libraries(sss_test - -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group - pthread m ${ATLAS_LIBRARIES} - ) - -add_executable(frame_config_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c ${SRC_UNIT_TESTS} ) -target_link_libraries(frame_config_test - -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group - pthread m ${ATLAS_LIBRARIES} - ) - -add_executable(harq_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/harq_test.c ${SRC_UNIT_TESTS} ) -target_link_libraries(harq_test - -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group - pthread m ${ATLAS_LIBRARIES} - ) - -add_executable(srs_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c ${SRC_UNIT_TESTS} ) -target_link_libraries(srs_test - -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group - pthread m ${ATLAS_LIBRARIES} - ) - -add_executable(pbch_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c ${SRC_UNIT_TESTS} ) -target_link_libraries(pbch_test - -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group - pthread m ${ATLAS_LIBRARIES} - ) - -add_executable(pucch_uci_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c ${SRC_UNIT_TESTS} ) -target_link_libraries(pucch_uci_test - -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group - pthread m ${ATLAS_LIBRARIES} - ) -add_executable(pucch_uci_generator_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_generator_test.c ${SRC_UNIT_TESTS} ) -target_link_libraries(pucch_uci_generator_test - -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group - pthread m ${ATLAS_LIBRARIES} - ) \ No newline at end of file diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/frame_config_test.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/frame_config_test.txt deleted file mode 100644 index f9e5da9a4e..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/frame_config_test.txt +++ /dev/null @@ -1,180 +0,0 @@ - FRAME CONFIGURATION TEST --------------------------- -log init done -Start lte_param_init, frame_type 0, extended_prefix 0 -[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0 -Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1 -[PHY][E][set_tdd_config_nr] set_tdd_configuration_nr: given period is inconsistent with current tdd configuration - -Tdd configuration tti 2 downlink 5 uplink 1 period 2500 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] D - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] D - -[PHY][E][set_tdd_config_nr] set_tdd_configuration_nr: given period is inconsistent with current tdd configuration - -Tdd configuration tti 2 downlink 4 uplink 2 period 2500 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] D - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] D - -[PHY][E][set_tdd_config_nr] set_tdd_configuration_nr: given period is inconsistent with current tdd configuration - -Tdd configuration tti 2 downlink 4 uplink 1 period 500 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] D - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] D - - -Tdd configuration tti 1 downlink 1 uplink 1 period 2000 - [ 0] D [ 1] U [ 2] D [ 3] U [ 4] D [ 5] U [ 6] D [ 7] U [ 8] D [ 9] U [ 10] D [ 11] U [ 12] D [ 13] U [ 14] D [ 15] U [ 16] D [ 17] U [ 18] D [ 19] U - - -Tdd configuration tti 1 downlink 4 uplink 1 period 5000 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - - -Tdd configuration tti 1 downlink 9 uplink 1 period 10000 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - - -Tdd configuration tti 2 downlink 1 uplink 1 period 1000 - [ 0] D [ 1] U [ 2] D [ 3] U [ 4] D [ 5] U [ 6] D [ 7] U [ 8] D [ 9] U [ 10] D [ 11] U [ 12] D [ 13] U [ 14] D [ 15] U [ 16] D [ 17] U [ 18] D [ 19] U - [ 20] D [ 21] U [ 22] D [ 23] U [ 24] D [ 25] U [ 26] D [ 27] U [ 28] D [ 29] U [ 30] D [ 31] U [ 32] D [ 33] U [ 34] D [ 35] U [ 36] D [ 37] U [ 38] D [ 39] U - - -Tdd configuration tti 2 downlink 3 uplink 1 period 2000 - [ 0] D [ 1] D [ 2] D [ 3] U [ 4] D [ 5] D [ 6] D [ 7] U [ 8] D [ 9] D [ 10] D [ 11] U [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] U [ 24] D [ 25] D [ 26] D [ 27] U [ 28] D [ 29] D [ 30] D [ 31] U [ 32] D [ 33] D [ 34] D [ 35] U [ 36] D [ 37] D [ 38] D [ 39] U - - -Tdd configuration tti 2 downlink 4 uplink 1 period 2500 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - - -Tdd configuration tti 2 downlink 9 uplink 1 period 5000 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - - -Tdd configuration tti 2 downlink 19 uplink 1 period 10000 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - - -Tdd configuration tti 4 downlink 1 uplink 1 period 500 - [ 0] D [ 1] U [ 2] D [ 3] U [ 4] D [ 5] U [ 6] D [ 7] U [ 8] D [ 9] U [ 10] D [ 11] U [ 12] D [ 13] U [ 14] D [ 15] U [ 16] D [ 17] U [ 18] D [ 19] U - [ 20] D [ 21] U [ 22] D [ 23] U [ 24] D [ 25] U [ 26] D [ 27] U [ 28] D [ 29] U [ 30] D [ 31] U [ 32] D [ 33] U [ 34] D [ 35] U [ 36] D [ 37] U [ 38] D [ 39] U - [ 40] D [ 41] U [ 42] D [ 43] U [ 44] D [ 45] U [ 46] D [ 47] U [ 48] D [ 49] U [ 50] D [ 51] U [ 52] D [ 53] U [ 54] D [ 55] U [ 56] D [ 57] U [ 58] D [ 59] U - [ 60] D [ 61] U [ 62] D [ 63] U [ 64] D [ 65] U [ 66] D [ 67] U [ 68] D [ 69] U [ 70] D [ 71] U [ 72] D [ 73] U [ 74] D [ 75] U [ 76] D [ 77] U [ 78] D [ 79] U - - -Tdd configuration tti 4 downlink 3 uplink 1 period 1000 - [ 0] D [ 1] D [ 2] D [ 3] U [ 4] D [ 5] D [ 6] D [ 7] U [ 8] D [ 9] D [ 10] D [ 11] U [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] U [ 24] D [ 25] D [ 26] D [ 27] U [ 28] D [ 29] D [ 30] D [ 31] U [ 32] D [ 33] D [ 34] D [ 35] U [ 36] D [ 37] D [ 38] D [ 39] U - [ 40] D [ 41] D [ 42] D [ 43] U [ 44] D [ 45] D [ 46] D [ 47] U [ 48] D [ 49] D [ 50] D [ 51] U [ 52] D [ 53] D [ 54] D [ 55] U [ 56] D [ 57] D [ 58] D [ 59] U - [ 60] D [ 61] D [ 62] D [ 63] U [ 64] D [ 65] D [ 66] D [ 67] U [ 68] D [ 69] D [ 70] D [ 71] U [ 72] D [ 73] D [ 74] D [ 75] U [ 76] D [ 77] D [ 78] D [ 79] U - - -Tdd configuration tti 4 downlink 4 uplink 1 period 1250 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - [ 40] D [ 41] D [ 42] D [ 43] D [ 44] U [ 45] D [ 46] D [ 47] D [ 48] D [ 49] U [ 50] D [ 51] D [ 52] D [ 53] D [ 54] U [ 55] D [ 56] D [ 57] D [ 58] D [ 59] U - [ 60] D [ 61] D [ 62] D [ 63] D [ 64] U [ 65] D [ 66] D [ 67] D [ 68] D [ 69] U [ 70] D [ 71] D [ 72] D [ 73] D [ 74] U [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U - - -Tdd configuration tti 4 downlink 7 uplink 1 period 2000 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] U [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] D - [ 20] D [ 21] D [ 22] D [ 23] U [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] U [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - [ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] U [ 48] D [ 49] D [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] U [ 56] D [ 57] D [ 58] D [ 59] D - [ 60] D [ 61] D [ 62] D [ 63] U [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] D [ 70] D [ 71] U [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U - - -Tdd configuration tti 4 downlink 9 uplink 1 period 2500 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - [ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] D [ 48] D [ 49] U [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] D [ 56] D [ 57] D [ 58] D [ 59] U - [ 60] D [ 61] D [ 62] D [ 63] D [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] U [ 70] D [ 71] D [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U - - -Tdd configuration tti 4 downlink 19 uplink 1 period 5000 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - [ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] D [ 48] D [ 49] D [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] D [ 56] D [ 57] D [ 58] D [ 59] U - [ 60] D [ 61] D [ 62] D [ 63] D [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] D [ 70] D [ 71] D [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U - - -Tdd configuration tti 4 downlink 38 uplink 2 period 10000 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] D - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] U [ 39] U - [ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] D [ 48] D [ 49] D [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] D [ 56] D [ 57] D [ 58] D [ 59] D - [ 60] D [ 61] D [ 62] D [ 63] D [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] D [ 70] D [ 71] D [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] U [ 79] U - - -Tdd configuration tti 8 downlink 4 uplink 1 period 625 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - [ 40] D [ 41] D [ 42] D [ 43] D [ 44] U [ 45] D [ 46] D [ 47] D [ 48] D [ 49] U [ 50] D [ 51] D [ 52] D [ 53] D [ 54] U [ 55] D [ 56] D [ 57] D [ 58] D [ 59] U - [ 60] D [ 61] D [ 62] D [ 63] D [ 64] U [ 65] D [ 66] D [ 67] D [ 68] D [ 69] U [ 70] D [ 71] D [ 72] D [ 73] D [ 74] U [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U - [ 80] D [ 81] D [ 82] D [ 83] D [ 84] U [ 85] D [ 86] D [ 87] D [ 88] D [ 89] U [ 90] D [ 91] D [ 92] D [ 93] D [ 94] U [ 95] D [ 96] D [ 97] D [ 98] D [ 99] U - [100] D [101] D [102] D [103] D [104] U [105] D [106] D [107] D [108] D [109] U [110] D [111] D [112] D [113] D [114] U [115] D [116] D [117] D [118] D [119] U - [120] D [121] D [122] D [123] D [124] U [125] D [126] D [127] D [128] D [129] U [130] D [131] D [132] D [133] D [134] U [135] D [136] D [137] D [138] D [139] U - [140] D [141] D [142] D [143] D [144] U [145] D [146] D [147] D [148] D [149] U [150] D [151] D [152] D [153] D [154] U [155] D [156] D [157] D [158] D [159] U - - -Tdd configuration tti 16 downlink 7 uplink 1 period 500 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] U [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] D - [ 20] D [ 21] D [ 22] D [ 23] U [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] U [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - [ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] U [ 48] D [ 49] D [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] U [ 56] D [ 57] D [ 58] D [ 59] D - [ 60] D [ 61] D [ 62] D [ 63] U [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] D [ 70] D [ 71] U [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U - [ 80] D [ 81] D [ 82] D [ 83] D [ 84] D [ 85] D [ 86] D [ 87] U [ 88] D [ 89] D [ 90] D [ 91] D [ 92] D [ 93] D [ 94] D [ 95] U [ 96] D [ 97] D [ 98] D [ 99] D - [100] D [101] D [102] D [103] U [104] D [105] D [106] D [107] D [108] D [109] D [110] D [111] U [112] D [113] D [114] D [115] D [116] D [117] D [118] D [119] U - [120] D [121] D [122] D [123] D [124] D [125] D [126] D [127] U [128] D [129] D [130] D [131] D [132] D [133] D [134] D [135] U [136] D [137] D [138] D [139] D - [140] D [141] D [142] D [143] U [144] D [145] D [146] D [147] D [148] D [149] D [150] D [151] U [152] D [153] D [154] D [155] D [156] D [157] D [158] D [159] U - [160] D [161] D [162] D [163] D [164] D [165] D [166] D [167] U [168] D [169] D [170] D [171] D [172] D [173] D [174] D [175] U [176] D [177] D [178] D [179] D - [180] D [181] D [182] D [183] U [184] D [185] D [186] D [187] D [188] D [189] D [190] D [191] U [192] D [193] D [194] D [195] D [196] D [197] D [198] D [199] U - [200] D [201] D [202] D [203] D [204] D [205] D [206] D [207] U [208] D [209] D [210] D [211] D [212] D [213] D [214] D [215] U [216] D [217] D [218] D [219] D - [220] D [221] D [222] D [223] U [224] D [225] D [226] D [227] D [228] D [229] D [230] D [231] U [232] D [233] D [234] D [235] D [236] D [237] D [238] D [239] U - [240] D [241] D [242] D [243] D [244] D [245] D [246] D [247] U [248] D [249] D [250] D [251] D [252] D [253] D [254] D [255] U [256] D [257] D [258] D [259] D - [260] D [261] D [262] D [263] U [264] D [265] D [266] D [267] D [268] D [269] D [270] D [271] U [272] D [273] D [274] D [275] D [276] D [277] D [278] D [279] U - [280] D [281] D [282] D [283] D [284] D [285] D [286] D [287] U [288] D [289] D [290] D [291] D [292] D [293] D [294] D [295] U [296] D [297] D [298] D [299] D - [300] D [301] D [302] D [303] U [304] D [305] D [306] D [307] D [308] D [309] D [310] D [311] U [312] D [313] D [314] D [315] D [316] D [317] D [318] D [319] U - - -Tdd configuration tti 2 downlink 4 uplink 1 period 2500 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - - -Set tdd dedicated configuration - [PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: tdd downlink symbol configuration is not supported - -Set tdd dedicated configuration - [PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: tdd uplink symbol configuration is not supported - -Set tdd dedicated configuration - [PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: tdd slot index exceeds maximum value - -Set tdd dedicated configuration - [PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: tdd downlink & uplink symbol configuration is not supported - -Set tdd dedicated configuration - [PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: no tdd symbol configuration is specified - -Set tdd dedicated configuration - UL[0] [PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: no tdd symbol configuration is specified - -Set tdd dedicated configuration - DL[0] - -Tdd configuration tti 2 downlink 4 uplink 1 period 2500 - [ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U - [ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U - - -Set tdd dedicated configuration - UL[0] UL[5] UL[10] UL[15] UL[20] UL[25] UL[30] UL[35] DL[4] DL[9] DL[14] DL[19] DL[19] DL[24] DL[29] DL[34] DL[39] - -Tdd configuration tti 2 downlink 4 uplink 1 period 2500 - [ 0] U [ 1] D [ 2] D [ 3] D [ 4] D [ 5] U [ 6] D [ 7] D [ 8] D [ 9] D [ 10] U [ 11] D [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] D - [ 20] U [ 21] D [ 22] D [ 23] D [ 24] D [ 25] U [ 26] D [ 27] D [ 28] D [ 29] D [ 30] U [ 31] D [ 32] D [ 33] D [ 34] D [ 35] U [ 36] D [ 37] D [ 38] D [ 39] D - -Test NR FRAME CONFIGURATION is pass diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/harq_test.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/harq_test.txt deleted file mode 100644 index a2739ae68f..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/harq_test.txt +++ /dev/null @@ -1,47 +0,0 @@ - HARQ TEST ----------- -log init done -Start lte_param_init, frame_type 0, extended_prefix 0 -[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0 -Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1 - -HARQ Uplink -First sequence ndi does not toggle -[HARQ-UL-PUSCH harqId : 0] first new transmission -[HARQ-UL-PUSCH harqId : 0] retransmission -[HARQ-UL-PUSCH harqId : 0] retransmission -[HARQ-UL-PUSCH harqId : 0] retransmission -[HARQ-UL-PUSCH harqId : 0] retransmission -Second sequence ndi toggle each transmission -[HARQ-UL-PUSCH harqId : 1] first new transmission -[HARQ-UL-PUSCH harqId : 1] new transmission due to toogle of ndi -[HARQ-UL-PUSCH harqId : 1] new transmission due to toogle of ndi -[HARQ-UL-PUSCH harqId : 1] new transmission due to toogle of ndi -[HARQ-UL-PUSCH harqId : 1] new transmission due to toogle of ndi -Third sequence ndi toggle each two transmissions -[HARQ-UL-PUSCH harqId : 2] first new transmission -[HARQ-UL-PUSCH harqId : 2] retransmission -[HARQ-UL-PUSCH harqId : 2] new transmission due to toogle of ndi -[HARQ-UL-PUSCH harqId : 2] retransmission -[HARQ-UL-PUSCH harqId : 2] new transmission due to toogle of ndi - -HARQ Downlink -First sequence ndi does not toggle -[HARQ-DL-PDSCH harqId : 0] first new reception -[HARQ-DL-PDSCH harqId : 0] reception of a retransmission -[HARQ-DL-PDSCH harqId : 0] reception of a retransmission -[HARQ-DL-PDSCH harqId : 0] reception of a retransmission -[HARQ-DL-PDSCH harqId : 0] reception of a retransmission -Second sequence ndi toggle each transmission -[HARQ-DL-PDSCH harqId : 1] first new reception -[HARQ-DL-PDSCH harqId : 1] new reception due to toogle of ndi -[HARQ-DL-PDSCH harqId : 1] new reception due to toogle of ndi -[HARQ-DL-PDSCH harqId : 1] new reception due to toogle of ndi -[HARQ-DL-PDSCH harqId : 1] new reception due to toogle of ndi -Third sequence ndi toggle each two transmissions -[HARQ-DL-PDSCH harqId : 2] first new reception -[HARQ-DL-PDSCH harqId : 2] reception of a retransmission -[HARQ-DL-PDSCH harqId : 2] new reception due to toogle of ndi -[HARQ-DL-PDSCH harqId : 2] reception of a retransmission -[HARQ-DL-PDSCH harqId : 2] new reception due to toogle of ndi -Test NR HARQ is pass diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pbch_test.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pbch_test.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pss_test.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pss_test.txt deleted file mode 100644 index 936ad636d6..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pss_test.txt +++ /dev/null @@ -1,179 +0,0 @@ - PSS TEST ----------- -log init done -Start lte_param_init, frame_type 0, extended_prefix 0 -[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0 -Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1 -*********************************** - PSS NR Test synchronisation -*********************************** ------------------------------------------------- -Test nr pss with Nid2 0 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 1 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 0, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 0, val = 232105225 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 2 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 0 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 1 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 232105225 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 2 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 0 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 1 ------------------------------------------------- -Test nr pss with Nid2 1 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 230099437 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 230099437 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 1 ------------------------------------------------- -Test nr pss with Nid2 2 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 1 ------------------------------------------------- -Test nr pss with Nid2 0 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 1 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 56788, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 56788, val = 232105225 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 2 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 0 at position 56888 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 56888, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 56888, val = 232379536 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 1 at position 56888 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 56888, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 56888, val = 232105225 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 2 at position 56888 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56888, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56888, val = 231344100 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 0 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 1 ------------------------------------------------- -Test nr pss with Nid2 1 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 111112, val = 230409881 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 111112, val = 230409881 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 1 ------------------------------------------------- -Test nr pss with Nid2 2 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 1 ------------------------------------------------- -Test nr pss with Nid2 0 at position 151234 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 151236, val = 219912170 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 151236, val = 219912170 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 2 ------------------------------------------------- -Test nr pss with Nid2 1 at position 151234 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 151236, val = 219714314 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 151236, val = 219714314 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 151234 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 151236, val = 219588850 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 151236, val = 219588850 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 2 ------------------------------------------------- -Test nr pss with Nid2 0 at position 151500 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 151500, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 151500, val = 232379536 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 1 at position 151500 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 151500, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 151500, val = 232105225 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 2 at position 151500 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 151500, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 151500, val = 231344100 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 0 at position 200000 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 200000, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 200000, val = 232379536 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 1 at position 200000 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 200000, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 200000, val = 232105225 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 2 at position 200000 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 200000, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 200000, val = 231344100 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 0 at position 250004 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 250004, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 250004, val = 232379536 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 1 at position 250004 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 250004, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 250004, val = 232105225 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 2 at position 250004 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 250004, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 250004, val = 231344100 (41 dB) -PSS NR Test is pass: pss detected at right position ------------------------------------------------- -Test nr pss with Nid2 0 at position 305152 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 305148, val = 185066768 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 305148, val = 185066768 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 4 ------------------------------------------------- -Test nr pss with Nid2 1 at position 305152 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 305148, val = 185490842 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 305148, val = 185490842 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 4 ------------------------------------------------- -Test nr pss with Nid2 2 at position 305152 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 305148, val = 185637380 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 305148, val = 185637380 (41 dB) -PSS NR Test is pass with warning: pss detected with a shift of 4 - -PSS NR Number of tests : 33 Pass : 21 Pass with warning : 12 Fail : 0 - -PSS NR Synchronisaton test is terminated. - diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pucch_uci_test.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pucch_uci_test.txt deleted file mode 100644 index d14373675c..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pucch_uci_test.txt +++ /dev/null @@ -1,498 +0,0 @@ - PUCCH TEST ------------ -log init done -Start lte_param_init, frame_type 0, extended_prefix 0 -[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0 -Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1 - -------------------------------------------------------------------------------------------- - - => Test : No harq feedback on going - -Set pucch common configuration -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - - => Test : Error due to acknownlegment not set -[PHY][E][get_downlink_ack] PUCCH Downlink acknowledgment has not been set : at line 0 in function get_downlink_ack of file -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - - => Test : Error due to DAI not set -[PHY][E][get_downlink_ack] PUCCH Downlink DAI has not been set : at line 0 in function get_downlink_ack of file -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - - => Test : Error due to DAI at wrong value -[PHY][E][get_downlink_ack] PUCCH Downlink DAI has an invalid value : at line 0 in function get_downlink_ack of file -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - - => Test : Error due to ACK not ready to be send -[PHY][E][get_downlink_ack] PUCCH Downlink ack can not be transmitted : at line 0 in function get_downlink_ack of file -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - - => Test : Error due to invalid DAI value -[PHY][E][get_downlink_ack] PUCCH Downlink dai is invalid : at line 0 in function get_downlink_ack of file -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - -Set pucch common configuration - - => Test : Error due to undefined PUCCH format from common config -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -[PHY][E][select_pucch_resource] PUCCH Invalid initial resource index : at line 0 in function select_pucch_resource of file -[PHY][W][pucch_procedures_ue_nr] PUCCH No PUCCH resource found at AbsSubframe 0.4 - - => Test : Error due to PUCCH format with multiple cells not already implemented -[PHY][E][get_downlink_ack] PUCCH ACK feedback is not implemented for mutiple gNB cells : at line 0 in function get_downlink_ack of file -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - -------------------------------------------------------------------------------------------- - -Set pucch common configuration - - => Test : PUCCH format from common config in prach mode: one positive downlink ACKnowledgment -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH format 0 nb symbols total 2 uci size 1 selected format 0 -PUCCH common configuration with index 1 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 12 ) -PUCCH ( starting_prb : 0 ) ( second_hop : 99 ) ( m_0 : 4 ) ( m_CS : 6 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH format 0 nb symbols total 2 uci size 1 selected format 0 -PUCCH common configuration with index 1 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 12 ) -PUCCH ( starting_prb : 0 ) ( second_hop : 99 ) ( m_0 : 4 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from common config in dedicated mode: two positive downlink ACKnowledgments -PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2) -PUCCH format 1 nb symbols total 4 uci size 2 selected format 1 -PUCCH common configuration with index 3 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x02 ) ( ack length 2 data 0x02 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 4 ) ( nb symbols : 4 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 10 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 98 ) ( m_0 : 6 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 4 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments -PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2) -PUCCH format 1 nb symbols total 4 uci size 2 selected format 1 -PUCCH common configuration with index 3 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x00 ) ( ack length 2 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 4 ) ( nb symbols : 4 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 10 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 98 ) ( m_0 : 6 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 4 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from common config in dedicated mode: two negative downlink ACKnowledgments -PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2) -PUCCH format 1 nb symbols total 4 uci size 2 selected format 1 -PUCCH common configuration with index 3 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x00 ) ( ack length 2 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 4 ) ( nb symbols : 4 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 10 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 98 ) ( m_0 : 6 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 4 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from common config in dedicated mode: no resource is found -PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2) -[PHY][E][select_pucch_resource] PUCCH No compatible pucch format found : at line 0 in function select_pucch_resource of file -[PHY][W][pucch_procedures_ue_nr] PUCCH No PUCCH resource found at AbsSubframe 0.4 - - => Test : PUCCH format from common config in dedicated mode: no PUCCH after reset of pending harq ACKnowledgments -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - -Set default pucch dedicated configuration - -------------------------------------------------------------------------------------------- - - => Test : PUCCH format from dedicated config : pucch resource indicator is invalid -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH found resource set 0 -[PHY][E][select_pucch_resource] PUCCH Invalid pucch resource indicator: at line 0 in function select_pucch_resource of file -[PHY][W][pucch_procedures_ue_nr] PUCCH No PUCCH resource found at AbsSubframe 0.4 - - => Test : PUCCH format from dedicated config with 1 transport block : with 1 downlink ACKnowledgments and pucch resource indicator 0 -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH found resource set 0 -PUCCH format 0 nb symbols total 1 uci size 1 selected format 0 -PUCCH dedicated configuration with resource index 0 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 6 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 1 transport block : with 1 downlink ACKnowledgments and pucch resource indicator 5 -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH found resource set 0 -PUCCH format 1 nb symbols total 9 uci size 1 selected format 1 -PUCCH dedicated configuration with resource index 5 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 1 data 0x01 ) ( ack length 1 data 0x01 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 9 ) ( nb symbols : 9 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 5 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 5 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 1 transport block : with 2 downlink ACKnowledgments and pucch resource indicator 1 -PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2) -PUCCH found resource set 0 -PUCCH format 1 nb symbols total 5 uci size 2 selected format 1 -PUCCH dedicated configuration with resource index 1 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x03 ) ( ack length 2 data 0x03 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 5 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 1 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 8 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 1 transport block : with 2 downlink ACKnowledgments and pucch resource indicator 0 -PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2) -PUCCH found resource set 0 -PUCCH format 0 nb symbols total 1 uci size 2 selected format 0 -PUCCH dedicated configuration with resource index 0 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 6 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 1 transport block : with 3 downlink ACKnowledgments and pucch resource indicator 1 -PUCCH power n(3) = ( V(3) - U(3) )mod4 * N_TB(1) + N(3) -PUCCH found resource set 1 -PUCCH format 3 nb symbols total 5 uci size 3 selected format 3 -PUCCH dedicated configuration with resource index 9 -PUCCH Adjust number of prb : (N_UCI : 3 ) (payload_in_bits : 18) (N_sc_ctrl_RB : 12) (nb_symbols : 3) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 3 data 0x07 ) ( ack length 3 data 0x07 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 3 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 1 ) -PUCCH ( starting_prb : 2 ) ( second_hop : 2 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 1 transport block : with 3 downlink ACKnowledgments and pucch resource indicator 3 -PUCCH power n(3) = ( V(3) - U(3) )mod4 * N_TB(1) + N(3) -PUCCH found resource set 1 -PUCCH format 2 nb symbols total 2 uci size 3 selected format 2 -PUCCH dedicated configuration with resource index 11 -PUCCH Adjust number of prb : (N_UCI : 3 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 3 data 0x07 ) ( ack length 3 data 0x07 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 1 ) -PUCCH ( starting_prb : 2 ) ( second_hop : 2 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 6 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 1 transport block : with 4 downlink ACKnowledgments and pucch resource indicator 5 -PUCCH power n(4) = ( V(4) - U(4) )mod4 * N_TB(1) + N(4) -PUCCH found resource set 2 -PUCCH format 4 nb symbols total 9 uci size 4 selected format 3 -PUCCH dedicated configuration with resource index 21 -PUCCH Number of pucch format 4 in subframe 4 is 1 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0f ) ( ack length 4 data 0x0f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 4 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 9 ) ( nb symbols : 7 ) ( max code rate*100 : 35 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 15 ) ( occ_Index : 16 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 3 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 5 ) ( DELTA_TF : -5 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 1 transport block : with 4 downlink ACKnowledgments and pucch resource indicator 7 -PUCCH power n(4) = ( V(4) - U(4) )mod4 * N_TB(1) + N(4) -PUCCH found resource set 2 -PUCCH format 3 nb symbols total 11 uci size 4 selected format 3 -PUCCH dedicated configuration with resource index 23 -PUCCH Adjust number of prb : (N_UCI : 4 ) (payload_in_bits : 54) (N_sc_ctrl_RB : 12) (nb_symbols : 9) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0f ) ( ack length 4 data 0x0f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 11 ) ( nb symbols : 9 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 1 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -6 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 1 transport block and missed PDSCH : with 6 downlink ACKnowledgments and pucch resource indicator 5 -PUCCH power n(4) = ( V(4) - U(2) )mod4 * N_TB(1) + N(2) -PUCCH found resource set 2 -PUCCH format 4 nb symbols total 9 uci size 4 selected format 3 -PUCCH dedicated configuration with resource index 21 -PUCCH Number of pucch format 4 in subframe 4 is 2 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0a ) ( ack length 4 data 0x0a ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 4 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 9 ) ( nb symbols : 7 ) ( max code rate*100 : 35 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 15 ) ( occ_Index : 16 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 6 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 5 ) ( DELTA_TF : -2 ) ( G_b_f_c : 0 ) - -------------------------------------------------------------------------------------------- - - => Test : PUCCH format from dedicated config with 2 transport blocks : with 1 downlink ACKnowledgments and pucch resource indicator 0 -PUCCH power n(2) = ( V(1) - U(1) )mod4 * N_TB(2) + N(2) -PUCCH found resource set 0 -PUCCH format 0 nb symbols total 1 uci size 2 selected format 0 -PUCCH dedicated configuration with resource index 0 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 6 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks : with 1 downlink ACKnowledgments and pucch resource indicator 1 -PUCCH power n(2) = ( V(1) - U(1) )mod4 * N_TB(2) + N(2) -PUCCH found resource set 0 -PUCCH format 1 nb symbols total 5 uci size 2 selected format 1 -PUCCH dedicated configuration with resource index 1 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x03 ) ( ack length 2 data 0x03 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 5 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 1 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 8 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks : with 2 downlink ACKnowledgments and pucch resource indicator 3 -PUCCH power n(4) = ( V(2) - U(2) )mod4 * N_TB(2) + N(4) -PUCCH found resource set 2 -PUCCH format 2 nb symbols total 2 uci size 4 selected format 2 -PUCCH dedicated configuration with resource index 19 -PUCCH Adjust number of prb : (N_UCI : 4 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0f ) ( ack length 4 data 0x0f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 1 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks : with 2 downlink ACKnowledgments and pucch resource indicator 7 -PUCCH power n(4) = ( V(2) - U(2) )mod4 * N_TB(2) + N(4) -PUCCH found resource set 2 -PUCCH format 3 nb symbols total 11 uci size 4 selected format 3 -PUCCH dedicated configuration with resource index 23 -PUCCH Adjust number of prb : (N_UCI : 4 ) (payload_in_bits : 54) (N_sc_ctrl_RB : 12) (nb_symbols : 9) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0f ) ( ack length 4 data 0x0f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 11 ) ( nb symbols : 9 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 1 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -6 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks : with 3 downlink ACKnowledgments and pucch resource indicator 2 -PUCCH power n(6) = ( V(3) - U(3) )mod4 * N_TB(2) + N(6) -PUCCH found resource set 3 -PUCCH format 4 nb symbols total 6 uci size 6 selected format 3 -PUCCH dedicated configuration with resource index 26 -PUCCH Number of pucch format 4 in subframe 4 is 3 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 6 data 0x3f ) ( ack length 6 data 0x3f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 4 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 6 ) ( nb symbols : 4 ) ( max code rate*100 : 35 ) ( starting_symbol_index : 3 ) -PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 12 ) ( occ_Index : 13 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 11 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 5 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks : with 3 downlink ACKnowledgments and pucch resource indicator 4 -PUCCH power n(6) = ( V(3) - U(3) )mod4 * N_TB(2) + N(6) -PUCCH found resource set 3 -PUCCH format 3 nb symbols total 8 uci size 6 selected format 3 -PUCCH dedicated configuration with resource index 28 -PUCCH Adjust number of prb : (N_UCI : 6 ) (payload_in_bits : 36) (N_sc_ctrl_RB : 12) (nb_symbols : 6) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 6 data 0x3f ) ( ack length 6 data 0x3f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 8 ) ( nb symbols : 6 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 ) -PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks : with 4 downlink ACKnowledgments and pucch resource indicator 4 -PUCCH power n(8) = ( V(4) - U(4) )mod4 * N_TB(2) + N(8) -PUCCH found resource set 3 -PUCCH format 3 nb symbols total 8 uci size 8 selected format 3 -PUCCH dedicated configuration with resource index 28 -PUCCH Adjust number of prb : (N_UCI : 8 ) (payload_in_bits : 36) (N_sc_ctrl_RB : 12) (nb_symbols : 6) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 8 data 0xff ) ( ack length 8 data 0xff ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 8 ) ( nb symbols : 6 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 ) -PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 6 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -1 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks : with 4 downlink ACKnowledgments and pucch resource indicator 6 -PUCCH power n(8) = ( V(4) - U(4) )mod4 * N_TB(2) + N(8) -PUCCH found resource set 3 -PUCCH format 3 nb symbols total 10 uci size 8 selected format 3 -PUCCH dedicated configuration with resource index 30 -PUCCH Adjust number of prb : (N_UCI : 8 ) (payload_in_bits : 48) (N_sc_ctrl_RB : 12) (nb_symbols : 8) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 8 data 0xff ) ( ack length 8 data 0xff ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 10 ) ( nb symbols : 8 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 ) -PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks and 1 missed PDSCH : with 4 downlink ACKnowledgments and pucch resource indicator 4 -PUCCH power n(8) = ( V(4) - U(3) )mod4 * N_TB(2) + N(6) -PUCCH found resource set 3 -PUCCH format 3 nb symbols total 10 uci size 8 selected format 3 -PUCCH dedicated configuration with resource index 30 -PUCCH Adjust number of prb : (N_UCI : 8 ) (payload_in_bits : 48) (N_sc_ctrl_RB : 12) (nb_symbols : 8) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 8 data 0xfc ) ( ack length 8 data 0xfc ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 10 ) ( nb symbols : 8 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 ) -PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with 2 transport blocks and 2 missed PDSCH : with 4 downlink ACKnowledgments and pucch resource indicator 4 -PUCCH power n(8) = ( V(4) - U(2) )mod4 * N_TB(2) + N(4) -PUCCH found resource set 3 -PUCCH format 3 nb symbols total 10 uci size 8 selected format 3 -PUCCH dedicated configuration with resource index 30 -PUCCH Adjust number of prb : (N_UCI : 8 ) (payload_in_bits : 48) (N_sc_ctrl_RB : 12) (nb_symbols : 8) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 8 data 0xcc ) ( ack length 8 data 0xcc ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 10 ) ( nb symbols : 8 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 ) -PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 ) - -------------------------------------------------------------------------------------------- - - => Test : PUCCH format from dedicated config with only a negative scheduling request : no PUCCH should be generated -PUCCH No feedback AbsSubframe 0.4 -[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4 - - => Test : PUCCH format 0 from dedicated config with only a positive scheduling request -PUCCH found resource set 0 -PUCCH format 0 nb symbols total 1 uci size 1 selected format 0 -PUCCH dedicated configuration with resource index 0 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format 1 from dedicated config with only a positive scheduling request -PUCCH found resource set 0 -PUCCH format 1 nb symbols total 5 uci size 1 selected format 1 -PUCCH dedicated configuration with resource index 1 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 1 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 1 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 5 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 1 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 8 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - -------------------------------------------------------------------------------------------- - - => Test : PUCCH format from dedicated config with a negative scheduling request and a positive ack -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH found resource set 0 -PUCCH format 0 nb symbols total 1 uci size 2 selected format 0 -PUCCH dedicated configuration with resource index 0 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with a positive scheduling request and a positive ack -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH found resource set 0 -PUCCH format 0 nb symbols total 1 uci size 2 selected format 0 -PUCCH dedicated configuration with resource index 0 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 9 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with a positive scheduling request and a positive ack -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH found resource set 0 -PUCCH format 1 nb symbols total 5 uci size 2 selected format 1 -PUCCH dedicated configuration with resource index 1 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x01 ) ( ack length 1 data 0x01 ) ( sr length 1 value 0 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 5 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 ) -PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 1 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 8 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks -PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2) -PUCCH found resource set 1 -PUCCH format 2 nb symbols total 2 uci size 3 selected format 2 -PUCCH dedicated configuration with resource index 8 -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 3 data 0x07 ) ( ack length 2 data 0x03 ) ( sr length 1 value 1 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 1 ) -PUCCH ( starting_prb : 2 ) ( second_hop : 2 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 6 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks -PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2) -PUCCH found resource set 1 -PUCCH format 3 nb symbols total 5 uci size 3 selected format 3 -PUCCH dedicated configuration with resource index 9 -PUCCH Adjust number of prb : (N_UCI : 3 ) (payload_in_bits : 18) (N_sc_ctrl_RB : 12) (nb_symbols : 3) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 3 data 0x07 ) ( ack length 2 data 0x03 ) ( sr length 1 value 1 ) ( csi length 0 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 3 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 1 ) -PUCCH ( starting_prb : 2 ) ( second_hop : 2 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 ) - -------------------------------------------------------------------------------------------- - - => Test : PUCCH format from dedicated config with CSI alone -PUCCH found resource set 2 -PUCCH format 2 nb symbols total 2 uci size 4 selected format 2 -PUCCH dedicated configuration with resource index 16 -PUCCH Adjust number of prb : (N_UCI : 4 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0e ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 4 data : 0x0e ) -PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 1 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with ACK and CSI -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH found resource set 2 -PUCCH format 2 nb symbols total 2 uci size 5 selected format 2 -PUCCH dedicated configuration with resource index 19 -PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 9) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 5 data 0x1d ) ( ack length 1 data 0x01 ) ( sr length 0 value 0 ) ( csi length 4 data : 0x0e ) -PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 2 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 3 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with ACK, negative SR and CSI -PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1) -PUCCH found resource set 3 -PUCCH format 3 nb symbols total 7 uci size 6 selected format 3 -PUCCH dedicated configuration with resource index 27 -PUCCH Adjust number of prb : (N_UCI : 2 ) (payload_in_bits : 30) (N_sc_ctrl_RB : 12) (nb_symbols : 5) (Q_m : 2) (max_code_rate*100 : 25) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x01 ) ( ack length 1 data 0x01 ) ( sr length 1 value 0 ) ( csi length 4 data : 0x00 ) -PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 7 ) ( nb symbols : 5 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 ) -PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 1 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -6 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with negative SR and CSI -PUCCH found resource set 2 -PUCCH format 2 nb symbols total 2 uci size 5 selected format 2 -PUCCH dedicated configuration with resource index 16 -PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 9) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 5 data 0x1c ) ( ack length 0 data 0x00 ) ( sr length 1 value 0 ) ( csi length 4 data : 0x0e ) -PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 2 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 3 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 ) - - => Test : PUCCH format from dedicated config with positive SR and CSI -PUCCH found resource set 2 -PUCCH format 2 nb symbols total 2 uci size 5 selected format 2 -PUCCH dedicated configuration with resource index 16 -PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 9) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15) -PUCCH ( AbsSubframe : 0.4 ) ( total payload size 5 data 0x1d ) ( ack length 0 data 0x00 ) ( sr length 1 value 1 ) ( csi length 4 data : 0x0e ) -PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 2 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 ) -PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 ) -[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE -PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 3 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 ) - -Release default pucch dedicated configuration - -Test PUCCH is pass diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/srs_test.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/srs_test.txt deleted file mode 100644 index d42f8df510..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/srs_test.txt +++ /dev/null @@ -1,383 +0,0 @@ - SRS TEST ----------- -log init done -Start lte_param_init, frame_type 0, extended_prefix 0 -[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0 -Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1 -Ok: No detected differences for uplink reference sequences -Number of srs generations 491520 -srs period 1 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 0 slot 1 -test_srs_periodicity srs at frame 0 slot 2 -test_srs_periodicity srs at frame 0 slot 3 -test_srs_periodicity srs at frame 0 slot 4 -test_srs_periodicity srs at frame 0 slot 5 -test_srs_periodicity srs at frame 0 slot 6 -test_srs_periodicity srs at frame 0 slot 7 -test_srs_periodicity srs at frame 0 slot 8 -test_srs_periodicity srs at frame 0 slot 9 -srs period 1 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 0 slot 1 -test_srs_periodicity srs at frame 0 slot 2 -test_srs_periodicity srs at frame 0 slot 3 -test_srs_periodicity srs at frame 0 slot 4 -test_srs_periodicity srs at frame 0 slot 5 -test_srs_periodicity srs at frame 0 slot 6 -test_srs_periodicity srs at frame 0 slot 7 -test_srs_periodicity srs at frame 0 slot 8 -test_srs_periodicity srs at frame 0 slot 9 -srs period 2 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 0 slot 2 -test_srs_periodicity srs at frame 0 slot 4 -test_srs_periodicity srs at frame 0 slot 6 -test_srs_periodicity srs at frame 0 slot 8 -test_srs_periodicity srs at frame 1 slot 0 -test_srs_periodicity srs at frame 1 slot 2 -test_srs_periodicity srs at frame 1 slot 4 -test_srs_periodicity srs at frame 1 slot 6 -test_srs_periodicity srs at frame 1 slot 8 -srs period 2 offset 1 -test_srs_periodicity srs at frame 0 slot 1 -test_srs_periodicity srs at frame 0 slot 3 -test_srs_periodicity srs at frame 0 slot 5 -test_srs_periodicity srs at frame 0 slot 7 -test_srs_periodicity srs at frame 0 slot 9 -test_srs_periodicity srs at frame 1 slot 1 -test_srs_periodicity srs at frame 1 slot 3 -test_srs_periodicity srs at frame 1 slot 5 -test_srs_periodicity srs at frame 1 slot 7 -test_srs_periodicity srs at frame 1 slot 9 -srs period 4 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 0 slot 4 -test_srs_periodicity srs at frame 0 slot 8 -test_srs_periodicity srs at frame 1 slot 2 -test_srs_periodicity srs at frame 1 slot 6 -test_srs_periodicity srs at frame 2 slot 0 -test_srs_periodicity srs at frame 2 slot 4 -test_srs_periodicity srs at frame 2 slot 8 -test_srs_periodicity srs at frame 3 slot 2 -test_srs_periodicity srs at frame 3 slot 6 -srs period 4 offset 3 -test_srs_periodicity srs at frame 0 slot 3 -test_srs_periodicity srs at frame 0 slot 7 -test_srs_periodicity srs at frame 1 slot 1 -test_srs_periodicity srs at frame 1 slot 5 -test_srs_periodicity srs at frame 1 slot 9 -test_srs_periodicity srs at frame 2 slot 3 -test_srs_periodicity srs at frame 2 slot 7 -test_srs_periodicity srs at frame 3 slot 1 -test_srs_periodicity srs at frame 3 slot 5 -test_srs_periodicity srs at frame 3 slot 9 -srs period 5 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 0 slot 5 -test_srs_periodicity srs at frame 1 slot 0 -test_srs_periodicity srs at frame 1 slot 5 -test_srs_periodicity srs at frame 2 slot 0 -test_srs_periodicity srs at frame 2 slot 5 -test_srs_periodicity srs at frame 3 slot 0 -test_srs_periodicity srs at frame 3 slot 5 -test_srs_periodicity srs at frame 4 slot 0 -test_srs_periodicity srs at frame 4 slot 5 -srs period 5 offset 4 -test_srs_periodicity srs at frame 0 slot 4 -test_srs_periodicity srs at frame 0 slot 9 -test_srs_periodicity srs at frame 1 slot 4 -test_srs_periodicity srs at frame 1 slot 9 -test_srs_periodicity srs at frame 2 slot 4 -test_srs_periodicity srs at frame 2 slot 9 -test_srs_periodicity srs at frame 3 slot 4 -test_srs_periodicity srs at frame 3 slot 9 -test_srs_periodicity srs at frame 4 slot 4 -test_srs_periodicity srs at frame 4 slot 9 -srs period 8 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 0 slot 8 -test_srs_periodicity srs at frame 1 slot 6 -test_srs_periodicity srs at frame 2 slot 4 -test_srs_periodicity srs at frame 3 slot 2 -test_srs_periodicity srs at frame 4 slot 0 -test_srs_periodicity srs at frame 4 slot 8 -test_srs_periodicity srs at frame 5 slot 6 -test_srs_periodicity srs at frame 6 slot 4 -test_srs_periodicity srs at frame 7 slot 2 -srs period 8 offset 7 -test_srs_periodicity srs at frame 0 slot 7 -test_srs_periodicity srs at frame 1 slot 5 -test_srs_periodicity srs at frame 2 slot 3 -test_srs_periodicity srs at frame 3 slot 1 -test_srs_periodicity srs at frame 3 slot 9 -test_srs_periodicity srs at frame 4 slot 7 -test_srs_periodicity srs at frame 5 slot 5 -test_srs_periodicity srs at frame 6 slot 3 -test_srs_periodicity srs at frame 7 slot 1 -test_srs_periodicity srs at frame 7 slot 9 -srs period 10 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 1 slot 0 -test_srs_periodicity srs at frame 2 slot 0 -test_srs_periodicity srs at frame 3 slot 0 -test_srs_periodicity srs at frame 4 slot 0 -test_srs_periodicity srs at frame 5 slot 0 -test_srs_periodicity srs at frame 6 slot 0 -test_srs_periodicity srs at frame 7 slot 0 -test_srs_periodicity srs at frame 8 slot 0 -test_srs_periodicity srs at frame 9 slot 0 -srs period 10 offset 9 -test_srs_periodicity srs at frame 0 slot 9 -test_srs_periodicity srs at frame 1 slot 9 -test_srs_periodicity srs at frame 2 slot 9 -test_srs_periodicity srs at frame 3 slot 9 -test_srs_periodicity srs at frame 4 slot 9 -test_srs_periodicity srs at frame 5 slot 9 -test_srs_periodicity srs at frame 6 slot 9 -test_srs_periodicity srs at frame 7 slot 9 -test_srs_periodicity srs at frame 8 slot 9 -test_srs_periodicity srs at frame 9 slot 9 -srs period 16 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 1 slot 6 -test_srs_periodicity srs at frame 3 slot 2 -test_srs_periodicity srs at frame 4 slot 8 -test_srs_periodicity srs at frame 6 slot 4 -test_srs_periodicity srs at frame 8 slot 0 -test_srs_periodicity srs at frame 9 slot 6 -test_srs_periodicity srs at frame 11 slot 2 -test_srs_periodicity srs at frame 12 slot 8 -test_srs_periodicity srs at frame 14 slot 4 -srs period 16 offset 15 -test_srs_periodicity srs at frame 1 slot 5 -test_srs_periodicity srs at frame 3 slot 1 -test_srs_periodicity srs at frame 4 slot 7 -test_srs_periodicity srs at frame 6 slot 3 -test_srs_periodicity srs at frame 7 slot 9 -test_srs_periodicity srs at frame 9 slot 5 -test_srs_periodicity srs at frame 11 slot 1 -test_srs_periodicity srs at frame 12 slot 7 -test_srs_periodicity srs at frame 14 slot 3 -test_srs_periodicity srs at frame 15 slot 9 -srs period 20 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 2 slot 0 -test_srs_periodicity srs at frame 4 slot 0 -test_srs_periodicity srs at frame 6 slot 0 -test_srs_periodicity srs at frame 8 slot 0 -test_srs_periodicity srs at frame 10 slot 0 -test_srs_periodicity srs at frame 12 slot 0 -test_srs_periodicity srs at frame 14 slot 0 -test_srs_periodicity srs at frame 16 slot 0 -test_srs_periodicity srs at frame 18 slot 0 -srs period 20 offset 19 -test_srs_periodicity srs at frame 1 slot 9 -test_srs_periodicity srs at frame 3 slot 9 -test_srs_periodicity srs at frame 5 slot 9 -test_srs_periodicity srs at frame 7 slot 9 -test_srs_periodicity srs at frame 9 slot 9 -test_srs_periodicity srs at frame 11 slot 9 -test_srs_periodicity srs at frame 13 slot 9 -test_srs_periodicity srs at frame 15 slot 9 -test_srs_periodicity srs at frame 17 slot 9 -test_srs_periodicity srs at frame 19 slot 9 -srs period 32 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 3 slot 2 -test_srs_periodicity srs at frame 6 slot 4 -test_srs_periodicity srs at frame 9 slot 6 -test_srs_periodicity srs at frame 12 slot 8 -test_srs_periodicity srs at frame 16 slot 0 -test_srs_periodicity srs at frame 19 slot 2 -test_srs_periodicity srs at frame 22 slot 4 -test_srs_periodicity srs at frame 25 slot 6 -test_srs_periodicity srs at frame 28 slot 8 -srs period 32 offset 31 -test_srs_periodicity srs at frame 3 slot 1 -test_srs_periodicity srs at frame 6 slot 3 -test_srs_periodicity srs at frame 9 slot 5 -test_srs_periodicity srs at frame 12 slot 7 -test_srs_periodicity srs at frame 15 slot 9 -test_srs_periodicity srs at frame 19 slot 1 -test_srs_periodicity srs at frame 22 slot 3 -test_srs_periodicity srs at frame 25 slot 5 -test_srs_periodicity srs at frame 28 slot 7 -test_srs_periodicity srs at frame 31 slot 9 -srs period 40 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 4 slot 0 -test_srs_periodicity srs at frame 8 slot 0 -test_srs_periodicity srs at frame 12 slot 0 -test_srs_periodicity srs at frame 16 slot 0 -test_srs_periodicity srs at frame 20 slot 0 -test_srs_periodicity srs at frame 24 slot 0 -test_srs_periodicity srs at frame 28 slot 0 -test_srs_periodicity srs at frame 32 slot 0 -test_srs_periodicity srs at frame 36 slot 0 -srs period 40 offset 39 -test_srs_periodicity srs at frame 3 slot 9 -test_srs_periodicity srs at frame 7 slot 9 -test_srs_periodicity srs at frame 11 slot 9 -test_srs_periodicity srs at frame 15 slot 9 -test_srs_periodicity srs at frame 19 slot 9 -test_srs_periodicity srs at frame 23 slot 9 -test_srs_periodicity srs at frame 27 slot 9 -test_srs_periodicity srs at frame 31 slot 9 -test_srs_periodicity srs at frame 35 slot 9 -test_srs_periodicity srs at frame 39 slot 9 -srs period 64 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 6 slot 4 -test_srs_periodicity srs at frame 12 slot 8 -test_srs_periodicity srs at frame 19 slot 2 -test_srs_periodicity srs at frame 25 slot 6 -test_srs_periodicity srs at frame 32 slot 0 -test_srs_periodicity srs at frame 38 slot 4 -test_srs_periodicity srs at frame 44 slot 8 -test_srs_periodicity srs at frame 51 slot 2 -test_srs_periodicity srs at frame 57 slot 6 -srs period 64 offset 63 -test_srs_periodicity srs at frame 6 slot 3 -test_srs_periodicity srs at frame 12 slot 7 -test_srs_periodicity srs at frame 19 slot 1 -test_srs_periodicity srs at frame 25 slot 5 -test_srs_periodicity srs at frame 31 slot 9 -test_srs_periodicity srs at frame 38 slot 3 -test_srs_periodicity srs at frame 44 slot 7 -test_srs_periodicity srs at frame 51 slot 1 -test_srs_periodicity srs at frame 57 slot 5 -test_srs_periodicity srs at frame 63 slot 9 -srs period 80 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 8 slot 0 -test_srs_periodicity srs at frame 16 slot 0 -test_srs_periodicity srs at frame 24 slot 0 -test_srs_periodicity srs at frame 32 slot 0 -test_srs_periodicity srs at frame 40 slot 0 -test_srs_periodicity srs at frame 48 slot 0 -test_srs_periodicity srs at frame 56 slot 0 -test_srs_periodicity srs at frame 64 slot 0 -test_srs_periodicity srs at frame 72 slot 0 -srs period 80 offset 79 -test_srs_periodicity srs at frame 7 slot 9 -test_srs_periodicity srs at frame 15 slot 9 -test_srs_periodicity srs at frame 23 slot 9 -test_srs_periodicity srs at frame 31 slot 9 -test_srs_periodicity srs at frame 39 slot 9 -test_srs_periodicity srs at frame 47 slot 9 -test_srs_periodicity srs at frame 55 slot 9 -test_srs_periodicity srs at frame 63 slot 9 -test_srs_periodicity srs at frame 71 slot 9 -test_srs_periodicity srs at frame 79 slot 9 -srs period 160 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 16 slot 0 -test_srs_periodicity srs at frame 32 slot 0 -test_srs_periodicity srs at frame 48 slot 0 -test_srs_periodicity srs at frame 64 slot 0 -test_srs_periodicity srs at frame 80 slot 0 -test_srs_periodicity srs at frame 96 slot 0 -test_srs_periodicity srs at frame 112 slot 0 -test_srs_periodicity srs at frame 128 slot 0 -test_srs_periodicity srs at frame 144 slot 0 -srs period 160 offset 159 -test_srs_periodicity srs at frame 15 slot 9 -test_srs_periodicity srs at frame 31 slot 9 -test_srs_periodicity srs at frame 47 slot 9 -test_srs_periodicity srs at frame 63 slot 9 -test_srs_periodicity srs at frame 79 slot 9 -test_srs_periodicity srs at frame 95 slot 9 -test_srs_periodicity srs at frame 111 slot 9 -test_srs_periodicity srs at frame 127 slot 9 -test_srs_periodicity srs at frame 143 slot 9 -test_srs_periodicity srs at frame 159 slot 9 -srs period 320 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 32 slot 0 -test_srs_periodicity srs at frame 64 slot 0 -test_srs_periodicity srs at frame 96 slot 0 -test_srs_periodicity srs at frame 128 slot 0 -test_srs_periodicity srs at frame 160 slot 0 -test_srs_periodicity srs at frame 192 slot 0 -test_srs_periodicity srs at frame 224 slot 0 -test_srs_periodicity srs at frame 256 slot 0 -test_srs_periodicity srs at frame 288 slot 0 -srs period 320 offset 319 -test_srs_periodicity srs at frame 31 slot 9 -test_srs_periodicity srs at frame 63 slot 9 -test_srs_periodicity srs at frame 95 slot 9 -test_srs_periodicity srs at frame 127 slot 9 -test_srs_periodicity srs at frame 159 slot 9 -test_srs_periodicity srs at frame 191 slot 9 -test_srs_periodicity srs at frame 223 slot 9 -test_srs_periodicity srs at frame 255 slot 9 -test_srs_periodicity srs at frame 287 slot 9 -test_srs_periodicity srs at frame 319 slot 9 -srs period 640 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 64 slot 0 -test_srs_periodicity srs at frame 128 slot 0 -test_srs_periodicity srs at frame 192 slot 0 -test_srs_periodicity srs at frame 256 slot 0 -test_srs_periodicity srs at frame 320 slot 0 -test_srs_periodicity srs at frame 384 slot 0 -test_srs_periodicity srs at frame 448 slot 0 -test_srs_periodicity srs at frame 512 slot 0 -test_srs_periodicity srs at frame 576 slot 0 -srs period 640 offset 639 -test_srs_periodicity srs at frame 63 slot 9 -test_srs_periodicity srs at frame 127 slot 9 -test_srs_periodicity srs at frame 191 slot 9 -test_srs_periodicity srs at frame 255 slot 9 -test_srs_periodicity srs at frame 319 slot 9 -test_srs_periodicity srs at frame 383 slot 9 -test_srs_periodicity srs at frame 447 slot 9 -test_srs_periodicity srs at frame 511 slot 9 -test_srs_periodicity srs at frame 575 slot 9 -test_srs_periodicity srs at frame 639 slot 9 -srs period 1280 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 128 slot 0 -test_srs_periodicity srs at frame 256 slot 0 -test_srs_periodicity srs at frame 384 slot 0 -test_srs_periodicity srs at frame 512 slot 0 -test_srs_periodicity srs at frame 640 slot 0 -test_srs_periodicity srs at frame 768 slot 0 -test_srs_periodicity srs at frame 896 slot 0 -test_srs_periodicity srs at frame 1024 slot 0 -test_srs_periodicity srs at frame 1152 slot 0 -srs period 1280 offset 1279 -test_srs_periodicity srs at frame 127 slot 9 -test_srs_periodicity srs at frame 255 slot 9 -test_srs_periodicity srs at frame 383 slot 9 -test_srs_periodicity srs at frame 511 slot 9 -test_srs_periodicity srs at frame 639 slot 9 -test_srs_periodicity srs at frame 767 slot 9 -test_srs_periodicity srs at frame 895 slot 9 -test_srs_periodicity srs at frame 1023 slot 9 -test_srs_periodicity srs at frame 1151 slot 9 -test_srs_periodicity srs at frame 1279 slot 9 -srs period 2560 offset 0 -test_srs_periodicity srs at frame 0 slot 0 -test_srs_periodicity srs at frame 256 slot 0 -test_srs_periodicity srs at frame 512 slot 0 -test_srs_periodicity srs at frame 768 slot 0 -test_srs_periodicity srs at frame 1024 slot 0 -test_srs_periodicity srs at frame 1280 slot 0 -test_srs_periodicity srs at frame 1536 slot 0 -test_srs_periodicity srs at frame 1792 slot 0 -test_srs_periodicity srs at frame 2048 slot 0 -test_srs_periodicity srs at frame 2304 slot 0 -srs period 2560 offset 2559 -test_srs_periodicity srs at frame 255 slot 9 -test_srs_periodicity srs at frame 511 slot 9 -test_srs_periodicity srs at frame 767 slot 9 -test_srs_periodicity srs at frame 1023 slot 9 -test_srs_periodicity srs at frame 1279 slot 9 -test_srs_periodicity srs at frame 1535 slot 9 -test_srs_periodicity srs at frame 1791 slot 9 -test_srs_periodicity srs at frame 2047 slot 9 -test_srs_periodicity srs at frame 2303 slot 9 -test_srs_periodicity srs at frame 2559 slot 9 -Test NR SRS is pass diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/sss_test.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/sss_test.txt deleted file mode 100644 index 4e2ba28342..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/sss_test.txt +++ /dev/null @@ -1,709 +0,0 @@ - SSS TEST ----------- -log init done -Start lte_param_init, frame_type 0, extended_prefix 0 -[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0 -Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1 -*********************************** - SSS NR Test synchronisation -*********************************** ------------------------------------------------- -Test nr pss with Nid2 0 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB) -Test nr sss with Nid1 0 -(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0 -(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0 -(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1 -(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2 -(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3 -(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5 -Nid2 0 Nid1 0 tot_metric 760832, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 0 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB) -Test nr sss with Nid1 0 -(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0 -(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0 -(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1 -(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2 -(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3 -(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5 -Nid2 0 Nid1 0 tot_metric 760832, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 0 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB) -Test nr sss with Nid1 0 -(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0 -(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0 -(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1 -(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2 -(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3 -(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5 -Nid2 0 Nid1 0 tot_metric 760832, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 0 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB) -Test nr sss with Nid1 0 -(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0 -(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0 -(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1 -(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2 -(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3 -(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5 -Nid2 0 Nid1 0 tot_metric 760832, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 0 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB) -Test nr sss with Nid1 0 -(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0 -(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0 -(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1 -(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2 -(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3 -(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5 -Nid2 0 Nid1 0 tot_metric 760832, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 0 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 222222 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 222224, val = 219912170 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 222224, val = 219912170 (41 dB) -Test nr sss with Nid1 0 -(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0 -(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0 -(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1 -(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2 -(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3 -(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5 -Nid2 0 Nid1 0 tot_metric 760832, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 0 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB) -Test nr sss with Nid1 71 -(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0 -(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1 -(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2 -(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3 -(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4 -(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 0 Nid1 71 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 71 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB) -Test nr sss with Nid1 71 -(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0 -(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1 -(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2 -(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3 -(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4 -(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 0 Nid1 71 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 71 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB) -Test nr sss with Nid1 71 -(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0 -(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1 -(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2 -(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3 -(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4 -(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 0 Nid1 71 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 71 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB) -Test nr sss with Nid1 71 -(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0 -(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1 -(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2 -(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3 -(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4 -(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 0 Nid1 71 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 71 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB) -Test nr sss with Nid1 71 -(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0 -(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1 -(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2 -(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3 -(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4 -(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 0 Nid1 71 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 71 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 0 at position 222222 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 222224, val = 219912170 (41 dB) -[UE] nr_synchro_time: Sync source = 0, Peak found at pos 222224, val = 219912170 (41 dB) -Test nr sss with Nid1 71 -(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0 -(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0 -(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0 -(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0 -(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0 -(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1 -(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2 -(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3 -(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4 -(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 0 Nid1 71 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 71 Nid2 0 ------------------------------------------------- -Test nr pss with Nid2 2 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 222222 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 222222 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB) -Test nr sss with Nid1 21 -(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0 -(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0 -(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0 -(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0 -(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0 -(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0 -(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2 -(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3 -(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4 -(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5 -Nid2 2 Nid1 21 tot_metric 759808, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 21 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 1 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 0, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 0, val = 232105225 (41 dB) -Test nr sss with Nid1 55 -(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0 -(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0 -(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0 -(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0 -(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0 -(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1 -(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2 -(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3 -(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 1 Nid1 55 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 55 Nid2 1 ------------------------------------------------- -Test nr pss with Nid2 1 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 232105225 (41 dB) -Test nr sss with Nid1 55 -(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0 -(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0 -(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0 -(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0 -(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0 -(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1 -(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2 -(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3 -(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 1 Nid1 55 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 55 Nid2 1 ------------------------------------------------- -Test nr pss with Nid2 1 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 230099437 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 230099437 (41 dB) -Test nr sss with Nid1 55 -(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0 -(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0 -(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0 -(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0 -(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0 -(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1 -(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2 -(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3 -(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 1 Nid1 55 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 55 Nid2 1 ------------------------------------------------- -Test nr pss with Nid2 1 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 56788, val = 232105225 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 56788, val = 232105225 (41 dB) -Test nr sss with Nid1 55 -(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0 -(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0 -(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0 -(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0 -(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0 -(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1 -(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2 -(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3 -(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 1 Nid1 55 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 55 Nid2 1 ------------------------------------------------- -Test nr pss with Nid2 1 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 111112, val = 230409881 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 111112, val = 230409881 (41 dB) -Test nr sss with Nid1 55 -(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0 -(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0 -(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0 -(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0 -(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0 -(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1 -(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2 -(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3 -(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 1 Nid1 55 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 55 Nid2 1 ------------------------------------------------- -Test nr pss with Nid2 1 at position 222222 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 222224, val = 219714314 (41 dB) -[UE] nr_synchro_time: Sync source = 1, Peak found at pos 222224, val = 219714314 (41 dB) -Test nr sss with Nid1 55 -(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0 -(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0 -(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0 -(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0 -(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0 -(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0 -(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1 -(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2 -(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3 -(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5 -Nid2 1 Nid1 55 tot_metric 770560, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 55 Nid2 1 ------------------------------------------------- -Test nr pss with Nid2 2 at position 0 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB) -Test nr sss with Nid1 111 -(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0 -(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0 -(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0 -(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0 -(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0 -(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1 -(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2 -(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3 -(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5 -Nid2 2 Nid1 111 tot_metric 770048, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 111 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 492 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB) -Test nr sss with Nid1 111 -(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0 -(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0 -(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0 -(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0 -(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0 -(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1 -(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2 -(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3 -(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5 -Nid2 2 Nid1 111 tot_metric 770048, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 111 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 493 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB) -Test nr sss with Nid1 111 -(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0 -(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0 -(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0 -(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0 -(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0 -(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1 -(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2 -(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3 -(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5 -Nid2 2 Nid1 111 tot_metric 770048, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 111 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 56788 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB) -Test nr sss with Nid1 111 -(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0 -(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0 -(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0 -(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0 -(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0 -(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1 -(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2 -(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3 -(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5 -Nid2 2 Nid1 111 tot_metric 770048, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 111 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 111111 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB) -Test nr sss with Nid1 111 -(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0 -(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0 -(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0 -(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0 -(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0 -(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1 -(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2 -(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3 -(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5 -Nid2 2 Nid1 111 tot_metric 770048, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 111 Nid2 2 ------------------------------------------------- -Test nr pss with Nid2 2 at position 222222 -[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB) -[UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB) -Test nr sss with Nid1 111 -(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0 -(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0 -(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0 -(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0 -(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0 -(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0 -(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0 -(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0 -(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1 -(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2 -(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3 -(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4 -(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5 -Nid2 2 Nid1 111 tot_metric 770048, phase_max 5 -SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 111 Nid2 2 - -SSS NR Number of tests : 36 Pass : 0 Pass with warning : 36 Fail : 0 -SSS NR Synchronisaton test is terminated. - diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/run_tests.sh b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/run_tests.sh deleted file mode 100755 index 81894ed726..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/run_tests.sh +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/bash -# -# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The OpenAirInterface Software Alliance licenses this file to You under -# the OAI Public License, Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.openairinterface.org/?page_id=698 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#------------------------------------------------------------------------------- -# For more information about the OpenAirInterface (OAI) Software Alliance: -# contact@openairinterface.org -# -#---------------------- -# File: run_tests.sh -#---------------------- -# Description: script batch for: -# - building tests -# - executing tests -# - checking output files with reference files. -# ./run_test to build/run and check all tests -# -b no build -# -e no execution -# -c no check -# -m no run of meld -# an alone specific test can be executed ./run_tests test_name -#---------------------------------------------------------------------------- -# CONFIGURATION -# files and directories - -WORK_DIR="openair1/SIMULATION/NR_UE_PHY/unit_tests/build" -OAIENV_DIR="../../../../.." -EXECUTABLE_DIR="." -REFERENCE_DIR="./reflogs" -RESULT_TEST_FILE="" -RESULT_DIR="./testlogs" -BROWSER="firefox" - -#---------------------------------------------------------------------------- -# For building and executing test application - -BUILD_TEST="yes" -CHECK_TEST="yes" -EXECUTE_TEST="yes" -SINGLE_TEST="no" -RUN_MELD="yes" -# for removing files -REMOVE="rm -f" -COMPARE="cmp" -TESTS_RUN=0 -TESTS_PASS=0 -TESTS_FAIL=0 - -#---------------------------------------------------------------------------- -# List of tests - -tst_files=" - pss_test - sss_test - pbch_test - srs_test - frame_config_test - harq_test - pucch_uci_test" - -#--------------------------------------------------------------------------- -# manage input parameters - -while [ $# != "0" ] -do - case $1 in - -b) - echo "No build of unit test" - BUILD_TEST="no" - ;; - -e) - echo "No execution of unit test" - EXECUTE_TEST="no" - ;; - -c) - echo "No check of unit test" - CHECK_TEST="no" - ;; - -m) - echo "No run of meld tool" - RUN_MELD="no" - ;; - -h) - echo "Option of run_test script" - echo "-b : No Build of unit tests" - echo "-c : No check for unit test" - echo "-e : No run of unit tests" - echo "-m : No run of meld tool" - exit - BUILD_TEST="no" - CHECK_TEST="no" - EXECUTE_TEST="no" - ;; - *) - for file in $tst_files - do - if [ $file == $1 ] - then - SINGLE_TEST="yes" - TEST=$1 - echo "Single test $TEST" - fi - done - if [ $SINGLE_TEST == "no" ] - then - echo "Unknown parameter $1" - BUILD_TEST="no" - CHECK_TEST="no" - EXECUTE_TEST="no" - exit - fi - ;; - esac - # shift of input parameter (excluding $0 ) $1 <- $2 <- $3 ... - # $# is decrement by shift - shift -done - -#-------------------------------------------------------------------------------------------- -# RUN AND CHECK RESULTS - -numberDisplayFilesDifferencies=0 -let MAX_NUMBER_DISPLAY_FILES_DIFFERENCES=8 -num_diff=0 - -if [ $EXECUTE_TEST == "yes" ] -then - mkdir $RESULT_DIR -fi - -if [ $BUILD_TEST == "yes" ] -then - if [ $SINGLE_TEST == "no" ] - then - echo "cd $OAIENV_DIR" - cd $OAIENV_DIR - echo "source oaienv" - source oaienv - echo "cd $WORK_DIR" - cd $WORK_DIR - echo "cmake CMakeLists.txt" - cmake CMakeLists.txt - echo -e "make clean\n" - #make clean - fi -fi - -if [ $CHECK_TEST == "yes" ] -then - echo "Display differencies for a maximum of "$MAX_NUMBER_DISPLAY_FILES_DIFFERENCES" files" -fi - -for file in $tst_files - do - - if [ $SINGLE_TEST == "yes" ] - then - file=$TEST - fi - - echo "Test : $file" - RESULT_TEST_FILE="$file.txt" - - # build executable - if [ $BUILD_TEST == "yes" ] - then - echo -e "make $file\n" - make $file - fi - - if [ $EXECUTE_TEST == "yes" ] - then - echo "rm $RESULT_DIR/$RESULT_TEST_FILE" - rm $RESULT_DIR/$RESULT_TEST_FILE - echo "$EXECUTABLE_DIR/$file > $RESULT_DIR/$RESULT_TEST_FILE" - $EXECUTABLE_DIR/$file > $RESULT_DIR/$RESULT_TEST_FILE - TESTS_RUN=$((TESTS_RUN+1)) - fi - - if [ $CHECK_TEST == "yes" ] - then - # check if there is already a reference file - if [ -f "$REFERENCE_DIR/$RESULT_TEST_FILE" ] - then - - echo File "$REFERENCE_DIR/$RESULT_TEST_FILE" exists - - $COMPARE $RESULT_DIR/$RESULT_TEST_FILE $REFERENCE_DIR/$RESULT_TEST_FILE > /dev/null 2>&1 - - if [ $? == 0 ] - then - echo "Test $file is PASS" - echo "Same logging file for $file" - TESTS_PASS=$((TESTS_PASS+1)) - else - echo "Test $file is FAIL" - TESTS_FAIL=$((TESTS_FAIL+1)) - echo "Difference of logging file for scenario $file" - let "num_diff=$num_diff + 1" - if [ $RUN_MELD == "yes" ] - then - meld $RESULT_DIR/$RESULT_TEST_FILE $REFERENCE_DIR/$RESULT_TEST_FILE & - let "numberDisplayFilesDifferencies=$numberDisplayFilesDifferencies + 1" - echo "Meld number "$numberDisplayFilesDifferencies - if [ $numberDisplayFilesDifferencies = $MAX_NUMBER_DISPLAY_FILES_DIFFERENCES ] - then - echo "###### ERROR ###### ERROR ###### ERROR ###### ERROR ###### ERROR ###### ERROR ######" - echo "=> ERROR Test aborted because there are already $MAX_NUMBER_DISPLAY_FILES_DIFFERENCES detected logging files which are different" - break - fi - fi - fi - else - echo "No reference file for test $file" - fi - fi - - if [ $SINGLE_TEST == "yes" ] - then - echo "Test $file has been executed" - break - fi - done - -if [ $CHECK_TEST == "yes" ] -then - echo "There are $num_diff result files which are different" -fi - - echo " tests run : $TESTS_RUN pass : $TESTS_PASS fail : $TESTS_FAIL" - -# end of script diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/readme.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/readme.txt deleted file mode 100644 index 8309bf0f92..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/readme.txt +++ /dev/null @@ -1,143 +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: /home/jacques/workspace/oai_openairinterface/openairinterface5g/openair1/SIMULATION/NR_UE_PHY/unit_tests/README.txt - -This directory contains testbenchs for 5G NR physical layers. - -Before building unit tests, full UE build should be done before (maily for asn1 dependencies): - -Initialise environment: -- under openairinterface5g enter >source oaienv -Install tools: -- under openairinterface5g/cmake_targets/build -I -Build NR UE: -- under openairinterface5g/cmake_targets/build --nrUE - -Specific test files -==================== - -pss_test.c: test for detection of primary synchronisation signal. -sss_test.c: test for detection of secundary synchronisation signal. -pbch_test.c: test for decoding of packet braodcast channel. -srs_test.c: test of sounding reference signal. -frame_config_test.c : test of frame configurations (FDD/TDD). -harq_test.c : test of HARQ downlink and uplink. -pucch_uci_test : test of packed Uplink Control Channel Uplink Control Information -pss_util_test.c: common functions for running synchronisation tests. -pss_util_test.h: common headers for synchronisation tests. -input_buffer_test.h: it allows providing samples for pss test. - -How to build & run tests -======================== - -Before building, oai environment should be set by entering under directory openairinterface5g "source oaienv". - -A script "run_tests.sh" allows to build, to run and to check all tests. -To run a complete non regression of unit tests, go under directory NR_UE_PHY/unit_tests/build and execute: -./run_tests.sh - -This script "run_tests.sh" list all available unit tests. - -build is based on cmake tool. - -cmake file is "/openairinterface5g/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeList.txt". - -CMakeList.txt lists different build. - -How to build: in directory "oai_openairinterface/openairinterface5g/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/", below commands should be entered: - -First command to do: -cmake CMakeList.txt -> it generates makefiles to build all projects. - -Then build of test: -make pss_test -> build pss_test: detection of NR (Primary Synchronisation Channel - synchronisation of UE). -make sss_test -> build sss_test: detection of NR SSS (Secundary Synchronisation Channel - second step for UE synchronisation). -make pbch_test -> build pbch_test: decoding of NR PBCH (Packet Broadcast Channel -> UE read MIB Master Information Block which gives network parameters). -make frame_config_test -> build frame_config_test: NR FDD/TDD configuration. -make srs_test -> build srs_test: Sounding Reference Signals are transmitted by UE to the network which can use them for channel estimations. -make harq_test -> build harq_test: Hybrid Repeat Request Acknowledgment: mecanism to acknowledge transmitted and received transport blocks. -make pucch_uci_test -> build pucch_uci_test : Packet Uplink Control Channel / Uplink Control information : create UCI payload and select PUCCH formats and its parameters. -make clean -> clean all projects. - -And execution of tests: -./pss_test -> run NR PSS tests. -./sss_test -> run NR SSS tests. -./pbch_test -> run NR PBCH tests. -./srs_test -> run NR srs tests. -./frame_config_test -> run NR frame configuration tests. -./harq_test -> run NR HARQ downlink and uplink tests. -./pucch_uci_test -> run NR PUCCH UCI tests. - -There is a script in build/run_test.sh which allows: -- building/running/checking all tests - -What is test result? -==================== - -Test verdict consists in a comparaison of generated logging file at execution with a reference logging file which is stored under git for each test. -By default, tool "meld" is open each time there is a difference between reference file and logging file. -It is possible to disable execution of meld with option -m. - -Build/execute only one test: -=========================== - -The script "run_tests.sh" has different options: -"-b : No Build of unit tests" -"-c : No check for unit test" -"-e : No execution of unit tests" -"-m : No run of meld tool" - -./run_tests.sh -> run all unit tests (build, execute and compare for each test) -./run_tests.sh -m -> run all unit tests but meld is not used (verdict is based on system command "cmp"). -./run_tests.sh -b -c -r -m -> list all available unit tests -./run_tests.sh pss_test -> run only one test (here it is pss_test). -./run_tests.sh -c -e -m pss_test -> build only one test -./run_tests.sh -m pss_test -> run only one test but without execution of meld - -Which processing can be tuned? -============================= - -Decimation feature: - -By default pss processing uses samples from received buffer at input sampling frequency fs. -For saving processing time, it is possible that pss uses a decimation of input signal. -To enable decimation file openairinterface5g_bis/openairinterface5g/openair1/PHY/NR_REFSIG/pss_nr.h should be modified. -//#define PSS_DECIMATOR should be enable to get decimation. -By default, decimation uses a FIR filter. -It is possible to use a CIC (Cascaded Integrated Comb filter) for decimation by enabling line //#define CIC_DECIMATOR. - -Input received signal: - -Different waveforms can be generated for testing pss and sss detection. -By default, it uses a sinusoidal signals at different frequencies with an amplitude at the same level than pss or sss signals. -For modifying these waveforms, function "set_random_rx_buffer" in file pss_util_test.c has to be modified. -For wavecom type, line data_format = SINUSOIDAL_DATA should be changed with new format. -For amplitude of waveform, declaration have to be modified in the function. - -Status -====== - -NR synchronisation tests run successfully with default parameters. -Warning: Tests of PSS NR with decimation (based on FIR or CIC filter) does not run successfully at the moment. - - - diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c deleted file mode 100644 index b8a5c7a780..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c +++ /dev/null @@ -1,218 +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 - */ - -/********************************************************************* -* -* FILENAME : dummy_functions.c -* -* MODULE : NR UE unit test -* -* DESCRIPTION : it allows to define unused functions for unit tests. -* -************************************************************************/ - -#include - -#include "../../unit_tests/src/pss_util_test.h" -#include "PHY/types.h" -#include "PHY/defs_gNB.h" -#include "../common/ran_context.h" -#include "../common/config/config_paramdesc.h" - - -/*****************variables****************************************/ - -RAN_CONTEXT_t RC; - -uint32_t (*p_nr_ue_get_SR)(module_id_t module_idP,int CC_id,frame_t frameP,uint8_t eNB_id,uint16_t rnti, sub_frame_t subframe) = NULL; - -/*****************functions****************************************/ - -lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char subframe) -{ - return(0); -} - -PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id, - frame_t frameP, uint8_t new_Msg3, - sub_frame_t subframe){ return(NULL);} - -void ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, - sub_frame_t subframe, uint8_t eNB_index, - uint8_t * ulsch_buffer, uint16_t buflen, - uint8_t * access_mode){} - -void Msg1_transmitted(module_id_t module_idP, uint8_t CC_id, - frame_t frameP, uint8_t eNB_id){} - -void Msg3_transmitted(module_id_t module_idP, uint8_t CC_id, - frame_t frameP, uint8_t eNB_id){} - -uint32_t nr_ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP, - uint8_t eNB_id, rnti_t rnti, sub_frame_t subframe){ - - uint32_t value = 0; - if (p_nr_ue_get_SR != NULL) - { - value = (p_nr_ue_get_SR)(module_idP, CC_id, frameP, eNB_id, rnti, subframe); - } - return(value);} - -void rrc_out_of_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index) -{} - -UE_L2_STATE_t ue_scheduler(const module_id_t module_idP, - const frame_t rxFrameP, - const sub_frame_t rxSubframe, - const frame_t txFrameP, - const sub_frame_t txSubframe, - const lte_subframe_t direction, - const uint8_t eNB_index, const int CC_id){ return(0);} - -void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame, - uint8_t CH_index, void *pdu, uint16_t len){} - -void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame, - uint8_t CH_index, void *pdu, uint16_t len){} - -void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame, - sub_frame_t subframe, uint8_t * sdu, uint16_t sdu_len, - uint8_t CH_index){} - -uint16_t -ue_process_rar(const module_id_t module_idP, - const int CC_id, - const frame_t frameP, - const rnti_t ra_rnti, - uint8_t * const dlsch_buffer, - rnti_t * const t_crnti, - const uint8_t preamble_index, - uint8_t * selected_rar_buffer){ return(0);} - -void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, - uint8_t * sdu, uint16_t sdu_len, uint8_t eNB_index, - uint8_t sync_area){} - -int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame, - sub_frame_t subframe, uint8_t eNB_index, - uint8_t * sync_area, uint8_t * mcch_active){ return(0);} - - -int ue_query_mch_fembms(module_id_t Mod_id, uint8_t CC_id, uint32_t frame, - sub_frame_t subframe, uint8_t eNB_index, - uint8_t * sync_area, uint8_t * mcch_active){ return(0);} - -void dl_phy_sync_success(module_id_t module_idP, - frame_t frameP, - unsigned char eNB_index, uint8_t first_sync){} - -uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn) { return(0);} - -int32_t get_uldl_offset(int nr_bandP) { return(0);} - -IF_Module_t *IF_Module_init(int Mod_id) { return(NULL);} - -int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP, uint8_t CC_id) { return(0);} - -int8_t get_deltaP_rampup(module_id_t module_idP, uint8_t CC_id) { return(0);} - -void thread_top_init(char *thread_name, - int affinity, - uint64_t runtime, - uint64_t deadline, - uint64_t period) {} - -int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0);} -int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); } -int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); } -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); } -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } -int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); } -int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); } -int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); } -int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); } -int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); } - -int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); } - -int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); } - -static int step_log = 0; -const char log_first[] = "debug"; -const char log_second[] = "full"; -const char log_default[] = " "; - -int config_get(paramdef_t *params,int numparams, char *prefix) -{ -#define MAX_STRING_SIZE (255) - - char *p_log; - - for (int i=0; i < numparams; i++) - { - switch(step_log) - { - case 1: - p_log = log_first; - params[i].strptr = calloc(1, MAX_STRING_SIZE); - *(params[i].strptr) = p_log; - break; - case 2: - p_log = log_first; - params[i].strptr = calloc(1, MAX_STRING_SIZE); - *(params[i].strptr) = p_log; - break; - case 3: - params[i].uptr = calloc(1, sizeof(int)); - *(params[i].uptr) = 0; - break; - default: - p_log = log_default; - params[i].strptr = calloc(1, MAX_STRING_SIZE); - *(params[i].strptr) = p_log; - break; - } - } - - step_log++; - - return(0); -} - -unsigned int taus(void) { return (0); } - -typedef int loader_shlibfunc_t; - -int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf) { return(0); } - -void * get_shlibmodule_fptr(char *modname, char *fname) { return(NULL) ; } - -/*void exit_fun (const char *s) { - VOID_PARAMETER s; - undefined_function(__FUNCTION__); -}*/ - -uint32_t ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP, - uint8_t eNB_id, rnti_t rnti, sub_frame_t subframe){ - uint32_t value = 0; - return(value); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c deleted file mode 100644 index 6e0f78d3ab..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c +++ /dev/null @@ -1,314 +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 - */ - -/********************************************************************** -* -* FILENAME : frame_config_test.c -* -* MODULE : UE test bench for tdd configuration -* -* DESCRIPTION : it allows unitary tests for tdd configuration -* -************************************************************************/ - -#include "../../unit_tests/src/pss_util_test.h" - -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/phy_extern_nr_ue.h" - -#include "SCHED_NR_UE/phy_frame_config_nr.h" - -/******************************************************************* -* -* NAME : display_frame_configuration -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : display uplink & downlink configuration -* -*********************************************************************/ - -void display_frame_configuration(NR_DL_FRAME_PARMS *frame_parms) { - - printf("\nTdd configuration tti %d downlink %d uplink %d period %d \n", frame_parms->slots_per_subframe, frame_parms->p_tdd_UL_DL_Configuration->nrofDownlinkSlots, - frame_parms->p_tdd_UL_DL_Configuration->nrofUplinkSlots, frame_parms->p_tdd_UL_DL_Configuration->dl_UL_TransmissionPeriodicity); - - int k = NR_NUMBER_OF_SUBFRAMES_PER_FRAME - 1; - int tti = 0; - for (int j = 0; j < frame_parms->slots_per_frame; j++) { - int frame = 0; - if (j != 0) { - frame = j / frame_parms->slots_per_frame; - tti = j % frame_parms->slots_per_frame; - } - else { - frame = 0; - tti = 0; - } - - if (slot_select_nr(frame_parms, frame, tti) & NR_DOWNLINK_SLOT) { - printf(" [%3d] D", j); - } - else { - if (slot_select_nr(frame_parms, frame, tti) & NR_UPLINK_SLOT) { - printf(" [%3d] U", j); - } - else { - printf("Error test_frame_configuration: unexpected value \n"); - assert(0); - } - } - if (j == k) { - printf("\n"); - k += NR_NUMBER_OF_SUBFRAMES_PER_FRAME; - } - } - printf("\n"); -} - -/******************************************************************* -* -* NAME : set_tti_test -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : set tti -* -*********************************************************************/ - -void set_tti_test(NR_DL_FRAME_PARMS *frame_parms, int slots_per_subframe) -{ - frame_parms->slots_per_subframe = slots_per_subframe; - frame_parms->slots_per_frame = slots_per_subframe * NR_NUMBER_OF_SUBFRAMES_PER_FRAME; -} - -/******************************************************************* -* -* NAME : test_frame_configuration -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of frame configuration feature -* -*********************************************************************/ - -int test_frame_configuration(PHY_VARS_NR_UE *PHY_vars_UE) -{ - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - int v_return = 0; - - #define NO_DOWNLINK_SYMBOL (0) - #define NO_UPLINK_SYMBOL (0) - - #define TTI_DEFAULT (2) - #define DL_SLOT_DEFAULT (4) - #define UL_SLOT_DEFAULT (1) - #define TDD_PERIODICITY_DEFAULT (ms2p5) - - #define TDD_WRONG_CONFIG_TEST (3) - #define TDD_GOOD_CONFIG_TEST (18) - #define TDD_CONFIG_TEST (TDD_WRONG_CONFIG_TEST + TDD_GOOD_CONFIG_TEST) - - /* this array allows setting different tdd configurations */ - /* it defines number of tti (slot) per subframe, number of downlink slots, number of uplink slots */ - /* and a period of the configuration */ - /* first configurations (wrong) shall be fired error because they are not correct */ - /* other configurations (good) are correct and they do not generate any error */ - /* there is a tdd configuration for each line */ - - uint16_t TDD_configuration[TDD_CONFIG_TEST][4] = { - /* tti per subframe SLOT_DL SLOT_UL period */ - { 2, 4+1, 1, ms2p5 }, - { 2, 4, 1+1, ms2p5 }, - { 2, 4, 1, ms0p5 }, - { 1, 1, 1, ms2 }, - { 1, 4, 1, ms5 }, - { 1, 9, 1, ms10 }, - { 2, 1, 1, ms1 }, - { 2, 3, 1, ms2 }, - { 2, 4, 1, ms2p5 }, - { 2, 9, 1, ms5 }, - { 2, 19, 1, ms10 }, - { 4, 1, 1, ms0p5 }, - { 4, 3, 1, ms1 }, - { 4, 4, 1, ms1p25 }, - { 4, 7, 1, ms2 }, - { 4, 9, 1, ms2p5 }, - { 4, 19, 1, ms5 }, - { 4, 38, 2, ms10 }, - { 8, 4, 1, ms0p625 }, - { 16, 7, 1, ms0p5 }, - { TTI_DEFAULT, DL_SLOT_DEFAULT, UL_SLOT_DEFAULT, TDD_PERIODICITY_DEFAULT }, - }; - - #define TDD_WRONG_DEDICATED_CONFIG_TEST (7) - #define TDD_GOOD_DEDICATED_CONFIG_TEST (18) - #define TDD_DEDICATED_CONFIG_TEST (TDD_WRONG_DEDICATED_CONFIG_TEST + TDD_GOOD_DEDICATED_CONFIG_TEST) - - /* this array allows setting different tdd dedicated configurations */ - /* tdd dedicated configuration overwrite current tdd confirguration for specified slot number */ - /* it defines slot number to modify, then with a bit map number of downlink symbol, number of uplink symbols */ - /* if next slot is set to 0 means that there is no additional slot to modify with current dedicated configuration */ - /* if next slot is set to 1 means that there is an additional slot to mdofy with current dedicated configuration */ - /* so tdd dedicated configuration can be composed of only 1 lines (for 1 slot) or several lines for several slots */ - /* first dedictaed configurations (wrong) shall be fired errors because they are not correct */ - /* other dedicated configurations (good) are correct and they do not generate any error */ - - uint16_t TDD_dedicated_config[TDD_DEDICATED_CONFIG_TEST][4] = { - /* slot number SLOT_DL SLOT_UL next slot */ - { 0, 1, 1, 0 }, - { 0, 0, 1, 0 }, - { 40, 0, NR_TDD_SET_ALL_SYMBOLS, 0 }, - { 0, NR_TDD_SET_ALL_SYMBOLS, NR_TDD_SET_ALL_SYMBOLS, 0 }, - { 0, 0, 0, 0 }, - { 0, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 0, 0, 0, 0 }, - { 0, NR_TDD_SET_ALL_SYMBOLS, 0, 0 }, - { 0, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 5, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 10, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 15, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 20, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 25, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 30, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 35, 0, NR_TDD_SET_ALL_SYMBOLS, 1 }, - { 4, NR_TDD_SET_ALL_SYMBOLS, 0, 1 }, - { 9, NR_TDD_SET_ALL_SYMBOLS, 0, 1 }, - { 14, NR_TDD_SET_ALL_SYMBOLS, 0, 1 }, - { 19, NR_TDD_SET_ALL_SYMBOLS, 0, 1 }, - { 19, NR_TDD_SET_ALL_SYMBOLS, 0, 1 }, - { 24, NR_TDD_SET_ALL_SYMBOLS, 0, 1 }, - { 29, NR_TDD_SET_ALL_SYMBOLS, 0, 1 }, - { 34, NR_TDD_SET_ALL_SYMBOLS, 0, 1 }, - { 39, NR_TDD_SET_ALL_SYMBOLS, 0, 0 }, - }; - - /* TEST wrong and good tdd configurations starting by wrong ones */ - int return_status = -1; - for (int i = 0; i < TDD_CONFIG_TEST; i++) { - if (i == TDD_WRONG_CONFIG_TEST) { - return_status = 0; /* status should be fine for fine configurations */ - } - - set_tti_test(frame_parms, TDD_configuration[i][0]); - - if (set_tdd_config_nr(frame_parms, TDD_configuration[i][3], TDD_configuration[i][1], NO_DOWNLINK_SYMBOL, - TDD_configuration[i][2], NO_UPLINK_SYMBOL) != return_status) { - v_return = (-1); - } - - display_frame_configuration(frame_parms); - - free_tdd_configuration_nr(frame_parms); - } - - /* set default configuration */ - set_tti_test(frame_parms, TTI_DEFAULT); - - if (set_tdd_config_nr(frame_parms, TDD_PERIODICITY_DEFAULT, DL_SLOT_DEFAULT, NO_DOWNLINK_SYMBOL, UL_SLOT_DEFAULT, NO_UPLINK_SYMBOL) != 0) { - v_return = (-1); - } - - /* TEST wrong and good tdd dedicated configurations starting by wrong ones */ - return_status = (-1); - for (int i = 0; i < TDD_DEDICATED_CONFIG_TEST; i++) { - - bool next = false; - do { - if (i == TDD_WRONG_DEDICATED_CONFIG_TEST) { - return_status = 0; /* status should be fine for fine configurations */ - } - - add_tdd_dedicated_configuration_nr( frame_parms, TDD_dedicated_config[i][0], TDD_dedicated_config[i][1], TDD_dedicated_config[i][2]); - - if (TDD_dedicated_config[i][3] == 1) { - next = true; - i = i + 1; - } - else { - next = false; - } - } while (next); - - if (set_tdd_configuration_dedicated_nr(frame_parms) != return_status) { - v_return = (-1); - } - - if (return_status == 0) { - display_frame_configuration(frame_parms); - } - - free_tdd_configuration_dedicated_nr(frame_parms); - } - - free_tdd_configuration_nr(frame_parms); - - return (v_return); -} - -/******************************************************************* -* -* NAME : main -* -* DESCRIPTION : test of tdd configuration -* -*********************************************************************/ - -int main(int argc, char *argv[]) -{ - uint8_t transmission_mode = 1; - uint8_t nb_antennas_tx = 1; - uint8_t nb_antennas_rx = 1; - uint8_t frame_type = FDD; - int N_RB_DL=100; - lte_prefix_type_t extended_prefix_flag = NORMAL; - int Nid_cell[] = {(3*0+0)}; - VOID_PARAMETER argc; - VOID_PARAMETER argv; - - printf(" FRAME CONFIGURATION TEST \n"); - printf("--------------------------\n"); - - if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) { - printf("Initialisation problem for frame configuration test \n"); - exit(-1);; - } - - if (test_frame_configuration(PHY_vars_UE) != 0) { - printf("Test NR FRAME CONFIGURATION is fail \n"); - } - else { - printf("Test NR FRAME CONFIGURATION is pass \n"); - } - - lte_sync_time_free(); - - free_context_synchro_nr(); - - return(0); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/harq_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/harq_test.c deleted file mode 100644 index 3099adb11a..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/harq_test.c +++ /dev/null @@ -1,164 +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 - */ - -/********************************************************************** -* -* FILENAME : harq_test.c -* -* MODULE : UE test bench for hard (hybrid repeat request acknowledgment) -* -* DESCRIPTION : it allows unitary tests for downlink harq -* -************************************************************************/ - -#include "../../unit_tests/src/pss_util_test.h" -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/phy_extern_nr_ue.h" - -#include "SCHED_NR_UE/harq_nr.h" - -//#include "PHY/vars.h" -//#include "LAYER2/MAC/vars.h" - -/******************************************************************* -* -* NAME : test_harq_downlink -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of HARQ downlink feature -* -*********************************************************************/ - -int test_harq_downlink(PHY_VARS_NR_UE *phy_vars_ue) -{ - int gNB_id = 0; - int harq_pid = 0; - int ndi = 1; - uint8_t rnti_type = TYPE_C_RNTI_; - int number_steps = 5; - int thread_number = 0; - int TB_identifier = 0; - - printf("\nHARQ Downlink \n"); - - config_downlink_harq_process(phy_vars_ue , gNB_id, TB_identifier, thread_number, NR_DEFAULT_DLSCH_HARQ_PROCESSES); - - NR_DL_UE_HARQ_t *dlsch_harq = phy_vars_ue->dlsch[thread_number][gNB_id][TB_identifier]->harq_processes[harq_pid]; - - /* reach maximum number of retransmissions */ - printf("First sequence ndi does not toggle \n"); - for (int i = 0 ; i < number_steps; i++) { - downlink_harq_process(dlsch_harq, harq_pid, ndi, rnti_type); - } - - harq_pid++; /* next harq */ - dlsch_harq = phy_vars_ue->dlsch[thread_number][gNB_id][TB_identifier]->harq_processes[harq_pid]; - - /* new grant so new transmission each try */ - printf("Second sequence ndi toggle each transmission \n"); - for (int i = 0 ; i < number_steps; i++) { - downlink_harq_process(dlsch_harq, harq_pid, ndi, rnti_type); - ndi ^= 1; /* toogle ndi each try */ - } - - harq_pid++; /* next harq */ - dlsch_harq = phy_vars_ue->dlsch[thread_number][gNB_id][TB_identifier]->harq_processes[harq_pid]; - - /* new grant so new transmission each try */ - printf("Third sequence ndi toggle each two transmissions \n"); - for (int i = 0 ; i < number_steps; i++) { - downlink_harq_process(dlsch_harq, harq_pid, ndi, rnti_type); - if (i & 0x1) { - ndi ^= 1; /* toogle ndi each try */ - } - } - - release_downlink_harq_process(phy_vars_ue , gNB_id, TB_identifier, thread_number); - - return 0; -} - -/******************************************************************* -* -* NAME : test_harq -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of HARQ feature -* -*********************************************************************/ - -int test_harq(PHY_VARS_NR_UE *phy_vars_ue) -{ - int result = -1; - - result = test_harq_downlink(phy_vars_ue); - - return (result); -} - -/******************************************************************* -* -* NAME : main -* -* DESCRIPTION : test of downlink harq entities -* -*********************************************************************/ - -int main(int argc, char *argv[]) -{ - VOID_PARAMETER argc; - VOID_PARAMETER argv; - uint8_t transmission_mode = 1; - uint8_t nb_antennas_tx = 1; - uint8_t nb_antennas_rx = 1; - uint8_t frame_type = FDD; - int N_RB_DL=100; - lte_prefix_type_t extended_prefix_flag = NORMAL; - int Nid_cell[] = {(3*0+0)}; - VOID_PARAMETER argc; - VOID_PARAMETER argv; - - printf(" HARQ TEST \n"); - printf("----------\n"); - - if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) { - printf("Initialisation problem for harq test \n"); - exit(-1);; - } - - if (test_harq(PHY_vars_UE) != 0) { - printf("Test NR HARQ is fail \n"); - } - else { - printf("Test NR HARQ is pass \n"); - } - - free_context_synchro_nr(); - - return(0); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/input_buffer_test.h b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/input_buffer_test.h deleted file mode 100644 index 007b366b3b..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/input_buffer_test.h +++ /dev/null @@ -1,29 +0,0 @@ -/********************************************************************** -* FILENAME : input_buffer_test -* -* MODULE : test of UE synchronisation -* -* DESCRIPTION : it allows unitary tests of UE synchronisation on host machine -* - ************************************************************************/ - -#ifndef INPUT_BUFFER_H -#define INPUT_BUFFER_H - -#ifdef DEFINE_VARIABLES_INPUT_BUFFER_TEST_H -#define EXTERNAL -#define INIT_VARIABLES_INPUT_BUFFER_H -#else -#define EXTERNAL extern -#undef INIT_VARIABLES_INPUT_BUFFER_H -#endif - -#ifndef INIT_VARIABLES_INPUT_BUFFER_H -EXTERNAL short input_buffer[] -#else -EXTERNAL short input_buffer[307360] = {0} -#endif /* INIT_VARIABLES_INPUT_BUFFER_H */ -; -#undef EXTERNAL -#undef INIT_VARIABLES_INPUT_BUFFER_H -#endif /* INPUT_BUFFER_H */ diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c deleted file mode 100644 index 5c7f3157e7..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c +++ /dev/null @@ -1,464 +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 - */ - -/********************************************************************** -* -* FILENAME : pbch_test.c -* -* MODULE : UE test bench for sss tests -* -* DESCRIPTION : it allows unitary tests for SSS on host machine -* -************************************************************************/ - -#include -#include -#include -#include -#include - -typedef int nfapi_nr_pfcch_commonSearchSpaces_t; -#include "../nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h" - -#include "PHY/defs_nr_UE.h" -#include "PHY/phy_extern_nr_ue.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h" -#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" - -#include "PHY/NR_REFSIG/ss_pbch_nr.h" -#include "PHY/NR_REFSIG/pss_nr.h" -#include "PHY/NR_REFSIG/sss_nr.h" -#include "PHY/NR_REFSIG/dmrs_nr.h" - -#include "../../unit_tests/src/pss_util_test.h" - -/************** EXTERNAL ******************************************/ - -extern int pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode); - -/******************************************************************* -* -* NAME : test_synchro_pss_sss_nr -* -* INPUT : UE context -* for first and second pss sequence -* - position of pss in the received UE buffer -* - number of pss sequence -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : detect pss sequences in the received UE buffer -* then detect sss sequence -* -* Test procedure: -* - reference pss sequences (first, second or both) are written at specific -* positions -* - correlation is done between the received buffer and the possible pss sequences -* - results indicate pss sequence number and correlation result -* - reference sss sequences are written at specific positions -* - correlation is done with possible sss sequence -* -* (10 ms) -* <---------------------------------------------------------------------------> -* ----------------------------------------------------------------------------- -* | Received UE data buffer | -* ---------------------------------------------------------------------------- -* --------------------------------------------- -* <-------------->| pss | pbch | sss | pbch | -* --------------------------------------------- -* offset -* -* SSS/PBCH block contains following symbols: pss + pbch + sss + pbch -* -*********************************************************************/ - -int test_synchro_pss_sss_nr(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number) -{ - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - UE_nr_rxtx_proc_t proc = {0}; - int synchro_position; - int offset; - int16_t *tmp; - int32_t metric_fdd_ncp=0; - uint8_t phase_fdd_ncp; - int rate_change = SYNCHRO_RATE_CHANGE_FACTOR; - int decoded_pbch = -1; - - set_sequence_pss(PHY_vars_UE, position_symbol, pss_sequence_number); - - synchro_position = pss_synchro_nr(PHY_vars_UE, rate_change); - - synchro_position = synchro_position * rate_change; - - if (abs(synchro_position - position_symbol) > PSS_DETECTION_MARGIN_MAX) - { - printf("NR Pss has been detected at position %d instead of %d \n", synchro_position, position_symbol); - } - - /* symbols order for synchronisation block is PSS - PBCH - SSS */ - /* knowing that synchronisation position gives pss ofdm start one can deduce start of sss symbol */ - offset = (position_symbol + (SSS_SYMBOL_NB - PSS_SYMBOL_NB)*(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples)); - - tmp = (int16_t *)&PHY_vars_UE->common_vars.rxdata[0][offset]; - - insert_sss_nr(tmp, frame_parms); - - //PHY_vars_UE->rx_offset = position_symbol; /* offset is given for samples of type int16 */ - PHY_vars_UE->rx_offset = synchro_position; /* offset is given for samples of type int16 */ - -#if TEST_SYNCHRO_TIMING_PSS - - start_meas(&generic_time[TIME_SSS]); - -#endif - - rx_sss_nr(PHY_vars_UE, &proc, &metric_fdd_ncp, &phase_fdd_ncp); - -#if TEST_SYNCHRO_TIMING_PSS - - stop_meas(&generic_time[TIME_SSS]); - - #ifndef NR_UNIT_TEST - - printf("PSS execution duration %5.2f \n", generic_time[TIME_PSS].p_time/(cpuf*1000.0)); - - printf("SSS execution duration %5.2f \n", generic_time[TIME_SSS].p_time/(cpuf*1000.0)); - - #endif - -#endif - - if (phase_fdd_ncp != INDEX_NO_PHASE_DIFFERENCE) { - printf("Error: detected phase on sss is not correct: expected index phase is %d, detected index phase is %d !\n", INDEX_NO_PHASE_DIFFERENCE, phase_fdd_ncp); - return -1; - } - - generate_dmrs_pbch(PHY_vars_UE->dmrs_pbch_bitmap_nr, frame_parms->Nid_cell); - - decoded_pbch = pbch_detection(PHY_vars_UE, PHY_vars_UE->mode); - - return decoded_pbch; -} - -/******************************************************************* -* -* NAME : set_sequence_sss -* -* PARAMETERS : UE context -* position of sss in the received UE buffer -* -* RETURN : none -* -* DESCRIPTION : write reference sss sequence at a specified sample position in the received UE buffer -* -*********************************************************************/ -void set_sequence_sss(PHY_VARS_NR_UE *PHY_vars_UE, int offset, int slot_offset) -{ - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - int length = frame_parms->ofdm_symbol_size; - int size = length * IQ_SIZE; /* i & q */ - nfapi_config_request_t nfapi_config; - int16_t data_sss[LENGTH_SSS_NR]; - - nfapi_config.sch_config.physical_cell_id.value = PHY_vars_UE->frame_parms.Nid_cell; - - /* reinitialise random for always getting same data */ - srand(0); - int random; - for (int i=0; i< size/2; i++) { - random = ((rand() % AMP) - AMP/2); /* AMP allows to get a scaling of samples */ - synchroF_tmp[i] = random; - } - - bzero(synchro_tmp, size); - - /* Computation of below offset has been added due to function generate_sss which is used for eNodeB to process transmission */ - /* so it is based on a transmitted buffer which has been dimensioned for a full frame */ - /* here one uses a smaller buffer according to the size of an ofdm symbol so it can not properly work in this case. */ - /* so in order to only write in this buffer, pointer of the buffer has been modified in such a way that function */ - /* generate_sss writes correct data at the right buffer location */ - /* this address offset is applied for SSS which is in the second part of the frame */ - int Nsymb = (frame_parms->Ncp==NORMAL)?14:12; - int index_offset = slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size; - int16_t *tmp = synchroF_tmp - (2*index_offset); - -#if 0 - - nr_generate_sss(data_sss, - (int32_t **)&tmp, - AMP, - 0, // symbol number - &nfapi_config, - frame_parms); - - /* get sss in the frequency domain by applying an inverse FFT */ - idft2048(synchroF_tmp, /* complex input */ - synchro_tmp, /* complex output */ - 1); /* scaling factor */ - - for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) { - - /* copy sss in rx buffer */ - for (int i=0; icommon_vars.rxdata[aa])[i + offset] = ((int32_t *)synchro_tmp)[i]; - } - } -#else - - insert_sss_nr(tmp, frame_parms); - -#endif -} - -/******************************************************************* -* -* NAME : insert_sequence_sss -* -* PARAMETERS : UE context -* position of sss in the received UE buffer -* -* RETURN : none -* -* DESCRIPTION : write reference sss sequence at a specified sample position in the received UE buffer -* -*********************************************************************/ - -void insert_sequence_sss(PHY_VARS_NR_UE *PHY_vars_UE, int offset) -{ - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - int samples_for_half_frame = frame_parms->samples_per_frame / 2; - - set_sequence_sss(PHY_vars_UE, offset, 0); - - set_sequence_sss(PHY_vars_UE, offset + samples_for_half_frame, 10); -} - -/******************************************************************** -* -* NAME : test_synchro_pss_sss -* -* INPUT : UE context -* for first and second pss sequence -* - position of pss in the received UE buffer -* - number of pss sequence -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : detect pss sequences in the received UE buffer -* then detect sss sequence -* -* Test procedure: -* -* - reference pss sequences (first, second or both) are written at specific -* positions -* - correlation is done between the received buffer and the possible pss sequences -* - results indicate pss sequence number and correlation result -* - reference sss sequences are written at specific positions -* - correlation is done with possible sss sequence -* -* (10 ms) -* <---------------------------------------------------------------------------> -* ----------------------------------------------------------------------------- -* | Received UE data buffer | -* ---------------------------------------------------------------------------- -* ------------- ------------- -* <-------------->| first pss |<--------------------->| second pss | -* position ------------- (5 ms) ------------- -* ---------- ---------- -* | first sss| |second sss| -* ------------ ----------- -* As specified by the standard: -* - first and second sss sequence are different -> allow to get frame slot timing -* - first sss sequence is located in slot 0 and second sss sequence is in slot 10 -* - ofdm symbol of sss is just before ofdm symbol of pss -* -*********************************************************************/ - -int test_synchro_pss_sss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int sequence_number, test_t *test) -{ - VOID_PARAMETER test; - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - int synchro_position; - int offset; - int32_t metric_fdd_ncp=0; - uint8_t flip_fdd_ncp; - uint8_t phase_fdd_ncp; - int rate_change = SYNCHRO_RATE_CHANGE_FACTOR; /* by default there is no sampling rate change */ - int decoded_pbch = -1; - - offset = position_symbol - frame_parms->ofdm_symbol_size - frame_parms->nb_prefix_samples; - - if (offset < 0) - { - printf("Test aborted because sss position is outside the window\n"); - exit(0); - } - - set_sequence_pss(PHY_vars_UE, position_symbol, sequence_number); - - synchro_position = pss_synchro_nr(PHY_vars_UE, rate_change); - - printf("Pss has been detected at position %d with Nid2 %d \n", synchro_position, PHY_vars_UE->common_vars.eNb_id ); - - insert_sequence_sss(PHY_vars_UE, offset); - - if ((frame_parms->Ncp != NORMAL) || (frame_parms->frame_type != FDD)) { - printf("This configuration is not supported. Please use call to function ""initial_sync"" for covering others configurations.\n"); - exit(0); - } - - int sync_pos2 = synchro_position - frame_parms->nb_prefix_samples; - - int sync_pos_slot = (frame_parms->samples_per_slot>>1) - frame_parms->ofdm_symbol_size - frame_parms->nb_prefix_samples; - - if (sync_pos2 >= sync_pos_slot) - PHY_vars_UE->rx_offset = sync_pos2 - sync_pos_slot; - else - PHY_vars_UE->rx_offset = FRAME_LENGTH_COMPLEX_SAMPLES + sync_pos2 - sync_pos_slot; - - rx_sss(PHY_vars_UE, &metric_fdd_ncp, &flip_fdd_ncp, &phase_fdd_ncp); - - if (phase_fdd_ncp != INDEX_NO_PHASE_DIFFERENCE) { - printf("Error: detected phase on sss is not correct: expected index phase is %d, detected index phase is %d !\n", INDEX_NO_PHASE_DIFFERENCE, phase_fdd_ncp); - return -1; - } - - init_frame_parms(&PHY_vars_UE->frame_parms,1); - - //lte_gold_new(frame_parms, PHY_vars_UE->lte_gold_table[0],frame_parms->Nid_cell); - - decoded_pbch = pbch_detection(PHY_vars_UE, PHY_vars_UE->mode); - - return decoded_pbch; -} - -/******************************************************************* -* -* NAME : main -* -* DESCRIPTION : test bench for synchronisation sequence (pss/sss/pbch) -* purpose of test is to check that synchronisation sequence can be -* properly detected depending of input waveforms. -* -* - First step of synchronisation consists in pss search (primary synchronisation signal). -* pss sequence should be detected at the right position -* in the received buffer whatever the position along the -* received data buffer. -* Detection of position is based on correlation in time domain between -* received signal and pss sequence -> position is given by -* peak of correlation result. -* - Second step of synchronisation is sss decoding (secundary synchronisation signal). -* sss detection is based on position of detected pss. -* -*********************************************************************/ - -int main(int argc, char *argv[]) -{ - VOID_PARAMETER argc; - VOID_PARAMETER argv; - uint8_t transmission_mode = 1; - uint8_t nb_antennas_tx = 1; - uint8_t nb_antennas_rx = 1; - uint8_t frame_type = FDD; - int N_RB_DL=100; - lte_prefix_type_t extended_prefix_flag = NORMAL; - int decoded_pbch = -1; - int Nid1, Nid2; - const char *name_test = " PBCH NR "; - test_t test = { name_test, 0, 0, 0, 0}; - -#if 1 - int test_position[] = { 20000 }; /* this is the sample number in the frame */ -#else - int test_position[] = { -1 }; /* to get samples from a buffer initialised from an external file */ -#endif - - int size_test_position; - - /* this is a pointer to the function in charge of the test */ - int (*p_test_synchro_pss_sss)(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int sequence_number) = test_synchro_pss_sss_nr; - -#if 0 - int Nid_cell[] = { (3*0+0), (3*71+0), (3*21+2), (3*21+2), (3*55+1), (3*111+2) }; -#else - int Nid_cell[] = { ((3*1+2)) }; -#endif - - printf(" PBCH TEST \n"); - printf("----------\n"); - - if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) { - printf("Initialisation problem for synchronisation test \n"); - exit(-1);; - } - - p_test_synchro_pss_sss = test_synchro_pss_sss_nr; - size_test_position = sizeof(test_position)/sizeof(int); - - printf("***********************************\n"); - printf(" %s Test NR synchroisation \n", test.test_current); - printf("***********************************\n"); - - for (unsigned int index = 0; index < (sizeof(Nid_cell)/sizeof(int)); index++) { - - Nid2 = GET_NID2(Nid_cell[index]); - Nid1 = GET_NID1(Nid_cell[index]); - - for (int position = 0; position < size_test_position; position++) { - - PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + N_ID_2_NUMBER; /* set to unvalid value */ - - decoded_pbch = (*p_test_synchro_pss_sss)(PHY_vars_UE, test_position[position], Nid2); /* return phase index which gives phase error from an array */ - - test.number_of_tests++; - printf("\n%s ", test.test_current); - - if (PHY_vars_UE->frame_parms.Nid_cell == (3 * Nid1) + Nid2) { - if (decoded_pbch != -1) { - printf("Test is pass with offset %d Nid1 %d Nid2 %d \n", test_position[position], Nid1, Nid2); - test.number_of_pass++; - } - else { - printf("Test is fail because pbch has not been decoded \n"); - test.number_of_fail++; - } - } - else { - printf("Test is fail with offset %d Nid1 %d Nid2 %d \n", test_position[position], Nid1, Nid2); - test.number_of_fail++; - } - break; - } - break; - } - - printf("\n %s Number of tests : %d Pass : %d Pass with warning : %d Fail : %d \n", test.test_current, test.number_of_tests, test.number_of_pass, test.number_of_pass_warning, test.number_of_fail); - - printf("%s Synchronisaton test is terminated.\n\n", test.test_current); - - /* reset test statistics */ - test.number_of_tests = test.number_of_pass = test.number_of_pass_warning = test.number_of_fail = 0; - - free_context_synchro_nr(); - - return(0); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_test.c deleted file mode 100644 index c9e76846e9..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_test.c +++ /dev/null @@ -1,239 +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 - */ - -/********************************************************************** -* -* FILENAME : pss_test.c -* -* MODULE : UE test bench for synchronisation -* -* DESCRIPTION : it allows unitary tests of UE synchronisation on host machine -* -************************************************************************/ - -#include -#include -#include -#include -#include - -#include "../../unit_tests/src/pss_util_test.h" -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/phy_extern_nr_ue.h" - -#include "PHY/NR_REFSIG/ss_pbch_nr.h" -#include "PHY/NR_REFSIG/pss_nr.h" -#include "PHY/NR_REFSIG/sss_nr.h" -#include "PHY/NR_REFSIG/dmrs_nr.h" - - -/************** DEFINE *******************************************/ - -/*************** LOCAL VARIABLES***********************************/ - -/*************** FUNCTIONS ****************************************/ - -/******************************************************************** -* -* NAME : pss_test -* -* INPUT : UE context -* for a pss sequence -* - position of pss in the received UE buffer -* - number of pss sequence -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : detect pss sequences in the received UE buffer -* -* Test procedure: -* -* - reference pss sequences is written at a specific position -* - correlation is done between the received buffer and the possible pss sequences -* - results indicate pss sequence number and correlation result. -* -* Test is pass if detection of pss position is the one which has been set. -* -* (10 ms) -* <---------------------------------------------------------------------------> -* ----------------------------------------------------------------------------- -* | Received UE data buffer | -* ---------------------------------------------------------------------------- -* +-----------+ -* <--------->| pss | -* position +-----------+ -* ^ -* | -* peak position -* given by maximum of correlation result -* position matches beginning of ofdm symbol -* -* Remark: memory position should be aligned on a multiple of 4 due to I & Q samples of int16 -* An OFDM symbol is composed of x number of received samples depending of Rf front end sample rate. -* -* I & Q storage in memory -* -* First samples Second samples -* ------------------------- ------------------------- ... -* | I1 | Q1 | I2 | Q2 | -* --------------------------------------------------- ... -* ^ 16 bits 16 bits ^ -* | | -* --------------------------------------------------- ... -* | sample 1 | sample 2 | -* ---------------------------------------------------- ... -* ^ -* | -* OFDM in time -* -*********************************************************************/ - -void test_synchro_pss_nr(PHY_VARS_NR_UE *PHY_VARS_NR_UE, int position_symbol, int pss_sequence_number, test_t *test) -{ - int rate_change = SYNCHRO_RATE_CHANGE_FACTOR; - int synchro_position; - int NID2_value; - - display_test_configuration_pss(position_symbol, pss_sequence_number); - - set_sequence_pss(PHY_VARS_NR_UE, position_symbol, pss_sequence_number); - - /* search pss */ - synchro_position = pss_synchro_nr(PHY_VARS_NR_UE, rate_change); - int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; - - if (pss_sequence_number < pss_sequence) { - NID2_value = pss_sequence_number; - } else { - NID2_value = pss_sequence; - } - - if (NID2_value < pss_sequence) { - test->number_of_tests++; - /* position should be adjusted with i&q samples which are successively stored as int16 in the received buffer */ - int test_margin = PSS_DETECTION_MARGIN_MAX; /* warning correlation results give an offset position between 0 and 12 */ - int delta_position = abs(position_symbol - (synchro_position*rate_change)); - printf("%s ", test->test_current); - if (PHY_VARS_NR_UE->common_vars.eNb_id == pss_sequence_number) { - if ( delta_position != 0) { - if (delta_position > test_margin*rate_change) { - printf("Test is fail due to wrong position %d instead of %d \n", (synchro_position*rate_change), position_symbol); - printf("%s ", test->test_current); - printf("Test is fail : pss detected with a shift of %d \n", delta_position); - test->number_of_fail++; - } - else { - printf("Test is pass with warning: pss detected with a shift of %d \n", delta_position); - test->number_of_pass_warning++; - } - } - else { - printf("Test is pass: pss detected at right position \n"); - test->number_of_pass++; - } - } - else { - printf("Test is fail due to wrong NID2 detection %d instead of %d \n", PHY_VARS_NR_UE->common_vars.eNb_id, NID2_value); - test->number_of_fail++; - } - } -} - -/******************************************************************* -* -* NAME : main -* -* DESCRIPTION : test bench for synchronisation sequence (pss/sss/pbch) -* purpose of test is to check that synchronisation sequence can be -* properly detected depending of input waveforms. -* -* - First step of synchronisation is pss sequence. -* pss sequence should be detected at the right position -* in the received buffer whatever the position along the -* received data buffer. -* Detection of position is based on correlation in time domain between -* received signal and pss sequence -> position is given by -* peak of correlation result. -* -*********************************************************************/ - -int main(int argc, char *argv[]) -{ - VOID_PARAMETER argc; - VOID_PARAMETER argv; - uint8_t transmission_mode = 1; - uint8_t nb_antennas_tx = 1; - uint8_t nb_antennas_rx = 1; - uint16_t Nid_cell=123; - uint8_t frame_type=FDD; - int N_RB_DL=100; - lte_prefix_type_t extended_prefix_flag=NORMAL; - const char *name_test = "PSS NR"; - test_t test = { name_test, 0, 0, 0, 0}; - /* this is a pointer to the function in charge of the test */ - void (*p_test_synchro_pss)(PHY_VARS_NR_UE *PHY_VARS_NR_UE, int position_symbol, int pss_sequence_number, test_t *test) = test_synchro_pss_nr; - - int test_position[] = { 0, 492, 493, 56788, 56888, 111111, 151234, 151500, 200000, 250004, (307200-2048) }; - int size_test_position = sizeof(test_position)/sizeof(int); - - printf(" PSS TEST \n"); - printf("----------\n"); - - if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell, N_RB_DL) != 0) { - printf("Initialisation problem for synchronisation test \n"); - exit(-1);; - } - - printf("***********************************\n"); - printf(" %s Test synchronisation \n", test.test_current); - printf("***********************************\n"); - -#if 0 - - printf("Synchronisation with random data\n"); - - test_synchro_pss_nr(PHY_vars_UE, 0, INVALID_PSS_SEQUENCE, &test); - -#endif - int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; - - for (int index_position = 0; index_position < size_test_position; index_position++) { - for (int number_pss_sequence = 0; number_pss_sequence < pss_sequence; number_pss_sequence++) { - - p_test_synchro_pss(PHY_vars_UE, test_position[index_position], number_pss_sequence, &test); - - //break; - } - //break; - } - - printf("\n%s Number of tests : %d Pass : %d Pass with warning : %d Fail : %d \n\n", test.test_current, test.number_of_tests, test.number_of_pass, test.number_of_pass_warning, test.number_of_fail); - - printf("%s Synchronisaton test is terminated.\n\n", test.test_current); - - /* reset test statistics */ - test.number_of_tests = test.number_of_pass = test.number_of_pass_warning = test.number_of_fail = 0; - - free_context_synchro_nr(); - - return(0); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c deleted file mode 100644 index cc754942a1..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c +++ /dev/null @@ -1,523 +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 - */ - -/********************************************************************* -* -* FILENAME : pss_util_test.c -* -* MODULE : UE test bench for unit tests -* -* DESCRIPTION : it allows unitary tests of NR UE -* -************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include - -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/phy_init.h" -#include "PHY/phy_extern_nr_ue.h" - -/* to declare ue variables */ -#include "PHY/phy_vars_nr_ue.h" -#include "PHY/LTE_TRANSPORT/transport_vars.h" - -#include "PHY/NR_REFSIG/pss_nr.h" -#include "PHY/NR_REFSIG/sss_nr.h" -#include "PHY/NR_UE_TRANSPORT/cic_filter_nr.h" - -#define DEFINE_VARIABLES_PSS_NR_H -#include "../../unit_tests/src/pss_util_test.h" -#undef DEFINE_VARIABLES_PSS_NR_H - -#define DEFINE_VARIABLES_INPUT_BUFFER_TEST_H -#include "../../unit_tests/src/input_buffer_test.h" -#undef DEFINE_VARIABLES_INPUT_BUFFER_TEST_H - -#include "common/utils/LOG/log.h" - -/************** DEFINE *******************************************/ - -/*************** LOCAL VARIABLES***********************************/ - -static nfapi_config_request_t config_t; -static nfapi_config_request_t *config =&config_t; - -/*************** FUNCTIONS ****************************************/ - -//void phy_init_nr_top(NR_DL_FRAME_PARMS *frame_parms); -int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_eNB); - -/******************************************************************* -* -* NAME : apply phase shift -* -* PARAMETERS : pointer to buffer in frequency -* length of sample -* -* RETURN : none -* -* DESCRIPTION : apply phase shift to samples -* -*********************************************************************/ - -void phase_shift_samples(int16_t *samples, int length, int16_t phase_shift_re, int16_t phase_shift_im) { - int16_t sample_re, sample_im; - - for (int i = 0; i < length; i++) { - sample_re = (((phase_shift_re*samples[2*i])>>SCALING_METRIC_SSS_NR) - ((phase_shift_im*samples[2*i+1])>>SCALING_METRIC_SSS_NR)); - sample_im = (((phase_shift_im*samples[2*i])>>SCALING_METRIC_SSS_NR) + ((phase_shift_re*samples[2*i+1])>>SCALING_METRIC_SSS_NR)); - samples[2*i] = sample_re; - samples[2*i+1] = sample_im; - } -} - -/******************************************************************* -* -* NAME : display_data -* -* PARAMETERS : pointer to buffer -* position in the buffer -* -* RETURN : none -* -* DESCRIPTION : display pss sequence and data of a buffer -* -* -*********************************************************************/ - -void display_data(int pss_sequence_number, int16_t *rxdata, int position) { -#ifdef DEBUG_TEST_PSS - int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; - int16_t *pss_sequence[pss_sequence] = {primary_synch0_time, primary_synch1_time, primary_synch2_time}; - int16_t *pss_sequence_sl[pss_sequence] = {primary_synch0_time, primary_synch1_time}; - int16_t *pss_sequence_time = pss_sequence[pss_sequence_number];; - if (get_softmodem_params()->sl_mode != 0) - pss_sequence_time = pss_sequence_sl[pss_sequence_number]; - printf(" pss %6d data \n", pss_sequence_number); - for (int i = 0; i < 4; i++) { - if (pss_sequence_number < pss_sequence) { - printf("[i %6d] : %4d [i %6d] : %8i at address : %p \n", i, pss_sequence_time[2*i], (i + position), rxdata[2*i + (position*2)], &(rxdata[2*i + (position*2)])); - printf("[q %6d] : %4d [q %6d] : %8i at address : %p \n", i, pss_sequence_time[2*i+1], (i + position), rxdata[2*i + 1 + (position*2)], &(rxdata[2*i + 1 + (position*2)])); - } else { - printf("[i %6d] : Undef [i %6d] : %8i at address : %p \n", i, (i + position), rxdata[2*i + (position*2)], &(rxdata[2*i + (position*2)])); - printf("[q %6d] : Undef [q %6d] : %8i at address : %p \n", i, (i + position), rxdata[2*i + 1 + (position*2)], &(rxdata[2*i + 1 + (position*2)])); - } - } - - nr_init_frame_parms - printf(" ... ... \n"); -#else - (void) pss_sequence_number; - (void) rxdata; - (void) position; -#endif -} - -/******************************************************************* -* -* NAME : display_test_configuration_pss -* -* PARAMETERS : -* -* -* RETURN : none -* -* DESCRIPTION : display test configuration of pss -* -*********************************************************************/ - -void display_test_configuration_pss(int position, int pss_sequence_number) { - const char next_test_text[] = "------------------------------------------------\n"; - const char test_text_pss[] = "Test nr pss with Nid2 %i at position %i \n"; - printf(next_test_text); - printf(test_text_pss, pss_sequence_number, position); -} - -/******************************************************************* -* -* NAME : display_test_configuration_sss -* -* PARAMETERS : -* -* -* RETURN : none -* -* DESCRIPTION : display test configuration of pss -* -*********************************************************************/ - -void display_test_configuration_sss(int sss_sequence_number) { - const char test_text_sss[] = "Test nr sss with Nid1 %i \n"; - printf(test_text_sss, sss_sequence_number); -} - -/******************************************************************* -* -* NAME : undefinedFunction -* -* PARAMETERS : function name -* -* RETURN : none -* -* DESCRIPTION : these functions allow to solve undefined functions at link -* function name is printed at execution time for checking that -* each function is not called -* -*********************************************************************/ - -void undefined_function(const char *function) { - printf("%s undefined \n", function); - printf("Warning: function \"%s\" has been replaced by an empty function for avoiding undefined function error at build \n", function); -} - -/******************************************************************* -* -* NAME : init_synchro_test -* -* PARAMETERS : configuration for UE and eNB -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : initialisation of UE and eNode contexts -* -*********************************************************************/ - -int init_test(unsigned char N_tx, unsigned char N_rx, unsigned char transmission_mode, - unsigned char extended_prefix_flag, uint8_t frame_type, uint16_t Nid_cell, int N_RB_DL) { - (void) transmission_mode; - NR_DL_FRAME_PARMS *frame_parms; - int log_level = OAILOG_TRACE; - logInit(); - // enable these lines if you need debug info - //set_comp_log(PHY,LOG_DEBUG,LOG_HIGH,1); - set_glog(log_level); -#ifndef NR_UNIT_TEST - cpuf = get_cpu_freq_GHz(); - //LOG_I(PHY, "[CONFIG] Test of UE synchronisation \n"); - set_component_filelog(USIM); // file located in /tmp/testSynchroue.txt -#endif - //randominit(0); - //set_taus_seed(0); - printf("Start lte_param_init, frame_type %d, extended_prefix %d\n",frame_type,extended_prefix_flag); - PHY_vars_UE = malloc(sizeof(PHY_VARS_NR_UE)); - bzero(PHY_vars_UE, sizeof(PHY_VARS_NR_UE)); - - if (PHY_vars_UE == NULL) - return(-1); - - frame_parms = &(PHY_vars_UE->frame_parms); - frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz - frame_parms->N_RB_UL = N_RB_DL; - frame_parms->Ncp = extended_prefix_flag; - frame_parms->Nid_cell = Nid_cell; - frame_parms->nb_antennas_tx = N_tx; - frame_parms->nb_antennas_rx = N_rx; - frame_parms->frame_type = frame_type; - frame_parms->nb_antenna_ports_gNB = 1; - frame_parms->threequarter_fs = 0; - frame_parms->numerology_index = NUMEROLOGY_INDEX_MAX_NR; - int mu = 1; - int n_ssb_crb = 0; - int ssb_subcarrier_offset = 0; - nr_init_frame_parms_ue(frame_parms, mu, extended_prefix_flag, N_RB_DL, n_ssb_crb, ssb_subcarrier_offset); - int nid_2_num = get_softmodem_params()->sl_mode == 0 ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL; - PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + nid_2_num; /* set to unvalid value */ - - //phy_init_nr_top(frame_parms); - - if (init_nr_ue_signal(PHY_vars_UE, 1) != 0) { - LOG_E(PHY,"Error at UE NR initialisation : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME); - return (0); - } - - /* dummy initialisation of global structure PHY_vars_UE_g */ - uint16_t NB_UE_INST=1; - PHY_vars_UE_g = (PHY_VARS_NR_UE ** *)calloc( NB_UE_INST, sizeof(PHY_VARS_NR_UE **)); - - for (int UE_id=0; UE_idnb_antennas_tx = 1; - //(frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx_ue; - // PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag); - PHY_vars_UE_g[UE_id][CC_id] = calloc(1, sizeof(PHY_VARS_NR_UE)); - PHY_vars_UE_g[UE_id][CC_id]->Mod_id=UE_id; - PHY_vars_UE_g[UE_id][CC_id]->CC_id=CC_id; - } - } - - return (0); -} - -/******************************************************************* -* -* NAME : set_random_rx_buffer -* -* PARAMETERS : Ue context -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : write random data in received UE buffer of the synchronisation window -* -*********************************************************************/ - -typedef enum { - ZERO_DATA, - SINUSOIDAL_DATA, - RANDOM_DATA, - RANDOM_MAX_DATA -} random_data_format_t; - -/* data is a pure cosinus wave */ -#define SAMPLING_RATE (30720000L) -#define SCALING_SINUSOIDAL_DATA (4) /* 16 is max value without decimation */ -#define FREQUENCY_15_MHZ (15360000L) -#define FREQUENCY (FREQUENCY_15_MHZ) /* to generate a frequency with a sampling of 30,72 MHz 5 gives 770 KHz, 20 gives 1,5 MHz, 40 gives 3 MHz */ - -void set_random_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int amp) { - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - int samples_for_frame = frame_parms->samples_per_frame; - int16_t random; - int16_t *data_p; - random_data_format_t data_format = SINUSOIDAL_DATA; - /* reinitialise random for always getting same data */ - srand(0); - double n = 0; - - for (int aa=0; aaframe_parms.nb_antennas_rx; aa++) { - data_p = (int16_t *) &(PHY_vars_UE->common_vars.rxdata[aa][0]); - int frequency_switch = samples_for_frame/LTE_NUMBER_OF_SUBFRAMES_PER_FRAME; - int frequency_step = 0; - double beat = (2*M_PI*FREQUENCY_15_MHZ)/(SAMPLING_RATE); - - for (int i=0; i< samples_for_frame; i++) { - switch(data_format) { - case ZERO_DATA: { - /* all data are forced to zero */ - random = 0; - break; - } - - case SINUSOIDAL_DATA: { - /* sinusoidal signal */ - n = cos(beat*i); - random = n * (amp * SCALING_SINUSOIDAL_DATA); - frequency_step++; - - if (frequency_step == frequency_switch) { - beat = beat/2; /* frequency is divided by 2 */ - //printf("frequency %f at %d\n", (beat/2*M_PI), i); - frequency_step = 0; - } - - //printf("%d : cos %d %d \n", i, n, random); - break; - } - - case RANDOM_DATA: { - /* random data can take any value between -SHRT_MAX and SHRT_MAX */ - /* in this case one can use maxim value for uint16 because there is no saturation */ -#define SCALING_RANDOM_DATA (24) /* 48 is max value without decimation */ -#define RANDOM_MAX_AMP (amp * SCALING_RANDOM_DATA) - random = ((rand() % RANDOM_MAX_AMP) - RANDOM_MAX_AMP/2); - break; - } - - case RANDOM_MAX_DATA: { - /* random data can take only two value (-RANDOM_MAX) or RANDOM_MAX */ - /* In this case saturation can occur with value of scaling_value greater than 23 */ -#define SCALING_RANDOM_MAX_DATA (8) -#define RANDOM_VALUE (amp * SCALING_RANDOM_DATA) - const int random_number[2] = {-1,+1}; - random = random_number[rand()%2] * RANDOM_VALUE; - break; - } - - default: { - printf("Format of data is undefined \n"); - assert(0); - break; - } - } - - data_p[2*i] = random; - data_p[2*i+1] = random; -#if 0 - - if (i < 10) { - printf("random %d \n", random); - printf("data[%d] : %d %d at address %p \n", i, data_p[2*i], data_p[2*i+1], &data_p[2*i]); - } - -#endif - } - } -} - -/******************************************************************* -* -* NAME : set_pss_in_rx_buffer_from_external_buffer -* -* PARAMETERS : UE context -* position of pss in the received UE buffer -* number of pss sequence* -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : set received buffer according to an external buffer -* -*********************************************************************/ - -int set_pss_in_rx_buffer_from_external_buffer(PHY_VARS_NR_UE *PHY_vars_UE, short *input_buffer) { - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - int samples_for_frame = frame_parms->samples_per_frame; /* both i and q */ - - for (int aa=0; aaframe_parms.nb_antennas_rx; aa++) { - for (int i = 0; i < samples_for_frame; i++) { - ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[2*i] = input_buffer[2*i]; /* real part */ - ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[2*i+1] = input_buffer[2*i+1]; /* imaginary part */ - } - } - - /* check that sequence has been properly copied */ - for (int aa=0; aaframe_parms.nb_antennas_rx; aa++) { - for (int i=0; icommon_vars.rxdata[aa])[2*i]) - || (input_buffer[2*i+1] != ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[2*i+1])) { - printf("Sequence pss was not properly copied into received buffer at index %d \n", i); - exit(-1); - } - } - } - - return (0); -} - -/******************************************************************* -* -* NAME : set_pss_in_rx_buffer -* -* PARAMETERS : UE context -* position of pss in the received UE buffer -* number of pss sequence* -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : write reference pss sequence at a specified sample position in the received UE buffer -* -* first pss sequence is written into the buffer only if: -* - pss sequence is valid -* - there is enough room for written the complete sequence -* -* second sequence is written at a position of 5 ms after first pss sequence if: -* - pss sequence is valid -* - there is enough room for written the complete sequence* -* -*********************************************************************/ - -int set_pss_in_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number) { - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - int samples_for_frame = frame_parms->samples_per_frame; - int16_t *pss_sequence_time; - - if ((position_symbol > samples_for_frame) - || ((position_symbol + frame_parms->ofdm_symbol_size) > samples_for_frame)) { - printf("This pss sequence can not be fully written in the received window \n"); - return (-1); - } - int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; - if ((pss_sequence_number >= pss_sequence) && (pss_sequence_number < 0)) { - printf("Unknow pss sequence %d \n", pss_sequence_number); - return (-1); - } - - pss_sequence_time = primary_synchro_time_nr[pss_sequence_number]; - - for (int aa=0; aaframe_parms.nb_antennas_rx; aa++) { - for (int i = 0; i < frame_parms->ofdm_symbol_size; i++) { - ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[(position_symbol*2) + (2*i)] = pss_sequence_time[2*i]; /* real part */ - ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[(position_symbol*2) + (2*i+1)] = pss_sequence_time[2*i+1]; /* imaginary part */ - } - } - - /* check that sequence has been properly copied */ - for (int aa=0; aaframe_parms.nb_antennas_rx; aa++) { - for (int i=0; i<(frame_parms->ofdm_symbol_size); i++) { - if ((pss_sequence_time[2*i] != ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[(position_symbol*2) + (2*i)]) - || (pss_sequence_time[2*i+1] != ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[(position_symbol*2) + (2*i+1)])) { - printf("Sequence pss was not properly copied into received buffer at index %d \n", i); - exit(-1); - } - } - } - - return (0); -} - -/******************************************************************* -* -* NAME : set_sequence_pss -* -* PARAMETERS : UE context -* position of pss in the received UE buffer -* number of pss sequence* -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : write reference pss sequence at a specified sample position in the received UE buffer -* -* pss sequence is written into the buffer only if: -* - pss sequence is valid -* - there is enough room for written the complete sequence* -* -*********************************************************************/ - -void set_sequence_pss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number) { - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - int samples_for_frame = frame_parms->samples_per_frame; - /* initialise received ue data with random */ - set_random_rx_buffer(PHY_vars_UE, AMP); - - /* in this case input buffer is provided by an external buffer */ - if (position_symbol < 0) { - set_pss_in_rx_buffer_from_external_buffer(PHY_vars_UE, input_buffer); - } - int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL; - /* write pss sequence in received ue buffer */ - else if (pss_sequence_number < pss_sequence) { - if (position_symbol > (samples_for_frame - frame_parms->ofdm_symbol_size)) { - printf("This position for pss sequence %d is not supported because it exceeds the frame length %d!\n", position_symbol, samples_for_frame); - exit(0); - } - - if (set_pss_in_rx_buffer(PHY_vars_UE, position_symbol, pss_sequence_number) != 0) - printf("Warning: pss sequence can not be properly written into received buffer !\n"); - } - - display_data(pss_sequence_number, (int16_t *)&(PHY_vars_UE->common_vars.rxdata[0][0]), position_symbol); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.h b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.h deleted file mode 100644 index 78efc2234b..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.h +++ /dev/null @@ -1,109 +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 - */ - -/********************************************************************** -* -* FILENAME : pss_util_test.h -* -* MODULE : UE utilities for test bench of synchronisation -* -* DESCRIPTION : it allows unitary tests of UE synchronisation on host machine -* -************************************************************************/ - -#ifndef PSS_UTIL_TEST_H -#define PSS_UTIL_TEST_H - -#include -#include -#include -#include -#include - -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/phy_extern_nr_ue.h" - -#include "PHY/NR_REFSIG/pss_nr.h" - -#ifdef DEFINE_VARIABLES_PSS_NR_H -#define EXTERN -#define INIT_VARIABLES_PSS_NR_H -#else -#define EXTERN extern -#undef INIT_VARIABLES_PSS_NR_H -#endif - -/************** DEFINE *******************************************/ - -//#define DEBUG_TEST_PSS -#define PSS_DETECTION_MARGIN_MAX (4) - -#define NUMEROLOGY_INDEX_MAX_NR (5) - -/*************** TYPE*********************************************/ - -typedef struct { - const char *test_current; - int number_of_tests; - int number_of_pass; - int number_of_pass_warning; - int number_of_fail; -} test_t; - -/*************** GLOBAL VARIABLES***********************************/ - -EXTERN PHY_VARS_eNB *PHY_vars_eNB; -EXTERN PHY_VARS_NR_UE *PHY_vars_UE; - -/*************** FUNCTIONS *****************************************/ - -void undefined_function(const char *function); - -void display_data(int pss_sequence_number, int16_t *rxdata, int position); - -void init_decimator_test(void); - -void decimation_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int **rxdata); - -void restore_context_frame(int **rxdata); - -int set_pss_in_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number); - -int init_test(unsigned char N_tx, unsigned char N_rx, unsigned char transmission_mode, - unsigned char extended_prefix_flag, uint8_t frame_type, uint16_t Nid_cell, - int N_RB_DL); - -void display_test_configuration_pss(int position, int pss_sequence_number); - -void display_test_configuration_sss(int sss_sequence_number); - -int set_pss_nr(int ofdm_symbol_size); - -void set_random_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int amp); - -void set_sequence_pss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number); - -int set_pss_in_rx_buffer_from_external_buffer(PHY_VARS_NR_UE *PHY_vars_UE, short *inputBuffer); - -void phase_shift_samples(int16_t *samples, int length, int16_t phase_shift_re, int16_t phase_shift_im); - -#endif /* PSS_UTIL_TEST_H */ diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_generator_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_generator_test.c deleted file mode 100644 index 4948d0a876..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_generator_test.c +++ /dev/null @@ -1,166 +0,0 @@ -#include "../../unit_tests/src/pss_util_test.h" -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/phy_extern_nr_ue.h" - -/* -#include "SCHED_NR_UE/defs.h" -#include "SCHED_NR/extern.h" - -#include "SCHED_NR_UE/harq_nr.h" -*/ -#include "SCHED_NR_UE/pucch_uci_ue_nr.h" - -/**************** define **************************************/ - -#define TST_GNB_ID_0 (0) /* first index of gNB */ -#define TST_THREAD_ID (0) - - -int test_pucch_generators(PHY_VARS_NR_UE *ue) { - int gNB_id = TST_GNB_ID_0; - int thread_number = TST_THREAD_ID; - int TB_identifier = 0; - int v_return = 0; - pucch_format_nr_t format = pucch_format2_nr; - uint8_t starting_symbol_index; - uint8_t nb_symbols_total = 4; - uint16_t starting_prb = 0;; /* it can be considered as first hop on case of pucch hopping */ - uint16_t second_hop = 0; /* second part for pucch for hopping */ - uint8_t nb_of_prbs = 1; - - switch (format) { - case pucch_format0_nr: - nb_symbols_total = 2; - nb_of_prbs = 1; - starting_symbol_index = 0; - break; - - case pucch_format1_nr: - nb_symbols_total = 5; - nb_of_prbs = 1; - starting_symbol_index = 0; - break; - - case pucch_format2_nr: - nb_symbols_total = 2; - nb_of_prbs = 16; - starting_symbol_index = 0; - break; - } - - int m_0 = 0; /* format 0 only */ - int m_CS = 0; /* for all format except for format 0 */ - int index_additional_dmrs = I_PUCCH_NO_ADDITIONAL_DMRS; - int index_hopping = I_PUCCH_NO_HOPPING; - int time_domain_occ = 0; - int occ_length = 0; - int occ_Index = 0; - uint64_t pucch_payload = 0; - int tx_amp = 512; - int nr_slot_tx = 0; - int N_UCI = 0; /* size in bits for Uplink Control Information */ - - switch(format) { - case pucch_format0_nr: { - nr_generate_pucch0(ue,ue->common_vars.txdataF, - &ue->frame_parms, - &ue->pucch_config_dedicated_nr[gNB_id], - tx_amp, - nr_slot_tx, - (uint8_t)m_0, - (uint8_t)m_CS, - nb_symbols_total, - starting_symbol_index, - starting_prb); - break; - } - - case pucch_format1_nr: { - nr_generate_pucch1(ue,ue->common_vars.txdataF, - &ue->frame_parms, - &ue->pucch_config_dedicated_nr[gNB_id], - pucch_payload, - tx_amp, - nr_slot_tx, - (uint8_t)m_0, - nb_symbols_total, - starting_symbol_index, - starting_prb, - second_hop, - (uint8_t)time_domain_occ, - (uint8_t)N_UCI); - break; - } - - case pucch_format2_nr: { - nr_generate_pucch2(ue, - ue->pdcch_vars[thread_number][gNB_id]->crnti, - ue->common_vars.txdataF, - &ue->frame_parms, - &ue->pucch_config_dedicated_nr[gNB_id], - pucch_payload, - tx_amp, - nr_slot_tx, - nb_symbols_total, - starting_symbol_index, - nb_of_prbs, - starting_prb, - (uint8_t)N_UCI); - break; - } - - case pucch_format3_nr: - case pucch_format4_nr: { - nr_generate_pucch3_4(ue, - ue->pdcch_vars[thread_number][gNB_id]->crnti, - ue->common_vars.txdataF, - &ue->frame_parms, - format, - &ue->pucch_config_dedicated_nr[gNB_id], - pucch_payload, - tx_amp, - nr_slot_tx, - nb_symbols_total, - starting_symbol_index, - nb_of_prbs, - starting_prb, - second_hop, - (uint8_t)N_UCI, - (uint8_t)occ_length, - (uint8_t)occ_Index); - break; - } - } - - return (v_return); -} - - -int main(int argc, char *argv[]) { - uint8_t transmission_mode = 1; - uint8_t nb_antennas_tx = 1; - uint8_t nb_antennas_rx = 1; - uint8_t frame_type = FDD; - int N_RB_DL=106; - lte_prefix_type_t extended_prefix_flag = NORMAL; - int Nid_cell[] = {(3*1+3)}; - VOID_PARAMETER argc; - VOID_PARAMETER argv; - printf(" PUCCH TEST \n"); - printf("-----------\n"); - - if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) { - printf("Initialisation problem for test \n"); - exit(-1);; - } - - if (test_pucch_generators(PHY_vars_UE) != 0) { - printf("\nTest PUCCH is fail \n"); - } else { - printf("\nTest PUCCH is pass \n"); - } - - free_context_synchro_nr(); - return(0); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c deleted file mode 100644 index 1217f70fba..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c +++ /dev/null @@ -1,1263 +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 - */ - -/********************************************************************** -* -* FILENAME : pucch_uci_test.c -* -* MODULE : UE test bench for pucch tests -* -* DESCRIPTION : it allows unitary tests of PUCCH UCI on host machine -* -************************************************************************/ - -#include "../../unit_tests/src/pss_util_test.h" -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/phy_extern_nr_ue.h" - -#include "SCHED_NR_UE/defs.h" -#include "SCHED_NR/extern.h" - -#include "SCHED_NR_UE/harq_nr.h" -#include "SCHED_NR_UE/pucch_uci_ue_nr.h" - - -/**************** define **************************************/ - -#define TST_GNB_ID_0 (0) /* first index of gNB */ -#define TST_THREAD_ID (0) - -#define TST_N_BWP_SIZE (100) /* band width for pucch */ - -#define TST_PUCCH_COMMON_CONFIG_INDEX_KO (6) -#define TST_PUCCH_COMMON_CONFIG_INDEX_OK (1) - -#define TST_DL_HARQ_PID_FIRST (1) -#define TST_DL_HARQ_PID_SECOND (3) -#define TST_DL_HARQ_PID_THIRD (4) -#define TST_DL_HARQ_PID_FOURTH (0) - -#define TST_NB_RESOURCE_SET (MAX_NB_OF_PUCCH_RESOURCE_SETS) -#define TST_NB_RESOURCES (32) -#define TST_NB_RESOURCES_PER_SET (8) - -/* pucch power control */ -#define TST_P0_NOMINAL (3) /* -202..24 */ -#define TST_P0_PUCCH_VALUE (0) /* -16..15 */ -#define TST_DELTA_F (1) /* -16..15 */ -#define TST_TX_POWER_MAX_DBM (24) /* -202..24 */ - - -/**************** extern *****************************************/ - -extern uint32_t (*p_nr_ue_get_SR)(module_id_t module_idP,int CC_id,frame_t frameP,uint8_t eNB_id,uint16_t rnti, sub_frame_t subframe); - -/**************** variables **************************************/ - -uint32_t tst_scheduling_request_payload; - -const char tst_separator[255] = "\n-------------------------------------------------------------------------------------------\n"; - -/******************************************************************* -* -* NAME : init_pucch_power_configuration -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : set power onfiguration -* -*********************************************************************/ - -void init_pucch_power_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id) { - - ue->pucch_config_common_nr[gNB_id].p0_nominal = TST_P0_NOMINAL; - - PUCCH_PowerControl_t *power_config = &ue->pucch_config_dedicated_nr[gNB_id].pucch_PowerControl; - - P0_PUCCH_t *p_p0_pucch = calloc( 1, sizeof(P0_PUCCH_t)); - - p_p0_pucch->p0_PUCCH_Value = TST_P0_PUCCH_VALUE; - p_p0_pucch->p0_PUCCH_Id = 1; - - power_config->p0_Set[0] = p_p0_pucch; - - for (int i = 0; i < NUMBER_PUCCH_FORMAT_NR; i++) { - power_config->deltaF_PUCCH_f[i] = TST_DELTA_F + i; - } - - ue->tx_power_max_dBm = TST_TX_POWER_MAX_DBM; -} - -/******************************************************************* -* -* NAME : init_pucch_configuration -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : set srs default configuration -* -*********************************************************************/ - -void common_pucch_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int pucch_index_config) -{ - printf("\nSet pucch common configuration \n"); - - for (int i = 0; i < MAX_NB_OF_PUCCH_RESOURCES; i++) { - ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[i] = NULL; - } - - for (int i = 0; i < MAX_NB_OF_PUCCH_RESOURCE_SETS; i++) { - ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i] = NULL; - } - - for (int i = 0; i < NUMBER_PUCCH_FORMAT_NR-1; i++) { - ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i] = NULL; - } - - ue->pucch_config_common_nr[gNB_id].pucch_ResourceCommon = pucch_index_config; - - /* default number of pdsch code words */ - ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n1; - - /* init of band width part for pucch */ - ue->systemInformationBlockType1_nr.N_BWP_SIZE = TST_N_BWP_SIZE; - - /* init default state */ - ue->UE_mode[gNB_id] = PRACH; -} - -/******************************************************************* -* -* NAME : test_pucch_basic_error -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of PUCCH error cases -* in this case no transmission occurs -* -*********************************************************************/ - -int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc) -{ - int v_return = 0; - bool reset_harq = false; - - printf("%s", tst_separator); - - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST; - - printf("\n => Test : No harq feedback on going\n"); - - common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_KO); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - /* set a tx slot with no ack */ - NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - - printf("\n => Test : Error due to acknownlegment not set \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - harq_status->ack = DL_ACK; - - printf("\n => Test : Error due to DAI not set \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - printf("\n => Test : Error due to DAI at wrong value \n"); - - harq_status->vDAI_DL = NR_DL_MAX_DAI + 1; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - printf("\n => Test : Error due to ACK not ready to be send \n"); - - harq_status->vDAI_DL = 0; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - printf("\n => Test : Error due to invalid DAI value \n"); - - harq_status->send_harq_status = 1; /* ack ready to be send */ - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - common_pucch_configuration(ue, gNB_id, NB_INITIAL_PUCCH_RESOURCE); - - printf("\n => Test : Error due to undefined PUCCH format from common config \n"); - - harq_status->vDAI_DL = 1; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - ue->n_connected_gNB = 2; - - printf("\n => Test : Error due to PUCCH format with multiple cells not already implemented \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - ue->n_connected_gNB = 1; - - return (v_return); -} - -/******************************************************************* -* -* NAME : test_pucch_common_config_single_transport_block -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of PUCCH from common configuration* -* -*********************************************************************/ - -int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc) -{ - int v_return = 0; - bool reset_harq = false; - - printf("%s", tst_separator); - - common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_OK); - - /* set a tx slot with no ack */ - NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack; - - harq_status->ack = DL_ACK; - - printf("\n => Test : PUCCH format from common config in prach mode: one positive downlink ACKnowledgment \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - v_return = -1; - } - - harq_status->decodeResult = false; - - printf("\n => Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - v_return = -1; - } - - /* switch ue mode after PRACH phase */ - ue->UE_mode[gNB_id] = PUSCH; - - /* set a second ack on a different downlink harq process */ - - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_SECOND; - - harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_SECOND].harq_ack; - - harq_status->n_CCE = 2; - harq_status->N_CCE = 4; - harq_status->pucch_resource_indicator = 1; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = 2; - harq_status->ack = DL_ACK; - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - - printf("\n => Test : PUCCH format from common config in dedicated mode: two positive downlink ACKnowledgments \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - v_return = -1; - } - - harq_status->decodeResult = false; - - printf("\n => Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - v_return = -1; - } - - ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack.ack = DL_NACK; - - printf("\n => Test : PUCCH format from common config in dedicated mode: two negative downlink ACKnowledgments \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - v_return = -1; - } - - harq_status->ack = DL_ACK; - reset_harq = true; - - printf("\n => Test : PUCCH format from common config in dedicated mode: no resource is found \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - printf("\n => Test : PUCCH format from common config in dedicated mode: no PUCCH after reset of pending harq ACKnowledgments \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - return (v_return); -} - -/******************************************************************* -* -* NAME : init_pucch_dedicated_configuration -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : initialisation of PUCCH from dedicated configuration -* -*********************************************************************/ - -void init_pucch_dedicated_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id) -{ - PUCCH_FormatConfig_t *p_format; - PUCCH_Resource_t *p_resource; - PUCCH_ResourceSet_t *p_resource_set; - int i,j; - - /* set cell group parameters which are supported */ - ue->cell_group_config.physicalCellGroupConfig.harq_ACK_SpatialBundlingPUCCH = false; - ue->cell_group_config.physicalCellGroupConfig.pdsch_HARQ_ACK_Codebook = dynamic; - - ue->PDSCH_ServingCellConfig.codeBlockGroupTransmission = NULL; - ue->PDSCH_ServingCellConfig.nrofHARQ_ProcessesForPDSCH = 8; - - printf("\nSet default pucch dedicated configuration \n"); - - for (i = 0; i < NB_DL_DATA_TO_UL_ACK; i++) { - ue->pucch_config_dedicated_nr[gNB_id].dl_DataToUL_ACK[i] = i + NR_UE_CAPABILITY_SLOT_RX_TO_TX; - } - - /* set configuration for format 1 to 4 */ - for (i = 0; i < NUMBER_PUCCH_FORMAT_NR-1; i++) { - - p_format = calloc( 1, sizeof(PUCCH_FormatConfig_t)); - - if (p_format == NULL) { - printf("Error of memory allocation : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__); - assert(0); - } - else { - //printf("Allocation %p \n", p_format); - p_format->interslotFrequencyHopping = feature_disabled; - p_format->additionalDMRS = disable_feature; - p_format->maxCodeRate = i; - p_format->nrofSlots = 1; - p_format->pi2PBSK = feature_disabled; - p_format->simultaneousHARQ_ACK_CSI = disable_feature; - } - - ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i] = p_format; - } - - /* 4 resource set with 8 resources */ - /* for set 0 only format 0 and 1 can be used */ - const pucch_format_nr_t tst_pucch_format[TST_NB_RESOURCE_SET][TST_NB_RESOURCES_PER_SET] = { -/* set 0 */ { pucch_format0_nr, pucch_format1_nr, pucch_format0_nr, pucch_format1_nr, pucch_format0_nr, pucch_format1_nr, pucch_format0_nr, pucch_format1_nr}, -/* set 1 */ { pucch_format2_nr, pucch_format3_nr, pucch_format4_nr, pucch_format2_nr, pucch_format3_nr, pucch_format4_nr, pucch_format2_nr, pucch_format3_nr}, -/* set 2 */ { pucch_format2_nr, pucch_format3_nr, pucch_format4_nr, pucch_format2_nr, pucch_format3_nr, pucch_format4_nr, pucch_format2_nr, pucch_format3_nr}, -/* set 3 */ { pucch_format3_nr, pucch_format3_nr, pucch_format4_nr, pucch_format3_nr, pucch_format3_nr, pucch_format4_nr, pucch_format3_nr, pucch_format3_nr}, - }; - - /* from TS 38.331 The field is not present in the first set (Set0) since the maximum Size of Set0 is specified to be 3 bit. */ - const int tst_max_payload[TST_NB_RESOURCE_SET] = { 1, 2, 4, 9 }; - - int counter_resource_id = 0; - - /* create TST_NB_RESOURCE_SET resources set with resources according to test tables */ - /* each resource set has TST_NB_RESOURCES_PER_SET resources */ - for (i = 0; i < TST_NB_RESOURCE_SET; i++) { - - p_resource_set = calloc( 1, sizeof(PUCCH_ResourceSet_t)); - - if (p_resource_set == NULL) { - printf("Error of memory allocation : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__); - assert(0); - } - else { - //printf("Allocation %p \n", p_resource_set); - p_resource_set->pucch_ResourceSetId = i; - p_resource_set->maxPayloadMinus1 = tst_max_payload[i]; - - /* create resources for format 0 to 4 */ - for (j = 0; j < TST_NB_RESOURCES_PER_SET; j++) { - - p_resource_set->pucch_resource_id[j] = counter_resource_id; - - p_resource = calloc( 1, sizeof(PUCCH_Resource_t)); - - if (p_resource == NULL) { - //printf("Error of memory allocation : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__); - assert(0); - } - else { - //printf("Allocation %p \n", p_resource); - p_resource->format_parameters.format = tst_pucch_format[i][j]; - p_resource->pucch_ResourceId = counter_resource_id; - p_resource->startingPRB = i+1; - p_resource->intraSlotFrequencyHopping = 0; - p_resource->secondHopPRB = 0; - p_resource->format_parameters.initialCyclicShift = i+2; - p_resource->format_parameters.timeDomainOCC = 0; - p_resource->format_parameters.nrofPRBs = j + i; - p_resource->format_parameters.occ_length = 0; - p_resource->format_parameters.occ_Index = 0; - - switch(p_resource->format_parameters.format) { - case 0: - p_resource->format_parameters.nrofSymbols = 1; - break; - case 1: - p_resource->format_parameters.timeDomainOCC = 10+j; - p_resource->format_parameters.nrofSymbols = 4+j; - p_resource->format_parameters.timeDomainOCC = j%6; - break; - case 2: - p_resource->format_parameters.nrofSymbols = 2; - break; - case 3: - p_resource->format_parameters.nrofSymbols = 4+j; - break; - case 4: - p_resource->format_parameters.nrofSymbols = 4+j; - p_resource->format_parameters.occ_length = 10+j; -// p_resource->format_parameters.occ_Index = 11+j; - p_resource->format_parameters.occ_Index = 0; - break; - default: - LOG_E(PHY,"Unknown format : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__); - } - p_resource->format_parameters.startingSymbolIndex = i; - } - - ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[counter_resource_id] = p_resource; - counter_resource_id++; /* next resource id */ - } - } - if (i == 0) { /* this is the first resource set */ - p_resource_set->first_resources_set_R_PUCCH = j; - } - for (; j < MAX_NB_OF_PUCCH_RESOURCES_PER_SET; j++) { - p_resource_set->pucch_resource_id[j] = MAX_NB_OF_PUCCH_RESOURCES; - ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i] = p_resource_set; - } - } -} - -/******************************************************************* -* -* NAME : relase_pucch_dedicated_configuration -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : release of PUCCH dedicated configuration -* -*********************************************************************/ - -void release_pucch_dedicated_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id) -{ - int i; - - printf("\nRelease default pucch dedicated configuration \n"); - - /* release of resources set */ - for (i = 0; i < MAX_NB_OF_PUCCH_RESOURCE_SETS; i++) { - if (ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i] != NULL) { - //printf("Free %p \n", ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i]); - free(ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i]); - } - } - - /* release of resources */ - for (i = 0; i < MAX_NB_OF_PUCCH_RESOURCES; i++) { - if (ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[i] != NULL) { - //printf("Free %p \n", ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[i]); - free(ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[i]); - } - } - - /* release of format */ - for (i = 0; i < NUMBER_PUCCH_FORMAT_NR-1; i++) { - if (ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i] != NULL) { - //printf("Free %p \n", ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i]); - free(ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i]); - } - } -} - -/******************************************************************* -* -* NAME : test_pucch_dedicated_single_transport_block -* -* PARAMETERS : ue context -* gNB identity -* current rx and tx time frame -* -* RETURN : none -* -* DESCRIPTION : test of PUCCH from dedicated configuration -* get DAI values from downlink harq and the generates -* acknownledgment with a PUCCH -* -*********************************************************************/ - -int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc) -{ -#define TST_NB_STEP_SINGLE_TRANSPORT_BLOCK (4) - - int v_return = 0; - int reset_harq = false; - int dl_harq_pid[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH }; - int pucch_resource_indicator[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK][2] = { { 0, 4 }, { 1, 0 } , { 1, 3 } , { 5, 7 } }; - NR_UE_DL_HARQ_STATUS_t *harq_status; - - ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n1; - - printf("%s", tst_separator); - - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST; - - harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = 1; - harq_status->ack = DL_ACK; - harq_status->pucch_resource_indicator = MAX_PUCCH_RESOURCE_INDICATOR; - - printf("\n => Test : PUCCH format from dedicated config : pucch resource indicator is invalid \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - v_return = -1; - } - - for (int i = 0; i < TST_NB_STEP_SINGLE_TRANSPORT_BLOCK; i++) { - - /* set a tx slot with no ack */ - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = dl_harq_pid[i]; - - NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = i+1; - harq_status->ack = DL_ACK; - - for (int j = 0 ; j < 2; j++) { - - /* reset ack context on last test */ - if ((i == (TST_NB_STEP_SINGLE_TRANSPORT_BLOCK-1)) && (j == 1)) { - reset_harq = true; - } - - harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j]; - - printf("\n => Test : PUCCH format from dedicated config with 1 transport block : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - v_return = -1; - } - } - } - - /* Test with missed PDSCH */ - /* some transport blocks have been missed and they need to be nack by UE in order to be retransmitted by the network */ - - int i; - - for (i = 1; i < TST_NB_STEP_SINGLE_TRANSPORT_BLOCK; i = i+2) { - - /* set a tx slot with no ack */ - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = dl_harq_pid[i]; - - NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = i+1; - harq_status->ack = DL_ACK; - harq_status->pucch_resource_indicator = pucch_resource_indicator[i][0]; - } - - reset_harq = true; - - printf("\n => Test : PUCCH format from dedicated config with 1 transport block and missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[3][0]); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - v_return = -1; - } - - return (v_return); -} - -/******************************************************************* -* -* NAME : test_pucch_dedicated_config_two_transport_blocks -* -* PARAMETERS : ue context -* gNB identity -* current rx and tx time frame -* -* RETURN : none -* -* DESCRIPTION : test of PUCCH from dedicated configuration -* get DAI values from downlink harq and the generates -* acknownledgment with a PUCCH -* -*********************************************************************/ - -int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc) -{ -#define TST_NB_STEP_TWO_TRANSPORT_BLOCKS (4) - - int v_return = 0; - int reset_harq = false; - int dl_harq_pid[TST_NB_STEP_TWO_TRANSPORT_BLOCKS] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH }; - int pucch_resource_indicator[TST_NB_STEP_TWO_TRANSPORT_BLOCKS][2] = { { 0, 1 }, { 3, 7 } , { 2 , 4 } , { 4 , 6 } }; - NR_UE_DL_HARQ_STATUS_t *harq_status; - int TB_identifier = 1; - int thread_number = TST_THREAD_ID; - - ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n2; - - printf("%s", tst_separator); - - /* create context for second transport block */ - config_downlink_harq_process(ue , gNB_id, TB_identifier, thread_number, NR_DEFAULT_DLSCH_HARQ_PROCESSES); - - for (int i = 0; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i++) { - - for (int code_word = 0; code_word < 2; code_word++) { - - ue->dlsch[proc->thread_id][gNB_id][code_word]->Number_MCS_HARQ_DL_DCI = 2; - - /* set a tx slot with no ack */ - ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i]; - - NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = i+1; - harq_status->ack = DL_ACK; - } - - for (int j = 0 ; j < 2; j++) { - - /* reset ack context on last test */ - if ((i == (TST_NB_STEP_TWO_TRANSPORT_BLOCKS-1)) && (j == 1)) { - reset_harq = true; - } - - harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack; - - harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j]; - - printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - } - } - - /* Test with missed PDSCH */ - /* some transport blocks have been missed and they need to be nack by UE in order to be retransmitted by the network */ - /* here first and third block receptions have been missed */ - - reset_harq = true; - - for (int i = 1; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i = i + 1) { - - for (int code_word = 0; code_word < 2; code_word++) { - - ue->dlsch[proc->thread_id][gNB_id][code_word]->Number_MCS_HARQ_DL_DCI = 2; - - /* set a tx slot with no ack */ - ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i]; - - NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = i+1; - harq_status->ack = DL_ACK; - - for (int j = 0 ; j < 2; j++) { - - harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack; - - harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j]; - } - } - } - - printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks and 1 missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", 4, pucch_resource_indicator[3][0]); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks and 2 missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", 4, pucch_resource_indicator[3][0]); - - for (int i = 1; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i = i + 2) { - - for (int code_word = 0; code_word < 2; code_word++) { - - ue->dlsch[proc->thread_id][gNB_id][code_word]->Number_MCS_HARQ_DL_DCI = 2; - - /* set a tx slot with no ack */ - ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i]; - - NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = i+1; - harq_status->ack = DL_ACK; - - for (int j = 0 ; j < 2; j++) { - - harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack; - - harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j]; - } - } - } - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n1; /* set to default value */ - - return (v_return); -} - -/******************************************************************* -* -* NAME : tst_set_scheduling_request_configuration -* -* PARAMETERS : resource identity -* period and offset -* -* RETURN : none -* -* DESCRIPTION : set configuration of scheduling request -* -*********************************************************************/ - -void tst_set_scheduling_request_configuration (PHY_VARS_NR_UE *ue, int gNB_id, int sr_config_index, int resource_id, sr_periodicity_t periodicity, int offset) -{ - SchedulingRequestResourceConfig_t *p_scheduling_request_config = calloc( 1, sizeof(SchedulingRequestResourceConfig_t)); - - p_scheduling_request_config->schedulingRequestResourceId = 0; - p_scheduling_request_config->schedulingRequestID = 0; - p_scheduling_request_config->resource = resource_id; - p_scheduling_request_config->periodicity = periodicity; - p_scheduling_request_config->offset = offset; - - ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[sr_config_index] = p_scheduling_request_config; - ue->scheduling_request_config_nr[gNB_id].active_sr_id = sr_config_index; -} - -/******************************************************************* -* -* NAME : tst_free_scheduling_request_configuration -* -* PARAMETERS : resource identity -* period and offset -* -* RETURN : none -* -* DESCRIPTION : set configuration of scheduling request -* -*********************************************************************/ - -void tst_free_scheduling_request_configuration (PHY_VARS_NR_UE *ue, int gNB_id, int sr_config_index) -{ - free(ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[sr_config_index]); - - ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[sr_config_index] = NULL; -} - -/******************************************************************* -* -* NAME : tst_ue_get_SR -* -* PARAMETERS : frameP is the sr payload -* -* RETURN : frameP is the sr payload -* -* DESCRIPTION : return payload of scheduling request -* -*********************************************************************/ - -uint32_t tst_ue_get_SR(module_id_t module_idP,int CC_id,frame_t frameP,uint8_t eNB_id,uint16_t rnti, sub_frame_t subframe) -{ - VOID_PARAMETER module_idP; - VOID_PARAMETER CC_id; - VOID_PARAMETER frameP; - VOID_PARAMETER eNB_id; - VOID_PARAMETER subframe; - VOID_PARAMETER rnti; - return (tst_scheduling_request_payload); -} - -/******************************************************************* -* -* NAME : tst_set_sr_config -* -* PARAMETERS : ue context -* gNB_id identity -* -* RETURN : none -* -* DESCRIPTION : set sr configuration -* -*********************************************************************/ - -void tst_set_sr_config(PHY_VARS_NR_UE *ue, int gNB_id) { - ue->scheduling_request_config[gNB_id].sr_ConfigIndex = 0; - p_nr_ue_get_SR = tst_ue_get_SR; -} - -/******************************************************************* -* -* NAME : test_sr_dedicated -* -* PARAMETERS : ue context -* gNB identity -* current rx and tx time frame -* -* RETURN : none -* -* DESCRIPTION : test of PUCCH from dedicated configuration -* with scheduling request -* -*********************************************************************/ - -int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc) -{ - int v_return = 0; - int reset_harq = 0; - int sr_config_id = 0; - int sr_resource_id = 0; - int sr_offset = 0; - - printf("%s", tst_separator); - - tst_set_scheduling_request_configuration( ue, gNB_id, sr_config_id, sr_resource_id, sr_sl1, sr_offset); - - tst_set_sr_config( ue, gNB_id); - - printf("\n => Test : PUCCH format from dedicated config with only a negative scheduling request : no PUCCH should be generated \n"); - - tst_scheduling_request_payload = 0; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format 0 from dedicated config with only a positive scheduling request \n"); - - tst_scheduling_request_payload = 1; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format 1 from dedicated config with only a positive scheduling request \n"); - - sr_resource_id = 1; - - tst_set_scheduling_request_configuration( ue, gNB_id, sr_config_id, sr_resource_id, sr_sl1, sr_offset ); - - tst_scheduling_request_payload = 1; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - /* restore single transport block */ - ue->dlsch[proc->thread_id][gNB_id][0]->Number_MCS_HARQ_DL_DCI = 1; - - return (v_return); -} - -/******************************************************************* -* -* NAME : test_sr_ack_dedicated -* -* PARAMETERS : ue context -* gNB identity -* current rx and tx time frame -* -* RETURN : none -* -* DESCRIPTION : test of PUCCH from dedicated configuration -* with scheduling request and acknowledgment -* -*********************************************************************/ - -int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc) -{ - int v_return = 0; - bool reset_harq = false; - int sr_config_id = 0; - int sr_resource_id = 0; - int sr_offset = 0; - int pucch_resource_indicator[5] = { 0, 1, 2, 3, 4 }; - - printf("%s", tst_separator); - - tst_set_scheduling_request_configuration( ue, gNB_id, sr_config_id, sr_resource_id, sr_sl1, sr_offset); - - tst_set_sr_config( ue, gNB_id); - - printf("\n => Test : PUCCH format from dedicated config with a negative scheduling request and a positive ack \n"); - - /* set a first harq ack context */ - - NR_UE_DL_HARQ_STATUS_t *harq_status; - - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST; - - harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = 1; - harq_status->ack = DL_ACK; - harq_status->pucch_resource_indicator = pucch_resource_indicator[0]; - - tst_scheduling_request_payload = 0; /* set sr payload */ - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and a positive ack \n"); - - tst_scheduling_request_payload = 1; /* set sr payload */ - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and a positive ack \n"); - - harq_status->pucch_resource_indicator = pucch_resource_indicator[1]; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks \n"); - - /* set a second harq ack context */ - - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_SECOND; - - harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_SECOND].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = 2; - harq_status->ack = DL_ACK; - harq_status->pucch_resource_indicator = pucch_resource_indicator[0]; - - tst_scheduling_request_payload = 1; /* set sr payload */ - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks \n"); - - harq_status->pucch_resource_indicator = pucch_resource_indicator[1]; - reset_harq = true; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - tst_free_scheduling_request_configuration(ue, gNB_id, sr_config_id); - - return (v_return); -} - -/******************************************************************* -* -* NAME : test_csi_dedicated -* -* PARAMETERS : ue context -* gNB identity -* current rx and tx time frame -* -* RETURN : none -* -* DESCRIPTION : test of PUCCH from dedicated configuration -* with channel state information CSI -* -*********************************************************************/ - -int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc) -{ - int v_return = 0; - int reset_harq = false; - int sr_config_id = 0; - int sr_resource_id = 0; - int sr_offset = 0; - int pucch_resource_indicator[5] = { 0, 1, 2, 3, 4 }; - - printf("%s", tst_separator); - - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = NR_MAX_DLSCH_HARQ_PROCESSES; - - printf("\n => Test : PUCCH format from dedicated config with CSI alone \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format from dedicated config with ACK and CSI \n"); - - /* set a first harq ack context */ - - NR_UE_DL_HARQ_STATUS_t *harq_status; - - ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST; - - harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack; - - harq_status->slot_for_feedback_ack = proc->nr_slot_tx; - harq_status->send_harq_status = 1; - harq_status->vDAI_DL = 1; - harq_status->ack = DL_ACK; - harq_status->pucch_resource_indicator = pucch_resource_indicator[3]; - - ue->pucch_config_dedicated_nr[gNB_id].formatConfig[2-1]->simultaneousHARQ_ACK_CSI = enable_feature; /* format 2 */ - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format from dedicated config with ACK, negative SR and CSI \n"); - - tst_set_scheduling_request_configuration( ue, gNB_id, sr_config_id, sr_resource_id, sr_sl1, sr_offset); - - tst_set_sr_config( ue, gNB_id); - - tst_scheduling_request_payload = 0; /* set sr payload */ - - reset_harq = true; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - printf("\n => Test : PUCCH format from dedicated config with negative SR and CSI \n"); - - harq_status->pucch_resource_indicator = pucch_resource_indicator[4]; - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - tst_scheduling_request_payload = 1; - - printf("\n => Test : PUCCH format from dedicated config with positive SR and CSI \n"); - - if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) { - printf("Test fail \n"); - v_return = -1; - } - - return (v_return); -} - -/******************************************************************* -* -* NAME : test_pucch -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of PUCCH feature -* -*********************************************************************/ - -int test_pucch(PHY_VARS_NR_UE *ue) -{ - int gNB_id = TST_GNB_ID_0; - int thread_number = TST_THREAD_ID; - int TB_identifier = 0; - int v_return = 0; - - UE_nr_rxtx_proc_t *proc = calloc( 1, sizeof(UE_nr_rxtx_proc_t)); - if (proc == NULL) { - printf("Error test_srs: memory allocation problem p_rxtx_proc \n"); - assert(0); - } - - proc->frame_rx = 0; - proc->nr_slot_rx = 0; - - proc->frame_tx = proc->frame_rx + (proc->nr_slot_rx + NR_UE_CAPABILITY_SLOT_RX_TO_TX) / ue->frame_parms.slots_per_frame; - proc->nr_slot_tx = (proc->nr_slot_rx + NR_UE_CAPABILITY_SLOT_RX_TO_TX) % ue->frame_parms.slots_per_frame; - - init_pucch_power_configuration( ue, gNB_id); - - /* init and clear downlink harq */ - config_downlink_harq_process(ue , gNB_id, TB_identifier, thread_number, NR_DEFAULT_DLSCH_HARQ_PROCESSES); - - if (test_pucch_basic_error(ue, gNB_id, proc) != 0) { - v_return = -1; - return (v_return); - } - - if (test_pucch_common_config_single_transport_block(ue, gNB_id, proc) != 0) { - v_return = -1; - return (v_return); - } - - init_pucch_dedicated_configuration(ue , gNB_id); - - if (test_pucch_dedicated_single_transport_block(ue, gNB_id, proc) != 0) { - v_return = -1; - return (v_return); - } - - if (test_pucch_dedicated_two_transport_blocks(ue, gNB_id, proc) != 0) { - v_return = -1; - return (v_return); - } - - if (test_sr_alone_dedicated(ue, gNB_id, proc) != 0) { - v_return = -1; - return (v_return); - } - - if (test_sr_ack_dedicated(ue, gNB_id, proc) != 0) { - v_return = -1; - return (v_return); - } - - if (test_csi_dedicated(ue, gNB_id, proc) != 0) { - v_return = -1; - return (v_return); - } - - release_downlink_harq_process(ue, gNB_id, TB_identifier, thread_number); - - release_pucch_dedicated_configuration(ue , gNB_id); - - free(proc); - - return (v_return); -} - -/******************************************************************* -* -* NAME : main -* -* DESCRIPTION : test of uplink sounding reference signal aka SRS feature -* -*********************************************************************/ - -int main(int argc, char *argv[]) -{ - uint8_t transmission_mode = 1; - uint8_t nb_antennas_tx = 1; - uint8_t nb_antennas_rx = 1; - uint8_t frame_type = FDD; - int N_RB_DL=100; - lte_prefix_type_t extended_prefix_flag = NORMAL; - int Nid_cell[] = {(3*1+3)}; - VOID_PARAMETER argc; - VOID_PARAMETER argv; - - printf(" PUCCH TEST \n"); - printf("-----------\n"); - - if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) { - printf("Initialisation problem for test \n"); - exit(-1);; - } - - if (test_pucch(PHY_vars_UE) != 0) { - printf("\nTest PUCCH is fail \n"); - } - else { - printf("\nTest PUCCH is pass \n"); - } - - free_context_synchro_nr(); - - return(0); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c deleted file mode 100644 index ce52eb1f56..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c +++ /dev/null @@ -1,467 +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 - */ - -/********************************************************************** -* -* FILENAME : pbch_test.c -* -* MODULE : UE test bench for sss tests -* -* DESCRIPTION : it allows unitary tests for SSS on host machine -* -************************************************************************/ - -#include -#include -#include -#include -#include - -#include "../../unit_tests/src/pss_util_test.h" -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/phy_extern_nr_ue.h" - -#include "PHY/NR_REFSIG/ul_ref_seq_nr.h" -#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h" - - -/******************************************************************* -* -* NAME : generate_reference_signals -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : generate sequence of reference signals -* -*********************************************************************/ -void generate_reference_signals(void) -{ - int number_differencies = 0;; - int u, v, Msc_RS; - - generate_ul_reference_signal_sequences(SHRT_MAX); - - generate_ul_ref_sigs(); - - for (Msc_RS = 2; Msc_RS < 33; Msc_RS++) { - for (u=0; u < U_GROUP_NUMBER; u++) { - for (v=0; v < V_BASE_SEQUENCE_NUMBER; v++) { - int number_differencies = 0; - /* find index of table which is for this srs length */ - unsigned int Msc_RS_index_nr = 0; - while((ul_allocated_re[Msc_RS_index_nr] != dftsizes[Msc_RS]) && (Msc_RS_index_nr < SRS_SB_CONF)){ - Msc_RS_index_nr++; - } - if (Msc_RS_index_nr == SRS_SB_CONF) { - printf("No nr index found for length %d \n", dftsizes[Msc_RS]); - assert(0); - } - for (int n=0; nsrs_nr.active_srs_Resource_Set = 0; - frame_parms->srs_nr.number_srs_Resource_Set++; - frame_parms->srs_nr.p_SRS_ResourceSetList[0] = p_srs_resource_set; - } - - p_srs_resource = calloc( 1, sizeof(SRS_Resource_t)); - if (p_srs_resource == NULL) { - free(p_srs_resource_set); - printf("Error default_srs_configuration: memory allocation problem \n"); - assert(0); - } - - /* init resource */ - p_srs_resource->nrof_SrsPorts = port1; - p_srs_resource->transmissionComb = 2; /* K_TC */ - p_srs_resource->resourceMapping_nrofSymbols = 1; - p_srs_resource->resourceMapping_repetitionFactor = 1; - p_srs_resource->SRS_Periodicity = sr_sl4; - p_srs_resource->SRS_Offset = 3; - - /* init resource set with only 1 resource */ - p_srs_resource_set->resourceType = periodic; - p_srs_resource_set->number_srs_Resource++; - frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0] = p_srs_resource; -} - -/******************************************************************* -* -* NAME : test_srs_single -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of SRS feature -* for various combinations of parameters -* -*********************************************************************/ -int test_srs_single(NR_DL_FRAME_PARMS *frame_parms, c16_t *txptr, UE_nr_rxtx_proc_t *proc) -{ - SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0]; - - if (generate_srs_nr(frame_parms->srs_nr.p_SRS_ResourceSetList[0], - frame_parms, - - - txptr, - AMP, - proc) != 0) { - printf("Ok: test_srs_single for K_TC %d comboffset %d cyclicShift %d u %d B_SRS %d C_SRS %d n_shift %d n_RRC %d b_hop %d groupOrSequenceHopping %d " - " sequenceId %d l_offset %d \n", - p_SRS_Resource->transmissionComb, p_SRS_Resource->combOffset, p_SRS_Resource->cyclicShift, p_SRS_Resource->sequenceId, - p_SRS_Resource->freqHopping_b_SRS, p_SRS_Resource->freqHopping_c_SRS, p_SRS_Resource->freqDomainPosition, - p_SRS_Resource->freqDomainShift, p_SRS_Resource->freqHopping_b_hop, p_SRS_Resource->groupOrSequenceHopping, - p_SRS_Resource->sequenceId, p_SRS_Resource->resourceMapping_startPosition); - - printf("Error: generate_srs_nr was not successfully executed ! \n"); - return (-1); - } - else { -#if 1 - printf("Ok: test_srs_single for K_TC %d comboffset %d cyclicShift %d u %d B_SRS %d C_SRS %d n_shift %d n_RRC %d b_hop %d groupOrSequenceHopping %d " - " sequenceId %d l_offset %d \n", - p_SRS_Resource->transmissionComb, p_SRS_Resource->combOffset, p_SRS_Resource->cyclicShift, p_SRS_Resource->sequenceId, - p_SRS_Resource->freqHopping_b_SRS, p_SRS_Resource->freqHopping_c_SRS, p_SRS_Resource->freqDomainPosition, - p_SRS_Resource->freqDomainShift, p_SRS_Resource->freqHopping_b_hop, p_SRS_Resource->groupOrSequenceHopping, - p_SRS_Resource->sequenceId, p_SRS_Resource->resourceMapping_startPosition); -#endif - - return (0); - } -} - -/******************************************************************* -* -* NAME : test_srs_periodicity -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of SRS feature -* for various combinations of parameters -* -*********************************************************************/ -int test_srs_periodicity(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc) -{ - NR_DL_FRAME_PARMS *frame_parms = &(ue->frame_parms); - SRS_Resource_t *p_srs_resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0]; - - for (int test_index = 0; test_index < NB_SRS_PERIOD; test_index++) { - p_srs_resource->SRS_Periodicity = test_index; - int srs_current_period = srs_period[p_srs_resource->SRS_Periodicity]; - for (int offset = 0 ; offset < 2; offset++) { - if (offset == 0) { - p_srs_resource->SRS_Offset = 0; - } - else { - p_srs_resource->SRS_Offset = srs_current_period - 1; - } - printf("srs period %d offset %d \n", srs_current_period, p_srs_resource->SRS_Offset); - - int duration = (10 * srs_current_period) / frame_parms->slots_per_frame; - - for (int frame_tx = 0; frame_tx < duration; frame_tx++) { - for (int slot_tx = 0; slot_tx < frame_parms->slots_per_frame; slot_tx++) { - proc->frame_tx = frame_tx; - proc->nr_slot_tx = slot_tx; - if (ue_srs_procedures_nr( ue, proc, 0) == 0) { - printf("test_srs_periodicity srs at frame %d slot %d \n", frame_tx, slot_tx); - } - } - } - } - } - - return(0); -} -/******************************************************************* -* -* NAME : test_srs_single -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of SRS feature -* for various combinations of parameters -* -*********************************************************************/ -int test_srs_specific(NR_DL_FRAME_PARMS *frame_parms, - int32_t *txptr, - UE_nr_rxtx_proc_t *proc) -{ -#define NUMBER_TEST_PARAMETERS (12) - -//#define SRS_TEST_HOPPING -#ifdef SRS_TEST_HOPPING -#define NUMBER_SRS_TEST (5) -#else -#define NUMBER_SRS_TEST (3) -#endif - - SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0]; - - uint8_t test_parameters[NUMBER_SRS_TEST][NUMBER_TEST_PARAMETERS] = { - /* K_TC comboffset cyclicShift u B_SRS C_SRS n_shift b_hop n_RRC groupOrSequenceHopping sequenceId l_offset*/ - { 2, 0, 0, 0, 1, 3, 0, 3, 0, neitherHopping, 0, 0 }, - { 2, 0, 0, 0, 1, 3, 0, 3, 2, neitherHopping, 0, 1 }, - { 2, 0, 0, 0, 3, 3, 0, 1, 0, neitherHopping, 0, 0 }, -#ifdef SRS_TEST_HOPPING - { 2, 0, 0, 0, 1, 3, 0, 0, 0, groupHopping, 30, 0 }, - { 2, 0, 0, 0, 0, 14, 0, 0, 0, sequenceHopping, 55, 1 }, -#endif - }; - - for (int test_index = 0; test_index < NUMBER_SRS_TEST; test_index++) { - - p_SRS_Resource->transmissionComb = test_parameters[test_index][0]; /* K_TC */ - p_SRS_Resource->combOffset = test_parameters[test_index][1]; - p_SRS_Resource->cyclicShift = test_parameters[test_index][2]; - p_SRS_Resource->sequenceId = test_parameters[test_index][3]; - p_SRS_Resource->freqHopping_b_SRS = test_parameters[test_index][4]; - p_SRS_Resource->freqHopping_c_SRS = test_parameters[test_index][5]; - p_SRS_Resource->freqDomainPosition = test_parameters[test_index][6]; - p_SRS_Resource->freqHopping_b_hop = test_parameters[test_index][7]; - p_SRS_Resource->freqDomainShift = (uint16_t)test_parameters[test_index][8]; - p_SRS_Resource->groupOrSequenceHopping = test_parameters[test_index][9]; - p_SRS_Resource->sequenceId = test_parameters[test_index][10]; - p_SRS_Resource->resourceMapping_startPosition = test_parameters[test_index][11]; - - if (test_srs_single(frame_parms, - txptr, - proc) != 0) { - return (-1); - } - } - - return (0); -} - -/******************************************************************* -* -* NAME : test_srs_group -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of SRS feature -* for various combinations of parameters -* -*********************************************************************/ -int test_srs_group(NR_DL_FRAME_PARMS *frame_parms, - int32_t *txptr, - UE_nr_rxtx_proc_t *proc) -{ - SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0]; - uint8_t n_SRS_cs_max[5] = { 0, 0, 8, 0, 12}; - int number_of_test = 0; - - for (int K_TC = 2; K_TC < 5; K_TC = K_TC + 2) { - for (int comboffset = 0; comboffset < K_TC; comboffset++) { - for (int cyclicShift = 0; cyclicShift < n_SRS_cs_max[K_TC]; cyclicShift++) { - for (int u = 0; u < U_GROUP_NUMBER; u++) { - for (uint8_t B_SRS = 0; B_SRS < B_SRS_NUMBER; B_SRS++) { - for (uint8_t C_SRS = 0; C_SRS < C_SRS_NUMBER; C_SRS++) { - p_SRS_Resource->transmissionComb = K_TC; - p_SRS_Resource->combOffset = comboffset; - p_SRS_Resource->cyclicShift = cyclicShift; - p_SRS_Resource->sequenceId = u; - p_SRS_Resource->freqHopping_b_SRS = B_SRS; - p_SRS_Resource->freqHopping_c_SRS = C_SRS; - number_of_test++; - if (test_srs_single(frame_parms, txptr, proc) != 0) { - return (-1); - } - } - } - } - } - } - } - - printf("Number of srs generations %d\n", number_of_test); - return (0); -} - -/******************************************************************* -* -* NAME : test_srs -* -* PARAMETERS : none -* -* RETURN : none -* -* DESCRIPTION : test of SRS feature -* -*********************************************************************/ -int test_srs(PHY_VARS_NR_UE *PHY_vars_UE) -{ - int32_t *txptr; - NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); - UE_nr_rxtx_proc_t *p_rxtx_proc; - int v_return = 0; - - generate_reference_signals(); - - /* start test of sounding reference signals */ - default_srs_configuration(frame_parms); - - txptr = calloc(frame_parms->samples_per_slot , sizeof(int32_t)); - if (txptr == NULL) { - printf("Error test_srs: memory allocation problem txptr \n"); - assert(0); - } - - p_rxtx_proc = calloc( 1, sizeof(UE_nr_rxtx_proc_t)); - if (p_rxtx_proc == NULL) { - printf("Error test_srs: memory allocation problem p_rxtx_proc \n"); - assert(0); - } - - if (test_srs_group(frame_parms, - txptr, - p_rxtx_proc) != 0) { - v_return = -1; - } - - if (test_srs_specific(frame_parms, - txptr, - p_rxtx_proc) != 0) { - v_return = -1; - } - - if (test_srs_periodicity(PHY_vars_UE, p_rxtx_proc) != 0) { - v_return = -1; - } - - for (int i = 0; i < frame_parms->srs_nr.number_srs_Resource_Set; i++) { - if (frame_parms->srs_nr.p_SRS_ResourceSetList[i] != NULL) { - for (int j = 0; j < frame_parms->srs_nr.p_SRS_ResourceSetList[i]->number_srs_Resource; j++) { - if (frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0] != NULL) { - free(frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0]); - } - else { - printf("Error test_srs: memory allocation problem p_srs_ResourceList \n"); - assert(0); - } - } - free(frame_parms->srs_nr.p_SRS_ResourceSetList[i]); - } - else { - printf("Error test_srs: memory allocation problem \n"); - assert(0); - } - } - - free(txptr); - free(p_rxtx_proc); - - free_ul_reference_signal_sequences(); - - free_ul_ref_sigs(); - - return (v_return); -} - -/******************************************************************* -* -* NAME : main -* -* DESCRIPTION : test of uplink sounding reference signal aka SRS feature -* -*********************************************************************/ -int main(int argc, char *argv[]) -{ - uint8_t transmission_mode = 1; - uint8_t nb_antennas_tx = 1; - uint8_t nb_antennas_rx = 1; - uint8_t frame_type = FDD; - int N_RB_DL=100; - lte_prefix_type_t extended_prefix_flag = NORMAL; - int Nid_cell[] = {(3*0+0)}; - VOID_PARAMETER argc; - VOID_PARAMETER argv; - - printf(" SRS TEST \n"); - printf("----------\n"); - - if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) { - printf("Initialisation problem for synchronisation test \n"); - exit(-1);; - } - - if (test_srs(PHY_vars_UE) != 0) { - printf("Test NR SRS is fail \n"); - } - else { - printf("Test NR SRS is pass \n"); - } - - free_context_synchro_nr(); - - return(0); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c deleted file mode 100644 index fa2a8cffd1..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c +++ /dev/null @@ -1,269 +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 - */ - -/********************************************************************** -* -* FILENAME : sss_test.c -* -* MODULE : UE test bench for sss tests -* -* DESCRIPTION : it allows unitary tests for SSS on host machine -* -************************************************************************/ - -#include -#include -#include -#include -#include - -#include "../../unit_tests/src/pss_util_test.h" -#include "PHY/defs_nr_UE.h" -#include "PHY/INIT/init_extern.h" -#include "PHY/phy_extern_nr_ue.h" - -#include "PHY/NR_REFSIG/ss_pbch_nr.h" -#include "PHY/NR_REFSIG/pss_nr.h" -#include "PHY/NR_REFSIG/sss_nr.h" -#include "PHY/NR_REFSIG/dmrs_nr.h" - - -/******************************************************************* -* -* NAME : test_synchro_pss_sss_nr -* -* INPUT : UE context -* for first and second pss sequence -* - position of pss in the received UE buffer -* - number of pss sequence -* -* RETURN : 0 if OK else error -* -* DESCRIPTION : detect pss sequences in the received UE buffer -* then detect sss sequence -* -* Test procedure: -* - reference pss sequences (first, second or both) are written at specific -* positions -* - correlation is done between the received buffer and the possible pss sequences -* - results indicate pss sequence number and correlation result -* - reference sss sequences are written at specific positions -* - correlation is done with possible sss sequence -* -* (10 ms) -* <---------------------------------------------------------------------------> -* ----------------------------------------------------------------------------- -* | Received UE data buffer | -* ---------------------------------------------------------------------------- -* --------------------------------------------- -* <-------------->| pss | pbch | sss | pbch | -* --------------------------------------------- -* offset -* -* SSS/PBCH block contains following symbols: pss + pbch + sss + pbch -* -*********************************************************************/ - -int test_synchro_pss_sss_nr(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, NR_DL_FRAME_PARMS *frame_parms_gNB, test_t *test) -{ - UE_nr_rxtx_proc_t proc = {0}; - VOID_PARAMETER test; - int synchro_position; - int offset; - int16_t *tmp; - int32_t metric_fdd_ncp=0; - uint8_t phase_fdd_ncp; - int rate_change = SYNCHRO_RATE_CHANGE_FACTOR; - int Nid2 = GET_NID2(frame_parms_gNB->Nid_cell); - int Nid1 = GET_NID1(frame_parms_gNB->Nid_cell); - - display_test_configuration_pss(position_symbol, Nid2); - - set_sequence_pss(PHY_vars_UE, position_symbol, Nid2); - - synchro_position = pss_synchro_nr(PHY_vars_UE, rate_change); - - display_test_configuration_sss(Nid1); - - synchro_position = synchro_position * rate_change; - - if (abs(synchro_position - position_symbol) > PSS_DETECTION_MARGIN_MAX) - { - printf("NR Pss has been detected at position %d instead of %d \n", synchro_position, position_symbol); - } - - /* symbols order for synchronisation block is PSS - PBCH - SSS */ - /* knowing that synchronisation position gives pss ofdm start one can deduce start of sss symbol */ - offset = (position_symbol + (SSS_SYMBOL_NB - PSS_SYMBOL_NB)*(PHY_vars_UE->frame_parms.ofdm_symbol_size + PHY_vars_UE->frame_parms.nb_prefix_samples)); - - tmp = (int16_t *)&PHY_vars_UE->common_vars.rxdata[0][offset]; - - insert_sss_nr(tmp, frame_parms_gNB); - - PHY_vars_UE->rx_offset = position_symbol; /* offset is given for samples of type int16 */ - -#if 0 - - int samples_for_frame = PHY_vars_UE->frame_parms.samples_per_frame; - - write_output("rxdata0_rand.m","rxd0_rand", &PHY_vars_UE->common_vars.rxdata[0][0], samples_for_frame, 1, 1); - -#endif - -#if TEST_SYNCHRO_TIMING_PSS - - start_meas(&generic_time[TIME_SSS]); - -#endif - - rx_sss_nr(PHY_vars_UE, &proc, &metric_fdd_ncp, &phase_fdd_ncp); - -#if TEST_SYNCHRO_TIMING_PSS - - stop_meas(&generic_time[TIME_SSS]); - - #ifndef NR_UNIT_TEST - - printf("PSS execution duration %5.2f \n", generic_time[TIME_PSS].p_time/(cpuf*1000.0)); - - printf("SSS execution duration %5.2f \n", generic_time[TIME_SSS].p_time/(cpuf*1000.0)); - - #endif - -#endif - - return phase_fdd_ncp; -} - -/******************************************************************* -* -* NAME : main -* -* DESCRIPTION : test bench for synchronisation sequence (pss/sss/pbch) -* purpose of test is to check that synchronisation sequence can be -* properly detected depending of input waveforms. -* -* - First step of synchronisation consists in pss search (primary synchronisation signal). -* pss sequence should be detected at the right position -* in the received buffer whatever the position along the -* received data buffer. -* Detection of position is based on correlation in time domain between -* received signal and pss sequence -> position is given by -* peak of correlation result. -* - Second step of synchronisation is sss decoding (secundary synchronisation signal). -* sss detection is based on position of detected pss. -* -*********************************************************************/ - -int main(int argc, char *argv[]) -{ - VOID_PARAMETER argc; - VOID_PARAMETER argv; - uint8_t transmission_mode = 1; - uint8_t nb_antennas_tx = 1; - uint8_t nb_antennas_rx = 1; - uint8_t frame_type = FDD; - int N_RB_DL=100; - lte_prefix_type_t extended_prefix_flag = NORMAL; - int phase; - int Nid1, Nid2; - NR_DL_FRAME_PARMS frame_parms_gNB; - - const char *name_test = "SSS NR"; - test_t test = { name_test, 0, 0, 0, 0}; - -#if 1 - int test_position[] = { 0, 492, 493, 56788, 111111, 222222 }; /* this is the sample number in the frame */ -#else - int test_position[] = {-1}; /* to get samples from an array */ -#endif - - int size_test_position = sizeof(test_position)/sizeof(int); - - /* this is a pointer to the function in charge of the test */ - int (*p_test_synchro_pss_sss)(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, NR_DL_FRAME_PARMS *frame_parms, test_t *test) = test_synchro_pss_sss_nr; - -#if 1 - int Nid_cell[] = { (3*0+0), (3*71+0), (3*21+2), (3*21+2), (3*55+1), (3*111+2) }; -#else - int Nid_cell[] = { ((3*1+2)) }; -#endif - - printf(" SSS TEST \n"); - printf("----------\n"); - - if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) { - printf("Initialisation problem for synchronisation test \n"); - exit(-1);; - } - - memcpy((void *)&frame_parms_gNB, (void*)&PHY_vars_UE->frame_parms, sizeof(NR_DL_FRAME_PARMS)); - - printf("***********************************\n"); - printf(" %s Test synchronisation \n", test.test_current); - printf("***********************************\n"); - - for (unsigned int index = 0; index < (sizeof(Nid_cell)/sizeof(int)); index++) { - - frame_parms_gNB.Nid_cell = Nid_cell[index]; - - Nid2 = GET_NID2(Nid_cell[index]); - Nid1 = GET_NID1(Nid_cell[index]); - int nid_2_num = get_softmodem_params()->sl_mode == 0 ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL; - for (int position = 0; position < size_test_position; position++) { - - PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + nid_2_num; /* set to invalid value */ - - phase = (*p_test_synchro_pss_sss)(PHY_vars_UE, test_position[position], &frame_parms_gNB, &test); /* return phase index which gives phase error from an array */ - - test.number_of_tests++; - printf("%s ", test.test_current); - - if (PHY_vars_UE->frame_parms.Nid_cell == (3 * Nid1) + Nid2) { - if (phase != INDEX_NO_PHASE_DIFFERENCE) { - printf("Test is pass with warning due to phase difference %d (instead of %d) offset %d Nid1 %d Nid2 %d \n", - phase, INDEX_NO_PHASE_DIFFERENCE, test_position[position], Nid1, Nid2); - test.number_of_pass_warning++; - } else { - printf("Test is pass with offset %d Nid1 %d Nid2 %d \n", test_position[position], Nid1, Nid2); - test.number_of_pass++; - } - } - else { - printf("Test is fail with offset %d Nid1 %d Nid2 %d \n", test_position[position], Nid1, Nid2); - test.number_of_fail++; - } - //break; - } - //break; - } - - printf("\n%s Number of tests : %d Pass : %d Pass with warning : %d Fail : %d \n", test.test_current, test.number_of_tests, test.number_of_pass, test.number_of_pass_warning, test.number_of_fail); - - printf("%s Synchronisaton test is terminated.\n\n", test.test_current); - - /* reset test statistics */ - test.number_of_tests = test.number_of_pass = test.number_of_pass_warning = test.number_of_fail = 0; - - free_context_synchro_nr(); - - return(0); -} diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index df80941a09..24da0a04f4 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1392,6 +1392,37 @@ f1ap_setup_req_t *RC_read_F1Setup(uint64_t id, return req; } +static nr_redcap_config_t *get_redcap_config(int gnb_idx) +{ + paramdef_t RedCap_Params[] = GNB_REDCAP_PARAMS_DESC; + char aprefix[MAX_OPTNAME_SIZE * 2 + 8]; + sprintf(aprefix, "%s.[%d].%s", GNB_CONFIG_STRING_GNB_LIST, gnb_idx, GNB_CONFIG_STRING_REDCAP); + int ret = config_get(config_get_if(), RedCap_Params, sizeofArray(RedCap_Params), aprefix); + + if (ret <= 0) { + printf("problem reading section \"%s\"\n", aprefix); + return NULL; + } + // Check for default/non-existing values in configuration file + if (*RedCap_Params[GNB_REDCAP_CELL_BARRED_REDCAP1_RX_R17_IDX].i8ptr == -1 + || *RedCap_Params[GNB_REDCAP_CELL_BARRED_REDCAP2_RX_R17_IDX].i8ptr == -1) { + LOG_I(NR_MAC, "No RedCap configuration found\n"); + return NULL; + } + + nr_redcap_config_t *rc = calloc_or_fail(1, sizeof(*rc)); + rc->cellBarredRedCap1Rx_r17 = *RedCap_Params[GNB_REDCAP_CELL_BARRED_REDCAP1_RX_R17_IDX].i8ptr; + rc->cellBarredRedCap2Rx_r17 = *RedCap_Params[GNB_REDCAP_CELL_BARRED_REDCAP2_RX_R17_IDX].i8ptr; + rc->intraFreqReselectionRedCap_r17 = *RedCap_Params[GNB_REDCAP_INTRA_FREQ_RESELECTION_REDCAP_R17_IDX].u8ptr; + + LOG_I(GNB_APP, + "cellBarredRedCap1Rx_r17 %d cellBarredRedCap2Rx_r17 %d intraFreqReselectionRedCap_r17 %d\n", + rc->cellBarredRedCap1Rx_r17, + rc->cellBarredRedCap2Rx_r17, + rc->intraFreqReselectionRedCap_r17); + return rc; +} + void RCconfig_nr_macrlc(configmodule_interface_t *cfg) { int j = 0; @@ -1478,6 +1509,8 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) int tot_ant = config.pdsch_AntennaPorts.N1 * config.pdsch_AntennaPorts.N2 * config.pdsch_AntennaPorts.XP; AssertFatal(config.maxMIMO_layers != 0 && config.maxMIMO_layers <= tot_ant, "Invalid maxMIMO_layers %d\n", config.maxMIMO_layers); + config.redcap = get_redcap_config(0); + paramdef_t Timers_Params[] = GNB_TIMERS_PARAMS_DESC; char aprefix[MAX_OPTNAME_SIZE * 2 + 8]; sprintf(aprefix, "%s.[0].%s", GNB_CONFIG_STRING_GNB_LIST, GNB_CONFIG_STRING_TIMERS_CONFIG); diff --git a/openair2/GNB_APP/gnb_paramdef.h b/openair2/GNB_APP/gnb_paramdef.h index ec5c8001e6..7f7fccbd8f 100644 --- a/openair2/GNB_APP/gnb_paramdef.h +++ b/openair2/GNB_APP/gnb_paramdef.h @@ -485,6 +485,29 @@ typedef enum { #define GNB_TIMERS_N311_IDX 8 #define GNB_TIMERS_T319_IDX 9 +/*-------------------------------------------------------------------------------------------------------------------------------------*/ +/* RedCap configuration parameters */ +/*-------------------------------------------------------------------------------------------------------------------------------------*/ + +#define GNB_CONFIG_HLP_STRING_CELL_BARRED_REDCAP1_RX_R17 "Value barred means that the cell is barred for a RedCap UE supporting 1 Rx branch\n" +#define GNB_CONFIG_HLP_STRING_CELL_BARRED_REDCAP2_RX_R17 "Value barred means that the cell is barred for a RedCap UE supporting 2 Rx branches\n" +#define GNB_CONFIG_HLP_STRING_INTRA_FREQ_RESELECTION_REDCAP_R17 "Controls cell selection/reselection to intra-frequency cells for RedCap UEs when this cell is barred\n" + +#define GNB_CONFIG_STRING_REDCAP "RedCap" +#define GNB_CONFIG_STRING_CELL_BARRED_REDCAP1_RX_R17 "cellBarredRedCap1Rx_r17" +#define GNB_CONFIG_STRING_CELL_BARRED_REDCAP2_RX_R17 "cellBarredRedCap2Rx_r17" +#define GNB_CONFIG_STRING_INTRA_FREQ_RESELECTION_REDCAP_R17 "intraFreqReselectionRedCap_r17" + +#define GNB_REDCAP_PARAMS_DESC { \ +{GNB_CONFIG_STRING_CELL_BARRED_REDCAP1_RX_R17, GNB_CONFIG_HLP_STRING_CELL_BARRED_REDCAP1_RX_R17, 0, .i8ptr=NULL, .defintval=-1, TYPE_INT8, 0},\ +{GNB_CONFIG_STRING_CELL_BARRED_REDCAP2_RX_R17, GNB_CONFIG_HLP_STRING_CELL_BARRED_REDCAP2_RX_R17, 0, .i8ptr=NULL, .defintval=-1, TYPE_INT8, 0},\ +{GNB_CONFIG_STRING_INTRA_FREQ_RESELECTION_REDCAP_R17, GNB_CONFIG_HLP_STRING_INTRA_FREQ_RESELECTION_REDCAP_R17, 0, .u8ptr=NULL, .defuintval=0, TYPE_UINT8, 0},\ +} + +#define GNB_REDCAP_CELL_BARRED_REDCAP1_RX_R17_IDX 0 +#define GNB_REDCAP_CELL_BARRED_REDCAP2_RX_R17_IDX 1 +#define GNB_REDCAP_INTRA_FREQ_RESELECTION_REDCAP_R17_IDX 2 + /*---------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------*/ /* SCTP configuration parameters section name */ diff --git a/openair2/LAYER2/MAC/dummy_functions.c b/openair2/LAYER2/MAC/dummy_functions.c new file mode 100644 index 0000000000..adc73d0dfa --- /dev/null +++ b/openair2/LAYER2/MAC/dummy_functions.c @@ -0,0 +1,61 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +#include "openair2/LAYER2/MAC/mac_proto.h" + +// TODO temporary solution +// to be removed once separation between NR and LTE is achieved + +int sf_ahead = 4; +SCHEDULER_MODES global_scheduler_mode; + +int rrc_mac_config_req_eNB(const module_id_t Mod_idP, const rrc_mac_config_req_eNB_t *param) +{ + return 0; +} + +void mac_top_init_eNB(void) +{ +} + +uint32_t to_earfcn_UL(int eutra_bandP, long long int ul_CarrierFreq, uint32_t bw) +{ + return 0; +} + +int32_t get_uldl_offset(int nr_bandP) { + return 0; +} + +IF_Module_t *IF_Module_init(int Mod_id) +{ + return NULL; +} + +uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) +{ + return 0; +} + +uint32_t to_earfcn_DL(int eutra_bandP, long long int dl_CarrierFreq, uint32_t bw) +{ + return 0; +} diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 2da3d9df93..d30c51ecc1 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -1630,7 +1630,7 @@ uint16_t get_nr_prach_format_from_index(uint8_t index, uint32_t pointa, uint8_t { uint8_t format2 = 0xff; uint16_t format; - if (pointa > 2016666) { // FR2 + if (get_freq_range_from_arfcn(pointa) == FR2) { if (table_6_3_3_2_4_prachConfig_Index[index][1] != -1) format2 = (uint8_t)table_6_3_3_2_4_prachConfig_Index[index][1]; format = ((uint8_t)table_6_3_3_2_4_prachConfig_Index[index][0]) | (format2 << 8); diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 8c905a8f58..1f0e552ba0 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -324,7 +324,7 @@ static void config_common_ue(NR_UE_MAC_INST_t *mac, NR_ServingCellConfigCommon_t if (frequencyInfoDL) { // NeedM for inter-freq handover mac->nr_band = *frequencyInfoDL->frequencyBandList.list.array[0]; frame_type = get_frame_type(mac->nr_band, get_softmodem_params()->numerology); - mac->frequency_range = mac->nr_band < 256 ? FR1 : FR2; + mac->frequency_range = get_freq_range_from_band(mac->nr_band); int bw_index = get_supported_band_index(frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing, mac->frequency_range, diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 01b33465e7..c945408319 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -498,7 +498,7 @@ static void configure_prach_occasions(NR_UE_MAC_INST_t *mac, int scs) sl *= 2; // if only 1 slot per subframe (or 60kHz slot) in case of 30 or 120kHz it's the odd one // as defined in 5.3.2 of 211 - if (prach_slots_in_sf == 1) + if (((prach_info.format & 0xff) > 3) && prach_slots_in_sf == 1) add_slot = 1; } int slot = sl + add_slot; @@ -624,9 +624,12 @@ static void ra_preamble_msga_transmission(RA_config_t *ra, int scs) prach_resources->ra_preamble_rx_target_power = get_ra_preamble_rx_target_power(ra, scs); - ra->ra_rnti = nr_get_ra_rnti(ra->sched_ro_info.start_symbol, ra->sched_ro_info.slot, ra->sched_ro_info.fdm, 0); + // 3GPP TS 38.321 Section 5.1.3 says t_id for RA-RNTI depends on mu as specified in clause 5.3.2 in TS 38.211 + // so mu = 0 for prach format < 4. + const int slot = ((ra->sched_ro_info.format & 0xff) < 4) ? ra->sched_ro_info.slot >> scs : ra->sched_ro_info.slot; + ra->ra_rnti = nr_get_ra_rnti(ra->sched_ro_info.start_symbol, slot, ra->sched_ro_info.fdm, 0); if (ra->ra_type == RA_2_STEP) - ra->MsgB_rnti = nr_get_MsgB_rnti(ra->sched_ro_info.start_symbol, ra->sched_ro_info.slot, ra->sched_ro_info.fdm, 0); + ra->MsgB_rnti = nr_get_MsgB_rnti(ra->sched_ro_info.start_symbol, slot, ra->sched_ro_info.fdm, 0); } // 38.321 Section 5.1.2 Random Access Resource selection diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c index a27a464878..71e4c7fe25 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c @@ -58,6 +58,70 @@ static uint8_t sl_get_elapsed_slots(uint32_t slot, uint32_t sl_slot_bitmap) return elapsed_slots; } +/* + * This function determines if the mixed slot is a Sidelink slot + */ +static uint8_t sl_determine_if_sidelink_slot(uint8_t sl_startsym, uint8_t sl_lensym, uint8_t num_ulsym) +{ + uint8_t ul_startsym = NR_NUMBER_OF_SYMBOLS_PER_SLOT - num_ulsym; + + if ((sl_startsym >= ul_startsym) && (sl_lensym <= NR_NUMBER_OF_SYMBOLS_PER_SLOT)) { + LOG_D(MAC, + "MIXED SLOT is a SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n", + sl_startsym, + sl_lensym - 1, + ul_startsym, + ul_startsym + num_ulsym - 1); + return NR_SIDELINK_SLOT; + } else { + LOG_D(MAC, + "MIXED SLOT is NOT SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n", + sl_startsym, + sl_lensym - 1, + ul_startsym, + ul_startsym + num_ulsym - 1); + return 0; + } +} + +/* + * This function determines if the Slot is a SIDELINK SLOT + * Every Uplink Slot is a Sidelink slot + * Mixed Slot is a sidelink slot if the uplink symbols in Mixed slot + * overlaps with Sidelink start symbol and number of symbols. + */ +int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int slot, uint8_t frame_duplex_type) +{ + int ul_sym = 0, slot_type = 0; + + // All PC5 bands are TDD bands , hence handling only TDD in this function. + AssertFatal(frame_duplex_type == TDD, "No Sidelink operation defined for FDD in 3GPP rel16\n"); + + if (cfg->tdd_table.max_tdd_periodicity_list == NULL) { // this happens before receiving TDD configuration + return slot_type; + } + + int period = cfg->tdd_table.tdd_period_in_slots; + int rel_slot = slot % period; + const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table; + + const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot]; + + for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) { + if (current_slot->max_num_of_symbol_per_slot_list[symbol_count].slot_config == 1) { + ul_sym++; + } + } + + if (ul_sym == NR_NUMBER_OF_SYMBOLS_PER_SLOT) { + slot_type = NR_SIDELINK_SLOT; + } else if (ul_sym) { + slot_type = sl_determine_if_sidelink_slot(cfg->sl_bwp_config.sl_start_symbol, cfg->sl_bwp_config.sl_num_symbols, ul_sym); + } + + return slot_type; +} + static void sl_determine_slot_bitmap(sl_nr_ue_mac_params_t *sl_mac, int ue_id) { diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 0abe35b80d..2d6ae1ba75 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -410,7 +410,7 @@ static void config_common(gNB_MAC_INST *nrmac, // Carrier configuration struct NR_FrequencyInfoDL *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL; - frequency_range_t frequency_range = *frequencyInfoDL->frequencyBandList.list.array[0] > 256 ? FR2 : FR1; + frequency_range_t frequency_range = get_freq_range_from_band(*frequencyInfoDL->frequencyBandList.list.array[0]); int bw_index = get_supported_band_index(frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing, frequency_range, frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth); @@ -440,7 +440,7 @@ static void config_common(gNB_MAC_INST *nrmac, } struct NR_FrequencyInfoUL *frequencyInfoUL = scc->uplinkConfigCommon->frequencyInfoUL; int scs = frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; - frequency_range = *frequencyInfoUL->frequencyBandList->list.array[0] > 256 ? FR2 : FR1; + frequency_range = get_freq_range_from_band(*frequencyInfoUL->frequencyBandList->list.array[0]); bw_index = get_supported_band_index(scs, frequency_range, frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth); cfg->carrier_config.uplink_bandwidth.value = get_supported_bw_mhz(frequency_range, bw_index); @@ -848,7 +848,7 @@ void nr_mac_configure_sib1(gNB_MAC_INST *nrmac, const f1ap_plmn_t *plmn, uint64_ NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - NR_BCCH_DL_SCH_Message_t *sib1 = get_SIB1_NR(scc, plmn, cellID, tac, &nrmac->radio_config.timer_config); + NR_BCCH_DL_SCH_Message_t *sib1 = get_SIB1_NR(scc, plmn, cellID, tac, &nrmac->radio_config); cc->sib1 = sib1; cc->sib1_bcch_length = encode_SIB1_NR(sib1, cc->sib1_bcch_pdu, sizeof(cc->sib1_bcch_pdu)); AssertFatal(cc->sib1_bcch_length > 0, "could not encode SIB1\n"); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 9bf8b739bf..3a64ac16c9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -92,7 +92,7 @@ static int16_t ssb_index_from_prach(module_id_t module_idP, msgacc = scc->uplinkConfigCommon->initialUplinkBWP->ext1->msgA_ConfigCommon_r16->choice.setup; const int ul_mu = scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; const int mu = nr_get_prach_or_ul_mu(msgacc, rach_ConfigCommon, ul_mu); - frequency_range_t freq_range = scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA > 2016666 ? FR2 : FR1; + frequency_range_t freq_range = get_freq_range_from_arfcn(scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA); get_nr_prach_sched_from_info(cc->prach_info, config_index, frameP, slotP, mu, freq_range, &RA_sfn_index, cc->frame_type); uint8_t index = 0, slot_index = 0; @@ -184,7 +184,7 @@ void find_SSB_and_RO_available(gNB_MAC_INST *nrmac) } // prach is scheduled according to configuration index and tables 6.3.3.2.2 to 6.3.3.2.4 - frequency_range_t freq_range = scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA > 2016666 ? FR2 : FR1; + frequency_range_t freq_range = get_freq_range_from_arfcn(scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA); nr_prach_info_t prach_info = get_nr_prach_occasion_info_from_index(config_index, freq_range, cc->frame_type); float num_ssb_per_RO = ssb_per_rach_occasion[cfg->prach_config.ssb_per_rach.value]; @@ -380,7 +380,7 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, slot_t slotP) const int mu = nr_get_prach_or_ul_mu(msgacc, rach_ConfigCommon, ul_mu); // prach is scheduled according to configuration index and tables 6.3.3.2.2 to 6.3.3.2.4 uint16_t RA_sfn_index = -1; - frequency_range_t freq_range = scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA > 2016666 ? FR2 : FR1; + frequency_range_t freq_range = get_freq_range_from_arfcn(scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA); if (get_nr_prach_sched_from_info(cc->prach_info, config_index, frameP, slotP, mu, freq_range, &RA_sfn_index, cc->frame_type)) { uint16_t format0 = cc->prach_info.format & 0xff; // first column of format from table uint16_t format1 = (cc->prach_info.format >> 8) & 0xff; // second column of format from table diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 2c02c15e94..e1a48d6002 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -199,6 +199,7 @@ uint8_t decode_ul_mac_sub_pdu_header(uint8_t *pduP, uint8_t *lcid, uint16_t *len *length = pduP[1]; } break; + case UL_SCH_LCID_CCCH_48_BITS_REDCAP: case UL_SCH_LCID_CCCH_48_BITS: *length = 6; break; @@ -329,6 +330,7 @@ static int nr_process_mac_pdu(instance_t module_idP, switch (lcid) { case UL_SCH_LCID_CCCH_64_BITS: + case UL_SCH_LCID_CCCH_48_BITS_REDCAP: case UL_SCH_LCID_CCCH_48_BITS: if (lcid == UL_SCH_LCID_CCCH_64_BITS) { // Check if it is a valid CCCH1 message, we get all 00's messages very often @@ -347,6 +349,10 @@ static int nr_process_mac_pdu(instance_t module_idP, LOG_I(MAC, "[RAPROC] Received SDU for CCCH length %d for UE %04x\n", mac_len, UE->rnti); + if (lcid == UL_SCH_LCID_CCCH_48_BITS_REDCAP) { + LOG_I(MAC, "UE with RNTI %04x is RedCap\n", UE->rnti); + } + if (prepare_initial_ul_rrc_message(RC.nrmac[module_idP], UE)) { mac_rlc_data_ind(module_idP, UE->rnti, diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 8b1bb3ec5c..65812ae0f5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -151,6 +151,12 @@ typedef struct nr_mac_timers { int t319; } nr_mac_timers_t; +typedef struct nr_redcap_config { + int8_t cellBarredRedCap1Rx_r17; + int8_t cellBarredRedCap2Rx_r17; + uint8_t intraFreqReselectionRedCap_r17; +} nr_redcap_config_t; + typedef struct nr_mac_config_t { int sib1_tda; nr_pdsch_AntennaPorts_t pdsch_AntennaPorts; @@ -172,6 +178,7 @@ typedef struct nr_mac_config_t { int nb_bfw[2]; int32_t *bw_list; int num_agg_level_candidates[NUM_PDCCH_AGG_LEVELS]; + nr_redcap_config_t *redcap; } nr_mac_config_t; typedef struct NR_preamble_ue { diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index a6c2ae1c9c..796ef4a3e1 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -610,7 +610,7 @@ void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcellconfig, NR_SCS_SpecificCarrier_t *scs_carrier = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]; int band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]; - const frequency_range_t freq_range = band < 257 ? FR1 : FR2; + const frequency_range_t freq_range = get_freq_range_from_band(band); const int scs = scs_carrier->subcarrierSpacing; const int bw_size = scs_carrier->carrierBandwidth; @@ -918,7 +918,7 @@ void prepare_sim_uecap(NR_UE_NR_Capability_t *cap, *bandNRinfo->pusch_256QAM = NR_BandNR__pusch_256QAM_supported; } if (mcs_table_dl == 1) { - const frequency_range_t freq_range = band < 257 ? FR1 : FR2; + const frequency_range_t freq_range = get_freq_range_from_band(band); if (freq_range == FR2) { bandNRinfo->pdsch_256QAM_FR2 = calloc(1, sizeof(*bandNRinfo->pdsch_256QAM_FR2)); *bandNRinfo->pdsch_256QAM_FR2 = NR_BandNR__pdsch_256QAM_FR2_supported; @@ -1368,7 +1368,7 @@ static void set_dl_mcs_table(int scs, AssertFatal(bw_rb > 0,"Could not find scs-SpecificCarrierList element for scs %d", scs); bool supported = false; - const frequency_range_t freq_range = band > 256 ? FR2 : FR1; + const frequency_range_t freq_range = get_freq_range_from_band(band); if (freq_range == FR2) { for (int i = 0; i < cap->rf_Parameters.supportedBandListNR.list.count; i++) { NR_BandNR_t *bandNRinfo = cap->rf_Parameters.supportedBandListNR.list.array[i]; @@ -2366,7 +2366,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, const f1ap_plmn_t *plmn, uint64_t cellID, int tac, - const nr_mac_timers_t *timer_config) + const nr_mac_config_t *mac_config) { AssertFatal(cellID < (1l << 36), "cellID must fit within 36 bits, but is %lu\n", cellID); @@ -2471,32 +2471,6 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, *sib1_v1700->cellBarredNTN_r17 = NR_SIB1_v1700_IEs__cellBarredNTN_r17_notBarred; } - // sib19 scheduling info - // ensure ntn-config is initialized - if (scc->ext2 && scc->ext2->ntn_Config_r17) { - if (sib1->nonCriticalExtension == NULL) - sib1->nonCriticalExtension = CALLOC(1, sizeof(struct NR_SIB1_v1610_IEs)); - if (sib1->nonCriticalExtension->nonCriticalExtension == NULL) - sib1->nonCriticalExtension->nonCriticalExtension = CALLOC(1, sizeof(struct NR_SIB1_v1630_IEs)); - if (sib1->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension == NULL) - sib1->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension = CALLOC(1, sizeof(struct NR_SIB1_v1700_IEs)); - - struct NR_SI_SchedulingInfo_v1700 *sib_v17_scheduling_info = CALLOC(1, sizeof(struct NR_SI_SchedulingInfo_v1700)); - - struct NR_SchedulingInfo2_r17 *si_schedulinginfo2_r17 = CALLOC(1, sizeof(struct NR_SchedulingInfo2_r17)); - si_schedulinginfo2_r17->si_BroadcastStatus_r17 = NR_SchedulingInfo2_r17__si_BroadcastStatus_r17_broadcasting; - si_schedulinginfo2_r17->si_WindowPosition_r17 = 2; - si_schedulinginfo2_r17->si_Periodicity_r17 = NR_SchedulingInfo2_r17__si_Periodicity_r17_rf8; - - struct NR_SIB_TypeInfo_v1700 *sib_type_info = CALLOC(1, sizeof(struct NR_SIB_TypeInfo_v1700)); - sib_type_info->sibType_r17.present = NR_SIB_TypeInfo_v1700__sibType_r17_PR_type1_r17; - sib_type_info->sibType_r17.choice.type1_r17 = NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType19; - - asn1cSeqAdd(&si_schedulinginfo2_r17->sib_MappingInfo_r17.list, sib_type_info); - asn1cSeqAdd(&sib_v17_scheduling_info->schedulingInfoList2_r17.list, si_schedulinginfo2_r17); - sib1->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->si_SchedulingInfo_v1700 = sib_v17_scheduling_info; - } - // servingCellConfigCommon asn1cCalloc(sib1->servingCellConfigCommon, ServCellCom); NR_BWP_DownlinkCommon_t *initialDownlinkBWP = &ServCellCom->downlinkConfigCommon.initialDownlinkBWP; @@ -2511,7 +2485,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, frequencyInfoDL->frequencyBandList.list.array[i]; } - frequency_range_t frequency_range = band > 256 ? FR2 : FR1; + frequency_range_t frequency_range = get_freq_range_from_band(band); sib1->servingCellConfigCommon->downlinkConfigCommon.frequencyInfoDL.offsetToPointA = get_ssb_offset_to_pointA(*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB, scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA, scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing, @@ -2672,6 +2646,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, // ue-TimersAndConstants sib1->ue_TimersAndConstants = CALLOC(1,sizeof(struct NR_UE_TimersAndConstants)); AssertFatal(sib1->ue_TimersAndConstants != NULL, "out of memory\n"); + const nr_mac_timers_t *timer_config = &mac_config->timer_config; sib1->ue_TimersAndConstants->t300 = get_NR_UE_TimersAndConstants_t300(timer_config); sib1->ue_TimersAndConstants->t301 = get_NR_UE_TimersAndConstants_t301(timer_config); sib1->ue_TimersAndConstants->t310 = get_NR_UE_TimersAndConstants_t310(timer_config); @@ -2698,7 +2673,47 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, // TODO: add lateNonCriticalExtension // nonCriticalExtension - // TODO: add nonCriticalExtension + if (mac_config->redcap || (scc->ext2 && scc->ext2->ntn_Config_r17)) { + sib1->nonCriticalExtension = calloc_or_fail(1, sizeof(*sib1->nonCriticalExtension)); + NR_SIB1_v1610_IEs_t *sib1_1610 = sib1->nonCriticalExtension; + sib1_1610->nonCriticalExtension = calloc_or_fail(1, sizeof(*sib1_1610->nonCriticalExtension)); + NR_SIB1_v1630_IEs_t *sib1_1630 = sib1_1610->nonCriticalExtension; + sib1_1630->nonCriticalExtension = calloc_or_fail(1, sizeof(*sib1_1630->nonCriticalExtension)); + NR_SIB1_v1700_IEs_t *sib1_1700 = sib1_1630->nonCriticalExtension; + + if (mac_config->redcap) { + sib1_1700->redCap_ConfigCommon_r17 = calloc_or_fail(1, sizeof(*sib1_1700->redCap_ConfigCommon_r17)); + sib1_1700->redCap_ConfigCommon_r17->cellBarredRedCap_r17 = + calloc_or_fail(1, sizeof(*sib1_1700->redCap_ConfigCommon_r17->cellBarredRedCap_r17)); + + const nr_redcap_config_t *redcap_config = mac_config->redcap; + struct NR_RedCap_ConfigCommonSIB_r17__cellBarredRedCap_r17 *CellBarredRedCap_r17 = + sib1_1700->redCap_ConfigCommon_r17->cellBarredRedCap_r17; + CellBarredRedCap_r17->cellBarredRedCap1Rx_r17 = redcap_config->cellBarredRedCap1Rx_r17; + CellBarredRedCap_r17->cellBarredRedCap2Rx_r17 = redcap_config->cellBarredRedCap2Rx_r17; + sib1_1700->intraFreqReselectionRedCap_r17 = calloc_or_fail(1, sizeof(*sib1_1700->intraFreqReselectionRedCap_r17)); + *sib1_1700->intraFreqReselectionRedCap_r17 = redcap_config->intraFreqReselectionRedCap_r17; + } + + // sib19 scheduling info + // ensure ntn-config is initialized + if (scc->ext2 && scc->ext2->ntn_Config_r17) { + struct NR_SI_SchedulingInfo_v1700 *sib_v17_scheduling_info = CALLOC(1, sizeof(struct NR_SI_SchedulingInfo_v1700)); + + struct NR_SchedulingInfo2_r17 *si_schedulinginfo2_r17 = CALLOC(1, sizeof(struct NR_SchedulingInfo2_r17)); + si_schedulinginfo2_r17->si_BroadcastStatus_r17 = NR_SchedulingInfo2_r17__si_BroadcastStatus_r17_broadcasting; + si_schedulinginfo2_r17->si_WindowPosition_r17 = 2; + si_schedulinginfo2_r17->si_Periodicity_r17 = NR_SchedulingInfo2_r17__si_Periodicity_r17_rf8; + + struct NR_SIB_TypeInfo_v1700 *sib_type_info = CALLOC(1, sizeof(struct NR_SIB_TypeInfo_v1700)); + sib_type_info->sibType_r17.present = NR_SIB_TypeInfo_v1700__sibType_r17_PR_type1_r17; + sib_type_info->sibType_r17.choice.type1_r17 = NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType19; + + asn1cSeqAdd(&si_schedulinginfo2_r17->sib_MappingInfo_r17.list, sib_type_info); + asn1cSeqAdd(&sib_v17_scheduling_info->schedulingInfoList2_r17.list, si_schedulinginfo2_r17); + sib1_1700->si_SchedulingInfo_v1700 = sib_v17_scheduling_info; + } + } if (LOG_DEBUGFLAG(DEBUG_ASN1)) { xer_fprint(stdout, &asn_DEF_NR_BCCH_DL_SCH_Message, sib1_message); diff --git a/openair2/RRC/NR/nr_rrc_config.h b/openair2/RRC/NR/nr_rrc_config.h index 803e0dadde..b72acf9770 100644 --- a/openair2/RRC/NR/nr_rrc_config.h +++ b/openair2/RRC/NR/nr_rrc_config.h @@ -82,7 +82,7 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, const f1ap_plmn_t *plmn, uint64_t cellID, int tac, - const nr_mac_timers_t *timer_config); + const nr_mac_config_t *mac_config); void free_SIB1_NR(NR_BCCH_DL_SCH_Message_t *sib1); int encode_SIB1_NR(NR_BCCH_DL_SCH_Message_t *sib1, uint8_t *buffer, int max_buffer_size); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index d0d1273776..dc1cb72baa 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -1614,7 +1614,7 @@ static void handle_measid_addmod(rrcPerNB_t *rrc, struct NR_MeasIdToAddModList * else if (obj_nr->refFreqCSI_RS) freq = *obj_nr->refFreqCSI_RS; AssertFatal(freq > 0, "Invalid ARFCN frequency for this measurement object\n"); - if (freq > 2016666) + if (get_freq_range_from_arfcn(freq) == FR2) nr_timer_setup(&timers->T321, 16000, 10); // 16 seconds for FR2 else nr_timer_setup(&timers->T321, 2000, 10); // 2 seconds for FR1 diff --git a/openair3/NAS/COMMON/IES/CMakeLists.txt b/openair3/NAS/COMMON/IES/CMakeLists.txt index 67cc9d782a..dd10fe3018 100644 --- a/openair3/NAS/COMMON/IES/CMakeLists.txt +++ b/openair3/NAS/COMMON/IES/CMakeLists.txt @@ -4,3 +4,4 @@ add_library(nas_common_ies_lib OBJECT ) target_include_directories(nas_common_ies_lib PUBLIC .) +target_link_libraries(nas_common_ies_lib PUBLIC log_headers) diff --git a/openair3/NAS/COMMON/UTIL/CMakeLists.txt b/openair3/NAS/COMMON/UTIL/CMakeLists.txt index dc29dff207..0947e80991 100644 --- a/openair3/NAS/COMMON/UTIL/CMakeLists.txt +++ b/openair3/NAS/COMMON/UTIL/CMakeLists.txt @@ -2,5 +2,6 @@ add_library(nas_utils OBJECT TLVDecoder.c OctetString.c ) +target_link_libraries(nas_utils PUBLIC log_headers) target_include_directories(nas_utils PRIVATE .) diff --git a/openair3/NAS/NR_UE/5GS/5GMM/IES/CMakeLists.txt b/openair3/NAS/NR_UE/5GS/5GMM/IES/CMakeLists.txt index 24ed3022a6..e865dd0046 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/IES/CMakeLists.txt +++ b/openair3/NAS/NR_UE/5GS/5GMM/IES/CMakeLists.txt @@ -8,6 +8,7 @@ add_library(fgs_5gmm_ies_lib OBJECT SORTransparentContainer.c ) -target_link_libraries(fgs_5gmm_ies_lib PUBLIC - nas_common_ies_lib +target_link_libraries(fgs_5gmm_ies_lib + PUBLIC nas_common_ies_lib + PRIVATE log_headers ) diff --git a/openair3/NAS/NR_UE/5GS/5GSM/MSG/CMakeLists.txt b/openair3/NAS/NR_UE/5GS/5GSM/MSG/CMakeLists.txt index 1630a48222..de75e7157f 100644 --- a/openair3/NAS/NR_UE/5GS/5GSM/MSG/CMakeLists.txt +++ b/openair3/NAS/NR_UE/5GS/5GSM/MSG/CMakeLists.txt @@ -1,6 +1,6 @@ add_library(fgs_5gsm_lib OBJECT PduSessionEstablishRequest.c PduSessionEstablishmentAccept.c) -target_link_libraries(fgs_5gsm_lib PUBLIC nas_common_ies_lib) +target_link_libraries(fgs_5gsm_lib PUBLIC nas_common_ies_lib log_headers) target_include_directories(fgs_5gsm_lib PUBLIC . ../../) diff --git a/openair3/NAS/NR_UE/nr_nas_msg.c b/openair3/NAS/NR_UE/nr_nas_msg.c index 64a541aa78..95548da714 100644 --- a/openair3/NAS/NR_UE/nr_nas_msg.c +++ b/openair3/NAS/NR_UE/nr_nas_msg.c @@ -520,7 +520,7 @@ static FGMMCapability set_fgmm_capability(nr_ue_nas_t *nas) cap.restrict_ec = 0; cap.lpp = 1; cap.ho_attach = 1; - cap.s1_mode = 1; + cap.s1_mode = 0; if (cap.length == 1) return cap; // Send minimum length only, 1 octet diff --git a/openair3/NAS/TOOLS/nvram.c b/openair3/NAS/TOOLS/nvram.c index 80d8b34893..ad39462dc9 100644 --- a/openair3/NAS/TOOLS/nvram.c +++ b/openair3/NAS/TOOLS/nvram.c @@ -69,7 +69,7 @@ int main (int argc, char * const argv[]) {NULL, 0, NULL, 0} }; int option_index; - char option_short; + int option_short; /* * Read command line parameters @@ -94,6 +94,8 @@ int main (int argc, char * const argv[]) output_dir = optarg; break; default: + fprintf(stderr, "unknown option %d, exit\n", option_short); + exit(1); break; } } diff --git a/openair3/NAS/TOOLS/usim.c b/openair3/NAS/TOOLS/usim.c index 84b4cfbdf8..9d74499144 100644 --- a/openair3/NAS/TOOLS/usim.c +++ b/openair3/NAS/TOOLS/usim.c @@ -69,7 +69,7 @@ int main (int argc, char * const argv[]) {NULL, 0, NULL, 0} }; int option_index; - char option_short; + int option_short; /* * Read command line parameters @@ -94,6 +94,8 @@ int main (int argc, char * const argv[]) output_dir = optarg; break; default: + fprintf(stderr, "unknown option %d, exit\n", option_short); + exit(1); break; } } diff --git a/openair3/NAS/UE/API/USIM/CMakeLists.txt b/openair3/NAS/UE/API/USIM/CMakeLists.txt index 90a9cb40fe..63ae905461 100644 --- a/openair3/NAS/UE/API/USIM/CMakeLists.txt +++ b/openair3/NAS/UE/API/USIM/CMakeLists.txt @@ -3,6 +3,7 @@ add_library(usim_lib OBJECT aka_functions.c usim_api.c ) +target_link_libraries(usim_lib PRIVATE log_headers) target_include_directories(usim_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/openair3/SCTP/sctp_default_values.h b/openair3/SCTP/sctp_default_values.h index 0f8f94dca9..6049d143f8 100644 --- a/openair3/SCTP/sctp_default_values.h +++ b/openair3/SCTP/sctp_default_values.h @@ -26,6 +26,6 @@ #define SCTP_IN_STREAMS (16) #define SCTP_MAX_ATTEMPTS (8) #define SCTP_TIMEOUT (60000) -#define SCTP_RECV_BUFFER_SIZE (8192) +#define SCTP_RECV_BUFFER_SIZE (65536) #endif /* SCTP_DEFAULT_VALUES_H_ */ diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index 530b3ea6b0..6b83a7df6d 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -806,8 +806,8 @@ sctp_eNB_read_from_socket( } if (!(flags & MSG_EOR)) { - SCTP_ERROR("fatal: partial SCTP messages are not handled\n"); - exit_fun("fatal: partial SCTP messages are not handled" ); + SCTP_ERROR("partial SCTP message received, discarding message\n"); + return; } if (flags & MSG_NOTIFICATION) { diff --git a/openair3/UICC/CMakeLists.txt b/openair3/UICC/CMakeLists.txt index 0570c7238f..c80694e1a5 100644 --- a/openair3/UICC/CMakeLists.txt +++ b/openair3/UICC/CMakeLists.txt @@ -1,2 +1,3 @@ add_library(lib_uicc OBJECT usim_interface.c) target_include_directories(lib_uicc PRIVATE .) +target_link_libraries(lib_uicc PRIVATE log_headers) diff --git a/radio/fhi_72/README.md b/radio/fhi_72/README.md new file mode 100644 index 0000000000..2f72a9aa07 --- /dev/null +++ b/radio/fhi_72/README.md @@ -0,0 +1,46 @@ +This document describes the driver for the xran driver, implementing O-RAN FHI +7.2 interface. This is for developers; for user documentation, consider the +[O-RAN 7.2 tutorial instead](../../doc/ORAN_FHI7.2_Tutorial.md). + +The main source files and their purpose are as follows: + +- `oaioran.c`: definition of xran-specific callback functions. +- `oran-config.c`: reading of 7.2-specific configuration and preparing xran + configration. +- `oran-init.c`: initialization of xran. +- `oran_isolate.c`: main entry point and definition of function pointers for OAI + callbacks. + +The entry point for the driver library is `transport_init()` in `oran_isolate.c`. +This function is concerned with setting necessary function pointers for OAI +integration, and prepares xran configuration through `get_xran_config()`. This +function reads 7.2 specific configuration and deduces some of the parameters +(e.g., frequency) from OAI-provided radio configuration in `openair0_config_t`. + +Actual xran initialization happens in `oai_oran_initialize()` in `oran-init.c`. +It calls various helper function in the same file to set up DPDK memory buffer +(pools). Notably, these callbacks are installed: + +- `oai_xran_fh_rx_callback()` through `xran_5g_fronthault_config()`: callback + for PUSCH data; used to provide timing data. +- `oai_xran_fh_rx_prach_callback()` through `xran_5g_prach_req()`: callback for + PRACH data; not currently used and implemented in PUSCH data callback. +- `oai_physide_dl_tti_call_back()` through `xran_reg_physide_cb()`: only used + to unblock timing in `oai_xran_fh_rx_callback()` upon first xran call. + +More detailed information about the xran callbacks can be taken from the xran +documentation. + +During normal operation, OAI calls into the driver through functions +`oran_fh_if4p5_south_in()` for PUSCH/PRACH and `oran_fh_if4p5_south_out()` for +PDSCH. + +For PDSCH, `oran_fh_if4p5_south_out()` calls `xran_fh_tx_send_slot()` that +optionally compresses IQ data, then writes it into IQ buffers of xran. + +For PUSCH/PRACH, `oran_fh_if4p5_south_in()` calls `xran_fh_rx_read_slot()` that +blocks and waits for the next slot. This is done through either a message +queue, or through polling, which in both cases depends on xran calling the +callback `oai_xran_fh_rx_callback()` as installed during xran initialization. +Once unblocked, it reads first PRACH data, then PUSCH data, before returning to +OAI. diff --git a/radio/fhi_72/oaioran.c b/radio/fhi_72/oaioran.c index 65839fd5a0..16dd2d85de 100644 --- a/radio/fhi_72/oaioran.c +++ b/radio/fhi_72/oaioran.c @@ -44,7 +44,7 @@ #endif // Declare variable useful for the send buffer function -volatile uint8_t first_call_set = 0; +volatile bool first_call_set = false; int xran_is_prach_slot(uint8_t PortId, uint32_t subframe_id, uint32_t slot_id); #include "common/utils/LOG/log.h" @@ -54,6 +54,12 @@ extern notifiedFIFO_t oran_sync_fifo; #else volatile oran_sync_info_t oran_sync_info = {0}; #endif + +/** @details xran-specific callback, called when all packets for given CC and + * 1/4, 1/2, 3/4, all symbols of a slot arrived. Currently, only used to get + * timing information and unblock another thread in xran_fh_rx_read_slot() + * through either a message queue, or writing in global memory with polling, on + * a full slot boundary. */ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status) { struct xran_cb_tag *callback_tag = (struct xran_cb_tag *)pCallbackTag; @@ -150,36 +156,23 @@ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status) last_frame = frame; } // rx_sym == 7 } -void oai_xran_fh_srs_callback(void *pCallbackTag, xran_status_t status) -{ - rte_pause(); -} -void oai_xran_fh_rx_prach_callback(void *pCallbackTag, xran_status_t status) -{ - rte_pause(); -} +/** @details Only used to unblock timing in oai_xran_fh_rx_callback() on first + * call. */ int oai_physide_dl_tti_call_back(void *param) { if (!first_call_set) - printf("first_call set from phy cb first_call_set=%p\n", &first_call_set); - first_call_set = 1; + LOG_I(HW, "first_call set from phy cb\n"); + first_call_set = true; return 0; } -int oai_physide_ul_half_slot_call_back(void *param) -{ - rte_pause(); - return 0; -} - -int oai_physide_ul_full_slot_call_back(void *param) -{ - rte_pause(); - return 0; -} - -int read_prach_data(ru_info_t *ru, int frame, int slot) +/** @brief Reads PRACH data from xran buffers. + * + * @details Reads PRACH data from xran-specific buffers and, if I/Q compression + * (bitwidth < 16 bits) is configured, uncompresses the data. Places PRACH data + * in OAI buffer. */ +static int read_prach_data(ru_info_t *ru, int frame, int slot) { /* calculate tti and subframe_id from frame, slot num */ int sym_idx = 0; @@ -248,6 +241,11 @@ int read_prach_data(ru_info_t *ru, int frame, int slot) return (0); } +/** @brief Check if symbol in slot is UL. + * + * @param frame_conf xran frame configuration + * @param slot the current (absolute) slot (number) + * @param sym_idx the current symbol index */ static bool is_tdd_ul_symbol(const struct xran_frame_config *frame_conf, int slot, int sym_idx) { /* in FDD, every symbol is also UL */ @@ -259,11 +257,20 @@ static bool is_tdd_ul_symbol(const struct xran_frame_config *frame_conf, int slo return frame_conf->sSlotConfig[slot_in_period].nSymbolType[sym_idx] == 1 /* UL */; } +/** @brief Check if current slot is DL or guard/mixed without UL (i.e., current + * slot is not UL). */ static bool is_tdd_dl_guard_slot(const struct xran_frame_config *frame_conf, int slot) { return !is_tdd_ul_symbol(frame_conf, slot, XRAN_NUM_OF_SYMBOL_PER_SLOT - 1); } +/** @details Read PRACH and PUSCH data from xran buffers. If + * I/Q compression (bitwidth < 16 bits) is configured, deccompresses the data + * before writing. Prints ON TIME counters every 128 frames. + * + * Function is blocking and waits for next frame/slot combination. It is unblocked + * by oai_xran_fh_rx_callback(). It writes the current slot into parameters + * frame/slot. */ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot) { void *ptr = NULL; @@ -458,6 +465,9 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot) return (0); } +/** @details Write PDSCH IQ-data from OAI txdataF_BF buffer to xran buffers. If + * I/Q compression (bitwidth < 16 bits) is configured, compresses the data + * before writing. */ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp) { int tti = /*frame*SUBFRAMES_PER_SYSTEMFRAME*SLOTNUM_PER_SUBFRAME+*/ 20 * frame diff --git a/radio/fhi_72/oaioran.h b/radio/fhi_72/oaioran.h index a20f6c80d3..e973ce2997 100644 --- a/radio/fhi_72/oaioran.h +++ b/radio/fhi_72/oaioran.h @@ -31,7 +31,9 @@ typedef struct { uint32_t f; } oran_sync_info_t; +/** @brief xran callback for fronthaul RX, see xran_5g_fronthault_config(). */ void oai_xran_fh_rx_callback(void *pCallbackTag, xran_status_t status); +/** @brief xran callback for time alignment, see xran_reg_physide_cb(). */ int oai_physide_dl_tti_call_back(void *param); #endif /* OAIORAN_H */ diff --git a/radio/fhi_72/oran-init.c b/radio/fhi_72/oran-init.c index a5c620e995..97930a172b 100644 --- a/radio/fhi_72/oran-init.c +++ b/radio/fhi_72/oran-init.c @@ -443,7 +443,7 @@ int *oai_oran_initialize(struct xran_fh_init *xran_fh_init, struct xran_fh_confi pi->prach_tag = tag; pi->pusch_tag = tag; #ifdef E_RELEASE - LOG_W(PHY, "Please be aware that E release support will be removed by the end of January 2025. Instead, F release will be mandatory.\n"); + LOG_W(PHY, "Please be aware that E release support will be removed in the future. Consider switching to F release.\n"); oran_allocate_buffers(gxran_handle, o_xu_id, 1, pi, &xran_fh_config[o_xu_id]); #elif defined F_RELEASE oran_allocate_buffers(gxran_handle, o_xu_id, 1, pi, xran_fh_init->mtu, &xran_fh_config[o_xu_id]); diff --git a/radio/fhi_72/oran_isolate.h b/radio/fhi_72/oran_isolate.h index 7388f88f3b..174c1399a6 100644 --- a/radio/fhi_72/oran_isolate.h +++ b/radio/fhi_72/oran_isolate.h @@ -45,9 +45,13 @@ typedef struct ru_info_s { int16_t **prach_buf; } ru_info_t; +/** @brief Reads RX data (PRACH/PUSCH) of next slot. + * + * @param ru pointer to structure keeping pointers to OAI data. + * @param frame output of the frame which has been read. + * @param slot output of the slot which has been read. */ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot); +/** @brief Writes TX data (PDSCH) of given slot. */ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp); -int compute_xran_statistics(); - #endif /* _ORAN_ISOLATE_H_ */ diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.51PRB.usrpb210.redcap.yaml b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.51PRB.usrpb210.redcap.yaml new file mode 100644 index 0000000000..b3f43bfbd7 --- /dev/null +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.51PRB.usrpb210.redcap.yaml @@ -0,0 +1,230 @@ +Active_gNBs: + - gNB-OAI +Asn1_verbosity: none +gNBs: + # Identification parameters: + - gNB_ID: 0xe00 + gNB_name: gNB-OAI + # Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code: 1 + plmn_list: + - + mcc: 001 + mnc: 01 + mnc_length: 2 + snssaiList: + - + sst: 1 + nr_cellid: 12345678 + # Physical parameters: + do_CSIRS: 1 + do_SRS: 1 + #uess_agg_levels: [0,1,1,1,1] + servingCellConfigCommon: + #spCellConfigCommon + - physCellId: 0 + # downlinkConfigCommon + #frequencyInfoDL + # this is 3619.200 MHz + absoluteFrequencySSB: 641280 + dl_frequencyBand: 78 + # this is 3611.280 MHz + dl_absoluteFrequencyPointA: 640752 + #scs-SpecificCarrierList + dl_offstToCarrier: 0 + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing: 1 + dl_carrierBandwidth: 51 + #initialDownlinkBWP + #genericParameters + # this is RBstart=0,L=51 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth: 13750 + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing: 1 + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero: 10 + initialDLBWPsearchSpaceZero: 0 + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand: 78 + #scs-SpecificCarrierList + ul_offstToCarrier: 0 + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing: 1 + ul_carrierBandwidth: 51 + pMax: 20 + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth: 13750 + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialULBWPsubcarrierSpacing: 1 + #rach-ConfigCommon + #rach-ConfigGeneric + prach_ConfigurationIndex: 98 + #prach_msg1_FDM + #0 = one, 1=two, 2=four, 3=eight + prach_msg1_FDM: 0 + prach_msg1_FrequencyStart: 0 + zeroCorrelationZoneConfig: 13 + preambleReceivedTargetPower: -96 + #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax: 6 + #powerRampingStep + # 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep: 1 + #ra_ReponseWindow + #1,2,4,8,10,20,40,80 + ra_ResponseWindow: 5 + #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR + #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 + #one (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 14 + #ra_ContentionResolutionTimer + #(0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer: 7 + rsrp_ThresholdSSB: 19 + #prach-RootSequenceIndex_PR + #1 = 839, 2 = 139 + prach_RootSequenceIndex_PR: 2 + prach_RootSequenceIndex: 1 + # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex + msg1_SubcarrierSpacing: 1 + # restrictedSetConfig + # 0=unrestricted, 1=restricted type A, 2=restricted type B + restrictedSetConfig: 0 + msg3_DeltaPreamble: 1 + p0_NominalWithGrant: -90 + # pucch-ConfigCommon setup : + # pucchGroupHopping + # 0 = neither, 1= group hopping, 2=sequence hopping + pucchGroupHopping: 0 + hoppingId: 40 + p0_nominal: -90 + ssb_PositionsInBurst_Bitmap: 1 + + # ssb_periodicityServingCell + # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 + ssb_periodicityServingCell: 2 + + # dmrs_TypeA_position + # 0 = pos2, 1 = pos3 + dmrs_TypeA_Position: 0 + + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + subcarrierSpacing: 1 + + + #tdd-UL-DL-ConfigurationCommon + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + referenceSubcarrierSpacing: 1 + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity: 6 + nrofDownlinkSlots: 7 + nrofDownlinkSymbols: 6 + nrofUplinkSlots: 2 + nrofUplinkSymbols: 4 + + ssPBCH_BlockPower: -25 + RedCap: + cellBarredRedCap1Rx_r17: 1 + cellBarredRedCap2Rx_r17: 1 + intraFreqReselectionRedCap_r17: 0 + TIMERS: + t300: 1000 + t301: 1000 + t310: 1000 + n310: 1 + t311: 30000 + n311: 1 + t319: 1000 + SCTP: + SCTP_INSTREAMS: 2 + SCTP_OUTSTREAMS: 2 + + + # AMF parameters: + amf_ip_address: + - ipv4: 192.168.70.132 + + + NETWORK_INTERFACES: + GNB_IPV4_ADDRESS_FOR_NG_AMF: 192.168.70.129 + GNB_IPV4_ADDRESS_FOR_NGU: 192.168.70.129 + GNB_PORT_FOR_S1U: 2152 # Spec 2152 + +MACRLCs: + - + num_cc: 1 + tr_s_preference: local_L1 + tr_n_preference: local_RRC + pusch_TargetSNRx10: 150 + pucch_TargetSNRx10: 200 + +L1s: + - + num_cc: 1 + tr_n_preference: local_mac + prach_dtx_threshold: 120 + pucch0_dtx_threshold: 100 + ofdm_offset_divisor: 8 #set this to UINT_MAX for offset 0 + +RUs: + - + local_rf: yes + nb_tx: 1 + nb_rx: 1 + att_tx: 12 + att_rx: 12 + bands: [78] + max_pdschReferenceSignalPower: -27 + max_rxgain: 114 + eNB_instances: [0] + clock_src: internal + +rfsimulator: + serveraddr: server + serverport: 4043 + options: [] #("saviq"); or/and "chanmod" + modelname: AWGN + IQfile: /tmp/rfsimulator.iqs + +security: + # preferred ciphering algorithms + # the first one of the list that an UE supports in chosen + # valid values: nea0, nea1, nea2, nea3 + ciphering_algorithms: [nea0] + + # preferred integrity algorithms + # the first one of the list that an UE supports in chosen + # valid values: nia0, nia1, nia2, nia3 + integrity_algorithms: [nia2, nia0] + + # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter + # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' + drb_ciphering: yes + drb_integrity: no + +log_config: + global_log_level: info + hw_log_level: info + phy_log_level: info + mac_log_level: info + rlc_log_level: info + pdcp_log_level: info + rrc_log_level: info + ngap_log_level: debug + f1ap_log_level: debug + +e2_agent: + near_ric_ip_addr: 127.0.0.1 + #sm_dir = /path/where/the/SMs/are/located/ + sm_dir: /usr/local/lib/flexric/