diff --git a/CMakeLists.txt b/CMakeLists.txt index feb7e41a4f..b607056aa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,7 @@ add_list_string_option(CMAKE_BUILD_TYPE "RelWithDebInfo" "Choose the type of bui # -so to avoid AVX512 instructions generation by gcc if(EXISTS "/proc/cpuinfo" AND NOT CROSS_COMPILE) file(STRINGS "/proc/cpuinfo" CPUFLAGS REGEX flags LIMIT_COUNT 1) + file(STRINGS "/proc/cpuinfo" CPUPART REGEX "CPU part" LIMIT_COUNT 1) else() message(WARNING "did not find /proc/cpuinfo -- not setting any x86-specific compilation variables") endif() @@ -146,9 +147,20 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_SSSE3_NATIVE") endif() elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") - set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mfloat-abi=hard -mfpu=neon -lgcc -lrt") + set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mfloat-abi=hard -mfpu=neon -lgcc -lrt") elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") - set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -lgcc -lrt") +# Neoverse CPU part codes available at https://github.com/util-linux/util-linux/blob/master/sys-utils/lscpu-arm.c + if (CPUPART MATCHES "0xd40") # Neoverse-V1 + set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=neoverse-v1 -lgcc -lrt") + elseif (CPUPART MATCHES "0xd4f") # Neoverse-V2 + set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=neoverse-v2 -ftree-vectorize -lgcc -lrt") + elseif (CPUPART MATCHES "0xd0c") # Neoverse-N1 + set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=neoverse-n1 -lgcc -lrt") + elseif (CPUPART MATCHES "0xd49") # Neoverse-N2 + set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=neoverse-n2 -ftree-vectorize -lgcc -lrt") + else () + set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=native -lgcc -lrt") + endif() else() message(FATAL_ERROR "compile for CPU architecture ${CPUARCH}, CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}") endif() @@ -939,7 +951,6 @@ set(PHY_SRC_UE ${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c ${OPENAIR1_DIR}/PHY/NR_REFSIG/dmrs_nr.c ${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c - ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_csi_rs.c ${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c ${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_freq_equalization.c ${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_measurements_gNB.c @@ -2052,6 +2063,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr pthread m rt CONFIG_LIB ${T_LIB} dl shlib_loader ) target_link_libraries(${myExe} PRIVATE asn1_lte_rrc_hdrs) + add_dependencies(${myExe} coding) endforeach(myExe) @@ -2104,12 +2116,18 @@ include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt) set(ENABLE_TESTS OFF CACHE STRING "Activate build of tests") set_property(CACHE ENABLE_TESTS PROPERTY TYPE BOOL) -if(ENABLE_TESTS) - # activates globally adding tests such that they can be run using ctest - enable_testing() +set(ENABLE_PHYSIM_TESTS OFF CACHE STRING "Activate build of physim tests") +set_property(CACHE ENABLE_PHYSIM_TESTS PROPERTY TYPE BOOL) + +if(ENABLE_TESTS OR ENABLE_PHYSIM_TESTS) # meta-target: each test is supposed to add_dependencies(tests ${NEWTEST}) # then, it is possible to build and execute all tests using "ninja tests && ctest" add_custom_target(tests) + # activates globally adding tests such that they can be run using ctest + enable_testing() +endif() + +if(ENABLE_TESTS) find_package(GTest) if (NOT GTest_FOUND) message(STATUS "GTest package not found, will download googletest automatically. To prevent that install google test on your system (libgtest-dev)") diff --git a/charts/physims/Chart.yaml b/charts/physims-4g/Chart.yaml similarity index 100% rename from charts/physims/Chart.yaml rename to charts/physims-4g/Chart.yaml diff --git a/charts/physims/charts/ulsim/Chart.yaml b/charts/physims-4g/charts/physims.4g/Chart.yaml similarity index 93% rename from charts/physims/charts/ulsim/Chart.yaml rename to charts/physims-4g/charts/physims.4g/Chart.yaml index 2311d729b4..bd10179fc5 100644 --- a/charts/physims/charts/ulsim/Chart.yaml +++ b/charts/physims-4g/charts/physims.4g/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -name: oai-ulsim -description: A Helm subchart for ulsim network function +name: oai-physims-4g +description: A Helm subchart for 4G physims network function # A chart can be either an 'application' or a 'library' chart. # @@ -24,7 +24,6 @@ appVersion: v1 keywords: - Physical Simulator - - ulsim - RAN - 4G diff --git a/charts/physims/charts/polartest/templates/_helpers.tpl b/charts/physims-4g/charts/physims.4g/templates/_helpers.tpl similarity index 73% rename from charts/physims/charts/polartest/templates/_helpers.tpl rename to charts/physims-4g/charts/physims.4g/templates/_helpers.tpl index ce81dbe525..2f6253d744 100644 --- a/charts/physims/charts/polartest/templates/_helpers.tpl +++ b/charts/physims-4g/charts/physims.4g/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "oai-polartest.name" -}} +{{- define "oai-physims-4g.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "oai-polartest.fullname" -}} +{{- define "oai-physims-4g.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "oai-polartest.chart" -}} +{{- define "oai-physims-4g.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "oai-polartest.labels" -}} -helm.sh/chart: {{ include "oai-polartest.chart" . }} -{{ include "oai-polartest.selectorLabels" . }} +{{- define "oai-physims-4g.labels" -}} +helm.sh/chart: {{ include "oai-physims-4g.chart" . }} +{{ include "oai-physims-4g.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -46,17 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "oai-polartest.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-polartest.name" . }} +{{- define "oai-physims-4g.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-physims-4g.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} {{/* Create the name of the service account to use */}} -{{- define "oai-polartest.serviceAccountName" -}} +{{- define "oai-physims-4g.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-polartest.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-physims-4g.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/charts/physims/charts/nr-dlsim.basic/templates/job.yaml b/charts/physims-4g/charts/physims.4g/templates/job.yaml similarity index 81% rename from charts/physims/charts/nr-dlsim.basic/templates/job.yaml rename to charts/physims-4g/charts/physims.4g/templates/job.yaml index cbe1a9cbbc..03bf54a9ee 100644 --- a/charts/physims/charts/nr-dlsim.basic/templates/job.yaml +++ b/charts/physims-4g/charts/physims.4g/templates/job.yaml @@ -31,8 +31,9 @@ spec: command: ["/bin/sh", "-c"] args: - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.basic" -d bin/ && - echo "FINISHED" && sleep infinity + ctest -R 4g --show-only=json-v1 >> physims-4g-tests.json && + ctest -R 4g -j$(nproc) --output-junit physims-4g-run.xml --test-output-size-passed 100000 --test-output-size-failed 100000 ; + echo "FINISHED" && sleep 15 dnsPolicy: ClusterFirst restartPolicy: Never schedulerName: default-scheduler @@ -43,5 +44,5 @@ spec: {{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- end }} {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrdlsimbasic }} + nodeName: {{ .Values.global.nodeName.physims5g }} {{- end }} diff --git a/charts/physims/charts/ulsim/values.yaml b/charts/physims-4g/charts/physims.4g/values.yaml similarity index 94% rename from charts/physims/charts/ulsim/values.yaml rename to charts/physims-4g/charts/physims.4g/values.yaml index 94038fa6df..52b751afd6 100644 --- a/charts/physims/charts/ulsim/values.yaml +++ b/charts/physims-4g/charts/physims.4g/values.yaml @@ -1,4 +1,4 @@ -# Default values for oai-ulsim. +# Default values for oai-physims-4g # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -20,7 +20,7 @@ serviceAccount: annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: "oai-ulsim-sa" + name: "oai-physims-4g" podSecurityContext: runAsUser: 0 diff --git a/charts/physims/templates/rbac.yaml b/charts/physims-4g/templates/rbac.yaml similarity index 100% rename from charts/physims/templates/rbac.yaml rename to charts/physims-4g/templates/rbac.yaml diff --git a/charts/physims/templates/serviceaccount.yaml b/charts/physims-4g/templates/serviceaccount.yaml similarity index 100% rename from charts/physims/templates/serviceaccount.yaml rename to charts/physims-4g/templates/serviceaccount.yaml diff --git a/charts/physims/values.yaml b/charts/physims-4g/values.yaml similarity index 94% rename from charts/physims/values.yaml rename to charts/physims-4g/values.yaml index 60a685179c..ce9ff32c90 100644 --- a/charts/physims/values.yaml +++ b/charts/physims-4g/values.yaml @@ -6,7 +6,7 @@ global: namespace: "OAICICD_PROJECT" image: registry: local - repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran/oai-physim + repository: image-registry.openshift-image-registry.svc:5000/oaicicd-core-for-ci-ran/oai-physim version: TAG # pullPolicy: IfNotPresent or Never or Always pullPolicy: Always diff --git a/charts/physims/charts/polartest/Chart.yaml b/charts/physims-5g/Chart.yaml similarity index 89% rename from charts/physims/charts/polartest/Chart.yaml rename to charts/physims-5g/Chart.yaml index ae5f5ca263..0a6abe4caa 100644 --- a/charts/physims/charts/polartest/Chart.yaml +++ b/charts/physims-5g/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -name: oai-polartest -description: A Helm subchart for polartest network function +name: oai-physim +description: A Helm chart for physical simulators network function # A chart can be either an 'application' or a 'library' chart. # @@ -16,17 +16,17 @@ icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_fin # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.1.1 +version: 1.0.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: v1 keywords: - - Physical Simulator - - polartest + - Physical Simulators - RAN - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/ldpctest/Chart.yaml b/charts/physims-5g/charts/physims.5g/Chart.yaml similarity index 92% rename from charts/physims/charts/ldpctest/Chart.yaml rename to charts/physims-5g/charts/physims.5g/Chart.yaml index 667bd3d8aa..4da4ad2faa 100644 --- a/charts/physims/charts/ldpctest/Chart.yaml +++ b/charts/physims-5g/charts/physims.5g/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -name: oai-ldpctest -description: A Helm subchart for ldpctest network function +name: oai-physims-5g +description: A Helm subchart for 5G physims network function # A chart can be either an 'application' or a 'library' chart. # @@ -24,7 +24,6 @@ appVersion: v1 keywords: - Physical Simulator - - ldpctest - RAN - 5G diff --git a/charts/physims/charts/ulsim/templates/_helpers.tpl b/charts/physims-5g/charts/physims.5g/templates/_helpers.tpl similarity index 73% rename from charts/physims/charts/ulsim/templates/_helpers.tpl rename to charts/physims-5g/charts/physims.5g/templates/_helpers.tpl index 67b6500479..f18b616e58 100644 --- a/charts/physims/charts/ulsim/templates/_helpers.tpl +++ b/charts/physims-5g/charts/physims.5g/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "oai-ulsim.name" -}} +{{- define "oai-physims-5g.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "oai-ulsim.fullname" -}} +{{- define "oai-physims-5g.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "oai-ulsim.chart" -}} +{{- define "oai-physims-5g.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "oai-ulsim.labels" -}} -helm.sh/chart: {{ include "oai-ulsim.chart" . }} -{{ include "oai-ulsim.selectorLabels" . }} +{{- define "oai-physims-5g.labels" -}} +helm.sh/chart: {{ include "oai-physims-5g.chart" . }} +{{ include "oai-physims-5g.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -46,17 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "oai-ulsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-ulsim.name" . }} +{{- define "oai-physims-5g.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-physims-5g.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} {{/* Create the name of the service account to use */}} -{{- define "oai-ulsim.serviceAccountName" -}} +{{- define "oai-physims-5g.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-ulsim.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-physims-5g.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/charts/physims/charts/ldpctest/templates/job.yaml b/charts/physims-5g/charts/physims.5g/templates/job.yaml similarity index 81% rename from charts/physims/charts/ldpctest/templates/job.yaml rename to charts/physims-5g/charts/physims.5g/templates/job.yaml index 4386d12a3e..7becb17f17 100644 --- a/charts/physims/charts/ldpctest/templates/job.yaml +++ b/charts/physims-5g/charts/physims.5g/templates/job.yaml @@ -31,8 +31,9 @@ spec: command: ["/bin/sh", "-c"] args: - > - cmake_targets/autotests/run_exec_autotests.bash -g "ldpctest" -d bin/ && - echo "FINISHED" && sleep infinity + ctest -R 5g --show-only=json-v1 >> physims-5g-tests.json && + ctest -R 5g -j$(nproc) --output-junit physims-5g-run.xml --test-output-size-passed 100000 --test-output-size-failed 100000 ; + echo "FINISHED" && sleep 20 dnsPolicy: ClusterFirst restartPolicy: Never schedulerName: default-scheduler @@ -43,5 +44,5 @@ spec: {{- toYaml .Values.global.nodeSelector | nindent 12 }} {{- end }} {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.ldpctest }} + nodeName: {{ .Values.global.nodeName.physims5g }} {{- end }} diff --git a/charts/physims/charts/ldpctest/values.yaml b/charts/physims-5g/charts/physims.5g/values.yaml similarity index 94% rename from charts/physims/charts/ldpctest/values.yaml rename to charts/physims-5g/charts/physims.5g/values.yaml index 0ff1153a2c..eb97064ebf 100644 --- a/charts/physims/charts/ldpctest/values.yaml +++ b/charts/physims-5g/charts/physims.5g/values.yaml @@ -1,4 +1,4 @@ -# Default values for oai-ldpctest. +# Default values for oai-physims-5g # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -20,7 +20,7 @@ serviceAccount: annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: "oai-ldpctest-sa" + name: "oai-physims-5g" podSecurityContext: runAsUser: 0 diff --git a/charts/physims-5g/templates/rbac.yaml b/charts/physims-5g/templates/rbac.yaml new file mode 100644 index 0000000000..989988baca --- /dev/null +++ b/charts/physims-5g/templates/rbac.yaml @@ -0,0 +1,26 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role +rules: +- apiGroups: + - security.openshift.io + resourceNames: + - anyuid + resources: + - securitycontextconstraints + verbs: + - use +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-binding +subjects: +- kind: ServiceAccount + name: {{ .Values.global.serviceAccountName }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: Role + name: {{ .Chart.Name }}-{{ .Release.Namespace }}-role + apiGroup: rbac.authorization.k8s.io diff --git a/charts/physims-5g/templates/serviceaccount.yaml b/charts/physims-5g/templates/serviceaccount.yaml new file mode 100644 index 0000000000..0810702f4f --- /dev/null +++ b/charts/physims-5g/templates/serviceaccount.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: oai-physim-sa #{{ .Values.global.serviceAccountName }} diff --git a/charts/physims-5g/values.yaml b/charts/physims-5g/values.yaml new file mode 100644 index 0000000000..ce9ff32c90 --- /dev/null +++ b/charts/physims-5g/values.yaml @@ -0,0 +1,21 @@ +# Default values for oai-physim. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +global: + serviceAccountName: oai-physim-sa + namespace: "OAICICD_PROJECT" + image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/oaicicd-core-for-ci-ran/oai-physim + version: TAG + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + # removing the node selector + # will place on two nodes intel 3rd gen and 5th gen with RT kernel + nodeSelector: + type: ran + nodeName: '' + resources: + define: false + requests: + cpu: 1.5 diff --git a/charts/physims/charts/dlsim.100rb+tm2/Chart.yaml b/charts/physims/charts/dlsim.100rb+tm2/Chart.yaml deleted file mode 100644 index 4d7cea8e23..0000000000 --- a/charts/physims/charts/dlsim.100rb+tm2/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-dlsim-100rb-tm2 -description: A Helm subchart for dlsim network function ("100rb+tm2" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - dlsim - - RAN - - 4G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/dlsim.100rb+tm2/templates/_helpers.tpl b/charts/physims/charts/dlsim.100rb+tm2/templates/_helpers.tpl deleted file mode 100644 index ee2418aee1..0000000000 --- a/charts/physims/charts/dlsim.100rb+tm2/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-dlsim-100rb-tm2.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-dlsim-100rb-tm2.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-dlsim-100rb-tm2.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-dlsim-100rb-tm2.labels" -}} -helm.sh/chart: {{ include "oai-dlsim-100rb-tm2.chart" . }} -{{ include "oai-dlsim-100rb-tm2.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-dlsim-100rb-tm2.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-dlsim-100rb-tm2.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-dlsim-100rb-tm2.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-dlsim-100rb-tm2.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/dlsim.100rb+tm2/templates/job.yaml b/charts/physims/charts/dlsim.100rb+tm2/templates/job.yaml deleted file mode 100644 index 4fbac5304d..0000000000 --- a/charts/physims/charts/dlsim.100rb+tm2/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "dlsim.100rb+tm2" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.dlsim100rbtm2 }} - {{- end }} diff --git a/charts/physims/charts/dlsim.100rb+tm2/values.yaml b/charts/physims/charts/dlsim.100rb+tm2/values.yaml deleted file mode 100644 index aae621bd84..0000000000 --- a/charts/physims/charts/dlsim.100rb+tm2/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-dlsim-100rb+tm2 -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-dlsim-100rb-tm2" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/dlsim.basic/Chart.yaml b/charts/physims/charts/dlsim.basic/Chart.yaml deleted file mode 100644 index 8fadf3e6b2..0000000000 --- a/charts/physims/charts/dlsim.basic/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-dlsim-basic -description: A Helm subchart for dlsim network function ("basic" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - dlsim - - RAN - - 4G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/dlsim.basic/templates/_helpers.tpl b/charts/physims/charts/dlsim.basic/templates/_helpers.tpl deleted file mode 100644 index d6dac8be45..0000000000 --- a/charts/physims/charts/dlsim.basic/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-dlsim-basic.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-dlsim-basic.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-dlsim-basic.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-dlsim-basic.labels" -}} -helm.sh/chart: {{ include "oai-dlsim-basic.chart" . }} -{{ include "oai-dlsim-basic.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-dlsim-basic.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-dlsim-basic.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-dlsim-basic.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-dlsim-basic.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/dlsim.basic/templates/job.yaml b/charts/physims/charts/dlsim.basic/templates/job.yaml deleted file mode 100644 index fac60059f2..0000000000 --- a/charts/physims/charts/dlsim.basic/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "dlsim.basic" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.dlsimbasic }} - {{- end }} diff --git a/charts/physims/charts/dlsim.basic/values.yaml b/charts/physims/charts/dlsim.basic/values.yaml deleted file mode 100644 index ae197e12ea..0000000000 --- a/charts/physims/charts/dlsim.basic/values.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# Default values for oai-dlsim-basic -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-dlsim-basic" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/ldpctest/templates/_helpers.tpl b/charts/physims/charts/ldpctest/templates/_helpers.tpl deleted file mode 100644 index 018eaa5af5..0000000000 --- a/charts/physims/charts/ldpctest/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-ldpctest.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-ldpctest.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-ldpctest.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-ldpctest.labels" -}} -helm.sh/chart: {{ include "oai-ldpctest.chart" . }} -{{ include "oai-ldpctest.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-ldpctest.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-ldpctest.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-ldpctest.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-ldpctest.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-dlschsim/Chart.yaml b/charts/physims/charts/nr-dlschsim/Chart.yaml deleted file mode 100644 index 3837f0cd2b..0000000000 --- a/charts/physims/charts/nr-dlschsim/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-dlschsim -description: A Helm subchart for nr-dlschsim network function - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-dlschsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-dlschsim/templates/_helpers.tpl b/charts/physims/charts/nr-dlschsim/templates/_helpers.tpl deleted file mode 100644 index 6b6a5181e9..0000000000 --- a/charts/physims/charts/nr-dlschsim/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-dlschsim.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-dlschsim.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-dlschsim.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-dlschsim.labels" -}} -helm.sh/chart: {{ include "oai-nr-dlschsim.chart" . }} -{{ include "oai-nr-dlschsim.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-dlschsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-dlschsim.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-dlschsim.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-dlschsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-dlschsim/templates/job.yaml b/charts/physims/charts/nr-dlschsim/templates/job.yaml deleted file mode 100644 index 6d1a798cb8..0000000000 --- a/charts/physims/charts/nr-dlschsim/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlschsim" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrdlschsim }} - {{- end }} diff --git a/charts/physims/charts/nr-dlschsim/values.yaml b/charts/physims/charts/nr-dlschsim/values.yaml deleted file mode 100644 index a75437a0d6..0000000000 --- a/charts/physims/charts/nr-dlschsim/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-dlschsim. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-dlschsim-sa" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-dlsim.basic/Chart.yaml b/charts/physims/charts/nr-dlsim.basic/Chart.yaml deleted file mode 100644 index b2a090a4b2..0000000000 --- a/charts/physims/charts/nr-dlsim.basic/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-dlsim-basic -description: A Helm subchart for nr-dlsim network function ("basic" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-dlsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-dlsim.basic/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim.basic/templates/_helpers.tpl deleted file mode 100644 index 733a367061..0000000000 --- a/charts/physims/charts/nr-dlsim.basic/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-dlsim-basic.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-dlsim-basic.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-dlsim-basic.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-dlsim-basic.labels" -}} -helm.sh/chart: {{ include "oai-nr-dlsim-basic.chart" . }} -{{ include "oai-nr-dlsim-basic.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-dlsim-basic.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-dlsim-basic.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-dlsim-basic.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-dlsim-basic.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-dlsim.basic/values.yaml b/charts/physims/charts/nr-dlsim.basic/values.yaml deleted file mode 100644 index 88e5a2caaa..0000000000 --- a/charts/physims/charts/nr-dlsim.basic/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-dlsim-basic -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-dlsim-basic" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/Chart.yaml b/charts/physims/charts/nr-dlsim.dmrs+ptrs/Chart.yaml deleted file mode 100644 index c5f51341c4..0000000000 --- a/charts/physims/charts/nr-dlsim.dmrs+ptrs/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-dlsim-dmrs-ptrs -description: A Helm subchart for nr-dlsim network function ("dmrs+ptrs" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-dlsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/_helpers.tpl deleted file mode 100644 index 85bf9e860c..0000000000 --- a/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-dlsim-dmrs-ptrs.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-dlsim-dmrs-ptrs.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-dlsim-dmrs-ptrs.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-dlsim-dmrs-ptrs.labels" -}} -helm.sh/chart: {{ include "oai-nr-dlsim-dmrs-ptrs.chart" . }} -{{ include "oai-nr-dlsim-dmrs-ptrs.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-dlsim-dmrs-ptrs.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-dlsim-dmrs-ptrs.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-dlsim-dmrs-ptrs.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-dlsim-dmrs-ptrs.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/job.yaml b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/job.yaml deleted file mode 100644 index 77f8dd061d..0000000000 --- a/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.dmrs+ptrs" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrdlsimdmrsptrs }} - {{- end }} diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/values.yaml b/charts/physims/charts/nr-dlsim.dmrs+ptrs/values.yaml deleted file mode 100644 index 357e6c2861..0000000000 --- a/charts/physims/charts/nr-dlsim.dmrs+ptrs/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-dlsim-dmrs+ptrs -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-dlsim-dmrs-ptrs" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/Chart.yaml b/charts/physims/charts/nr-dlsim.mcs+mimo/Chart.yaml deleted file mode 100644 index 55ea194f07..0000000000 --- a/charts/physims/charts/nr-dlsim.mcs+mimo/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-dlsim-mcs-mimo -description: A Helm subchart for nr-dlsim network function ("mcs+mimo" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-dlsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/_helpers.tpl deleted file mode 100644 index 246383d370..0000000000 --- a/charts/physims/charts/nr-dlsim.mcs+mimo/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-dlsim-mcs-mimo.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-dlsim-mcs-mimo.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-dlsim-mcs-mimo.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-dlsim-mcs-mimo.labels" -}} -helm.sh/chart: {{ include "oai-nr-dlsim-mcs-mimo.chart" . }} -{{ include "oai-nr-dlsim-mcs-mimo.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-dlsim-mcs-mimo.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-dlsim-mcs-mimo.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-dlsim-mcs-mimo.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-dlsim-mcs-mimo.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/templates/job.yaml b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/job.yaml deleted file mode 100644 index 4625667c2b..0000000000 --- a/charts/physims/charts/nr-dlsim.mcs+mimo/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.mcs+mimo" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrdlsimmcsmimo }} - {{- end }} diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/values.yaml b/charts/physims/charts/nr-dlsim.mcs+mimo/values.yaml deleted file mode 100644 index 5ef75a1672..0000000000 --- a/charts/physims/charts/nr-dlsim.mcs+mimo/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-dlsim-mcs-mimo -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-dlsim-mcs-mimo" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-dlsim.offset/Chart.yaml b/charts/physims/charts/nr-dlsim.offset/Chart.yaml deleted file mode 100644 index e4fa9a4100..0000000000 --- a/charts/physims/charts/nr-dlsim.offset/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-dlsim-offset -description: A Helm subchart for nr-dlsim network function ("offset" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-dlsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-dlsim.offset/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim.offset/templates/_helpers.tpl deleted file mode 100644 index 74417c21d9..0000000000 --- a/charts/physims/charts/nr-dlsim.offset/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-dlsim-offset.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-dlsim-offset.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-dlsim-offset.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-dlsim-offset.labels" -}} -helm.sh/chart: {{ include "oai-nr-dlsim-offset.chart" . }} -{{ include "oai-nr-dlsim-offset.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-dlsim-offset.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-dlsim-offset.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-dlsim-offset.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-dlsim-offset.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-dlsim.offset/templates/job.yaml b/charts/physims/charts/nr-dlsim.offset/templates/job.yaml deleted file mode 100644 index dabe3749e6..0000000000 --- a/charts/physims/charts/nr-dlsim.offset/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.offset" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrdlsimoffset }} - {{- end }} diff --git a/charts/physims/charts/nr-dlsim.offset/values.yaml b/charts/physims/charts/nr-dlsim.offset/values.yaml deleted file mode 100644 index efef89ce4a..0000000000 --- a/charts/physims/charts/nr-dlsim.offset/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-dlsim-offset -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-dlsim-offset" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-pbchsim.106rb/Chart.yaml b/charts/physims/charts/nr-pbchsim.106rb/Chart.yaml deleted file mode 100644 index ea93f8da58..0000000000 --- a/charts/physims/charts/nr-pbchsim.106rb/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-pbchsim-106rb -description: A Helm subchart for nr-pbchsim network function ("106rb" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-pbchsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-pbchsim.106rb/templates/_helpers.tpl b/charts/physims/charts/nr-pbchsim.106rb/templates/_helpers.tpl deleted file mode 100644 index 1ea88a4681..0000000000 --- a/charts/physims/charts/nr-pbchsim.106rb/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-pbchsim-106rb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-pbchsim-106rb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-pbchsim-106rb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-pbchsim-106rb.labels" -}} -helm.sh/chart: {{ include "oai-nr-pbchsim-106rb.chart" . }} -{{ include "oai-nr-pbchsim-106rb.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-pbchsim-106rb.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-pbchsim-106rb.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-pbchsim-106rb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-pbchsim-106rb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-pbchsim.106rb/templates/job.yaml b/charts/physims/charts/nr-pbchsim.106rb/templates/job.yaml deleted file mode 100644 index c477116131..0000000000 --- a/charts/physims/charts/nr-pbchsim.106rb/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.106rb" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrpbschsim106rb }} - {{- end }} diff --git a/charts/physims/charts/nr-pbchsim.106rb/values.yaml b/charts/physims/charts/nr-pbchsim.106rb/values.yaml deleted file mode 100644 index 8f8104146a..0000000000 --- a/charts/physims/charts/nr-pbchsim.106rb/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-pbchsim-106rb -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-pbchsim-106rb" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-pbchsim.217rb/Chart.yaml b/charts/physims/charts/nr-pbchsim.217rb/Chart.yaml deleted file mode 100644 index 74561a42e9..0000000000 --- a/charts/physims/charts/nr-pbchsim.217rb/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-pbchsim-217rb -description: A Helm subchart for nr-pbchsim network function ("217rb" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-pbchsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-pbchsim.217rb/templates/_helpers.tpl b/charts/physims/charts/nr-pbchsim.217rb/templates/_helpers.tpl deleted file mode 100644 index 28bb7fa4a0..0000000000 --- a/charts/physims/charts/nr-pbchsim.217rb/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-pbchsim-217rb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-pbchsim-217rb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-pbchsim-217rb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-pbchsim-217rb.labels" -}} -helm.sh/chart: {{ include "oai-nr-pbchsim-217rb.chart" . }} -{{ include "oai-nr-pbchsim-217rb.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-pbchsim-217rb.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-pbchsim-217rb.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-pbchsim-217rb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-pbchsim-217rb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-pbchsim.217rb/templates/job.yaml b/charts/physims/charts/nr-pbchsim.217rb/templates/job.yaml deleted file mode 100644 index 70eeec8eda..0000000000 --- a/charts/physims/charts/nr-pbchsim.217rb/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.217rb" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrpbchsim217rb }} - {{- end }} diff --git a/charts/physims/charts/nr-pbchsim.217rb/values.yaml b/charts/physims/charts/nr-pbchsim.217rb/values.yaml deleted file mode 100644 index 96b3f860df..0000000000 --- a/charts/physims/charts/nr-pbchsim.217rb/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-pbchsim-217rb -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-pbchsim-217rb" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-pbchsim.273rb/Chart.yaml b/charts/physims/charts/nr-pbchsim.273rb/Chart.yaml deleted file mode 100644 index 6fab0faad8..0000000000 --- a/charts/physims/charts/nr-pbchsim.273rb/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-pbchsim-273rb -description: A Helm subchart for nr-pbchsim network function ("273rb" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-pbchsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-pbchsim.273rb/templates/_helpers.tpl b/charts/physims/charts/nr-pbchsim.273rb/templates/_helpers.tpl deleted file mode 100644 index 2682e2f699..0000000000 --- a/charts/physims/charts/nr-pbchsim.273rb/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-pbchsim-273rb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-pbchsim-273rb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-pbchsim-273rb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-pbchsim-273rb.labels" -}} -helm.sh/chart: {{ include "oai-nr-pbchsim-273rb.chart" . }} -{{ include "oai-nr-pbchsim-273rb.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-pbchsim-273rb.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-pbchsim-273rb.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-pbchsim-273rb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-pbchsim-273rb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-pbchsim.273rb/templates/job.yaml b/charts/physims/charts/nr-pbchsim.273rb/templates/job.yaml deleted file mode 100644 index ab002fe664..0000000000 --- a/charts/physims/charts/nr-pbchsim.273rb/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.273rb" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }} - {{- end }} diff --git a/charts/physims/charts/nr-pbchsim.273rb/values.yaml b/charts/physims/charts/nr-pbchsim.273rb/values.yaml deleted file mode 100644 index 36b62e0146..0000000000 --- a/charts/physims/charts/nr-pbchsim.273rb/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-pbchsim-273rb -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-pbchsim-273rb" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-pbchsim.scs/Chart.yaml b/charts/physims/charts/nr-pbchsim.scs/Chart.yaml deleted file mode 100644 index c590bfff38..0000000000 --- a/charts/physims/charts/nr-pbchsim.scs/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-pbchsim-scs -description: A Helm subchart for nr-pbchsim network function ("Other SCS" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-pbchsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-pbchsim.scs/templates/_helpers.tpl b/charts/physims/charts/nr-pbchsim.scs/templates/_helpers.tpl deleted file mode 100644 index 4734fc898e..0000000000 --- a/charts/physims/charts/nr-pbchsim.scs/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-pbchsim-scs.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-pbchsim-scs.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-pbchsim-scs.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-pbchsim-scs.labels" -}} -helm.sh/chart: {{ include "oai-nr-pbchsim-scs.chart" . }} -{{ include "oai-nr-pbchsim-scs.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-pbchsim-scs.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-pbchsim-scs.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-pbchsim-scs.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-pbchsim-scs.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-pbchsim.scs/templates/job.yaml b/charts/physims/charts/nr-pbchsim.scs/templates/job.yaml deleted file mode 100644 index 74077c2dfb..0000000000 --- a/charts/physims/charts/nr-pbchsim.scs/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.otherSCS" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrpbchsim273rb }} - {{- end }} diff --git a/charts/physims/charts/nr-pbchsim.scs/values.yaml b/charts/physims/charts/nr-pbchsim.scs/values.yaml deleted file mode 100644 index f7753924f1..0000000000 --- a/charts/physims/charts/nr-pbchsim.scs/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-pbchsim-scs -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-pbchsim-scs" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-prachsim/Chart.yaml b/charts/physims/charts/nr-prachsim/Chart.yaml deleted file mode 100644 index 8c88587a7f..0000000000 --- a/charts/physims/charts/nr-prachsim/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-prachsim -description: A Helm subchart for nr-prachsim network function - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-prachsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-prachsim/templates/_helpers.tpl b/charts/physims/charts/nr-prachsim/templates/_helpers.tpl deleted file mode 100644 index 6362c72b2a..0000000000 --- a/charts/physims/charts/nr-prachsim/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-prachsim.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-prachsim.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-prachsim.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-prachsim.labels" -}} -helm.sh/chart: {{ include "oai-nr-prachsim.chart" . }} -{{ include "oai-nr-prachsim.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-prachsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-prachsim.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-prachsim.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-prachsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-prachsim/templates/job.yaml b/charts/physims/charts/nr-prachsim/templates/job.yaml deleted file mode 100644 index 050ee2f3bc..0000000000 --- a/charts/physims/charts/nr-prachsim/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_prachsim" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrprachsim }} - {{- end }} diff --git a/charts/physims/charts/nr-prachsim/values.yaml b/charts/physims/charts/nr-prachsim/values.yaml deleted file mode 100644 index 8404ea4192..0000000000 --- a/charts/physims/charts/nr-prachsim/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-prachsim. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-prachsim-sa" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-psbchsim/Chart.yaml b/charts/physims/charts/nr-psbchsim/Chart.yaml deleted file mode 100644 index 8f1af6d648..0000000000 --- a/charts/physims/charts/nr-psbchsim/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-psbchsim -description: A Helm subchart for nr-psbchsim network function - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-psbchsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-psbchsim/templates/_helpers.tpl b/charts/physims/charts/nr-psbchsim/templates/_helpers.tpl deleted file mode 100644 index ef7fc150b5..0000000000 --- a/charts/physims/charts/nr-psbchsim/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-psbchsim.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-psbchsim.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-psbchsim.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-psbchsim.labels" -}} -helm.sh/chart: {{ include "oai-nr-psbchsim.chart" . }} -{{ include "oai-nr-psbchsim.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-psbchsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-psbchsim.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-psbchsim.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-psbchsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-psbchsim/templates/job.yaml b/charts/physims/charts/nr-psbchsim/templates/job.yaml deleted file mode 100644 index 04c6a410cb..0000000000 --- a/charts/physims/charts/nr-psbchsim/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_psbchsim" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrpsbchsim }} - {{- end }} diff --git a/charts/physims/charts/nr-psbchsim/values.yaml b/charts/physims/charts/nr-psbchsim/values.yaml deleted file mode 100644 index b6fa992ccf..0000000000 --- a/charts/physims/charts/nr-psbchsim/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-psbchsim -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-psbchsim" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-pucchsim/Chart.yaml b/charts/physims/charts/nr-pucchsim/Chart.yaml deleted file mode 100644 index bb0033175f..0000000000 --- a/charts/physims/charts/nr-pucchsim/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-pucchsim -description: A Helm subchart for nr-pucchsim network function - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-pucchsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-pucchsim/templates/_helpers.tpl b/charts/physims/charts/nr-pucchsim/templates/_helpers.tpl deleted file mode 100644 index 210ba26db2..0000000000 --- a/charts/physims/charts/nr-pucchsim/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-pucchsim.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-pucchsim.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-pucchsim.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-pucchsim.labels" -}} -helm.sh/chart: {{ include "oai-nr-pucchsim.chart" . }} -{{ include "oai-nr-pucchsim.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-pucchsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-pucchsim.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-pucchsim.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-pucchsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-pucchsim/templates/job.yaml b/charts/physims/charts/nr-pucchsim/templates/job.yaml deleted file mode 100644 index d9081bb926..0000000000 --- a/charts/physims/charts/nr-pucchsim/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_pucchsim" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrpucchsim }} - {{- end }} diff --git a/charts/physims/charts/nr-pucchsim/values.yaml b/charts/physims/charts/nr-pucchsim/values.yaml deleted file mode 100644 index 1c2c822088..0000000000 --- a/charts/physims/charts/nr-pucchsim/values.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# Default values for oai-nr-pucchsim. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-pucchsim-sa" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -service: - type: ClusterIP - port: 80 - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-ulschsim/Chart.yaml b/charts/physims/charts/nr-ulschsim/Chart.yaml deleted file mode 100644 index e2525f0032..0000000000 --- a/charts/physims/charts/nr-ulschsim/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-ulschsim -description: A Helm subchart for nr-ulschsim network function - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-ulschsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-ulschsim/templates/_helpers.tpl b/charts/physims/charts/nr-ulschsim/templates/_helpers.tpl deleted file mode 100644 index 9aa13a81f0..0000000000 --- a/charts/physims/charts/nr-ulschsim/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-ulschsim.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-ulschsim.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-ulschsim.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-ulschsim.labels" -}} -helm.sh/chart: {{ include "oai-nr-ulschsim.chart" . }} -{{ include "oai-nr-ulschsim.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-ulschsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-ulschsim.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-ulschsim.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-ulschsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-ulschsim/templates/job.yaml b/charts/physims/charts/nr-ulschsim/templates/job.yaml deleted file mode 100644 index b75963898b..0000000000 --- a/charts/physims/charts/nr-ulschsim/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulschsim" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrulschsim }} - {{- end }} diff --git a/charts/physims/charts/nr-ulschsim/values.yaml b/charts/physims/charts/nr-ulschsim/values.yaml deleted file mode 100644 index 770cb43bb1..0000000000 --- a/charts/physims/charts/nr-ulschsim/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-ulschsim. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-ulschsim-sa" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-ulsim.3gpp/Chart.yaml b/charts/physims/charts/nr-ulsim.3gpp/Chart.yaml deleted file mode 100644 index e2de26c5e8..0000000000 --- a/charts/physims/charts/nr-ulsim.3gpp/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-ulsim-3gpp -description: A Helm subchart for nr-ulsim network function ("3gpp" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-ulsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-ulsim.3gpp/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim.3gpp/templates/_helpers.tpl deleted file mode 100644 index 4655516f35..0000000000 --- a/charts/physims/charts/nr-ulsim.3gpp/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-ulsim-3gpp.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-ulsim-3gpp.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-ulsim-3gpp.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-ulsim-3gpp.labels" -}} -helm.sh/chart: {{ include "oai-nr-ulsim-3gpp.chart" . }} -{{ include "oai-nr-ulsim-3gpp.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-ulsim-3gpp.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-ulsim-3gpp.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-ulsim-3gpp.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-ulsim.3gpp/templates/job.yaml b/charts/physims/charts/nr-ulsim.3gpp/templates/job.yaml deleted file mode 100644 index 6b9d4a1a39..0000000000 --- a/charts/physims/charts/nr-ulsim.3gpp/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.3gpp" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrulsim3gpp }} - {{- end }} diff --git a/charts/physims/charts/nr-ulsim.3gpp/values.yaml b/charts/physims/charts/nr-ulsim.3gpp/values.yaml deleted file mode 100644 index b2aedcba03..0000000000 --- a/charts/physims/charts/nr-ulsim.3gpp/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-ulsim-3gpp -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-ulsim-3gpp" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-ulsim.mimo/Chart.yaml b/charts/physims/charts/nr-ulsim.mimo/Chart.yaml deleted file mode 100644 index b4a691f14a..0000000000 --- a/charts/physims/charts/nr-ulsim.mimo/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-ulsim-mimo -description: A Helm subchart for nr-ulsim network function ("mimo" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-ulsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-ulsim.mimo/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim.mimo/templates/_helpers.tpl deleted file mode 100644 index ead3e5ca41..0000000000 --- a/charts/physims/charts/nr-ulsim.mimo/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-ulsim-mimo.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-ulsim-mimo.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-ulsim-mimo.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-ulsim-mimo.labels" -}} -helm.sh/chart: {{ include "oai-nr-ulsim-mimo.chart" . }} -{{ include "oai-nr-ulsim-mimo.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-ulsim-mimo.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-ulsim-mimo.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-ulsim-mimo.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-ulsim.mimo/templates/job.yaml b/charts/physims/charts/nr-ulsim.mimo/templates/job.yaml deleted file mode 100644 index 337329a6fe..0000000000 --- a/charts/physims/charts/nr-ulsim.mimo/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.mimo" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrulsimmimo }} - {{- end }} diff --git a/charts/physims/charts/nr-ulsim.mimo/values.yaml b/charts/physims/charts/nr-ulsim.mimo/values.yaml deleted file mode 100644 index b2dd42d3be..0000000000 --- a/charts/physims/charts/nr-ulsim.mimo/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-ulsim-mimo -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-ulsim-mimo" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-ulsim.misc/Chart.yaml b/charts/physims/charts/nr-ulsim.misc/Chart.yaml deleted file mode 100644 index 6770f26b76..0000000000 --- a/charts/physims/charts/nr-ulsim.misc/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-ulsim-misc -description: A Helm subchart for nr-ulsim network function ("misc" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-ulsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-ulsim.misc/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim.misc/templates/_helpers.tpl deleted file mode 100644 index 6b5906a8e7..0000000000 --- a/charts/physims/charts/nr-ulsim.misc/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-ulsim-misc.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-ulsim-misc.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-ulsim-misc.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-ulsim-misc.labels" -}} -helm.sh/chart: {{ include "oai-nr-ulsim-misc.chart" . }} -{{ include "oai-nr-ulsim-misc.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-ulsim-misc.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-ulsim-misc.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-ulsim-misc.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-ulsim.misc/templates/job.yaml b/charts/physims/charts/nr-ulsim.misc/templates/job.yaml deleted file mode 100644 index 8a2feff183..0000000000 --- a/charts/physims/charts/nr-ulsim.misc/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.misc" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrulsimmisc }} - {{- end }} diff --git a/charts/physims/charts/nr-ulsim.misc/values.yaml b/charts/physims/charts/nr-ulsim.misc/values.yaml deleted file mode 100644 index 8d15fca39e..0000000000 --- a/charts/physims/charts/nr-ulsim.misc/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-ulsim-misc -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-ulsim-misc" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/Chart.yaml b/charts/physims/charts/nr-ulsim.sc-fdma/Chart.yaml deleted file mode 100644 index c4460cd6a0..0000000000 --- a/charts/physims/charts/nr-ulsim.sc-fdma/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-nr-ulsim-sc-fdma -description: A Helm subchart for nr-ulsim network function ("sc-fdma" tests) - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - nr-ulsim - - RAN - - 5G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim.sc-fdma/templates/_helpers.tpl deleted file mode 100644 index b608389dc8..0000000000 --- a/charts/physims/charts/nr-ulsim.sc-fdma/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-nr-ulsim-sc-fdma.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-nr-ulsim-sc-fdma.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-nr-ulsim-sc-fdma.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-nr-ulsim-sc-fdma.labels" -}} -helm.sh/chart: {{ include "oai-nr-ulsim-sc-fdma.chart" . }} -{{ include "oai-nr-ulsim-sc-fdma.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-nr-ulsim-sc-fdma.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-ulsim-sc-fdma.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-nr-ulsim-sc-fdma.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/templates/job.yaml b/charts/physims/charts/nr-ulsim.sc-fdma/templates/job.yaml deleted file mode 100644 index 6915790c2c..0000000000 --- a/charts/physims/charts/nr-ulsim.sc-fdma/templates/job.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - ports: - - containerPort: 80 - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.sc-fdma" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.nrulsimscfdma }} - {{- end }} diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/values.yaml b/charts/physims/charts/nr-ulsim.sc-fdma/values.yaml deleted file mode 100644 index c617eeafec..0000000000 --- a/charts/physims/charts/nr-ulsim.sc-fdma/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-nr-ulsim-sc-fdma -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-ulsim-sc-fdma" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/polartest/templates/job.yaml b/charts/physims/charts/polartest/templates/job.yaml deleted file mode 100644 index e3850514d7..0000000000 --- a/charts/physims/charts/polartest/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "polartest" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.polartest }} - {{- end }} diff --git a/charts/physims/charts/polartest/values.yaml b/charts/physims/charts/polartest/values.yaml deleted file mode 100644 index 12386f02bc..0000000000 --- a/charts/physims/charts/polartest/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-polartest. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-polartest-sa" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/smallblocktest/Chart.yaml b/charts/physims/charts/smallblocktest/Chart.yaml deleted file mode 100644 index 74092783ae..0000000000 --- a/charts/physims/charts/smallblocktest/Chart.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -name: oai-smallblocktest -description: A Helm subchart for smallblocktest network function - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v1 - -keywords: - - Physical Simulator - - smallblocktest - - RAN - - 4G - -sources: - - https://gitlab.eurecom.fr/oai/openairinterface5g - -maintainers: - - name: OPENAIRINTERFACE - email: contact@openairinterface.org diff --git a/charts/physims/charts/smallblocktest/templates/_helpers.tpl b/charts/physims/charts/smallblocktest/templates/_helpers.tpl deleted file mode 100644 index a3c264b33e..0000000000 --- a/charts/physims/charts/smallblocktest/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "oai-smallblocktest.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "oai-smallblocktest.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "oai-smallblocktest.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "oai-smallblocktest.labels" -}} -helm.sh/chart: {{ include "oai-smallblocktest.chart" . }} -{{ include "oai-smallblocktest.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "oai-smallblocktest.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-smallblocktest.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oai-smallblocktest.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "oai-smallblocktest.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/physims/charts/smallblocktest/templates/job.yaml b/charts/physims/charts/smallblocktest/templates/job.yaml deleted file mode 100644 index 1b695fe670..0000000000 --- a/charts/physims/charts/smallblocktest/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "smallblocktest" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.smallblocktest }} - {{- end }} diff --git a/charts/physims/charts/smallblocktest/values.yaml b/charts/physims/charts/smallblocktest/values.yaml deleted file mode 100644 index 7f116091ac..0000000000 --- a/charts/physims/charts/smallblocktest/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Default values for oai-smallblocktest. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # pullPolicy: IfNotPresent or Never or Always - pullPolicy: Always - -imagePullSecrets: [] - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "oai-smallblocktest-sa" - -podSecurityContext: - runAsUser: 0 - runAsGroup: 0 - -securityContext: - privileged: false - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/charts/physims/charts/ulsim/templates/job.yaml b/charts/physims/charts/ulsim/templates/job.yaml deleted file mode 100644 index ca6c1be16c..0000000000 --- a/charts/physims/charts/ulsim/templates/job.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ .Chart.Name }} -spec: - template: - metadata: - labels: - app: physim - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: physim - image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.global.resources.define}} - resources: - requests: - cpu: {{ .Values.global.resources.requests.cpu | quote }} - {{- end}} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: OPENAIR_DIR - value: /opt/oai-physim - command: ["/bin/sh", "-c"] - args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "ulsim" -d bin/ && - echo "FINISHED" && sleep infinity - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ .Values.global.serviceAccountName }} - terminationGracePeriodSeconds: 30 - {{- if .Values.global.nodeSelector}} - nodeSelector: - {{- toYaml .Values.global.nodeSelector | nindent 12 }} - {{- end }} - {{- if .Values.global.nodeName}} - nodeName: {{ .Values.global.nodeName.ulsim }} - {{- end }} diff --git a/ci-scripts/Jenkinsfile-GitLab-Container b/ci-scripts/Jenkinsfile-GitLab-Container index a4da765bf5..62ab0266b1 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Container +++ b/ci-scripts/Jenkinsfile-GitLab-Container @@ -246,11 +246,11 @@ pipeline { stage ("Image Test Processes") { when { expression {doBuild} } parallel { - stage ("PhySim-Cluster") { - when { expression {do4Gtest || do5Gtest || do5GUeTest} } + stage ("PhySim-Cluster-5G") { + when { expression {do5Gtest || do5GUeTest} } steps { script { - triggerSlaveJob ('RAN-PhySim-Cluster', 'PhySim-Cluster') + triggerSlaveJob ('RAN-PhySim-Cluster-5G', 'PhySim-Cluster-5G') } } post { @@ -258,13 +258,36 @@ pipeline { script { // Using a unique variable name for each test stage to avoid overwriting on a global variable // due to parallel-time concurrency - physimStatus = finalizeSlaveJob('RAN-PhySim-Cluster') + physim5GStatus = finalizeSlaveJob('RAN-PhySim-Cluster-5G') } } failure { script { currentBuild.result = 'FAILURE' - failingStages += physimStatus + failingStages += physim5GStatus + } + } + } + } + stage ("PhySim-Cluster-4G") { + when { expression {do4Gtest} } + steps { + script { + triggerSlaveJob ('RAN-PhySim-Cluster-4G', 'PhySim-Cluster-4G') + } + } + post { + always { + script { + // Using a unique variable name for each test stage to avoid overwriting on a global variable + // due to parallel-time concurrency + physim4GStatus = finalizeSlaveJob('RAN-PhySim-Cluster-4G') + } + } + failure { + script { + currentBuild.result = 'FAILURE' + failingStages += physim4GStatus } } } diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran index 3aea407002..f1baa5b04d 100644 --- a/ci-scripts/Jenkinsfile-tmp-full-ran +++ b/ci-scripts/Jenkinsfile-tmp-full-ran @@ -100,15 +100,6 @@ pipeline { if (params.eNB_Credentials == null) { allParametersPresent = false } - if (params.UE_IPAddress == null) { - allParametersPresent = false - } - if (params.UE_SourceCodePath == null) { - allParametersPresent = false - } - if (params.UE_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -181,7 +172,6 @@ pipeline { } withCredentials([ [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'], ]) { sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") @@ -189,7 +179,7 @@ pipeline { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}" } } catch (Exception e) { currentBuild.result = 'FAILURE' @@ -197,7 +187,7 @@ pipeline { } } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}" + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } } } @@ -244,24 +234,6 @@ pipeline { } } } - stage('Log Collection (OAI UE - Build)') { - steps { - echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m' - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}" - - echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m' - sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("build.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "build.log.${env.BUILD_ID}.zip" - } - } - } - } stage('Log Collection (eNB - Run)') { steps { withCredentials([ @@ -285,21 +257,6 @@ pipeline { } } } - stage('Log Collection (OAI UE - Run)') { - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] - ]) { - echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m' - sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("ue.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "ue.log.${env.BUILD_ID}.zip" - } - } - } - } } } } diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 5df1992bf8..5e60b199b4 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -113,15 +113,6 @@ pipeline { if (params.eNB2_Credentials == null) { allParametersPresent = false } - if (params.UE_IPAddress == null) { - allParametersPresent = false - } - if (params.UE_SourceCodePath == null) { - allParametersPresent = false - } - if (params.UE_Credentials == null) { - allParametersPresent = false - } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -196,7 +187,6 @@ pipeline { [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] ]) { sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}" String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") @@ -204,7 +194,7 @@ pipeline { if (fileExists(xmlFile)) { try { timeout (time: 60, unit: 'MINUTES') { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --XMLTestFile=${xmlFile}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}" } } catch (Exception e) { currentBuild.result = 'FAILURE' @@ -212,7 +202,7 @@ pipeline { } } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}" + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } } } @@ -238,24 +228,6 @@ pipeline { } } } - stage('Log Collection (OAI UE - Build)') { - steps { - echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m' - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] - ]) { - sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}" - - echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m' - sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("build.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "build.log.${env.BUILD_ID}.zip" - } - } - } - } stage('Log Collection (eNB - Run)') { steps { withCredentials([ @@ -274,21 +246,6 @@ pipeline { } } } - stage('Log Collection (OAI UE - Run)') { - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] - ]) { - echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m' - sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("ue.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "ue.log.${env.BUILD_ID}.zip" - } - } - } - } } } } diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py index 4bb999bd9d..92cb0d163f 100644 --- a/ci-scripts/args_parse.py +++ b/ci-scripts/args_parse.py @@ -41,7 +41,7 @@ import constants as CONST #----------------------------------------------------------- -def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): +def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER): py_param_file_present = False @@ -84,7 +84,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): HTML.ranRepository=matchReg.group(1) CONTAINERS.ranRepository=matchReg.group(1) SCA.ranRepository=matchReg.group(1) - PHYSIM.ranRepository=matchReg.group(1) CLUSTER.ranRepository=matchReg.group(1) elif re.match(r'^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE): if re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE): @@ -98,7 +97,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): HTML.ranAllowMerge=True CONTAINERS.ranAllowMerge=True SCA.ranAllowMerge=True - PHYSIM.ranAllowMerge=True CLUSTER.ranAllowMerge=True elif re.match(r'^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE): if re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE): @@ -110,7 +108,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): HTML.ranBranch=matchReg.group(1) CONTAINERS.ranBranch=matchReg.group(1) SCA.ranBranch=matchReg.group(1) - PHYSIM.ranBranch=matchReg.group(1) CLUSTER.ranBranch=matchReg.group(1) elif re.match(r'^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE): if re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE): @@ -122,7 +119,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): HTML.ranCommitID=matchReg.group(1) CONTAINERS.ranCommitID=matchReg.group(1) SCA.ranCommitID=matchReg.group(1) - PHYSIM.ranCommitID=matchReg.group(1) CLUSTER.ranCommitID=matchReg.group(1) elif re.match(r'^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE): if re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE): @@ -134,7 +130,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): HTML.ranTargetBranch=matchReg.group(1) CONTAINERS.ranTargetBranch=matchReg.group(1) SCA.ranTargetBranch=matchReg.group(1) - PHYSIM.ranTargetBranch=matchReg.group(1) CLUSTER.ranTargetBranch=matchReg.group(1) elif re.match(r'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE): if re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE): @@ -142,7 +137,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): RAN.eNBIPAddress=matchReg.group(1) CONTAINERS.eNBIPAddress=matchReg.group(1) SCA.eNBIPAddress=matchReg.group(1) - PHYSIM.eNBIPAddress=matchReg.group(1) CLUSTER.eNBIPAddress=matchReg.group(1) elif re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE) @@ -158,7 +152,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): RAN.eNBUserName=matchReg.group(1) CONTAINERS.eNBUserName=matchReg.group(1) SCA.eNBUserName=matchReg.group(1) - PHYSIM.eNBUserName=matchReg.group(1) CLUSTER.eNBUserName=matchReg.group(1) elif re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE) @@ -174,7 +167,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): RAN.eNBPassword=matchReg.group(1) CONTAINERS.eNBPassword=matchReg.group(1) SCA.eNBPassword=matchReg.group(1) - PHYSIM.eNBPassword=matchReg.group(1) CLUSTER.eNBPassword=matchReg.group(1) elif re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE) @@ -190,7 +182,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): RAN.eNBSourceCodePath=matchReg.group(1) CONTAINERS.eNBSourceCodePath=matchReg.group(1) SCA.eNBSourceCodePath=matchReg.group(1) - PHYSIM.eNBSourceCodePath=matchReg.group(1) CLUSTER.eNBSourceCodePath=matchReg.group(1) elif re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE) @@ -200,35 +191,19 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): matchReg = re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE) RAN.eNB2SourceCodePath=matchReg.group(1) CONTAINERS.eNB2SourceCodePath=matchReg.group(1) - elif re.match(r'^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE): - print("parameter --EPCIPAddress ignored") - elif re.match(r'^\-\-EPCUserName=(.+)$', myArgv, re.IGNORECASE): - print("parameter --EPCUserName ignored") - elif re.match(r'^\-\-EPCPassword=(.+)$', myArgv, re.IGNORECASE): - print("parameter --EPCPassword ignored") - elif re.match(r'^\-\-EPCSourceCodePath=(.+)$', myArgv, re.IGNORECASE): - print("parameter --EPCSourceCodePath ignored") - elif re.match(r'^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE): - print("parameter --EPCType ignored") - elif re.match(r'^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE): - print("parameter --EPCContainerPrefix ignored") elif re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE) CiTestObj.testXMLfiles.append(matchReg.group(1)) HTML.testXMLfiles.append(matchReg.group(1)) HTML.nbTestXMLfiles=HTML.nbTestXMLfiles+1 elif re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE): # cleanup - matchReg = re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE) - CiTestObj.UEIPAddress = matchReg.group(1) + print("parameter --UEIPAddress ignored") elif re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE) - CiTestObj.UEUserName = matchReg.group(1) + print("parameter --UEUserName ignored") elif re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE) - CiTestObj.UEPassword = matchReg.group(1) + print("parameter --UEPassword ignored") elif re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE) - CiTestObj.UESourceCodePath = matchReg.group(1) + print("parameter --UESourceCodePath ignored") elif re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE) finalStatus = matchReg.group(1) @@ -236,15 +211,12 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): CiTestObj.finalStatus = True elif re.match(r'^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE) - PHYSIM.OCUserName = matchReg.group(1) CLUSTER.OCUserName = matchReg.group(1) elif re.match(r'^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE) - PHYSIM.OCPassword = matchReg.group(1) CLUSTER.OCPassword = matchReg.group(1) elif re.match(r'^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE) - PHYSIM.OCProjectName = matchReg.group(1) CLUSTER.OCProjectName = matchReg.group(1) elif re.match(r'^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match(r'^\-\-OCUrl=(.+)$', myArgv, re.IGNORECASE) diff --git a/ci-scripts/cls_analysis.py b/ci-scripts/cls_analysis.py index 25d9b0c659..ac591b52fb 100644 --- a/ci-scripts/cls_analysis.py +++ b/ci-scripts/cls_analysis.py @@ -20,8 +20,11 @@ # */ #--------------------------------------------------------------------- -import logging import re +import os + +import xml.etree.ElementTree as ET +import json # Define the mapping of physim_test values to search patterns PHYSIM_PATTERN_MAPPING = { @@ -80,3 +83,65 @@ class Analysis(): msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us exceeds a limit of {threshold} us' return success,msg + + def analyze_oc_physim(result_junit, details_json): + try: + tree = ET.parse(result_junit) + root = tree.getroot() + nb_tests = int(root.attrib["tests"]) + nb_failed = int(root.attrib["failures"]) + except ET.ParseError as e: + return False, False, f'Could not parse XML log file {result_junit}: {e}' + except FileNotFoundError as e: + return False, False, f'JUnit XML log file {result_junit} not found: {e}' + except Exception as e: + return False, False, f'While parsing JUnit XML log file: exception: {e}' + + try: + with open(details_json) as f: + j = json.load(f) + # prepare JSON for easier access of strings + json_test_desc = {} + for e in j["tests"]: + json_test_desc[e["name"]] = e + + except json.JSONDecodeError as e: + return False, False, f'Could not decode JSON log file {details_json}: {e}' + except FileNotFoundError as e: + return False, False, f'Physim JSON log file {details_json} not found: {e}' + except Exception as e: + return False, False, f'While parsing physim JSON log file: exception: {e}' + + test_result = {} + for test in root: # for each test + test_name = test.attrib["name"] + test_exec = json_test_desc[test_name]["properties"][1]["value"][0] + desc = json_test_desc[test_name]["properties"][1]["value"][1] + # get runtime and checks + test_check = test.attrib["status"] == "run" + time = round(float(test.attrib["time"]), 1) + time_check = time < 150 + output = test.findtext("system-out") + output_check = "exceeds the threshold" not in output + # collect logs + log_dir = f'../cmake_targets/log/{test_exec}' + os.makedirs(log_dir, exist_ok=True) + with open(f'{log_dir}/{test_name}.log', 'w') as f: + f.write(output) + # prepare result and info + info = f"Runtime: {f'{time:.3f}'[:5]} s" + resultstr = 'PASS' if (test_check and time_check and output_check) else 'FAIL' + if test_check: + if not output_check: + info += " Test log exceeds maximal allowed length 100 kB" + if not time_check: + info += " Test exceeds 150s" + if not (time_check and output_check): + nb_failed += 1 # time threshold/output length error, not counted for by ctest as of now + test_result[test_name] = [desc, info, resultstr] + + test_summary = {} + test_summary['Nbtests'] = nb_tests + test_summary['Nbpass'] = nb_tests - nb_failed + test_summary['Nbfail'] = nb_failed + return nb_failed == 0, test_summary, test_result diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index ed7c638195..7e88c6b07b 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -31,8 +31,10 @@ import logging import re import time +import os import cls_oai_html +import cls_analysis import constants as CONST import helpreadme as HELP import cls_containerize @@ -457,3 +459,38 @@ class Cluster: HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, imageSize) return status + + def deploy_oc_physim(self, HTML, oc_release, svr_id): + if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '': + HELP.GenericHelp(CONST.Version) + raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {self.ranBranch} ranCommitID {self.ranCommitID}') + image_tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge) + logging.debug(f'Running physims from server: {svr_id}') + script = "scripts/oc-deploy-physims.sh" + options = f"oaicicd-core-for-ci-ran {oc_release} {image_tag} {self.eNBSourceCodePath}" + ret = cls_cmd.runScript(svr_id, script, 600, options) + logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}') + log_dir = f'{os.getcwd()}/../cmake_targets/log' + os.makedirs(log_dir, exist_ok=True) + result_junit = f'{oc_release}-run.xml' + details_json = f'{oc_release}-tests.json' + with cls_cmd.getConnection(svr_id) as ssh: + ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/{details_json}', tgt=f'{log_dir}/{details_json}') + ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/{result_junit}', tgt=f'{log_dir}/{result_junit}') + ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/physim_log.txt', tgt=f'{log_dir}/physim_log.txt') + ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/physim_pods_summary.txt', tgt=f'{log_dir}/physim_pods_summary.txt') + ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/LastTestsFailed.log', tgt=f'{log_dir}/LastTestsFailed.log') + test_status, test_summary, test_result = cls_analysis.Analysis.analyze_oc_physim(f'{log_dir}/{result_junit}', f'{log_dir}/{details_json}') + if test_summary: + if test_status: + HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) + HTML.CreateHtmlTestRowPhySimTestResult(test_summary, test_result) + logging.info('\u001B[1m Physical Simulator Pass\u001B[0m') + else: + HTML.CreateHtmlTestRow('Some test(s) failed!', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL) + HTML.CreateHtmlTestRowPhySimTestResult(test_summary, test_result) + logging.error('\u001B[1m Physical Simulator Fail\u001B[0m') + else: + HTML.CreateHtmlTestRowQueue('Physical simulator failed', 'KO', [test_result]) + logging.error('\u001B[1m Physical Simulator Fail\u001B[0m') + return test_status diff --git a/ci-scripts/cls_oai_html.py b/ci-scripts/cls_oai_html.py index 8e99b20de7..478cbd1860 100644 --- a/ci-scripts/cls_oai_html.py +++ b/ci-scripts/cls_oai_html.py @@ -564,13 +564,13 @@ class HTMLManagement(): self.htmlFile.write(' Nb Pass\n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') - self.htmlFile.write(' physim_test.txt \n') + self.htmlFile.write(' physim_log.txt \n') self.htmlFile.write(' ' + str(testSummary['Nbtests']) + ' \n') if testSummary['Nbfail'] == 0: - self.htmlFile.write(' ' + str(testSummary['Nbfail']) + ' \n') + self.htmlFile.write(' ' + str(testSummary['Nbfail']) + '\n') else: - self.htmlFile.write(' ' + str(testSummary['Nbfail']) + ' \n') - self.htmlFile.write(' ' + str(testSummary['Nbpass']) + ' \n') + self.htmlFile.write(' ' + str(testSummary['Nbfail']) + '\n') + self.htmlFile.write(' ' + str(testSummary['Nbpass']) + ' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' ---- PHYSIM TEST DETAIL INFO---- \n') @@ -578,22 +578,24 @@ class HTMLManagement(): self.htmlFile.write(' \n') self.htmlFile.write(' Test Name\n') self.htmlFile.write(' Test Description\n') - self.htmlFile.write(' Result\n') + self.htmlFile.write(' Test Status\n') + self.htmlFile.write(' Info\n') self.htmlFile.write(' \n') y = '' for key, value in testResult.items(): x = key.split(".") - if x[0] != y: + if x[2] != y: self.htmlFile.write(' \n') - self.htmlFile.write(' "' + x[0] + '" series \n') + self.htmlFile.write(' "' + x[2] + '" series \n') self.htmlFile.write(' \n') - y = x[0] + y = x[2] self.htmlFile.write(' \n') self.htmlFile.write(' ' + key + ' \n') self.htmlFile.write(' ' + value[0] + '\n') if 'PASS' in value: - self.htmlFile.write(' ' + value[1] + '\n') + self.htmlFile.write(' ' + value[2] + '\n') else: - self.htmlFile.write(' ' + value[1] + '\n') + self.htmlFile.write(' ' + value[2] + '\n') + self.htmlFile.write(' ' + value[1] + '\n') self.htmlFile.close() diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index cd40c807e1..4d7cf0a6fd 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -275,11 +275,6 @@ class OaiCiTest(): self.iperf_options = '' self.iperf_tcp_rate_target = '' self.finalStatus = False - self.UEIPAddress = '' - self.UEUserName = '' - self.UEPassword = '' - self.UESourceCodePath = '' - self.UELogFile = '' self.air_interface='' self.ue_ids = [] self.nodes = [] @@ -888,7 +883,7 @@ class OaiCiTest(): def LogCollectBuild(self,RAN): # Some pipelines are using "none" IP / Credentials # In that case, just forget about it - if RAN.eNBIPAddress == 'none' or self.UEIPAddress == 'none': + if RAN.eNBIPAddress == 'none': sys.exit(0) if (RAN.eNBIPAddress != '' and RAN.eNBUserName != '' and RAN.eNBPassword != ''): @@ -896,11 +891,6 @@ class OaiCiTest(): UserName = RAN.eNBUserName Password = RAN.eNBPassword SourceCodePath = RAN.eNBSourceCodePath - elif (self.UEIPAddress != '' and self.UEUserName != '' and self.UEPassword != ''): - IPAddress = self.UEIPAddress - UserName = self.UEUserName - Password = self.UEPassword - SourceCodePath = self.UESourceCodePath else: sys.exit('Insufficient Parameter') with cls_cmd.getConnection(IPAddress) as cmd: diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py deleted file mode 100644 index 97aa9d6dff..0000000000 --- a/ci-scripts/cls_physim1.py +++ /dev/null @@ -1,286 +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 -# */ -#--------------------------------------------------------------------- -# Python for CI of OAI-eNB + COTS-UE -# -# Required Python Version -# Python 3.x -# -# Required Python Package -# pexpect -#--------------------------------------------------------------------- - -#----------------------------------------------------------- -# Import -#----------------------------------------------------------- -import logging -import os -import re -import time -import subprocess -import sys - -import sshconnection as SSH -import cls_oai_html -import constants as CONST -import helpreadme as HELP - -class PhySim: - def __init__(self): - self.eNBIpAddr = "" - self.eNBUserName = "" - self.eNBPassword = "" - self.OCUserName = "" - self.OCPassword = "" - self.OCProjectName = "" - self.eNBSourceCodePath = "" - self.ranRepository = "" - self.ranBranch = "" - self.ranCommitID= "" - self.ranAllowMerge= False - self.ranTargetBranch= "" - self.testResult = {} - self.testSummary = {} - self.testStatus = False - -#-----------------$ -#PUBLIC Methods$ -#-----------------$ - - def Deploy_PhySim(self, HTML): - if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '': - HELP.GenericHelp(CONST.Version) - sys.exit('Insufficient Parameter') - lIpAddr = self.eNBIPAddress - lUserName = self.eNBUserName - lPassWord = self.eNBPassword - lSourcePath = self.eNBSourceCodePath - ocUserName = self.OCUserName - ocPassword = self.OCPassword - ocProjectName = self.OCProjectName - - if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '' or ocUserName == '' or ocPassword == '' or ocProjectName == '': - HELP.GenericHelp(CONST.Version) - sys.exit('Insufficient Parameter') - logging.debug('Building on server: ' + lIpAddr) - mySSH = SSH.SSHConnection() - mySSH.open(lIpAddr, lUserName, lPassWord) - - self.testCase_id = HTML.testCase_id - - # on RedHat/CentOS .git extension is mandatory - result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) - if result is not None: - full_ran_repo_name = self.ranRepository.replace('git/', 'git') - else: - full_ran_repo_name = self.ranRepository + '.git' - mySSH.command('rm -Rf ' + lSourcePath, '\$', 30) - mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) - mySSH.command('cd ' + lSourcePath, '\$', 5) - mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) - # Raphael: here add a check if git clone or git fetch went smoothly - mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) - mySSH.command('git config user.name "OAI Jenkins"', '\$', 5) - - mySSH.command('git clean -x -d -ff', '\$', 30) - mySSH.command('mkdir -p cmake_targets/log', '\$', 5) - # if the commit ID is provided use it to point to it - if self.ranCommitID != '': - mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) - if self.ranAllowMerge: - branchName = self.ranBranch.replace('/','-') - imageTag = f'{branchName}-{self.ranCommitID[0:8]}' - if self.ranTargetBranch == '': - if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): - mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30) - else: - logging.debug('Merging with the target branch: ' + self.ranTargetBranch) - mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30) - else: - imageTag = f'develop-{self.ranCommitID[0:8]}' - - # logging to OC Cluster and then switch to corresponding project - mySSH.command(f'oc login -u {ocUserName} -p {ocPassword} --server https://api.oai.cs.eurecom.fr:6443', '\$', 30) - if mySSH.getBefore().count('Login successful.') == 0: - logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') - mySSH.close() - HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) - return False - else: - logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m') - mySSH.command(f'oc project {ocProjectName}', '\$', 30) - if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0: - logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m') - mySSH.command('oc logout', '\$', 30) - mySSH.close() - HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL) - return False - else: - logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m') - - # Using helm charts deployment - mySSH.command(f'helm install physim ./charts/physims/ --set global.image.version={imageTag} --wait 2>&1 | tee -a cmake_targets/log/physim_helm_summary.txt', '\$', 30) - if mySSH.getBefore().count('STATUS: deployed') == 0: - logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m') - mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 30) - isFinished1 = False - while(isFinished1 == False): - time.sleep(20) - mySSH.command('oc get pods -l app=physim', '\$', 6, resync=True) - if re.search('No resources found', mySSH.getBefore()): - isFinished1 = True - mySSH.command('oc logout', '\$', 30) - mySSH.close() - self.AnalyzeLogFile_phySim() - return False - else: - logging.debug('\u001B[1m Deployed PhySim Successfully using helm chart\u001B[0m') - isRunning = False - count = 0 - # Check whether the containers are in Running state or not under 2 mins - while(count < 5 and isRunning == False): - time.sleep(60) - mySSH.command('oc get pods -o wide -l app=physim | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 30, resync=True) - running_count = mySSH.getBefore().count('Running') - completed_count = mySSH.getBefore().count('Completed') - if (running_count + completed_count) == 23: - logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m') - isRunning = True - podNames = re.findall('oai-[\S\d\w]+', mySSH.getBefore()) - count +=1 - if isRunning == False: - logging.error('\u001B[1m Some pods are in Error state \u001B[0m') - mySSH.command('oc get pods -l app=physim 2>&1 | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6) - mySSH.command('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc describe pod $pod >> cmake_targets/log/physim_pods_summary.txt; done', '\$', 10) - mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) - self.AnalyzeLogFile_phySim() - isFinished1 = False - while(isFinished1 == False): - time.sleep(20) - mySSH.command('oc get pods -l app=physim', '\$', 6, resync=True) - if re.search('No resources found', mySSH.getBefore()): - isFinished1 = True - mySSH.command('oc logout', '\$', 30) - HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL) - HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) - return False - # Waiting to complete the running test - count = 0 - isFinished = False - # doing a deep copy! - tmpPodNames = podNames.copy() - while(count < 9 and isFinished == False): - time.sleep(60) - for podName in tmpPodNames: - mySSH.command2(f'oc logs --tail=1 {podName} 2>&1', 6, silent=True) - if mySSH.cmd2Results.count('FINISHED') != 0: - logging.debug(podName + ' is finished') - tmpPodNames.remove(podName) - if not tmpPodNames: - isFinished = True - count += 1 - if isFinished: - logging.debug('\u001B[1m PhySim test is Complete\u001B[0m') - else: - logging.error('\u001B[1m PhySim test Timed-out!\u001B[0m') - - # Getting the logs of each executables running in individual pods - for podName in podNames: - mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 15, resync=True) - mySSH.command('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc describe pod $pod >> cmake_targets/log/physim_pods_summary.txt; done', '\$', 10) - mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/log/physim_test.txt', '.') - try: - listLogFiles = subprocess.check_output('grep -E --colour=never "Execution Log file|Linux oai-" physim_test.txt', shell=True, universal_newlines=True) - for line in listLogFiles.split('\n'): - res1 = re.search('Linux (?Poai-[a-zA-Z0-9\-]+) ', str(line)) - res2 = re.search('Execution Log file = (?P[a-zA-Z0-9\-\/\.\_\+]+)', str(line)) - if res1 is not None: - podName = res1.group('pod') - if res2 is not None: - logFileInPod = res2.group('name') - folderName = logFileInPod.replace('/opt/oai-physim/cmake_targets/autotests/log/', '') - folderName = re.sub('/test.*', '', folderName) - fileName = logFileInPod.replace('/opt/oai-physim/cmake_targets/autotests/log/' + folderName + '/', '') - mySSH.command('mkdir -p cmake_targets/log/' + folderName, '\$', 5, silent=True) - mySSH.command('oc cp ' + podName + ':' + logFileInPod + ' cmake_targets/log/' + folderName + '/' + fileName, '\$', 20, silent=True) - except Exception as e: - pass - - # UnDeploy the physical simulator pods - mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) - isFinished1 = False - while(isFinished1 == False): - time.sleep(20) - mySSH.command('oc get pods -l app=physim', '\$', 6, resync=True) - if re.search('No resources found', mySSH.getBefore()): - isFinished1 = True - if isFinished1 == True: - logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m') - mySSH.command('oc logout', '\$', 6) - mySSH.close() - self.AnalyzeLogFile_phySim() - if self.testStatus and isFinished: - HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) - HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) - logging.info('\u001B[1m Physical Simulator Pass\u001B[0m') - else: - if isFinished: - HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) - else: - HTML.CreateHtmlTestRow('Some test(s) timed-out!', 'KO', CONST.ALL_PROCESSES_OK) - HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) - logging.error('\u001B[1m Physical Simulator Fail\u001B[0m') - return self.testStatus - - def AnalyzeLogFile_phySim(self): - mySSH = SSH.SSHConnection() - mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) - dirToCopy = f'{self.eNBSourceCodePath}/cmake_targets/log/' - mySSH.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, dirToCopy, f'./physim_test_logs_{self.testCase_id}/') - mySSH.command(f'rm -rf {dirToCopy}', '\$', 5) - mySSH.close() - # physim test log analysis - nextt = 0 - nbTests = 0 - nbFailed = 0 - if (os.path.isfile(f'./physim_test_logs_{self.testCase_id}/physim_test.txt')): - with open(f'./physim_test_logs_{self.testCase_id}/physim_test.txt', 'r') as logfile: - for line in logfile: - # the following regex would match the following line: - # execution nr_pbchsim.106rb.test1 {Test1: PBCH-only, 106 PRB} Run_Result = " Run_1 =PASS Run_2 =PASS Run_3 =PASS" Result = PASS - # ^testname ^testdescription ^test1 ^test2 ^test3 ^status - ret = re.search('execution\s+(?P[a-zA-Z0-9\._\-\+]+)\s+{(?P[A-Za-z0-9\.\_\-\+:,;\/\%\=\(\)\s]+)}\s+Run_Result\s*=\s*\"\s*Run_1\s*=\s*(?P[A-Za-z]+)\s*Run_2\s*=\s*(?P[A-Za-z]+)\s*Run_3\s*=\s*(?P[A-Za-z]+)\s*\"\s+Result\s*=\s*(?P[A-Za-z]+)', line) - if ret is None: - continue - nbTests += 1 - r = [ret.group('run1'), ret.group('run2'), ret.group('run3')] - nbPass = sum([x == 'PASS' for x in r]) - resultstr = 'PASS' - if nbPass < 3 or ret.group('status') != 'PASS': - resultstr = f'FAIL ({3-nbPass}/3)' - nbFailed += 1 - self.testResult[ret.group('name')] = [ret.group('desc'), resultstr] - self.testSummary['Nbtests'] = nbTests - self.testSummary['Nbpass'] = nbTests - nbFailed - self.testSummary['Nbfail'] = nbFailed - if self.testSummary['Nbfail'] == 0: - self.testStatus = True - return 0 diff --git a/ci-scripts/datalog_rt_stats.100.2x2.yaml b/ci-scripts/datalog_rt_stats.100.2x2.yaml index c0a7717346..024dfa8e9e 100644 --- a/ci-scripts/datalog_rt_stats.100.2x2.yaml +++ b/ci-scripts/datalog_rt_stats.100.2x2.yaml @@ -11,8 +11,8 @@ Ref : feptx_prec : 0.0 feptx_ofdm : 60.0 feptx_total : 150.0 - L1 Tx processing : 530.0 - DLSCH encoding : 220.0 + L1 Tx processing : 475.0 + DLSCH encoding : 200.0 L1 Rx processing : 530.0 PUSCH inner-receiver : 360.0 Schedule Response : 1.0 diff --git a/ci-scripts/datalog_rt_stats.1x1.60.yaml b/ci-scripts/datalog_rt_stats.1x1.60.yaml index 47021b502b..85075bac97 100644 --- a/ci-scripts/datalog_rt_stats.1x1.60.yaml +++ b/ci-scripts/datalog_rt_stats.1x1.60.yaml @@ -11,8 +11,8 @@ Ref : feptx_prec : 15.0 feptx_ofdm : 30.0 feptx_total : 45.0 - L1 Tx processing : 205.0 - DLSCH encoding : 140.0 + L1 Tx processing : 175.0 + DLSCH encoding : 110.0 L1 Rx processing : 345.0 PUSCH inner-receiver : 150.0 Schedule Response : 1.0 diff --git a/ci-scripts/datalog_rt_stats.60.2x2.yaml b/ci-scripts/datalog_rt_stats.60.2x2.yaml index 064d6374c1..b371356971 100644 --- a/ci-scripts/datalog_rt_stats.60.2x2.yaml +++ b/ci-scripts/datalog_rt_stats.60.2x2.yaml @@ -11,8 +11,8 @@ Ref : feptx_prec : 14.0 feptx_ofdm : 30.0 feptx_total : 80.0 - L1 Tx processing : 315.0 - DLSCH encoding : 155.0 + L1 Tx processing : 280.0 + DLSCH encoding : 140.0 L1 Rx processing : 345.0 PUSCH inner-receiver : 155.0 Schedule Response : 1.0 diff --git a/ci-scripts/datalog_rt_stats.default.yaml b/ci-scripts/datalog_rt_stats.default.yaml index 17e45cf367..32977944a0 100644 --- a/ci-scripts/datalog_rt_stats.default.yaml +++ b/ci-scripts/datalog_rt_stats.default.yaml @@ -11,8 +11,8 @@ Ref : feptx_prec : 13.0 feptx_ofdm : 30.0 feptx_total : 45.0 - L1 Tx processing : 160.0 - DLSCH encoding : 100.0 + L1 Tx processing : 145.0 + DLSCH encoding : 90.0 L1 Rx processing : 290.0 PUSCH inner-receiver : 115.0 Schedule Response : 1.0 diff --git a/ci-scripts/helpreadme.py b/ci-scripts/helpreadme.py index 6f192acd9c..ce4c594f58 100644 --- a/ci-scripts/helpreadme.py +++ b/ci-scripts/helpreadme.py @@ -58,12 +58,6 @@ def eNBSrvHelp(ipaddr, username, password, sourcepath): print(' --eNBPassword=[eNB\'s Login Password] -- ' + password) print(' --eNBSourceCodePath=[eNB\'s Source Code Path] -- ' + sourcepath) -def OAIUESrvHelp(ipaddr, username, password, sourcepath): - print(' --UEIPAddress=[UE\'s IP Address] -- ' + ipaddr) - print(' --UEUserName=[UE\'s Login User Name] -- ' + username) - print(' --UEPassword=[UE\'s Login Password] -- ' + password) - print(' --UESourceCodePath=[UE\'s Source Code Path] -- ' + sourcepath) - def XmlHelp(filename): print(' --XMLTestFile=[XML Test File to be run] -- ' + filename) print(' Note: multiple xml files can be specified (--XMLFile=File1 ... --XMLTestFile=FileN) when HTML headers are created ("InitiateHtml" mode)') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 6d5448c4e0..333d515858 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -41,7 +41,6 @@ import constants as CONST import cls_oaicitest #main class for OAI CI test framework import cls_containerize #class Containerize for all container-based operations on RAN/UE objects import cls_static_code_analysis #class for static code analysis -import cls_physim1 #class PhySim for physical simulators deploy and run import cls_cluster # class for building/deploying on cluster import cls_native # class for all native/source-based operations @@ -97,7 +96,6 @@ def ExecuteActionWithParam(action): global HTML global CONTAINERS global SCA - global PHYSIM global CLUSTER if action == 'Build_eNB' or action == 'Build_Image' or action == 'Build_Proxy' or action == "Build_Cluster_Image" or action == "Build_Run_Tests": RAN.Build_eNB_args=test.findtext('Build_eNB_args') @@ -295,7 +293,9 @@ def ExecuteActionWithParam(action): success = cls_oaicitest.IdleSleep(HTML, int(st)) elif action == 'Deploy_Run_PhySim': - success = PHYSIM.Deploy_PhySim(HTML) + oc_release = test.findtext('oc_release') + svr_id = test.findtext('svr_id') or None + success = CLUSTER.deploy_oc_physim(HTML, oc_release, svr_id) elif action == 'DeployCoreNetwork' or action == 'UndeployCoreNetwork': cn_id = test.findtext('cn_id') @@ -442,7 +442,6 @@ RAN = ran.RANManagement() HTML = cls_oai_html.HTMLManagement() CONTAINERS = cls_containerize.Containerize() SCA = cls_static_code_analysis.StaticCodeAnalysis() -PHYSIM = cls_physim1.PhySim() CLUSTER = cls_cluster.Cluster() #----------------------------------------------------------- @@ -452,7 +451,7 @@ CLUSTER = cls_cluster.Cluster() import args_parse # Force local execution, move all execution targets to localhost force_local = False -py_param_file_present, py_params, mode, force_local = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER) +py_param_file_present, py_params, mode, force_local = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER) @@ -485,9 +484,9 @@ elif re.match('^TerminateMME$', mode, re.IGNORECASE): elif re.match('^TerminateSPGW$', mode, re.IGNORECASE): logging.warning("Option TerminateSPGW ignored") elif re.match('^LogCollectBuild$', mode, re.IGNORECASE): - if (RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '') and (CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == ''): - HELP.GenericHelp(CONST.Version) - sys.exit('Insufficient Parameter') + if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '': + logging.warning("nothing to collect (eNBIPAddress/eNBUserName/eNBPassword/eNBSourceCodePath is '')") + sys.exit(0) if RAN.eNBIPAddress == 'none': sys.exit(0) CiTestObj.LogCollectBuild(RAN) @@ -557,7 +556,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re HELP.eNBSrvHelp(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, RAN.eNBSourceCodePath) sys.exit('Insufficient Parameter') else: - if CiTestObj.UEIPAddress == '' or CiTestObj.ranRepository == '' or CiTestObj.ranBranch == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '' or CiTestObj.UESourceCodePath == '': + if CiTestObj.ranRepository == '' or CiTestObj.ranBranch == '': HELP.GenericHelp(CONST.Version) sys.exit('UE: Insufficient Parameter') diff --git a/ci-scripts/scripts/oc-deploy-physims.sh b/ci-scripts/scripts/oc-deploy-physims.sh new file mode 100755 index 0000000000..ddb2e964ef --- /dev/null +++ b/ci-scripts/scripts/oc-deploy-physims.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e + +function die() { echo $@; exit 1; } +[ $# -eq 4 ] || die "usage: $0 " + +OC_NS=${1} +OC_RELEASE=${2} +IMG_TAG=${3} +OAI_DIR=${4} + +cat /opt/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null +oc project ${OC_NS} > /dev/null +oc tag oaicicd-ran/oai-physim:${IMG_TAG} ${OC_NS}/oai-physim:${IMG_TAG} +helm install ${OC_RELEASE} ${OAI_DIR}/charts/${OC_RELEASE} --set global.image.version=${IMG_TAG} --wait +POD_ID=$(oc get pods | grep oai-${OC_RELEASE} | awk '{print $1}') +sleep 10 +echo "Monitoring logs for 'FINISHED' in pod '$POD_ID'" +oc logs -f -n ${OC_NS} "$POD_ID" | while read -r line; do + if [[ "$line" == *"FINISHED"* ]]; then + echo "'FINISHED' detected in logs. Copying logs..." + oc logs -n ${OC_NS} "$POD_ID" >> ${OAI_DIR}/ci-scripts/physim_log.txt + oc describe pod $POD_ID >> ${OAI_DIR}/ci-scripts/physim_pods_summary.txt + oc cp "$POD_ID":/opt/oai-physim/Testing/Temporary/LastTestsFailed.log ${OAI_DIR}/ci-scripts/LastTestsFailed.log + oc cp "$POD_ID":/opt/oai-physim/${OC_RELEASE}-tests.json ${OAI_DIR}/ci-scripts/${OC_RELEASE}-tests.json + oc cp "$POD_ID":/opt/oai-physim/${OC_RELEASE}-run.xml ${OAI_DIR}/ci-scripts/${OC_RELEASE}-run.xml + break + fi +done +helm uninstall ${OC_RELEASE} --wait +oc delete istag oai-physim:${IMG_TAG} -n ${OC_NS} +oc logout > /dev/null diff --git a/ci-scripts/tests/test-runner/run.sh b/ci-scripts/tests/test-runner/run.sh index 808bc563a7..9c02186a5f 100755 --- a/ci-scripts/tests/test-runner/run.sh +++ b/ci-scripts/tests/test-runner/run.sh @@ -26,10 +26,6 @@ python3 main.py \ --eNBUserName=NONE \ --eNBPassword=NONE \ --eNBSourceCodePath=NONE \ - --UEIPAddress=localhost \ - --UEUserName=NONE \ - --UEPassword=NONE \ - --UESourceCodePath=NONE \ --XMLTestFile=tests/test-runner/test.xml python3 main.py \ diff --git a/ci-scripts/xml_files/physim_deploy_run.xml b/ci-scripts/xml_files/physim_4g_deploy_run.xml similarity index 72% rename from ci-scripts/xml_files/physim_deploy_run.xml rename to ci-scripts/xml_files/physim_4g_deploy_run.xml index 63152c1fb5..f8fb8781d5 100644 --- a/ci-scripts/xml_files/physim_deploy_run.xml +++ b/ci-scripts/xml_files/physim_4g_deploy_run.xml @@ -25,13 +25,23 @@ Physical Simulators Check wrench - 010201 + 800813 + 010201 - + + Create_Workspace + Create new Workspace + 0 + 0 + + + Deploy_Run_PhySim - Deploy and run physical simulator on openshift + Deploy and run physical simulator on openshift + physims-4g + avra diff --git a/ci-scripts/xml_files/physim_5g_deploy_run.xml b/ci-scripts/xml_files/physim_5g_deploy_run.xml new file mode 100644 index 0000000000..bd8bb0a121 --- /dev/null +++ b/ci-scripts/xml_files/physim_5g_deploy_run.xml @@ -0,0 +1,47 @@ + + + build-tab + Physical Simulators Check + wrench + + 800813 + 010201 + + + + + Create_Workspace + Create new Workspace + 0 + 0 + + + + Deploy_Run_PhySim + Deploy and run physical simulator on openshift + physims-5g + avra + + + diff --git a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml index 6dd2dec52a..fb1d5a95ce 100644 --- a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml @@ -179,6 +179,7 @@ services: --uicc0.imsi 208990100001100 --rfsimulator.options chanmod --rfsimulator.serveraddr server + --rfsimulator.hanging-workaround 1 --telnetsrv --telnetsrv.shrmod ciUE --telnetsrv.listenaddr 192.168.71.181 --telnetsrv.listenport 8091 --channelmod.modellist_rfsimu_1.[0].model_name rfsimu_channel_ue0 --channelmod.modellist_rfsimu_1.[1].model_name rfsimu_channel_ue1 diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt deleted file mode 100755 index 67d3cf9ba2..0000000000 --- a/cmake_targets/autotests/README.txt +++ /dev/null @@ -1,76 +0,0 @@ -OAI Test PLAN - -Obj.# Case# Test# Description - -01 51 Run PHY simulator tests -01 51 00 dlsim test cases (Test 1: 10 MHz, R2.FDD (MCS 5), EVA5, -1dB), - (Test 5: 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)), - (Test 6: 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)), - (Test 6b: 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)), - (Test 7: 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)), - (Test 7b: 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)), - (Test 10: 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)), - (Test 10b: 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)), - (Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)) - (TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)), - (TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)), -01 51 01 ulsim Test cases. (Test 1, 5 MHz, FDD (MCS 5), AWGN, 6dB), - (Test 2, 5 MHz, FDD (MCS 16), AWGN , 12dB (70%)), - (Test 3, 10 MHz, R3.FDD (MCS 5), AWGN, 6dB (70%)), - (Test 4, 10 MHz, R3-1.FDD (MCS 16), AWGN, 12dB (70%)), - (Test 5, 20 MHz, FDD (MCS 5), AWGN, 6dB (70%)), - (Test 6, 20 MHz, FDD (MCS 16), AWGN, 12 dB (70%)) -01 51 02 ldpc Test cases. (Test1: block length = 3872), - (Test2: block length = 4224), - (Test3: block length = 4576), - (Test4: block length = 4928), - (Test5: block length = 5280), - (Test6: block length = 5632), - (Test7: block length = 6336), - (Test8: block length = 7040), - (Test9: block length = 7744), - (Test10: block length = 8448) -01 51 03 polartest Test cases. (Test1: PBCH polar test), - (Test2: DCI polar test) -01 51 04 nr_pbchsim Test cases. (Test1: PBCH-only, 106 PRB), - (Test2: PBCH and synchronization, 106PBR), - (Test3: PBCH-only, 217 PRB), - (Test4: PBCH and synchronization, 217 RPB), - (Test5: PBCH-only, 273 PRB), - (Test6: PBCH and synchronization, 273 PRB) -01 51 05 nr_dlsim Test cases. (Test1: 106 PRB), - (Test2: 217 PRB), - (Test3: 273 PRB) -01 51 06 nr_dlschsim Test cases. (Test1: 106 PRB), - (Test2: 217 PRB), - (Test3: 273 PRB) -01 51 07 shortblocktest Test cases. (Test1: 3 bits), - (Test2: 6 bits), - (Test3: 7 bits), - (Test4: 11 bits) -01 51 08 nr_ulschsim Test cases. (Test1: 106 PRB), - (Test2: 217 PRB), - (Test3: 273 PRB) -01 51 09 nr_pucchsim Test cases. (Test1: Format 0 ACK miss 106 PRB), - (Test2: Format 1 ACK miss 106 PRB), - (Test3: Format 1 ACK miss 273 PRB), - (Test4: Format 1 NACKtoACK 106 PRB) -01 51 10 dlsim_tm4 test cases (Test 1: 10 MHz, R2.FDD (MCS 5), EVA5, -1dB), - (Test 5: 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)), - (Test 6: 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)), - (Test 6b: 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)), - (Test 7: 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)), - (Test 7b: 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)), - (Test 10: 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)), - (Test 10b: 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)), - (Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)) - (TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)), - (TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)), -01 51 11 nr_ulsim Test cases. (Test1: MCS 9 106 PRBs), - (Test2: MCS 16 50 PRBs), - (Test3: MCS 28 50 PRBs), - (Test4: MCS 9 217 PRBs), - (Test5: MCS 9 273 PRBs) -01 51 12 nr_prachsim Test cases.(Test1: 106 PRBs), - (Test2: 217 PRBs), - (Test3: 273 PRBs) diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash deleted file mode 100755 index c531f62f9a..0000000000 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ /dev/null @@ -1,304 +0,0 @@ -#!/bin/bash -#set -xv -#/* -# * 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 -# */ - -if [ -s $OPENAIR_DIR/cmake_targets/tools/build_helper ] ; then - source $OPENAIR_DIR/cmake_targets/tools/build_helper -else - echo "Error: no file in the file tree: is OPENAIR_DIR variable set?" - exit 1 -fi - -source $OPENAIR_DIR/cmake_targets/tools/test_helper - -tdir=$OPENAIR_DIR/cmake_targets/autotests -rm -fr $tdir/bin -mkdir -p $tdir/bin -results_file="$tdir/log/results_autotests.xml" - - -#\param $1 -> name of test case -#\param $2 -> name of executable -#\param $3 -> arguments for running the program -#\param $4 -> search expression -#\param $5 -> search expression which should NOT be found (for ex. segmentation fault) -#\param $6 -> number of runs -#\param $7 -> tags to help identify the test case for readability in output xml file -#\param $8 => test config file params to be modified -#\param $9 -> desc to help identify the test case for readability in output xml file - -function test_run() { - xUnit_start - test_case_name=$1 - log_dir=$tdir/log/$test_case_name - log_file=$log_dir/test.$1.log.txt - main_exec=$2 - exec_args=$3 - search_expr_array=("${!4}") - search_expr_negative=$5 - nruns=${6} - tags=${7} - test_config_file=${8} - desc=${9} - - xmlfile_testcase=$log_dir/test.$1.xml - #Temporary log file where execution log is stored. - temp_exec_log=$log_dir/temp_log.txt - export OPENAIR_LOGDIR=$log_dir - rm -fr $log_dir - mkdir -p $log_dir - - echo "" > $temp_exec_log - echo "start at $(date)" > "$log_file" - #echo "log_dir = $log_dir" - #echo "log_file = $log_file" - #echo "exec_file = $exec_file" - #echo "exec_args = $exec_args" - #echo "search_expr = $search_expr" - #echo "nruns = $nruns" - #echo "desc = $desc" - - tags_array=() - read -a tags_array <<<"$tags" - desc_array=() - readarray -t desc_array <<<"$desc" - - main_exec_args_array=() - readarray -t main_exec_args_array <<< "$exec_args" - - if [ ! -f $main_exec ]; then - echo_fatal "no executable $main_exec found" - fi - - tags_array_index=0 - for main_exec_args_array_index in "${main_exec_args_array[@]}" - do - global_result=PASS - result_string="" - PROPER_DESC=`echo ${desc_array[$tags_array_index]} | sed -e "s@^.*Test cases.*(Test@Test@" -e "s@^ *(@@" -e"s/)$//" -e "s/),$//"` - echo_info "$PROPER_DESC" - - for (( run_index=1; run_index <= $nruns; run_index++ )) - do - temp_exec_log="$log_dir/test.$test_case_name.${tags_array[$tags_array_index]}.run_$run_index" - echo "Executing test case $test_case_name.${tags_array[$tags_array_index]}, Run Index = $run_index, Execution Log file = $temp_exec_log" - - echo "-----------------------------------------------------------------------------" > "$temp_exec_log" - echo "" >> "$temp_exec_log" - echo "Executing $main_exec $main_exec_args_array_index at $(date)" >> "$temp_exec_log" - uname -a >> "$temp_exec_log" - time "$main_exec" $main_exec_args_array_index >> "$temp_exec_log" 2>&1 & - done - - wait - - for (( run_index=1; run_index <= $nruns; run_index++ )) - do - temp_exec_log="$log_dir/test.$test_case_name.${tags_array[$tags_array_index]}.run_$run_index" - echo "" >> $temp_exec_log 2>&1 - cat "$temp_exec_log" >> "$log_file" 2>&1 - - result=PASS - for search_expr in "${search_expr_array[@]}" - do - grep -Eq "$search_expr" $temp_exec_log || result=FAIL - done - - #If we find a negative search result then there is crash of program and test case is failed even if above condition is true - grep -q -iE "$search_expr_negative" $temp_exec_log && result=FAIL - - if [ "$result" != PASS ]; then - echo_error "$test_case_name.${tags_array[$tags_array_index]} RUN = $run_index Result = FAIL" - else - echo_success "$test_case_name.${tags_array[$tags_array_index]} RUN = $run_index Result = PASS" - fi - - result_string=$result_string" Run_$run_index =$result" - if [ $result != PASS ] ; then - global_result=FAIL - fi - - done #End of for loop (nindex) - - echo "END at $(date)" >> "$log_file" - - if [ "$global_result" != PASS ]; then - echo_error "execution $test_case_name.${tags_array[$tags_array_index]} {$PROPER_DESC} Run_Result = \"$result_string\" Result = FAIL" - xUnit_fail "execution" "$test_case_name.${tags_array[$tags_array_index]}" "FAIL" "$result_string" "$xmlfile_testcase" "$PROPER_DESC" - else - echo_success "execution $test_case_name.${tags_array[$tags_array_index]} {$PROPER_DESC} Run_Result = \"$result_string\" Result = PASS " - xUnit_success "execution" "$test_case_name.${tags_array[$tags_array_index]}" "PASS" "$result_string" "$xmlfile_testcase" "$PROPER_DESC" - fi - - let "tags_array_index++" - done -} - -dlog=$OPENAIR_DIR/cmake_targets/autotests/log -exec_dir=$OPENAIR_DIR/cmake_targets/ran_build/build -xml_conf="$OPENAIR_DIR/cmake_targets/autotests/test_case_list.xml" - -function print_help() { - echo_info ' -This program runs automated test cases -Options --c | --config - Set the configuration file to execute (default: $xml_conf) --d | --exec-dir - Set directory of executables (default: $exec_dir) --g | --run-group - Run test cases in a group. For example, ./run_exec_autotests "0101* 010102" --h | --help - This help -' -} - -function main () { -RUN_GROUP=0 -test_case_group="" -test_case_group_array=() -test_case_array=() - -until [ -z "$1" ]; do - case "$1" in - -c|--config) - xml_conf=$2 - echo "setting xml_conf to $xml_conf" - shift 2;; - -d|--exec-dir) - exec_dir=$2 - echo "setting exec_dir to $exec_dir" - shift 2;; - -g | --run-group) - RUN_GROUP=1 - test_case_group=$2 - test_case_group=`sed "s/\+/\*/g" <<< "${test_case_group}"` # Replace + with * for bash string substituion - echo_info "Will execute test cases only in group $test_case_group" - shift 2;; - -h | --help) - print_help - exit 1;; - *) - print_help - echo_fatal "Unknown option $1" - break;; - esac -done - -test_case_excl_list=`xmlstarlet sel -t -v "/testCaseList/TestCaseExclusionList" $xml_conf` -test_case_excl_list=`sed "s/\+/\*/g" <<< "$test_case_excl_list" ` # Replace + with * for bash string substituion -echo "Test Case Exclusion List = $test_case_excl_list " -read -a test_case_excl_array <<< "$test_case_excl_list" - -test_case_list=`xmlstarlet sel -T -t -m /testCaseList/testCase -s A:N:- "@id" -v "@id" -n $xml_conf` -echo "test_case_list = $test_case_list" -readarray -t test_case_array <<<"$test_case_list" - -read -a test_case_group_array <<< "$test_case_group" -for search_expr in "${test_case_array[@]}" - do - flag_run_test_case=0 - # search if this test case needs to be executed - if [ "$RUN_GROUP" -eq "1" ]; then - for search_group in "${test_case_group_array[@]}" - do - if [[ $search_expr == $search_group ]];then - flag_run_test_case=1 - echo_info "Test case $search_expr match found in group" - break - fi - done - else - flag_run_test_case=1 - fi - - for search_excl in "${test_case_excl_array[@]}" - do - if [[ $search_expr == $search_excl ]];then - flag_run_test_case=0 - echo_info "Test case $search_expr match found in test case excl group. Will skip the test case for execution..." - break - fi - done - - - #We skip this test case if it is not in the group list - if [ "$flag_run_test_case" -ne "1" ]; then - continue - fi - - name=$search_expr - desc=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/desc" $xml_conf` - main_exec=$exec_dir/`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/main_exec" $xml_conf` - main_exec_args=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/main_exec_args" $xml_conf` - search_expr_true=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/search_expr_true" $xml_conf` - search_expr_false=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/search_expr_false" $xml_conf` - nruns=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/nruns" $xml_conf` - tags=`xmlstarlet sel -t -v "/testCaseList/testCase[@id='$search_expr']/tags" $xml_conf` - - echo "name = $name" - echo "Description = $desc" - echo "main_exec = $main_exec" - echo "main_exec_args = $main_exec_args" - echo "search_expr_true = $search_expr_true" - echo "search_expr_false = $search_expr_false" - echo "tags = $tags" - echo "nruns = $nruns" - - - search_array_true=() - - IFS=\" #set the shell field separator - set -f #dont try to glob - #set -- $search_expr_true #split on $IFS - for i in $search_expr_true - do echo "i = $i" - if [ -n "$i" ] && [ "$i" != " " ]; then - search_array_true+=("$i") - #echo "inside i = \"$i\" " - fi - done - unset IFS - - #echo "arg1 = ${search_array_true[0]}" - #echo " arg2 = ${search_array_true[1]}" - - test_run \ - "$name" \ - "$main_exec" \ - "$main_exec_args" \ - "search_array_true[@]" \ - "$search_expr_false" \ - "$nruns" \ - "$tags" \ - "$test_config_file" \ - "$desc" - - done -} - -uname -a - -main "$@" - -xUnit_write "$results_file" -echo "Test Results are written to $results_file" diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml deleted file mode 100755 index 6d9d64bce2..0000000000 --- a/cmake_targets/autotests/test_case_list.xml +++ /dev/null @@ -1,584 +0,0 @@ - - - - - dlsim Test cases. (Test 1: 10 MHz, R2.FDD (MCS 5), EVA5, -1dB), - (Test 5: 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)), - (Test 6: 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)), - (Test 6b: 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)), - (Test 7: 10 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)), - (Test 7b: 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)), - (Test 10: 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)), - (Test 10b: 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)), - (Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)) - dlsim - -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 - -m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -Tperf=60 - -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 - -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -Tperf=60 - -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=25 - -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -Tperf=25 - -m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -Tperf=60 - -m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -Tperf=60 - -m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 - test1 test5 test6 test6b test7 test7b test10 test10b test11 - "passed" - segmentation fault|assertion|exiting|fatal - 3 - - - - dlsim Test cases. (Test 15: 20 MHz, R.9 FDD (MCS 26), EVA5, 17.6dB (70%)), - (Test 15b: 20 MHz, R.9-2 FDD (MCS 26, 17PRB), EVA5, 17.3dB (70%)), - (Test 15c: 20 MHz, R.9-1 FDD (MCS 26, 83 PRB), EVA5, 16.6dB (70%)), - (TM2 Test 1: 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)), - (TM2 Test 1b: 5 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)) - dlsim - -m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -Tperf=60 - -m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -Tperf=60 - -m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -Tperf=60 - -m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -Tperf=60 - -m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -Tperf=60 - test15 test15b test15c TM2_test1 TM2_test1b - "passed" - segmentation fault|assertion|exiting|fatal - 3 - - - - ulsim Test cases. (Test 1: 5 MHz, FDD (MCS 5), AWGN, 6dB), - (Test 2: 5 MHz, FDD (MCS 16), AWGN , 12dB (70%)), - (Test 3: 10 MHz, R3.FDD (MCS 5), AWGN, 6dB (70%)), - (Test 4: 10 MHz, R3-1.FDD (MCS 16), AWGN, 12dB (70%)), - (Test 5: 20 MHz, FDD (MCS 5), AWGN, 6dB (70%)), - (Test 6: 20 MHz, FDD (MCS 16), AWGN, 12 dB (70%)) - ulsim - -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 - -BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 - -BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 - -BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 - -BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 - -BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 - test1 test2 test3 test4 test5 test6 - "passed" - segmentation fault|assertion|exiting|fatal - 3 - - - - ldpc Test cases. (Test1: block length = 3872, BG1), - (Test2: block length = 4224, BG1), - (Test3: block length = 4576, BG1), - (Test4: block length = 4928, BG1), - (Test5: block length = 5280, BG1), - (Test6: block length = 5632, BG1), - (Test7: block length = 6336, BG1), - (Test8: block length = 7040, BG1), - (Test9: block length = 7744, BG1), - (Test10: block length = 8448, BG1), - (Test11: block length = 1, BG2), - (Test12: block length = 100, BG2), - (Test13: block length = 193, BG2), - (Test14: block length = 500, BG2), - (Test15: block length = 561, BG2), - (Test16: block length = 600, BG2), - (Test17: block length = 641, BG2), - (Test18: block length = 2000, BG2), - (Test19: block length = 3000, BG2), - (Test20: block length = 3840, BG2) - ldpctest - -l3872 -s10 -n100 - -l4224 -s10 -n100 - -l4576 -s10 -n100 - -l4928 -s10 -n100 - -l5280 -s10 -n100 - -l5632 -s10 -n100 - -l6336 -s10 -n100 - -l7040 -s10 -n100 - -l7744 -s10 -n100 - -l8448 -s10 -n100 - -l1 -s10 -n100 - -l100 -s10 -n100 - -l193 -s10 -n100 - -l500 -s10 -n100 - -l561 -s10 -n100 - -l600 -s10 -n100 - -l641 -s10 -n100 - -l2000 -s10 -n100 - -l3000 -s10 -n100 - -l3840 -s10 -n100 - test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 - BLER 0.000000 - segmentation fault|assertion|exiting|fatal|differ - 3 - - - - polartest Test cases. (Test1: PBCH polar test), - (Test2: DCI polar test), - (Test3: UCI polar test,6-bit CRC), - (Test4: UCI polar test,11-bit CRC) - polartest - -q -s-10 -f0 - -q -s-10 -f0 -m1 - -q -s-2 -f2 -m2 -k12 - -q -s-2 -f2 -m2 -k20 - test1 test2 test3 test4 - BLER= 0.000000 - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_pbchsim Test cases. (Test1: PBCH-only, 106 PRB, NID 2), - (Test2: PBCH and synchronization, 106PBR), - (Test3: PBCH and synchronization, 106PBR, SSB SC OFFSET 6) - nr_pbchsim - -s-11 -S-8 -n10 -R106 -N2 - -s-11 -S-8 -n10 -o8000 -I -R106 - -s-11 -S-8 -n10 -R106 -c6 - test1 test2 test3 - PBCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_pbchsim Test cases. (Test1: PBCH-only, 217 PRB), - (Test2: PBCH and synchronization, 217 RPB) - nr_pbchsim - -s-10 -S-8 -n10 -R217 - -s-10 -S-8 -n10 -o8000 -I -R217 - test1 test2 - PBCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_pbchsim Test cases. (Test1: PBCH-only, 273 PRB), - (Test2: PBCH and synchronization, 273 PRB) - nr_pbchsim - -s-10 -S-8 -n10 -R273 - -s-10 -S-8 -n10 -o8000 -I -R273 - test1 test2 - PBCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_pbchsim Test cases. (Test1: PBCH-only, 15Khz, 5Mhz), - (Test2: PBCH-only, 120Khz, 50Mhz) - nr_pbchsim - -s-10 -S-8 -n10 -m0 -R25 - -s-10 -S-8 -n10 -m3 -R32 - test1 test2 - PBCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_dlsim Test cases. (Test1: 106 PRB), - (Test2: 217 PRB), - (Test3: 273 PRB), - (Test4: HARQ test 25% TP 4 rounds), - (Test5: HARQ test 33% TP 3 rounds), - (Test6: HARQ test 50% TP 2 rounds), - (Test7: 25 PRBs, 15 kHz SCS), - (Test8: 32 PRBs, 120 kHz SCS) - nr_dlsim - -n100 -R106 -b106 -s5 - -n100 -R217 -b217 -s5 - -n100 -R273 -b273 -s5 - -n100 -s1 -S2 -t25 - -n100 -s1 -S2 -t33 - -n100 -s5 -S7 -t50 - -n100 -m0 -e0 -R25 -b25 -i 2 1 0 - -n100 -s5 -m3 -R32 -b32 - test1 test2 test3 test4 test5 test6 test7 test8 - PDSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_dlsim Test cases. (Test1: 106 PRB 25 PDSCH-Offset), - (Test2: 106 PRB 51 PDSCH-Offset), - (Test3: 217 PRB 100 PDSCH-PRBs), - (Test4: 217 PRB 80 PDSCH-Offset), - (Test5: 217 PRB 100 PDSCH-PRBs 110 PDSCH-Offset) - nr_dlsim - -n100 -R106 -a25 -s5 - -n100 -R106 -a51 -s5 - -n100 -R217 -b100 -s5 - -n100 -R217 -a80 -s5 - -n100 -R217 -a110 -s5 -b100 - test1 test2 test3 test4 test5 - PDSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_dlsim Test cases. (Test1: 106 PRBs 50 PDSCH-PRBs MCS Index 27), - (Test2: 106 PRBs 50 PDSCH-PRBs MCS Index 16), - (Test3: 106 MCS-TABLE 256 QAM MCS Index 26), - (Test4: MCS 0, low SNR performance), - (Test5: 4x4 MIMO, 1 Layer), - (Test6: 4x4 MIMO, 2 Layers), - (Test7: 4x4 MIMO, 4 Layers) - nr_dlsim - -n100 -e27 -s30 - -n100 -e16 -s11 -S13 - -n100 -q1 -e26 -s30 - -n100 -e0 -t95 -S-1.0 -i 2 1 0 - -n10 -s20 -U 3 0 0 2 -gA -x1 -y4 -z4 - -n10 -s20 -U 3 0 0 2 -gA -x2 -y4 -z4 - -n10 -s20 -U 3 0 0 2 -x4 -y4 -z4 - test1 test2 test3 test4 test5 test6 test7 - PDSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_dlsim Test cases. (Test1: 3 PTRS, 8 Interpolated Symbols), - (Test2: 6 PTRS, 5 Interpolated Symbols), - (Test3: 11 PTRS, 0 Interpolated Symbols), - (Test4: Mapping type A, 2 DMRS Symbols), - (Test5: Mapping type A, 3 DMRS Symbols), - (Test6: Mapping type B, 4 DMRS Symbols) - nr_dlsim - -n100 -s5 -T 2 2 2 - -n100 -s5 -T 2 1 2 - -n100 -s5 -T 2 0 4 - -n100 -s5 -S7 -U 2 0 1 - -n100 -s5 -S7 -U 2 0 2 - -n100 -s5 -S7 -U 2 1 3 - test1 test2 test3 test4 test5 test6 - PDSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_dlschsim Test cases. (Test1: 106 PRB), - (Test2: 217 PRB), - (Test3: 273 PRB) - nr_dlschsim - -R 106 -m9 -s13 -n100 - -R 217 -m15 -s15 -n100 - -R 273 -m19 -s20 -n100 - test1 test2 test3 - PDSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - shortblocktest Test cases. (Test1: 3 bits), - (Test2: 6 bits), - (Test3: 7 bits), - (Test4: 11 bits) - smallblocktest - -l 3 -s -4 -d 1 -i 10000 - -l 6 -s -4 -d 1 -i 10000 - -l 7 -s -4 -d 1 -i 10000 - -l 11 -s -4 -d 1 -i 10000 - test1 test2 test3 test4 - BLER= 0.000000 - segmentation fault|assertion|exiting|fatal - 3 - - - - - nr_ulschsim Test cases. (Test1: 106 PRBs), - (Test2: 217 PRBs), - (Test3: 273 PRBs) - (Test4: 106 PRBs 4-layer MIMO) - nr_ulschsim - -R 106 -m9 -s13 -n100 - -R 217 -m15 -s15 -n100 - -R 273 -m19 -s20 -n100 - -R 106 -m9 -s13 -n100 -y4 -z4 -W4 - test1 test2 test3 test4 - PUSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_pucchsim Test cases. (Test1: Format 0 1-bit ACK miss 106 PRB), - (Test2: Format 0 2-bit ACK miss 106 PRB), - (Test3: Format 0 2-bit ACK miss, 1-bit SR 106 PRB), - (Test4: Format 2 3-bit 2/106 PRB), - (Test5: Format 2 4-bit 2/106 PRB), - (Test6: Format 2 5-bit 2/106 PRB), - (Test7: Format 2 6-bit 2/106 PRB), - (Test8: Format 2 7-bit 2/106 PRB), - (Test9: Format 2 8-bit 2/106 PRB), - (Test10: Format 2 9-bit 2/106 PRB), - (Test11: Format 2 10-bit 2/106 PRB), - (Test12: Format 2 11-bit 2/106 PRB), - (Test13: Format 2 12-bit 4/106 PRB), - (Test14: Format 2 19-bit 4/106 PRB), - (Test15: Format 2 12-bit 8/106 PRB), - (Test16: Format 2 19-bit 8/106 PRB), - (Test17: Format 2 32-bit 8/106 PRB), - (Test18: Format 2 32-bit 16/106 PRB), - (Test19: Format 2 64-bit 16/106 PRB), - (Test20: Format 0 1-bit Ack miss 273 PRB), - (Test21: Format 0 2-bit Ack miss 273 PRB), - (Test22: Format 0 2-bit Ack miss+SR 273 PRB), - (Test23: Format 2 4-bit 2/273 PRB), - (Test24: Format 2 7-bit 2/273 PRB), - (Test25: Format 2 11-bit 2/273 PRB), - (Test26: Format 2 12-bit 8/273 PRB), - (Test27: Format 2 19-bit 8/273 PRB), - (Test28: Format 2 64-bit 16/273 PRB), - (Test29: Format 2 64-bit 16/273 PRB Delay 2us) - nr_pucchsim - -R 106 -i 1 -P 0 -b 1 -s-2 -n1000 - -R 106 -i 1 -P 0 -b 2 -s-2 -n1000 - -R 106 -i 1 -P 0 -b 2 -s-2 -c -n1000 - -R 106 -i 1 -P 2 -b 3 -s0 -n1000 - -R 106 -i 1 -P 2 -b 4 -s0 -n1000 - -R 106 -i 1 -P 2 -b 5 -s1 -n1000 - -R 106 -i 1 -P 2 -b 6 -s2 -n1000 - -R 106 -i 1 -P 2 -b 7 -s3 -n1000 - -R 106 -i 1 -P 2 -b 8 -s4 -n1000 - -R 106 -i 1 -P 2 -b 9 -s5 -n1000 - -R 106 -i 1 -P 2 -b 10 -s6 -n1000 - -R 106 -i 1 -P 2 -b 11 -s6 -n1000 - -R 106 -i 1 -P 2 -q4 -b 12 -s-3 -n1000 - -R 106 -i 1 -P 2 -q4 -b 19 -s-3 -n1000 - -R 106 -i 1 -P 2 -q8 -b 12 -s-3 -n1000 - -R 106 -i 1 -P 2 -q8 -b 19 -s-3 -n1000 - -R 106 -i 1 -P 2 -q8 -b 32 -s-3 -n1000 - -R 106 -i 1 -P 2 -q16 -b 32 -s-3 -n1000 - -R 106 -i 1 -P 2 -q16 -b 64 -s-3 -n1000 - -R 273 -z8 -i 1 -P 0 -b 1 -s-2 -n1000 - -R 273 -z8 -i 1 -P 0 -b 2 -s-2 -n1000 - -R 273 -z8 -i 1 -P 0 -b 2 -s-2 -c -n1000 - -R 273 -z8 -i 1 -P 2 -b 4 -s-10 -n1000 - -R 273 -z8 -i 1 -P 2 -b 7 -s3 -n1000 - -R 273 -z8 -i 1 -P 2 -b 11 -s6 -n1000 - -R 273 -z8 -i 1 -P 2 -q8 -b 12 -s-3 -n1000 - -R 273 -z8 -i 1 -P 2 -q8 -b 19 -s-3 -n1000 - -R 273 -z8 -i 1 -P 2 -q16 -b 64 -s-3 -n1000 - -R 273 -z8 -i 1 -P 2 -q16 -b 64 -s-3 -d 2 -n1000 - test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 - PUCCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - - dlsim_tm4 test cases (Test 1: 10 MHz, R2.FDD (MCS 5), EVA5, -1dB), - (Test 5: 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)), - (Test 6, 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)), - (Test 6b, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)), - (Test 7, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)), - (Test 7b, 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)), - (Test 10, 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)), - (Test 10b, 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)), - (Test 11, 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)) - (TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)), - (TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)), - - $OPENAIR_DIR/cmake_targets/lte-simulators/build/dlsim_tm4 - -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 - -m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O70 - -m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 - -m14 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70 - -m15 -gG -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O30 - -m14 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O30 - -m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70 - -m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O70 - -m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 - -m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O70 - -m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O70 - test1 test5 test6 test6b test7 test7b test10 test10b test11 TM2_test1 TM2_test1b - "passed" - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_ulsim Test cases. (Test1: MCS 9 106 PRBs), - (Test2: MCS 16 50 PRBs), - (Test3: MCS 28 50 PRBs), - (Test4: MCS 27 50 PRBs 256QAM), - (Test5: MCS 9 217 PRBs), - (Test6: MCS 9 273 PRBs), - (Test7: PUSCH Type A, 2 DMRS Symbols), - (Test8: PUSCH Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols), - (Test9: PUSCH Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols), - (Test10: PUSCH Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols), - (Test11: 25 PRBs, 15 kHz SCS), - (Test12: 32 PRBs, 120 kHz SCS), - (Test13: MCS 0, low SNR performance) - (Test14: MCS 28, 106 PRBs, Time shift 8) - (Test15: SRS, SNR 40 dB) - nr_ulsim - -n100 -m9 -r106 -s5 - -n100 -m16 -s10 - -n100 -m28 -s20 - -n100 -m27 -s25 -q1 - -n100 -m9 -R217 -r217 -s5 - -n100 -m9 -R273 -r273 -s5 - -n100 -s5 -U 0,1,1,1 - -n100 -s5 -T 1,2 -U 0,2,1,1 - -n100 -s5 -T 2,2 -U 1,2,1,1 - -n100 -s5 -a4 -b8 -T 1,2 -U 1,3,1,1 - -n100 -u0 -m0 -R25 -r25 -i 1,0 - -n100 -s5 -r32 -R32 -u3 - -n100 -m0 -S -0.6 -i 1,0 - -n100 -m 28 -R106 -r106 -t90 -s24 -S24 -d 8 - -n100 -s40 -E 1 - test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 - PUSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_ulsim Test cases. (Test1: SC-FDMA, 50 PRBs), - (Test2: SC-FDMA, 75 PRBs), - (Test3: SC-FDMA, 216 PRBs), - (Test4: SC-FDMA, 273 PRBs), - (Test5: SC-FDMA, 3 DMRS) - nr_ulsim - -n100 -s5 -Z - -n100 -s5 -Z -r75 - -n50 -s5 -Z -r216 -R217 - -n50 -s5 -Z -r270 -R273 - -n100 -s5 -Z -U 0,2,1,2 - test1 test2 test3 test4 test5 - PUSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_ulsim Test cases. (Test1: MCS 19 50 PRBs 2 RX_Antenna), - (Test2: MCS 9 106 PRBs MIMO 2 layers), - (Test3: MCS 10 106 PRBs MIMO 2 layers), - (Test4: MCS 19 106 PRBs MIMO 2 layers), - (Test5: MCS 9 106 PRBs MIMO 4 layers) - nr_ulsim - -n100 -m19 -s10 -S15 -z2 - -n100 -m9 -r106 -s8 -W2 -y2 -z2 - -n100 -m10 -r106 -s12 -W2 -y2 -z2 - -n100 -m19 -r106 -s22 -W2 -y2 -z2 - -n100 -m9 -r106 -s10 -W4 -y4 -z4 - test1 test2 test3 test4 test5 - PUSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_ulsim Test cases. (Test1: 3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test), - (Test2: 3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test), - (Test3: 3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test), - (Test4: 3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test), - (Test5: 3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test), - (Test6: 3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test), - (Test7: 3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test), - (Test8: 3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test), - (Test9: 3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test), - (Test10: 3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test), - (Test11: 3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test), - (Test12: 3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test), - (Test13: 3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test), - (Test14: 3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test), - (Test15: 3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test), - (Test16: 3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test), - (Test17: 3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test), - (Test18: 3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test), - (Test19: 3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test), - (Test20: 3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test), - (Test21: 3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test), - (Test22: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test), - (Test23: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test), - (Test24: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test), - (Test25: 3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers), - (Test26: 3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers), - (Test27: 3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers), - (Test28: 3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers) - nr_ulsim - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z2 -s12.4 -S12.4 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z4 -s8.5 -S8.5 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z8 -s5.4 -S5.4 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z2 -s12.5 -S12.5 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z4 -s8.9 -S8.9 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z8 -s5.7 -S5.7 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z2 -s12.6 -S12.6 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z4 -s8.9 -S8.9 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z8 -s5.8 -S5.8 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z2 -s12.3 -S12.3 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z4 -s8.8 -S8.8 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.7 -S5.7 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z2 -s12.5 -S12.5 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z4 -s8.6 -S8.6 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z8 -s5.6 -S5.6 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z2 -s12.5 -S12.5 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z4 -s8.6 -S8.6 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z8 -s5.6 -S5.6 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z2 -s12.5 -S12.5 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z4 -s8.7 -S8.7 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.5 -S5.5 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z2 -s13.1 -S13.1 - -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z4 -s9.2 -S9.2 - -n100 -b14 -I8 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9 - -n100 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s1.7 -S1.7 - -n100 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s-2.1 -S-2.1 - -n100 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s18.7 -S18.7 - -n100 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s11.2 -S11.2 - test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 test23 test24 test25 test26 test27 test28 - PUSCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - nr_prachsim Test cases. (Test1: 30kHz SCS, 106 PRBs, Prach format A2), - (Test2: 30kHz SCS, 217 PRBs, Prach format A2), - (Test3: 30kHz SCS, 273 PRBs, Prach format A2), - (Test4: 30kHz SCS, 106 PRBs, Prach format 0), - (Test5: 120kHz SCS, 32 PRBs, Prach format A2), - (Test6: 120kHz SCS, 66 PRBs, Prach format A2), - (Test7: 120kHz SCS, 66 PRBs, High Speed Enabled), - (Test8: 15kHz SCS, 25 PRBs) - nr_prachsim - -a -s -30 -n 100 -p 63 -R 106 - -a -s -30 -n 100 -p 63 -R 217 - -a -s -30 -n 100 -p 63 -R 273 - -a -s -30 -n 100 -p 63 -R 106 -c 4 - -a -s -30 -n 100 -p 32 -R 32 -m 3 -c52 - -a -s -30 -n 100 -p 32 -R 66 -m 3 -c52 - -a -s -30 -n 100 -R 66 -m 3 -c52 -H - -a -s -30 -n 100 -p 99 -R 25 -m 0 - test1 test2 test3 test4 test5 test6 test7 test8 - PRACH test OK - segmentation fault|assertion|exiting|fatal - 3 - - - - NR-Sidelink PSBCH test cases. (Test1: SLSS Search), - (Test2: PSBCH TxRx) - nr_psbchsim - -I - -n 10 - test1 test2 - PSBCH test OK - segmentation fault|assertion|exiting|fatal - 3 - - diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 92dce6d1cd..5e9bfaf444 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -317,6 +317,7 @@ function main() { shift 2;; -P | --phy_simulators) SIMUS_PHY=1 + CMAKE_CMD="$CMAKE_CMD -DENABLE_PHYSIM_TESTS=ON" # TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim" echo_info "Will compile dlsim, ulsim, ..." diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index e6f7c0076a..264e26d890 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -550,7 +550,6 @@ check_install_additional_tools (){ libforms-bin \ libforms-dev \ libxft-dev \ - xmlstarlet \ libpcre3-dev \ libssh-dev \ libxml2-dev" @@ -563,7 +562,6 @@ check_install_additional_tools (){ libXft-devel \ xforms \ xforms-devel \ - xmlstarlet \ pcre-devel \ libssh-devel \ libxml2-devel" diff --git a/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch b/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch index 5f55996d76..b8d09cf862 100644 --- a/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch +++ b/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch @@ -1,5 +1,5 @@ diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h -index ac5f471..bbd39fe 100644 +index ac5f471..9ebbcab 100644 --- a/fhi_lib/app/src/common.h +++ b/fhi_lib/app/src/common.h @@ -28,7 +28,7 @@ @@ -7,7 +7,7 @@ index ac5f471..bbd39fe 100644 #include -#define VERSIONX "oran_f_release_v1.0" -+#define VERSIONX "oran_f_release_v1.2" ++#define VERSIONX "oran_f_release_v1.3" #define APP_O_DU 0 #define APP_O_RU 1 @@ -164,9 +164,18 @@ index eccc4ae..b1b8f4b 100644 CPP_FLAGS_FULL := $(CPP_FLAGS) $(CPP_COMP) $(INC) $(DEF) CPP_FLAGS_FULL_SNC := $(CPP_FLAGS) $(CPP_COMP_SNC) $(INC) $(DEF) diff --git a/fhi_lib/lib/api/xran_fh_o_du.h b/fhi_lib/lib/api/xran_fh_o_du.h -index bacf597..90a42a2 100644 +index bacf597..8bd7c66 100644 --- a/fhi_lib/lib/api/xran_fh_o_du.h +++ b/fhi_lib/lib/api/xran_fh_o_du.h +@@ -141,7 +141,7 @@ extern "C" { + #define XRAN_MAX_SECTIONS_PER_SYM (XRAN_MAX_SECTIONS_PER_SLOT) /**< Max number of different sections in single slot (section may be equal to RB allocation for UE) */ + #define XRAN_MIN_SECTIONS_PER_SYM (XRAN_MIN_SECTIONS_PER_SLOT) /**< Min number of different sections in single slot (section may be equal to RB allocation for UE) */ + +-#define XRAN_MAX_FRAGMENT (4) /**< Max number of fragmentations in single symbol */ ++#define XRAN_MAX_FRAGMENT (6) /**< Max number of fragmentations in single symbol */ + #define XRAN_MAX_SET_BFWS (64) /**< Assumed 64Ant, BFP 9bit with 9K jumbo frame */ + + #define XRAN_MAX_PKT_BURST (448+4) /**< 4x14x8 symbols per ms */ @@ -1193,6 +1193,31 @@ int32_t xran_reg_physide_cb_by_dev_id(void *pHandle, xran_fh_tti_callback_fn Cb, */ int32_t xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond); diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c index 30e8e6c32e..078ef027e8 100644 --- a/common/utils/nr/nr_common.c +++ b/common/utils/nr/nr_common.c @@ -37,6 +37,7 @@ #include "nr_common.h" #include #include +#include #define C_SRS_NUMBER (64) #define B_SRS_NUMBER (4) @@ -131,8 +132,24 @@ void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out) DevAssert(in != NULL); DevAssert(out != NULL); +// Bit reversal implementation based on https://wunkolo.github.io/post/2020/11/gf2p8affineqb-bit-reversal/ +#if defined(__GFNI__) && defined(__AVX512F__) + int simde_sz = 64; + int i = 0; + int simde_bound = sz - simde_sz; + for (; i <= simde_bound; i += simde_sz) { + __m512i input = _mm512_loadu_epi8(&in[i]); + __m512i reversed = _mm512_gf2p8affine_epi64_epi8(input, _mm512_set1_epi64(0x8040201008040201), 0); + _mm512_storeu_epi8(&out[i], reversed); + } + + for (; i < sz; ++i) { + out[i] = bit_reverse_table_256[in[i]]; + } +#else for(size_t i = 0; i < sz; ++i) out[i] = bit_reverse_table_256[in[i]]; +#endif } // Reverse bits implementation based on http://graphics.stanford.edu/~seander/bithacks.html diff --git a/doc/Doxyfile b/doc/Doxyfile index a154051692..6b0b390f05 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -2133,10 +2133,8 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc_encode_parity_check.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc176_byte.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc352_byte.c \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc128_byte_128.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc224_byte.c \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8seg.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc104_byte.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/CODING/nrLDPC_encoder/ldpc320_byte_128.c \ diff --git a/doc/NR_SA_Tutorial_COTS_UE.md b/doc/NR_SA_Tutorial_COTS_UE.md index 14012339ab..5efef725c7 100644 --- a/doc/NR_SA_Tutorial_COTS_UE.md +++ b/doc/NR_SA_Tutorial_COTS_UE.md @@ -21,7 +21,7 @@ In this tutorial we describe how to configure and run a 5G end-to-end setup with Minimum hardware requirements: - Laptop/Desktop/Server for OAI CN5G and OAI gNB - - Operating System: [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/ubuntu-24.04.1-desktop-amd64.iso) + - Operating System: [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/ubuntu-24.04.2-desktop-amd64.iso) - CPU: 8 cores x86_64 @ 3.5 GHz - RAM: 32 GB - Laptop for UE @@ -63,7 +63,7 @@ sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils git clone https://github.com/EttusResearch/uhd.git ~/uhd cd ~/uhd -git checkout v4.7.0.0 +git checkout v4.8.0.0 cd host mkdir build cd build diff --git a/doc/NR_SA_Tutorial_OAI_CN5G.md b/doc/NR_SA_Tutorial_OAI_CN5G.md index eb78972d35..06490803bb 100644 --- a/doc/NR_SA_Tutorial_OAI_CN5G.md +++ b/doc/NR_SA_Tutorial_OAI_CN5G.md @@ -21,7 +21,7 @@ In this tutorial we describe how to configure and run a 5G end-to-end setup with Minimum hardware requirements: - Laptop/Desktop/Server for OAI CN5G and OAI gNB - - Operating System: [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/ubuntu-24.04.1-desktop-amd64.iso) + - Operating System: [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/ubuntu-24.04.2-desktop-amd64.iso) - CPU: 8 cores x86_64 @ 3.5 GHz - RAM: 32 GB @@ -38,7 +38,7 @@ sudo apt install -y ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc -echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin diff --git a/doc/NR_SA_Tutorial_OAI_nrUE.md b/doc/NR_SA_Tutorial_OAI_nrUE.md index 70a981174c..e5024ce053 100644 --- a/doc/NR_SA_Tutorial_OAI_nrUE.md +++ b/doc/NR_SA_Tutorial_OAI_nrUE.md @@ -21,11 +21,11 @@ In this tutorial we describe how to configure and run a 5G end-to-end setup with Minimum hardware requirements: - Laptop/Desktop/Server for OAI CN5G and OAI gNB - - Operating System: [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/ubuntu-24.04.1-desktop-amd64.iso) + - Operating System: [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/ubuntu-24.04.2-desktop-amd64.iso) - CPU: 8 cores x86_64 @ 3.5 GHz - RAM: 32 GB - Laptop for UE - - Operating System: [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/ubuntu-24.04.1-desktop-amd64.iso) + - Operating System: [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/ubuntu-24.04.2-desktop-amd64.iso) - CPU: 8 cores x86_64 @ 3.5 GHz - RAM: 8 GB - [USRP B210](https://www.ettus.com/all-products/ub210-kit/), [USRP N300](https://www.ettus.com/all-products/USRP-N300/) or [USRP X300](https://www.ettus.com/all-products/x300-kit/) @@ -51,7 +51,7 @@ sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils git clone https://github.com/EttusResearch/uhd.git ~/uhd cd ~/uhd -git checkout v4.7.0.0 +git checkout v4.8.0.0 cd host mkdir build cd build diff --git a/doc/ORAN_FHI7.2_Tutorial.md b/doc/ORAN_FHI7.2_Tutorial.md index df72be82c6..7aff02f9df 100644 --- a/doc/ORAN_FHI7.2_Tutorial.md +++ b/doc/ORAN_FHI7.2_Tutorial.md @@ -66,15 +66,16 @@ PTP enabled switches and grandmaster clock we have in are lab: We have only verified LLS-C3 configuration in our lab, i.e. using an external grandmaster, a switch as a boundary clock, and the gNB/DU and RU. We haven't -tested any RU without S-plane. Radio units we are testing/integrating: +tested any RU without S-plane. +We tested the category A radio units listed below. -|Vendor |Software Version | -|-----------------|----------------------| -|VVDN LPRU |03-v3.0.5 | -|LiteON RU |01.00.08/02.00.03 | -|Benetel 650 |RAN650-1v1.0.4-dda1bf5| -|Benetel 550 CAT-A|RAN550-1v1.0.4-605a25a| -|Foxconn RPQN |v3.1.15q.551_rc10 | +|Vendor |Software Version | +|-----------------|---------------------------------------------| +|VVDN LPRU |03-v3.0.5 | +|LiteON RU |01.00.08/02.00.03/02.00.10 | +|Benetel 650 |RAN650-1v1.0.4-dda1bf5|RAN650-1v1.2.2-2fa04bc| +|Benetel 550 |RAN550-1v1.0.4-605a25a|RAN550-1v1.2.2-2fa04bc| +|Foxconn RPQN |v3.1.15q.551_rc10 | Tested libxran releases: @@ -534,8 +535,6 @@ Contact the RU vendor and get the configuration manual to understand the below c ### Benetel 650 -**Valid only for version RAN650-1v1.0.4-dda1bf5** - The OAI configuration file [`gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf) corresponds to: - TDD pattern `DDDSU`, 2.5ms - Bandwidth 100MHz @@ -562,8 +561,6 @@ dl_ul_tuning_special_slot=0xfd00000 ### Benetel 550 -**Valid only for version RAN550-1v1.0.4-605a25a** - The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf) corresponds to: - TDD pattern `DDDDDDDSUU`, 5ms - Bandwidth 100MHz @@ -590,11 +587,11 @@ dl_tuning_special_slot=0x13b6 ### LITEON -**Verson 01.00.08** The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf) corresponds to: - TDD pattern `DDDSU`, 2.5ms - Bandwidth 100MHz -- MTU 1500 (the above mentioned LITEON version doesn't support jumbo frames) +- MTU 1500 +- MTU 9600: v02.00.10 #### RU configuration @@ -614,18 +611,16 @@ Once the RU is PTP synced, and RF state and DPD are `Ready`, write `configure te - Bandwidth - Compression Bitwidth - TX/RX attenuation +- PRACH eAxC IDs +- DU MAC address +... -After each reboot, the PRACH has to be manually configured. -To do so, please login to RU as user `root` and run below commands: +The configuration mode example: ```bash -devmem 0x80001014 32 0x00050004 -devmem 0x80001018 32 0x00070006 -devmem 0x8000201C 32 0x00000001 -``` - -If you have RU version that supports jumbo frames, please enable it as: -```bash -devmem 0x8000200C 32 0x00000001 +compression-bit 9 # set IQ bitwidth for PxSCH/PRACH +eAXC_id 4 5 6 7 # set PRACH eAxC IDs +jumboframe 1 # enable jumbo frame +... ``` ### VVDN LPRU @@ -709,7 +704,7 @@ At this stage, RU must be rebooted so the changes apply. The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4X4-foxconn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4X4-foxconn.conf) corresponds to: - TDD pattern `DDDSU`, 2.5ms - Bandwidth 100MHz -- MTU 8000 +- MTU 9600 #### RU configuration @@ -750,7 +745,7 @@ In the following, we will use these short hands: - `IF_NAME`: Physical network interface through which you can access the RU - `VLAN`: the VLAN tag as recommended by the RU vendor -- `MTU`: the MTU as specified by the RU vendor, and supported by the NIC +- `MTU`: this MTU must be higher than supported by the RU vendor due to additional ethernet header of 14 B and DPDK packet header `RTE_PKTMBUF_HEADROOM` of 128 B - `DU_U_PLANE_MAC_ADD`: DU U plane MAC address - `U_PLANE_PCI_BUS_ADD`: PCI bus address of the VF for U plane - `DU_C_PLANE_MAC_ADD`: DU C plane MAC address diff --git a/doc/physical-simulators.md b/doc/physical-simulators.md index f52b2e371d..662daa2a95 100644 --- a/doc/physical-simulators.md +++ b/doc/physical-simulators.md @@ -1,135 +1,161 @@ -This document describes the physical simulators, also called "unitary -simulators", or short "physims". +# Physical Simulators ("Physims") User Guide + +This document provides an overview and usage guide for the **physical simulators**, also referred to as **unitary +simulators** or simply **physims**, used in the OpenAirInterface (OAI) project for LTE and 5G PHY layer validation. [[_TOC_]] # Introduction -There are several unitary simulations for the physical layer, testing -individual L1 transport/control channels using Monte-Carlo simulations, for -instance: +**Unitary simulations** are standalone test programs designed to validate individual physical layer (L1) transport or +control channels. These simulations are based on **Monte Carlo techniques**, enabling statistical evaluation of +performance metrics such as block error rate (BLER), hybrid automatic repeat request (HARQ) throughput, and decoding +accuracy under various signal conditions. -- `nr_pucchsim` for 5G PUCCH, -- `nr_dlsim` for 5G DLSCH/PDSCH, -- `nr_prachsim` for 5G PRACH, -- `dlsim` for 4G DLSCH/PDSCH, etc. +Physims are essential for: -These simulators constitute the starting point for testing any new code in the -PHY layer, and are required tests to be performed before committing any new -code to the repository, in the sense that all of these should compile and -execute correctly. They provide estimates of the transport block error rates -and HARQ thoughput, DCI error rates, etc. The simulators reside in -`openair1/SIMULATION/LTE_PHY` and `openair1/SIMULATION/NR_PHY`. For instance, -`nr_dlsim` is built from `openair1/SIMULATION/NR_PHY/dlsim.c`. +* Debugging and evaluating new PHY code in isolation +* Regression testing +* Ensuring correctness before merging new contributions into the repository -Further unitary simulation of the coding subsystem components also exists in -`openair1/PHY/CODING/TESTBENCH`, e.g., `ldpctest` for encoding/decoding of -LDPC. +## Examples of Simulators -These are the simulators known to work properly and tested in CI: -- 4G: `dlsim`, `ulsim` -- 5G: `nr_dlsim`, `nr_ulsim`, `nr_dlschsim`, `nr_ulschsim`, `ldpctest`, - `nr_pbchsim`, `nr_prachsim`, `nr_pucchsim`, `polartest`, `smallblocktest`, - `nr_psbchsim` (sidelink) +| Technology | Simulators | Description | +|------------|-------------------------------------------|----------------------------------| +| 4G LTE | `dlsim`, `ulsim` | Downlink and uplink simulators | +| 5G NR | `nr_dlsim`, `nr_ulsim` | Downlink and uplink simulators | +| | `nr_dlschsim`, `nr_ulschsim` | HARQ and TB throughput tests | +| | `nr_pucchsim` | Control channel simulation | +| | `nr_pbchsim` | Broadcast channel simulation | +| | `nr_prachsim` | PRACH simulation | +| | `nr_psbchsim` | Sidelink simulation | +| Coding | `ldpctest`, `polartest`, `smallblocktest` | LDPC, Polar, and other FEC tests | -# How to run +### Source Locations -You first have to build simulators: +* 4G PHY simulators: `openair1/SIMULATION/LTE_PHY/` +* 5G PHY simulators: `openair1/SIMULATION/NR_PHY/` +* Coding unit tests: `openair1/PHY/CODING/TESTBENCH/` -```bash -cd openairinterface5g/ -. oaienv # important for the run_exec_autotests.bash script -cd cmake_targets/ -./build_oai --ninja -P -``` - -This builds the simulators in the default build directory `ran_build/build` -(all paths given here are relative to `cmake_targets/` in the root of -`openairinterface5g/`). To run all simulators in this default build directory -of above `build_oai` invocation, run the `run_exec_autotests.bash` script: -```bash -autotests/run_exec_autotests.bash -``` - -This runs all simulations as defined in `autotests/test_case_list.xml`. - -To run a group of tests, you can specify the group using `-g`. You can also -specify the build directory, after building the simulators, which, for the -default directory, is: - -```bash -autotests/run_exec_autotests.bash -g "nr_dlsim.basic" -d ran_build/build/ -``` - -This will run the `nr_dlsim.basic` group, as listed in -`autotests/test_case_list.xml`. - -## How to interpret the output - -From the output, you can see the invoked tests, its parameters, and the log files. Example: -``` -[user@oai cmake_targets]$ autotests/run_exec_autotests.bash -g "nr_dlsim.basic" -d ran_build/build/ -[...] -Test case nr_dlsim.basic match found in group -name = nr_dlsim.basic -Description = nr_dlsim Test cases. (Test1: 106 PRB), - (Test2: 217 PRB), - (Test3: 273 PRB), - (Test4: HARQ test 25% TP 4 rounds), - (Test5: HARQ test 33% TP 3 rounds), - (Test6: HARQ test 50% TP 2 rounds), - (Test7: 25 PRBs, 15 kHz SCS) -main_exec = ran_build/build//nr_dlsim -main_exec_args = -n100 -R106 -b106 -s5 - -n100 -R217 -b217 -s5 - -n100 -R273 -b273 -s5 - -n100 -s1 -S2 -t25 - -n100 -s1 -S2 -t33 - -n100 -s5 -S7 -t50 - -n100 -m0 -e0 -R25 -b25 -i 2 1 0 -search_expr_true = PDSCH test OK -search_expr_false = segmentation fault|assertion|exiting|fatal -tags = test1 test2 test3 test4 test5 test6 test7 -nruns = 3 -i = PDSCH test OK -Test1: 106 PRB -Executing test case nr_dlsim.basic.test1, Run Index = 1, Execution Log file = /home/oai/openairinterface5g/cmake_targets/autotests/log/nr_dlsim.basic/test.nr_dlsim.basic.test1.run_1 -Executing test case nr_dlsim.basic.test1, Run Index = 2, Execution Log file = /home/oai/openairinterface5g/cmake_targets/autotests/log/nr_dlsim.basic/test.nr_dlsim.basic.test1.run_2 -Executing test case nr_dlsim.basic.test1, Run Index = 3, Execution Log file = /home/oai/openairinterface5g/cmake_targets/autotests/log/nr_dlsim.basic/test.nr_dlsim.basic.test1.run_3 -[...] -nr_dlsim.basic.test1 RUN = 1 Result = PASS -nr_dlsim.basic.test1 RUN = 2 Result = PASS -nr_dlsim.basic.test1 RUN = 3 Result = PASS -execution nr_dlsim.basic.test1 {Test1: 106 PRB} Run_Result = " Run_1 =PASS Run_2 =PASS Run_3 =PASS" Result = PASS +```bash +# 5G Downlink simulator +openair1/SIMULATION/NR_PHY/dlsim.c ``` -You see: -- the `Description` of the test cases (here, 7 tests) -- the executable that is used, and the parameters (`main_exec` and - `main_exec_args`), for instance `-n100 -R106 -b106 -s5` for `Test1` -- what is the condition for a successful test -- where are the log files -- if the tests passed or not `PASS`, otherwise `FAIL` and a summary for the - three runs. +# How to Run Simulators Using `ctest` -## How to change the parameters - -You can modify the parameters in `autotests/test_case_list.xml`. To learn about -their meaning, run the simulator manually with flag `-h` ("help"). For -instance, for the above run, it would be +## Option 1: Using CMake ```bash -ran_build/build/nr_dlsim -h +cd openairinterface5g +mkdir build && cd build +cmake .. -GNinja -DENABLE_PHYSIM_TESTS=ON +ninja tests +ctest ``` -## How to change the code +## Option 2: Using the `build_oai` script -You can modify the source files to adapt to your needs. For instance, for -`nr_dlsim` above, refer to file `openair1/SIMULATION/NR_PHY/dlsim.c`. +This method simplifies the process by automatically building the simulators with ctest support. -# CI +```bash +cd openairinterface5g/cmake_targets +./build_oai --ninja --phy_simulators +cd ran_build/build +ctest +``` -These tests are run in this pipeline: -[RAN-PhySim-Cluster](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster/). +# `ctest` Usage Tips + +## Useful Options + +Use the following options to customize test execution: + +| Option | Description | +|------------------|------------------------------------------------------| +| `-R ` | Run tests matching the regex pattern (by name) | +| `-L ` | Run tests with labels matching the regex pattern | +| `-E ` | Exclude tests matching the regex pattern (by name) | +| `-LE ` | Exclude tests with labels matching the regex pattern | +| `--print-labels` | Display all available test labels | +| `-j ` | Run tests in parallel using specified number of jobs | + +For the complete list of `ctest` options, refer to the manual: + +```bash +man ctest +``` + +## Example + +```bash +# Run only NR ULSCH simulator tests, in parallel +ctest -L nr_ulsch -j 4 +``` + +# Adding a New Physim Test + +To define a new test or modify existing ones, update the following file: + +``` +openair1/PHY/CODING/tests/CMakeLists.txt +``` + +Use the `add_physim_test` macro with the following arguments: + +```cmake +add_physim_test( ) +``` + +### Arguments: + +* ``: Test generation (e.g., `4g` or `5g`) +* ``: Name of the test executable (e.g., `nr_prachsim`) +* ``: Description shown in `ctest` output, useful for categorization and indexing. +* ``: Label used for filtering tests (via `-L`), shown in the ctest output summary as a descriptive tag. +* ``: Command line options passed to the test + +### Example: + +```cmake +# add_physim_test( ) +add_physim_test(5g nr_prachsim test8 "15kHz SCS, 25 PRBs" -a -s -30 -n 300 -p 99 -R 25 -m 0) +``` + +These tests are run automatically as part of the following +pipelines: [RAN-PhySim-Cluster-4G](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster-4G/) and [RAN-PhySim-Cluster-5G](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster-5G/) + +### How to rerun failed CI tests using `ctest` + +Ctest automatically logs the failed tests in LastTestsFailed.log. This log is archived in +the CI artifacts and can be reused locally to rerun only those failed tests. + +```bash +# 1. Navigate to the build directory, build physims +cd ~/openairinterface5g/build +cmake .. -GNinja -DENABLE_PHYSIM_TESTS=ON && ninja tests + +# 2. Create ctest directory structure +ctest -N --quiet + +# 3. Unzip the test logs artifact from the CI run +unzip /path/to/test_logs_123.zip + +# 4. Copy the LastTestsFailed.log file to the expected location +cp /path/to/test_logs_123/test_logs/LastTestsFailed.log ./Testing/Temporary/ + +# 5. Rerun only the failed tests using ctest +ctest --rerun-failed +``` + +# Legacy Bash Autotest (Deprecated) + +> **Note:** Autotest script, configuration, and documentation, are no longer maintained. + +For legacy support or archival purposes, you can still find this implementation by checking out the historical tag: + +```bash +git checkout 2025.w18 +``` diff --git a/doc/tutorial_resources/oai-cn5g/conf/config.yaml b/doc/tutorial_resources/oai-cn5g/conf/config.yaml index 2a7002afe6..f18c965ed1 100644 --- a/doc/tutorial_resources/oai-cn5g/conf/config.yaml +++ b/doc/tutorial_resources/oai-cn5g/conf/config.yaml @@ -177,6 +177,7 @@ smf: - dnn: "oai" - dnn: "openairinterface" - dnn: "ims" + - dnn: "default" local_subscription_infos: - single_nssai: *embb_slice dnn: "oai" @@ -196,6 +197,12 @@ smf: 5qi: 9 session_ambr_ul: "10Gbps" session_ambr_dl: "10Gbps" + - single_nssai: *embb_slice + dnn: "default" + qos_profile: + 5qi: 9 + session_ambr_ul: "10Gbps" + session_ambr_dl: "10Gbps" upf: support_features: @@ -211,6 +218,7 @@ upf: - dnn: "oai" - dnn: "openairinterface" - dnn: "ims" + - dnn: "default" ## DNN configuration dnns: @@ -225,3 +233,7 @@ dnns: pdu_session_type: "IPV4V6" ipv4_subnet: "10.0.9.0/24" ipv6_prefix: "2001:1:2::/64" + - dnn: "default" + pdu_session_type: "IPV4V6" + ipv4_subnet: "10.0.255.0/24" + ipv6_prefix: "2001:1:2::/64" diff --git a/docker/Dockerfile.phySim.rhel9 b/docker/Dockerfile.phySim.rhel9 index a651b2b31d..e9ccf68b00 100644 --- a/docker/Dockerfile.phySim.rhel9 +++ b/docker/Dockerfile.phySim.rhel9 @@ -38,7 +38,7 @@ RUN dnf install -y libasan libubsan RUN /bin/sh oaienv && \ cd cmake_targets && \ mkdir -p log && \ - ./build_oai --phy_simulators --ninja --build-tool-opt -k10 --sanitize --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror + ./build_oai --phy_simulators --ninja --sanitize --build-tool-opt -k10 --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/opt/oai-physim/bin #start from scratch for target executable FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-physim @@ -53,41 +53,21 @@ RUN dnf update -y && \ procps-ng \ net-tools \ iputils \ + cmake \ bc \ iproute && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf WORKDIR /opt/oai-physim/bin -COPY --from=phy-sim-build \ - /oai-ran/cmake_targets/ran_build/build/dlsim \ - /oai-ran/cmake_targets/ran_build/build/nr_dlsim \ - /oai-ran/cmake_targets/ran_build/build/nr_prachsim \ - /oai-ran/cmake_targets/ran_build/build/nr_ulschsim \ - /oai-ran/cmake_targets/ran_build/build/polartest \ - /oai-ran/cmake_targets/ran_build/build/ulsim \ - /oai-ran/cmake_targets/ran_build/build/ldpctest \ - /oai-ran/cmake_targets/ran_build/build/nr_dlschsim \ - /oai-ran/cmake_targets/ran_build/build/nr_pbchsim \ - /oai-ran/cmake_targets/ran_build/build/nr_psbchsim \ - /oai-ran/cmake_targets/ran_build/build/nr_pucchsim \ - /oai-ran/cmake_targets/ran_build/build/nr_ulsim \ - /oai-ran/cmake_targets/ran_build/build/smallblocktest \ - ./ +COPY --from=phy-sim-build /opt/oai-physim/bin/ /opt/oai-physim/bin/ COPY --from=phy-sim-build \ /oai-ran/cmake_targets/ran_build/build/libcoding.so \ /lib64/liblapacke.so.3 \ - /lib64/libX11.so.6 \ - /lib64/libXpm.so.4 \ - /lib64/libxcb.so.1 \ - /lib64/libXau.so.6 \ - /lib64/libforms.so.2 \ /lib64/libblas.so.3 \ /lib64/libcblas.so.3 \ /lib64/liblapack.so.3 \ - /lib64/libexslt.so.0 \ - /lib64/libxslt.so.1 \ /usr/lib64/libasan.so.6 \ /usr/lib64/libubsan.so.1 \ /oai-ran/cmake_targets/ran_build/build/libdfts.so \ @@ -114,24 +94,11 @@ RUN ldconfig && \ /usr/local/lib/libdfts.so \ /usr/local/lib/libldpc*.so -# Copy some executables -WORKDIR /usr/bin/ - -COPY --from=phy-sim-build \ - /usr/bin/killall \ - /usr/bin/xmlstarlet \ - ./ - # Copy the relevant configuration files for phySim WORKDIR /opt/oai-physim/ COPY --from=phy-sim-build \ - /oai-ran/cmake_targets/autotests/run_exec_autotests.bash \ - /oai-ran/cmake_targets/autotests/test_case_list.xml \ - /opt/oai-physim/cmake_targets/autotests/ -COPY --from=phy-sim-build \ - /oai-ran/cmake_targets/tools/build_helper \ - /oai-ran/cmake_targets/tools/test_helper \ - /opt/oai-physim/cmake_targets/tools/ + /oai-ran/cmake_targets/ran_build/build/openair1/PHY/CODING/tests/CTestTestfile.cmake \ + /opt/oai-physim/ #CMD ["sleep", "infinity"] diff --git a/openair1/PHY/CODING/CMakeLists.txt b/openair1/PHY/CODING/CMakeLists.txt index 4eee35a2cd..e31857a4d5 100644 --- a/openair1/PHY/CODING/CMakeLists.txt +++ b/openair1/PHY/CODING/CMakeLists.txt @@ -17,20 +17,6 @@ add_library(ldpc_orig MODULE set_target_properties(ldpc_orig PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) target_link_libraries(ldpc_orig PRIVATE ldpc_segment ldpc_gen_HEADERS) -add_library(ldpc_optim MODULE - nrLDPC_decoder/nrLDPC_decoder.c - nrLDPC_encoder/ldpc_encoder_optim.c -) -set_target_properties(ldpc_optim PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) -target_link_libraries(ldpc_optim PRIVATE ldpc_segment ldpc_gen_HEADERS) - -add_library(ldpc_optim8seg MODULE - nrLDPC_decoder/nrLDPC_decoder.c - nrLDPC_encoder/ldpc_encoder_optim8seg.c -) -set_target_properties(ldpc_optim8seg PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) -target_link_libraries(ldpc_optim8seg PRIVATE ldpc_segment ldpc_gen_HEADERS) - add_library(ldpc MODULE nrLDPC_decoder/nrLDPC_decoder.c nrLDPC_encoder/ldpc_encoder_optim8segmulti.c @@ -38,13 +24,13 @@ add_library(ldpc MODULE set_target_properties(ldpc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) target_link_libraries(ldpc PRIVATE ldpc_segment ldpc_gen_HEADERS) -add_dependencies(ldpctest ldpc ldpc_orig ldpc_optim ldpc_optim8seg) -add_dependencies(nr-softmodem ldpc ldpc_orig ldpc_optim ldpc_optim8seg) -add_dependencies(nr-uesoftmodem ldpc ldpc_orig ldpc_optim ldpc_optim8seg) -add_dependencies(nr_ulsim ldpc ldpc_orig ldpc_optim ldpc_optim8seg) -add_dependencies(nr_ulschsim ldpc ldpc_orig ldpc_optim ldpc_optim8seg) -add_dependencies(nr_dlsim ldpc ldpc_orig ldpc_optim ldpc_optim8seg) -add_dependencies(nr_dlschsim ldpc ldpc_orig ldpc_optim ldpc_optim8seg) +add_dependencies(ldpctest ldpc ldpc_orig) +add_dependencies(nr-softmodem ldpc ldpc_orig) +add_dependencies(nr-uesoftmodem ldpc ldpc_orig) +add_dependencies(nr_ulsim ldpc ldpc_orig) +add_dependencies(nr_ulschsim ldpc ldpc_orig) +add_dependencies(nr_dlsim ldpc ldpc_orig) +add_dependencies(nr_dlschsim ldpc ldpc_orig) add_custom_target(nrLDPC_decoder_kernels_CL COMMAND gcc nrLDPC_decoder/nrLDPC_decoder_CL.c -dD -DNRLDPC_KERNEL_SOURCE -E -o ${CMAKE_CURRENT_BINARY_DIR}/nrLDPC_decoder_kernels_CL.clc @@ -95,3 +81,7 @@ if (ENABLE_LDPC_CUDA) endif() add_subdirectory(nrLDPC_coding) + +if(ENABLE_PHYSIM_TESTS) + add_subdirectory(tests) +endif() diff --git a/openair1/PHY/CODING/DOC/LDPCImplementation.md b/openair1/PHY/CODING/DOC/LDPCImplementation.md index 2880c45ecf..325b208a64 100644 --- a/openair1/PHY/CODING/DOC/LDPCImplementation.md +++ b/openair1/PHY/CODING/DOC/LDPCImplementation.md @@ -120,16 +120,16 @@ By default the function `int load_nrLDPClib(void)` looks for `libldpc.so`, this #### Examples of ldpc shared lib selection when running nr softmodem's: -loading `libldpc_optim8seg.so` instead of `libldpc.so`: +loading `libldpc_orig.so` instead of `libldpc.so`: ``` -./nr-softmodem -O libconfig:gnb.band78.tm1.106PRB.usrpx300.conf:dbgl5 --loader.ldpc.shlibversion _optim8seg +./nr-softmodem -O libconfig:gnb.band78.tm1.106PRB.usrpx300.conf:dbgl5 --loader.ldpc.shlibversion _orig ....................... [CONFIG] loader.ldpc.shlibversion set to default value "" [LIBCONFIG] loader.ldpc: 2/2 parameters successfully set, (1 to default value) -[CONFIG] shlibversion set to _optim8seg from command line +[CONFIG] shlibversion set to _orig from command line [CONFIG] loader.ldpc 1 options set from command line -[LOADER] library libldpc_optim8seg.so successfully loaded +[LOADER] library libldpc_orig.so successfully loaded ........................ ``` diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index 5912c9d0b4..0e0493dcc6 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -123,7 +123,7 @@ one_measurement_t test_ldpc(short max_iterations, uint8_t estimated_output[MAX_NUM_DLSCH_SEGMENTS][Kprime]; memset(estimated_output, 0, sizeof(estimated_output)); uint8_t *channel_input[MAX_NUM_DLSCH_SEGMENTS]; - uint8_t *channel_input_optim[MAX_NUM_DLSCH_SEGMENTS]; + uint8_t *channel_input_optim; // double channel_output[68 * 384]; double modulated_input[MAX_NUM_DLSCH_SEGMENTS][68 * 384] = {0}; int8_t channel_output_fixed[MAX_NUM_DLSCH_SEGMENTS][68 * 384] = {0}; @@ -265,9 +265,9 @@ one_measurement_t test_ldpc(short max_iterations, memset(test_input[j], 0, ((K + 7) & ~7) / 8); channel_input[j] = malloc16(68 * 384); memset(channel_input[j], 0, 68 * 384); - channel_input_optim[j] = malloc16(68 * 384); - memset(channel_input_optim[j], 0, 68 * 384); } + channel_input_optim = malloc16(68 * 384); + memset(channel_input_optim, 0, 68 * 384); // Fill input segments with random values for (int j = 0; j < MAX_NUM_DLSCH_SEGMENTS; j++) { @@ -282,10 +282,10 @@ one_measurement_t test_ldpc(short max_iterations, } encoder_implemparams_t impp = {.Zc = Zc, .Kb = Kb, .BG = BG, .K = K}; - impp.gen_code = 2; + impp.gen_code = 1; if (ntrials == 0) - ldpc_orig.LDPCencoder(test_input, channel_input, &impp); + ldpc_orig.LDPCencoder(test_input, channel_input[0], &impp); impp.gen_code = 0; decode_abort_t dec_abort; init_abort(&dec_abort); @@ -294,23 +294,21 @@ one_measurement_t test_ldpc(short max_iterations, //// encoder start_meas(&time); for (int j = 0; j < n_segments; j++) { - ldpc_orig.LDPCencoder(&test_input[j], &channel_input[j], &impp); + ldpc_orig.LDPCencoder(&test_input[j], channel_input[j], &impp); } stop_meas(&time); impp.n_segments = n_segments; - for (int j = 0; j < (n_segments / 8 + 1); j++) { - start_meas(&ret.time_optim); - impp.macro_num = j; - ldpc_toCompare.LDPCencoder(test_input, channel_input_optim, &impp); - stop_meas(&ret.time_optim); - } + start_meas(&ret.time_optim); + impp.first_seg = 0; + ldpc_toCompare.LDPCencoder(test_input, channel_input_optim, &impp); + stop_meas(&ret.time_optim); if (ntrials == 1) for (int j = 0; j < n_segments; j++) for (int i = 0; i < K + (nrows - no_punctured_columns) * Zc - removed_bit; i++) { - if (channel_input[j][i] != channel_input_optim[j][i]) { - printf("differ in seg %d pos %d (%u,%u)\n", j, i, channel_input[j][i], channel_input_optim[j][i]); + if (channel_input[j][i] != ((channel_input_optim[i] >> j) & 0x1)) { + printf("differ in seg %d pos %d (%u,%u)\n", j, i, channel_input[j][i], (channel_input_optim[i] >> j) & 0x1); return ret; } } @@ -322,7 +320,7 @@ one_measurement_t test_ldpc(short max_iterations, printf("\ne %d..%d: ", i, i + 15); #endif - if (channel_input_optim[j][i - 2 * Zc] == 0) + if (((channel_input_optim[i - 2 * Zc] >> j) & 0x1) == 0) modulated_input[j][i] = 1.0; /// sqrt(2); //QPSK else modulated_input[j][i] = -1.0; /// sqrt(2); @@ -332,7 +330,7 @@ one_measurement_t test_ldpc(short max_iterations, // Uncoded BER uint8_t channel_output_uncoded = channel_output_fixed[j][i] < 0 ? 1 /* QPSK demod */ : 0; - if (channel_output_uncoded != channel_input_optim[j][i - 2 * Zc]) + if (channel_output_uncoded != ((channel_input_optim[i - 2 * Zc] >> j) & 0x1)) ret.errors_bit_uncoded++; } @@ -396,8 +394,8 @@ one_measurement_t test_ldpc(short max_iterations, for (int j = 0; j < MAX_NUM_DLSCH_SEGMENTS; j++) { free(test_input[j]); free(channel_input[j]); - free(channel_input_optim[j]); } + free(channel_input_optim); print_meas(&time, "ldpc_encoder", NULL, NULL); print_meas(&ret.time_optim, "ldpc_encoder_optim", NULL, NULL); @@ -432,7 +430,7 @@ int main(int argc, char *argv[]) short max_iterations = 5; int n_segments = 1; // double rate=0.333; - + int ret = 1; int nom_rate = 1; int denom_rate = 3; double SNR0 = -2.0; @@ -618,8 +616,10 @@ int main(int argc, char *argv[]) dec_iter[i].n_iter_max); i = i + 1; - if (decoded_errors[i - 1] == 0) + if (decoded_errors[i - 1] == 0) { + ret = 0; break; + } } fclose(fd); LOG_M("ldpctestStats.m", "SNR", &dec_iter[0].snr, i, 1, 7); @@ -630,5 +630,5 @@ int main(int argc, char *argv[]) loader_reset(); logTerm(); - return (0); + return ret; } diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index beab44c689..e84a62775b 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -22,6 +22,7 @@ configmodule_interface_t *uniqCfg = NULL; int main(int argc, char *argv[]) { // Default simulation values (Aim for iterations = 1000000.) + int ret = 1; int decoder_int16 = 0; int itr, iterations = 1000, arguments, polarMessageType = 0; // 0=PBCH, 1=DCI, 2=UCI double SNRstart = -20.0, SNRstop = 0.0, SNRinc = 0.5; // dB @@ -387,8 +388,10 @@ int main(int argc, char *argv[]) (double)timeEncoder.diff / timeEncoder.trials / (get_cpu_freq_GHz() * 1000.0), (double)timeDecoder.diff / timeDecoder.trials / (get_cpu_freq_GHz() * 1000.0)); - if (blockErrorCumulative == 0 && bitErrorCumulative == 0) + if (blockErrorCumulative == 0 && bitErrorCumulative == 0) { + ret = 0; break; + } blockErrorCumulative = 0; bitErrorCumulative = 0; @@ -398,5 +401,5 @@ int main(int argc, char *argv[]) print_meas(&timeDecoder, "polar_decoder", NULL, NULL); if (logFlag) fclose(logFile); - return (0); + return ret; } diff --git a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c index 3759b1eab7..a701a49d1a 100644 --- a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c +++ b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c @@ -15,6 +15,7 @@ int main(int argc, char *argv[]) reset_meas(&timeDecoder); randominit(0); + int ret = 1; int arguments, iterations = 1000, messageLength = 11; // int matlabDebug = 0; uint32_t testInput, encoderOutput, codingDifference, nBitError = 0, blockErrorState = 0, blockErrorCumulative = 0, @@ -86,6 +87,8 @@ int main(int argc, char *argv[]) uint16_t mask = 0x07ff >> (11 - messageLength); for (SNR = SNRstart; SNR <= SNRstop; SNR += SNRinc) { + blockErrorCumulative = 0; + bitErrorCumulative = 0; printf("SNR %f\n", SNR); SNR_lin = pow(10, SNR / 10.0); sigma = 1.0 / sqrt(SNR_lin); @@ -161,13 +164,14 @@ int main(int argc, char *argv[]) ((double)blockErrorCumulative / iterations), ((double)timeEncoder.diff / timeEncoder.trials) / (get_cpu_freq_GHz()), ((double)timeDecoder.diff / timeDecoder.trials) / (get_cpu_freq_GHz() * 1000.0)); - - blockErrorCumulative = 0; - bitErrorCumulative = 0; } print_meas(&timeEncoder, "smallblock_encoder", NULL, NULL); print_meas(&timeDecoder, "smallblock_decoder", NULL, NULL); - return (0); + if (blockErrorCumulative == 0) { + ret = 0; + } + + return ret; } diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h index 7544f8cf55..ca57c9bab3 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h @@ -140,9 +140,7 @@ typedef struct nrLDPC_slot_decoding_parameters_s{ * \struct nrLDPC_segment_encoding_parameters_s * \brief encoding parameter of segments * \var E input llr segment size - * \var output input llr segment array * \var c Pointers to code blocks before LDPC encoding (38.212 V15.4.0 section 5.2.2) - * flag indicating that the decoding of the segment was successful * IT MUST BE FILLED BY THE IMPLEMENTATION * \var ts_interleave interleaving time stats * \var ts_rate_match rate matching time stats @@ -150,7 +148,6 @@ typedef struct nrLDPC_slot_decoding_parameters_s{ */ typedef struct nrLDPC_segment_encoding_parameters_s{ int E; - unsigned char *output; uint8_t *c; time_stats_t ts_interleave; time_stats_t ts_rate_match; @@ -179,6 +176,7 @@ typedef struct nrLDPC_segment_encoding_parameters_s{ * \var F filler bits size * \var C number of segments * \var segments array of segments parameters + * \var output input llr TB array */ typedef struct nrLDPC_TB_encoding_parameters_s{ @@ -202,6 +200,7 @@ typedef struct nrLDPC_TB_encoding_parameters_s{ uint32_t C; nrLDPC_segment_encoding_parameters_t *segments; + unsigned char *output; } nrLDPC_TB_encoding_parameters_t; /** diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c index b51712ed71..5d0e90e46b 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c @@ -41,12 +41,184 @@ #include -// #define DEBUG_LDPC_ENCODING -// #define DEBUG_LDPC_ENCODING_FREE 1 +#define DEBUG_LDPC_ENCODING +//#define DEBUG_LDPC_ENCODING_FREE 1 +/** + * \brief write nrLDPC_coding_segment_encoder output with interleaver output + * the interleaver output has 8 bits from 8 different segments per byte + * nrLDPC_coding_segment_encoder is made of concatenated packed segments + * \param f input interleaved segment, 8 bits from 8 segments per byte + * \param E number of bits per segment in f + * \param f2 input interleaved segment, 8 bits from 8 segments per byte + * interleaved with E2 if there was a E shift in the segment group + * \param E2 number of bits per segment in f2 + * \param Eshift flag indicating if there was a E shift within the segment group + * \param E2_first_segment index of the first segment of size E2 if there is a E shift in the segment group + * \param nb_segments number of segments in the group + * \param output nrLDPC_coding_segment_encoder with concatenated segments and packed bits + * \param Eoffset offset in number of bits of the first segment of the segment group within output + */ +static void write_task_output(uint8_t *f, + uint32_t E, + uint8_t *f2, + uint32_t E2, + bool Eshift, + uint32_t E2_first_segment, + uint32_t nb_segments, + uint8_t *output, + uint32_t Eoffset) +{ + +#if defined(__AVX512VBMI__) + uint64_t *output_p = (uint64_t*)output; + __m512i inc = _mm512_set1_epi8(0x1); + + for (int i=0;i>/<< because when the Eoffset2_bit is 64 or 0, the << + // and >> operations are undefined and in fact don't give "0" which is + // what we want here. The SIMD version do give 0 when the shift is 64 + uint32_t Eoffset2_byte = Eoffset2 >> 6; + uint32_t Eoffset2_bit = Eoffset2 & 63; + __m64 tmp = (__m64)_mm512_bitshuffle_epi64_mask(((__m512i *)f)[i >> 6],bitperm); + *(__m64*)(output_p + Eoffset2_byte) = _mm_or_si64(*(__m64*)(output_p + Eoffset2_byte),_mm_slli_si64(tmp,Eoffset2_bit)); + *(__m64*)(output_p + Eoffset2_byte+1) = _mm_or_si64(*(__m64*)(output_p + Eoffset2_byte+1),_mm_srli_si64(tmp,(64-Eoffset2_bit))); + Eoffset2 += E; + bitperm = _mm512_add_epi8(bitperm ,inc); + } + } else { + for (int j=0; j < E2_first_segment; j++) { + Eoffset2 += E; + bitperm = _mm512_add_epi8(bitperm ,inc); + } + } + for (int j=E2_first_segment; j < nb_segments; j++) { + uint32_t Eoffset2_byte = Eoffset2 >> 6; + uint32_t Eoffset2_bit = Eoffset2 & 63; + __m64 tmp = (__m64)_mm512_bitshuffle_epi64_mask(((__m512i *)f2)[i >> 6],bitperm); + *(__m64*)(output_p + Eoffset2_byte) = _mm_or_si64(*(__m64*)(output_p + Eoffset2_byte),_mm_slli_si64(tmp,Eoffset2_bit)); + *(__m64*)(output_p + Eoffset2_byte+1) = _mm_or_si64(*(__m64*)(output_p + Eoffset2_byte+1),_mm_srli_si64(tmp,(64-Eoffset2_bit))); + Eoffset2 += E2; + bitperm = _mm512_add_epi8(bitperm ,inc); + } + output_p++; + } + +#elif defined(__aarch64__) + uint16_t *output_p = (uint16_t*)output; + const int8_t __attribute__ ((aligned (16))) ucShift[8][16] = { + {0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7}, // segment 0 + {-1,0,1,2,3,4,5,6,-1,0,1,2,3,4,5,6}, // segment 1 + {-2,-1,0,1,2,3,4,5,-2,-1,0,1,2,3,4,5}, // segment 2 + {-3,-2,-1,0,1,2,3,4,-3,-2,-1,0,1,2,3,4}, // segment 3 + {-4,-3,-2,-1,0,1,2,3,-4,-3,-2,-1,0,1,2,3}, // segment 4 + {-5,-4,-3,-2,-1,0,1,2,-5,-4,-3,-2,-1,0,1,2}, // segment 5 + {-6,-5,-4,-3,-2,-1,0,1,-6,-5,-4,-3,-2,-1,0,1}, // segment 6 + {-7,-6,-5,-4,-3,-2,-1,0,-7,-6,-5,-4,-3,-2,-1,0}}; // segment 7 + const uint8_t __attribute__ ((aligned (16))) masks[16] = + {0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80}; + int8x16_t vshift[8]; + for (int n=0;n<8;n++) vshift[n] = vld1q_s8(ucShift[n]); + uint8x16_t vmask = vld1q_u8(masks); + + for (int i=0;i> 4; + uint32_t Eoffset2_bit = Eoffset2 & 15; + uint8x16_t cshift = vandq_u8(vshlq_u8(((uint8x16_t*)f)[i >> 4],vshift[j]),vmask); + int32_t tmp = (int)vaddv_u8(vget_low_u8(cshift)); + tmp += (int)(vaddv_u8(vget_high_u8(cshift))<<8); + *(output_p + Eoffset2_byte) |= (uint16_t)(tmp<>(16-Eoffset2_bit)); + Eoffset2 += E; + } + } else { + for (int j=0; j < E2_first_segment; j++) { + Eoffset2 += E; + } + } + for (int j=E2_first_segment; j < nb_segments; j++) { + uint32_t Eoffset2_byte = Eoffset2 >> 4; + uint32_t Eoffset2_bit = Eoffset2 & 15; + uint8x16_t cshift = vandq_u8(vshlq_u8(((uint8x16_t*)f2)[i >> 4],vshift[j]),vmask); + int32_t tmp = (int)vaddv_u8(vget_low_u8(cshift)); + tmp += (int)(vaddv_u8(vget_high_u8(cshift))<<8); + *(output_p + Eoffset2_byte) |= (uint16_t)(tmp<>(16-Eoffset2_bit)); + Eoffset2 += E2; + } + output_p++; + } + +#else + uint32_t *output_p = (uint32_t*)output; + + for (int i=0; i < E2; i += 32) { + uint32_t Eoffset2 = Eoffset; + if (i < E) { + for (int j = 0; j < E2_first_segment; j++) { + // Note: Here and below, we are using the 64-bit SIMD instruction + // instead of C >>/<< because when the Eoffset2_bit is 64 or 0, the << + // and >> operations are undefined and in fact don't give "0" which is + // what we want here. The SIMD version do give 0 when the shift is 64 + uint32_t Eoffset2_byte = Eoffset2 >> 5; + uint32_t Eoffset2_bit = Eoffset2 & 31; + int tmp = _mm256_movemask_epi8(_mm256_slli_epi16(((__m256i *)f)[i >> 5], 7 - j)); + __m64 tmp64 = _mm_set1_pi32(tmp); + __m64 out64 = _mm_set_pi32(*(output_p + Eoffset2_byte + 1), *(output_p + Eoffset2_byte)); + __m64 tmp64b = _mm_or_si64(out64, _mm_slli_pi32(tmp64, Eoffset2_bit)); + __m64 tmp64c = _mm_or_si64(out64, _mm_srli_pi32(tmp64, (32 - Eoffset2_bit))); + *(output_p + Eoffset2_byte) = _m_to_int(tmp64b); + *(output_p + Eoffset2_byte + 1) = _m_to_int(_mm_srli_si64(tmp64c, 32)); + Eoffset2 += E; + } + } else { + for (int j = 0; j < E2_first_segment; j++) { + Eoffset2 += E; + } + } + for (int j = E2_first_segment; j < nb_segments; j++) { + uint32_t Eoffset2_byte = Eoffset2 >> 5; + uint32_t Eoffset2_bit = Eoffset2 & 31; + int tmp = _mm256_movemask_epi8(_mm256_slli_epi16(((__m256i *)f2)[i >> 5], 7 - j)); + __m64 tmp64 = _mm_set1_pi32(tmp); + __m64 out64 = _mm_set_pi32(*(output_p + Eoffset2_byte + 1), *(output_p + Eoffset2_byte)); + __m64 tmp64b = _mm_or_si64(out64, _mm_slli_pi32(tmp64, Eoffset2_bit)); + __m64 tmp64c = _mm_or_si64(out64, _mm_srli_pi32(tmp64, (32 - Eoffset2_bit))); + *(output_p + Eoffset2_byte) = _m_to_int(tmp64b); + *(output_p + Eoffset2_byte + 1) = _m_to_int(_mm_srli_si64(tmp64c, 32)); + Eoffset2 += E2; + } + output_p++; + } + + +#endif +} + +/** + * \typedef ldpc8blocks_args_t + * \struct ldpc8blocks_args_s + * \brief Arguments of an encoding task + * encode up to 8 code blocks + * \var nrLDPC_TB_encoding_parameters TB encoding parameters as defined in the coding library interface + * \var impp encoder implementation specific parameters for the task + * \var f first interleaver output to be filled by the task + * \var f2 second interleaver output to be filled by the task + * in case of a shift of E in the code blocks group processed by the task + */ typedef struct ldpc8blocks_args_s { nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters; encoder_implemparams_t impp; + uint8_t *f; + uint8_t *f2; } ldpc8blocks_args_t; static void ldpc8blocks(void *p) @@ -64,156 +236,214 @@ static void ldpc8blocks(void *p) // nrLDPC_encoder output is in "d" // let's make this interface happy! - uint8_t tmp[8][68 * 384] __attribute__((aligned(32))); - uint8_t *d[impp->n_segments]; - for (int rr = impp->macro_num * 8, i = 0; rr < impp->n_segments && rr < (impp->macro_num + 1) * 8; rr++, i++) - d[rr] = tmp[i]; - + uint8_t d[68 * 384] __attribute__((aligned(64))); uint8_t *c[nrLDPC_TB_encoding_parameters->C]; + unsigned int macro_segment, macro_segment_end; + + + macro_segment = impp->first_seg; + macro_segment_end = (impp->n_segments > impp->first_seg + 8) ? impp->first_seg + 8 : impp->n_segments; for (int r = 0; r < nrLDPC_TB_encoding_parameters->C; r++) c[r] = nrLDPC_TB_encoding_parameters->segments[r].c; - start_meas(&nrLDPC_TB_encoding_parameters->segments[impp->macro_num * 8].ts_ldpc_encode); + start_meas(&nrLDPC_TB_encoding_parameters->segments[impp->first_seg].ts_ldpc_encode); LDPCencoder(c, d, impp); - stop_meas(&nrLDPC_TB_encoding_parameters->segments[impp->macro_num * 8].ts_ldpc_encode); + stop_meas(&nrLDPC_TB_encoding_parameters->segments[impp->first_seg].ts_ldpc_encode); // Compute where to place in output buffer that is concatenation of all segments - uint32_t r_offset = 0; - for (int i = 0; i < impp->macro_num * 8; i++) - r_offset += nrLDPC_TB_encoding_parameters->segments[i].E; - for (int rr = impp->macro_num * 8; rr < impp->n_segments && rr < (impp->macro_num + 1) * 8; rr++) { - if (impp->F > 0) { - // writing into positions d[r][k-2Zc] as in clause 5.3.2 step 2) in 38.212 - memset(&d[rr][impp->K - impp->F - 2 * impp->Zc], NR_NULL, impp->F); - } - #ifdef DEBUG_LDPC_ENCODING - LOG_D(PHY, "rvidx in encoding = %d\n", rel15->rvIndex[0]); + LOG_D(PHY, "rvidx in encoding = %d\n", nrLDPC_TB_encoding_parameters->rv_index); #endif - uint32_t E = nrLDPC_TB_encoding_parameters->segments[rr].E; - LOG_D(NR_PHY, - "Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Filler bits %d, Filler offset %d mod_order %d, nb_rb " + const uint32_t E = nrLDPC_TB_encoding_parameters->segments[macro_segment].E; + uint32_t E2=E; + bool Eshift=false; + uint32_t Emax = E; + for (int s=macro_segment;ssegments[s].E != E) { + E2=nrLDPC_TB_encoding_parameters->segments[s].E; + Eshift=true; + if(E2 > Emax) + Emax = E2; + break; + } + + + LOG_D(NR_PHY, + "Rate Matching, Code segment %d...%d/%d (coded bits (G) %u, E %d, E2 %d Filler bits %d, Filler offset %d mod_order %d, nb_rb " "%d,nrOfLayer %d)...\n", - rr, + macro_segment, + macro_segment_end, + impp->n_segments, + G, + E,E2, + impp->F, + impp->K - impp->F - 2 * impp->Zc, + mod_order, + nb_rb, + nrLDPC_TB_encoding_parameters->nb_layers); +/* + printf("Rate Matching, Code segment %d...%d/%d (coded bits (G) %u, E %d, E2 %d Filler bits %d, Filler offset %d mod_order %d, nb_rb " + "%d,nrOfLayer %d)...\n", + macro_segment, + macro_segment_end, + impp->n_segments, + G, + E,E2, + impp->F, + impp->K - impp->F - 2 * impp->Zc, + mod_order, + nb_rb, + nrLDPC_TB_encoding_parameters->nb_layers); +*/ + uint32_t Tbslbrm = nrLDPC_TB_encoding_parameters->tbslbrm; + + uint8_t e[Emax] __attribute__((aligned(64))); + // Interleaver outputs are stored in the output arrays + uint8_t *f = args->f; + uint8_t *f2 = args->f2; + bzero(e, Emax); + bzero(f, ceil_mod(E, 64)); + if (Eshift) { + bzero(f2, ceil_mod(E2, 64)); + } + start_meas(&nrLDPC_TB_encoding_parameters->segments[macro_segment].ts_rate_match); + nr_rate_matching_ldpc(Tbslbrm, + impp->BG, + impp->Zc, + d, + e, + impp->n_segments, + impp->F, + impp->K - impp->F - 2 * impp->Zc, + nrLDPC_TB_encoding_parameters->rv_index, + Emax); + + stop_meas(&nrLDPC_TB_encoding_parameters->segments[macro_segment].ts_rate_match); + if (impp->K - impp->F - 2 * impp->Zc > E) { + LOG_E(PHY, + "dlsch coding A %d Kr %d G %d (nb_rb %d, mod_order %d)\n", + A, + impp->K, + G, + nb_rb, + (int)mod_order); + + LOG_E(NR_PHY, + "Rate Matching, Code segments %d...%d/%d (coded bits (G) %u, E %d, Kr %d, Filler bits %d, Filler offset %d mod_order %d, " + "nb_rb %d)...\n", + macro_segment, + macro_segment_end, impp->n_segments, G, E, + impp->K, impp->F, impp->K - impp->F - 2 * impp->Zc, mod_order, - nb_rb, - nrLDPC_TB_encoding_parameters->nb_layers); - - uint32_t Tbslbrm = nrLDPC_TB_encoding_parameters->tbslbrm; - - uint8_t e[E]; - bzero(e, E); - start_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_rate_match); - nr_rate_matching_ldpc(Tbslbrm, - impp->BG, - impp->Zc, - d[rr], - e, - impp->n_segments, - impp->F, - impp->K - impp->F - 2 * impp->Zc, - nrLDPC_TB_encoding_parameters->rv_index, - E); - stop_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_rate_match); - if (impp->K - impp->F - 2 * impp->Zc > E) { - LOG_E(PHY, "dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)\n", A, impp->K, G, nb_rb, (int)mod_order); - - LOG_E(NR_PHY, - "Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, K %d, Filler bits %d, Filler offset %d mod_order %d, " - "nb_rb %d)...\n", - rr, - impp->n_segments, - G, - E, - impp->K, - impp->F, - impp->K - impp->F - 2 * impp->Zc, - mod_order, - nb_rb); - } -#ifdef DEBUG_LDPC_ENCODING - - for (int i = 0; i < 16; i++) - printf("output ratematching e[%d]= %d r_offset %u\n", i, e[i], r_offset); - -#endif - start_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_interleave); - nr_interleaving_ldpc(E, mod_order, e, impp->output + r_offset); - stop_meas(&nrLDPC_TB_encoding_parameters->segments[rr].ts_interleave); -#ifdef DEBUG_LDPC_ENCODING - - for (int i = 0; i < 16; i++) - printf("output interleaving f[%d]= %d r_offset %u\n", i, impp->output[i + r_offset], r_offset); - - if (r == impp->n_segments - 1) - write_output("enc_output.m", "enc", impp->output, G, 1, 4); - -#endif - r_offset += E; + nb_rb); } + start_meas(&nrLDPC_TB_encoding_parameters->segments[macro_segment].ts_interleave); + nr_interleaving_ldpc(E, + mod_order, + e, + f); + if (Eshift) + nr_interleaving_ldpc(E2, + mod_order, + e, + f2); + stop_meas(&nrLDPC_TB_encoding_parameters->segments[macro_segment].ts_interleave); - // Task running in // completed completed_task_ans(impp->ans); } -static int nrLDPC_prepare_TB_encoding(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters, +static int nrLDPC_launch_TB_encoding(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters, int dlsch_id, - thread_info_tm_t *t_info) + thread_info_tm_t *t_info, + uint8_t **f, + uint8_t **f2) { nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id]; - encoder_implemparams_t impp = {0}; + encoder_implemparams_t common_segment_params = { + .n_segments = nrLDPC_TB_encoding_parameters->C, + .tinput = nrLDPC_slot_encoding_parameters->tinput, + .tprep = nrLDPC_slot_encoding_parameters->tprep, + .tparity = nrLDPC_slot_encoding_parameters->tparity, + .toutput = nrLDPC_slot_encoding_parameters->toutput, + .Kb = nrLDPC_TB_encoding_parameters->Kb, + .Zc = nrLDPC_TB_encoding_parameters->Z, + .BG = nrLDPC_TB_encoding_parameters->BG, + .output = nrLDPC_TB_encoding_parameters->output, + .K = nrLDPC_TB_encoding_parameters->K, + .F = nrLDPC_TB_encoding_parameters->F, + }; - impp.n_segments = nrLDPC_TB_encoding_parameters->C; - impp.tinput = nrLDPC_slot_encoding_parameters->tinput; - impp.tprep = nrLDPC_slot_encoding_parameters->tprep; - impp.tparity = nrLDPC_slot_encoding_parameters->tparity; - impp.toutput = nrLDPC_slot_encoding_parameters->toutput; - impp.Kb = nrLDPC_TB_encoding_parameters->Kb; - impp.Zc = nrLDPC_TB_encoding_parameters->Z; - impp.BG = nrLDPC_TB_encoding_parameters->BG; - impp.output = nrLDPC_TB_encoding_parameters->segments->output; - impp.K = nrLDPC_TB_encoding_parameters->K; - impp.F = nrLDPC_TB_encoding_parameters->F; + const size_t n_tasks = (common_segment_params.n_segments + 7) >> 3; - size_t const n_seg = (impp.n_segments / 8 + ((impp.n_segments & 7) == 0 ? 0 : 1)); - - for (int j = 0; j < n_seg; j++) { + for (int j = 0; j < n_tasks; j++) { ldpc8blocks_args_t *perJobImpp = &((ldpc8blocks_args_t *)t_info->buf)[t_info->len]; DevAssert(t_info->len < t_info->cap); - impp.ans = t_info->ans; t_info->len += 1; - impp.macro_num = j; - perJobImpp->impp = impp; + perJobImpp->impp = common_segment_params; + perJobImpp->impp.first_seg = j * 8; + perJobImpp->impp.ans = t_info->ans; perJobImpp->nrLDPC_TB_encoding_parameters = nrLDPC_TB_encoding_parameters; + perJobImpp->f = f[j]; + perJobImpp->f2 = f2[j]; task_t t = {.func = ldpc8blocks, .args = perJobImpp}; pushTpool(nrLDPC_slot_encoding_parameters->threadPool, t); } - return n_seg; + return n_tasks; } int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters) { int nbTasks = 0; + + uint32_t Emax = 0; for (int dlsch_id = 0; dlsch_id < nrLDPC_slot_encoding_parameters->nb_TBs; dlsch_id++) { + // Compute number of tasks to encode TB nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id]; size_t n_seg = (nrLDPC_TB_encoding_parameters->C / 8 + ((nrLDPC_TB_encoding_parameters->C & 7) == 0 ? 0 : 1)); nbTasks += n_seg; + + // Search for maximum E for sizing encoder output f and f2 + for (int seg_id = 0; seg_id < nrLDPC_TB_encoding_parameters->C; seg_id++) { + uint32_t E = nrLDPC_TB_encoding_parameters->segments[seg_id].E; + Emax = E > Emax ? E : Emax; + } } + + // Create f and f2 to old encoding tasks outputs + uint32_t Emax_ceil_mod = ceil_mod(Emax, 64); + uint8_t f[nbTasks][Emax_ceil_mod] __attribute__((aligned(64))); + uint8_t f2[nbTasks][Emax_ceil_mod] __attribute__((aligned(64))); + ldpc8blocks_args_t arr[nbTasks]; task_ans_t ans; init_task_ans(&ans, nbTasks); thread_info_tm_t t_info = {.buf = (uint8_t *)arr, .len = 0, .cap = nbTasks, .ans = &ans}; int nbEncode = 0; + nbTasks = 0; for (int dlsch_id = 0; dlsch_id < nrLDPC_slot_encoding_parameters->nb_TBs; dlsch_id++) { - nbEncode += nrLDPC_prepare_TB_encoding(nrLDPC_slot_encoding_parameters, dlsch_id, &t_info); + // For easier indexing we store the pointers to sub arrays of f and f2 in pointer arrays + // Then a function to which we pass the pointer arrays can directly use f_2d[j] ans f2_2d[j] + nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id]; + size_t n_seg = (nrLDPC_TB_encoding_parameters->C / 8 + ((nrLDPC_TB_encoding_parameters->C & 7) == 0 ? 0 : 1)); + uint8_t *f_2d[n_seg]; + uint8_t *f2_2d[n_seg]; + for (int j = 0; j < n_seg; j++) { + f_2d[j] = &f[nbTasks + j][0]; + f2_2d[j] = &f2[nbTasks + j][0]; + } + + // Launch tasks encoding TB + nbEncode += nrLDPC_launch_TB_encoding(nrLDPC_slot_encoding_parameters, dlsch_id, &t_info, f_2d, f2_2d); + + nbTasks += n_seg; } if (nbEncode < nbTasks) { completed_many_task_ans(&ans, nbTasks - nbEncode); @@ -221,5 +451,53 @@ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encodin // Execute thread pool tasks join_task_ans(&ans); + // Write output + nbTasks = 0; + for (int dlsch_id = 0; dlsch_id < nrLDPC_slot_encoding_parameters->nb_TBs; dlsch_id++) { + nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id]; + uint32_t C = nrLDPC_TB_encoding_parameters->C; + size_t n_seg = (C / 8 + ((C & 7) == 0 ? 0 : 1)); + + time_stats_t *toutput = nrLDPC_slot_encoding_parameters->toutput; + + for (int j = 0; j < n_seg; j++) { + unsigned int macro_segment = j * 8; + unsigned int macro_segment_end = (C > macro_segment + 8) ? macro_segment + 8 : C; + const uint32_t E = nrLDPC_TB_encoding_parameters->segments[macro_segment].E; + uint32_t E2 = E, E2_first_segment = macro_segment_end - macro_segment; + bool Eshift = false; + uint32_t Emax = E; + for (int s = macro_segment; s < macro_segment_end; s++) { + if (nrLDPC_TB_encoding_parameters->segments[s].E != E) { + E2 = nrLDPC_TB_encoding_parameters->segments[s].E; + Eshift = true; + E2_first_segment = s-macro_segment; + if(E2 > Emax) + Emax = E2; + break; + } + } + + if(toutput != NULL) start_meas(toutput); + + uint32_t Eoffset=0; + for (int s=0; ssegments[s].E); + + write_task_output(&f[nbTasks + j][0], + E, + &f2[nbTasks + j][0], + E2, + Eshift, + E2_first_segment, + macro_segment_end - macro_segment, + nrLDPC_TB_encoding_parameters->output, + Eoffset); + + if(toutput != NULL) stop_meas(toutput); + } + nbTasks += n_seg; + } + return 0; } diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c index ebd1ddf2dd..4a507fa381 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c @@ -29,274 +29,419 @@ static const uint8_t index_k0[2][4] = {{0, 17, 33, 56}, {0, 13, 25, 43}}; void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e, uint8_t *f) { - uint32_t EQm; - - EQm = E / Qm; + const uint32_t EQm = E / Qm; memset(f, 0, E * sizeof(uint8_t)); - uint8_t *e0, *e1, *e2, *e3, *e4, *e5, *e6, *e7; - uint8_t *fp; -#if 0 // def __WASAVX2__ - simde__m256i tmp0,tmp1,tmp2,tmp0b,tmp1b,tmp3,tmp4,tmp5; - simde__m256i *e0_256,*e1_256,*e2_256,*e3_256,*e4_256,*e5_256,*e6_256,*e7_256; - - simde__m256i *f_256=(simde__m256i *)f; - - uint8_t *fp2; switch(Qm) { - case 2: - e0=e; - e1=e0+EQm; - e0_256=(simde__m256i *)e0; - e1_256=(simde__m256i *)e1; - for (int k=0,j=0;j>5;j++,k+=2) { - f_256[k] = simde_mm256_unpacklo_epi8(e0_256[j],e1_256[j]); - f_256[k+1] = simde_mm256_unpackhi_epi8(e0_256[j],e1_256[j]); - } - break; - case 4: - e0=e; - e1=e0+EQm; - e2=e1+EQm; - e3=e2+EQm; - e0_256=(simde__m256i *)e0; - e1_256=(simde__m256i *)e1; - e2_256=(simde__m256i *)e2; - e3_256=(simde__m256i *)e3; - for (int k=0,j=0;j>5;j++,k+=4) { - tmp0 = simde_mm256_unpacklo_epi8(e0_256[j],e1_256[j]); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15) - tmp1 = simde_mm256_unpacklo_epi8(e2_256[j],e3_256[j]); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15) - f_256[k] = simde_mm256_unpacklo_epi8(tmp0,tmp1); // e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) - f_256[k+1] = simde_mm256_unpackhi_epi8(tmp0,tmp1); // e0(i+8) e1(i+8) e2(i+8) e3(i+8) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) - tmp0 = simde_mm256_unpackhi_epi8(e0_256[j],e1_256[j]); // e0(i+16) e1(i+16) e0(i+17) e1(i+17) .... e0(i+31) e1(i+31) - tmp1 = simde_mm256_unpackhi_epi8(e2_256[j],e3_256[j]); // e2(i+16) e3(i+16) e2(i+17) e3(i+17) .... e2(i+31) e3(i+31) - f_256[k+2] = simde_mm256_unpacklo_epi8(tmp0,tmp1); - f_256[k+3] = simde_mm256_unpackhi_epi8(tmp0,tmp1); - } - break; - case 6: - e0=e; - e1=e0+EQm; - e2=e1+EQm; - e3=e2+EQm; - e4=e3+EQm; - e5=e4+EQm; - e0_256=(simde__m256i *)e0; - e1_256=(simde__m256i *)e1; - e2_256=(simde__m256i *)e2; - e3_256=(simde__m256i *)e3; - e4_256=(simde__m256i *)e4; - e5_256=(simde__m256i *)e5; - - for (int j=0,k=0;j>5;j++,k+=192) { - fp = f+k; - fp2 = fp+96; - - tmp0 = simde_mm256_unpacklo_epi8(e0_256[j],e1_256[j]); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15) - tmp1 = simde_mm256_unpacklo_epi8(e2_256[j],e3_256[j]); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15) - tmp0b = simde_mm256_unpacklo_epi16(tmp0,tmp1); // e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) - tmp1b = simde_mm256_unpackhi_epi16(tmp0,tmp1); // e0(i+8) e1(i+8) e2(i+8) e3(i+8) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) - tmp0 = simde_mm256_unpacklo_epi8(e4_256[j],e5_256[j]); // e4(i) e5(i) e4(i+1) e5(i+1) .... e4(i+15) e5(i+15) - *((uint32_t*)fp) = simde_mm256_extract_epi32(tmp0b,0); - *((uint16_t*)(fp+4)) = simde_mm256_extract_epi16(tmp0,0); - *((uint32_t*)(fp+6)) = simde_mm256_extract_epi32(tmp0b,1); - *((uint16_t*)(fp+10)) = simde_mm256_extract_epi16(tmp0,1); - *((uint32_t*)(fp+12)) = simde_mm256_extract_epi32(tmp0b,2); - *((uint16_t*)(fp+16)) = simde_mm256_extract_epi16(tmp0,2); - *((uint32_t*)(fp+18)) = simde_mm256_extract_epi32(tmp0b,3); - *((uint16_t*)(fp+22)) = simde_mm256_extract_epi16(tmp0,3); - *((uint32_t*)(fp+24)) = simde_mm256_extract_epi32(tmp0b,4); - *((uint16_t*)(fp+26)) = simde_mm256_extract_epi16(tmp0,4); - *((uint32_t*)(fp+30)) = simde_mm256_extract_epi32(tmp0b,5); - *((uint16_t*)(fp+34)) = simde_mm256_extract_epi16(tmp0,5); - *((uint32_t*)(fp+36)) = simde_mm256_extract_epi32(tmp0,6); - *((uint16_t*)(fp+40)) = simde_mm256_extract_epi16(tmp0,6); - *((uint32_t*)(fp+42)) = simde_mm256_extract_epi32(tmp0b,7); - *((uint16_t*)(fp+46)) = simde_mm256_extract_epi16(tmp0,7); - - *((uint32_t*)(fp+48)) = simde_mm256_extract_epi32(tmp1b,0); - *((uint16_t*)(fp+52)) = simde_mm256_extract_epi16(tmp0,8); - *((uint32_t*)(fp+56)) = simde_mm256_extract_epi32(tmp1b,1); - *((uint16_t*)(fp+60)) = simde_mm256_extract_epi16(tmp0,9); - *((uint32_t*)(fp+62)) = simde_mm256_extract_epi32(tmp1b,2); - *((uint16_t*)(fp+66)) = simde_mm256_extract_epi16(tmp0,10); - *((uint32_t*)(fp+68)) = simde_mm256_extract_epi32(tmp1b,3); - *((uint16_t*)(fp+72)) = simde_mm256_extract_epi16(tmp0,11); - *((uint32_t*)(fp+74)) = simde_mm256_extract_epi32(tmp1b,4); - *((uint16_t*)(fp+76)) = simde_mm256_extract_epi16(tmp0,12); - *((uint32_t*)(fp+80)) = simde_mm256_extract_epi32(tmp1b,5); - *((uint16_t*)(fp+82)) = simde_mm256_extract_epi16(tmp0,13); - *((uint32_t*)(fp+86)) = simde_mm256_extract_epi32(tmp1b,6); - *((uint16_t*)(fp+90)) = simde_mm256_extract_epi16(tmp0,14); - *((uint32_t*)(fp+92)) = simde_mm256_extract_epi32(tmp1b,7); - *((uint16_t*)(fp+94)) = simde_mm256_extract_epi16(tmp0,15); - - tmp0 = simde_mm256_unpackhi_epi8(e0_256[j],e1_256[j]); // e0(i+16) e1(i+16) e0(i+17) e1(i+17) .... e0(i+31) e1(i+31) - tmp1 = simde_mm256_unpackhi_epi8(e2_256[j],e3_256[j]); // e2(i+16) e3(i+16) e2(i+17) e3(i+17) .... e2(i+31) e3(i+31) - tmp0b = simde_mm256_unpacklo_epi16(tmp0,tmp1); // e0(i+16) e1(i+16) e2(i+16) e3(i+16) ... e0(i+23) e1(i+23) e2(i+23) e3(i+23) - tmp1b = simde_mm256_unpackhi_epi16(tmp0,tmp1); // e0(i+24) e1(i+24) e2(i+24) e3(i+24) ... e0(i+31) e1(i+31) e2(i+31) e3(i+31) - tmp0 = simde_mm256_unpackhi_epi8(e4_256[j],e5_256[j]); // e4(i+16) e5(i+16) e4(i+17) e5(i+17) .... e4(i+31) e5(i+31) - *((uint32_t*)fp2) = simde_mm256_extract_epi32(tmp0b,0); - *((uint16_t*)(fp2+4)) = simde_mm256_extract_epi16(tmp0,0); - *((uint32_t*)(fp2+6)) = simde_mm256_extract_epi32(tmp0b,1); - *((uint16_t*)(fp2+10)) = simde_mm256_extract_epi16(tmp0,1); - *((uint32_t*)(fp2+12)) = simde_mm256_extract_epi32(tmp0b,2); - *((uint16_t*)(fp2+16)) = simde_mm256_extract_epi16(tmp0,2); - *((uint32_t*)(fp2+18)) = simde_mm256_extract_epi32(tmp0b,3); - *((uint16_t*)(fp2+22)) = simde_mm256_extract_epi16(tmp0,3); - *((uint32_t*)(fp2+24)) = simde_mm256_extract_epi32(tmp0b,4); - *((uint16_t*)(fp2+26)) = simde_mm256_extract_epi16(tmp0,4); - *((uint32_t*)(fp2+30)) = simde_mm256_extract_epi32(tmp0b,5); - *((uint16_t*)(fp2+34)) = simde_mm256_extract_epi16(tmp0,5); - *((uint32_t*)(fp2+36)) = simde_mm256_extract_epi32(tmp0,6); - *((uint16_t*)(fp2+40)) = simde_mm256_extract_epi16(tmp0,6); - *((uint32_t*)(fp2+42)) = simde_mm256_extract_epi32(tmp0b,7); - *((uint16_t*)(fp2+46)) = simde_mm256_extract_epi16(tmp0,7); - - *((uint32_t*)(fp2+48)) = simde_mm256_extract_epi32(tmp1b,0); - *((uint16_t*)(fp2+52)) = simde_mm256_extract_epi16(tmp0,8); - *((uint32_t*)(fp2+56)) = simde_mm256_extract_epi32(tmp1b,1); - *((uint16_t*)(fp2+60)) = simde_mm256_extract_epi16(tmp0,9); - *((uint32_t*)(fp2+62)) = simde_mm256_extract_epi32(tmp1b,2); - *((uint16_t*)(fp2+66)) = simde_mm256_extract_epi16(tmp0,10); - *((uint32_t*)(fp2+68)) = simde_mm256_extract_epi32(tmp1b,3); - *((uint16_t*)(fp2+72)) = simde_mm256_extract_epi16(tmp0,11); - *((uint32_t*)(fp2+74)) = simde_mm256_extract_epi32(tmp1b,4); - *((uint16_t*)(fp2+76)) = simde_mm256_extract_epi16(tmp0,12); - *((uint32_t*)(fp2+80)) = simde_mm256_extract_epi32(tmp1b,5); - *((uint16_t*)(fp2+82)) = simde_mm256_extract_epi16(tmp0,13); - *((uint32_t*)(fp2+86)) = simde_mm256_extract_epi32(tmp1b,6); - *((uint16_t*)(fp2+90)) = simde_mm256_extract_epi16(tmp0,14); - *((uint32_t*)(fp2+92)) = simde_mm256_extract_epi32(tmp1b,7); - *((uint16_t*)(fp2+94)) = simde_mm256_extract_epi16(tmp0,15); - } - break; - case 8: - e0=e; - e1=e0+EQm; - e2=e1+EQm; - e3=e2+EQm; - e4=e3+EQm; - e5=e4+EQm; - e6=e5+EQm; - e7=e6+EQm; - - e0_256=(simde__m256i *)e0; - e1_256=(simde__m256i *)e1; - e2_256=(simde__m256i *)e2; - e3_256=(simde__m256i *)e3; - e4_256=(simde__m256i *)e4; - e5_256=(simde__m256i *)e5; - e6_256=(simde__m256i *)e6; - e7_256=(simde__m256i *)e7; - for (int k=0,j=0;j>5;j++,k+=8) { - tmp0 = simde_mm256_unpacklo_epi8(e0_256[j],e1_256[j]); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15) - tmp1 = simde_mm256_unpacklo_epi8(e2_256[j],e3_256[j]); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15) - tmp2 = simde_mm256_unpacklo_epi8(e4_256[j],e5_256[j]); // e4(i) e5(i) e4(i+1) e5(i+1) .... e4(i+15) e5(i+15) - tmp3 = simde_mm256_unpacklo_epi8(e6_256[j],e7_256[j]); // e6(i) e7(i) e6(i+1) e7(i+1) .... e6(i+15) e7(i+15) - tmp4 = simde_mm256_unpacklo_epi16(tmp0,tmp1); // e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) - tmp5 = simde_mm256_unpacklo_epi16(tmp2,tmp3); // e4(i) e5(i) e6(i) e7(i) ... e4(i+7) e5(i+7) e6(i+7) e7(i+7) - f_256[k] = simde_mm256_unpacklo_epi16(tmp4,tmp5); // e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) e6(i) e7(i)... e0(i+3) e1(i+3) e2(i+3) e3(i+3) e4(i+3) e5(i+3) e6(i+3) e7(i+3)) - f_256[k+1] = simde_mm256_unpackhi_epi16(tmp4,tmp5); // e0(i+4) e1(i+4) e2(i+4) e3(i+4) e4(i+4) e5(i+4) e6(i+4) e7(i+4)... e0(i+7) e1(i+7) e2(i+7) e3(i+7) e4(i+7) e5(i+7) e6(i+7) e7(i+7)) - - tmp4 = simde_mm256_unpackhi_epi16(tmp0,tmp1); // e0(i+8) e1(i+8) e2(i+8) e3(i+8) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) - tmp5 = simde_mm256_unpackhi_epi16(tmp2,tmp3); // e4(i+8) e5(i+8) e6(i+8) e7(i+8) ... e4(i+15) e5(i+15) e6(i+15) e7(i+15) - f_256[k+2] = simde_mm256_unpacklo_epi16(tmp4,tmp5); // e0(i+8) e1(i+8) e2(i+8) e3(i+8) e4(i+8) e5(i+8) e6(i+8) e7(i+8)... e0(i+11) e1(i+11) e2(i+11) e3(i+11) e4(i+11) e5(i+11) e6(i+11) e7(i+11)) - f_256[k+3] = simde_mm256_unpackhi_epi16(tmp4,tmp5); // e0(i+12) e1(i+12) e2(i+12) e3(i+12) e4(i+12) e5(i+12) e6(i+12) e7(i+12)... e0(i+15) e1(i+15) e2(i+15) e3(i+15) e4(i+15) e5(i+15) e6(i+15) e7(i+15)) - - tmp0 = simde_mm256_unpackhi_epi8(e0_256[j],e1_256[j]); // e0(i+16) e1(i+16) e0(i+17) e1(i+17) .... e0(i+31) e1(i+31) - tmp1 = simde_mm256_unpackhi_epi8(e2_256[j],e3_256[j]); // e2(i+16) e3(i+16) e2(i+17) e3(i+17) .... e2(i+31) e3(i+31) - tmp2 = simde_mm256_unpackhi_epi8(e4_256[j],e5_256[j]); // e4(i+16) e5(i+16) e4(i+17) e5(i+17) .... e4(i+31) e5(i+31) - tmp3 = simde_mm256_unpackhi_epi8(e6_256[j],e7_256[j]); // e6(i+16) e7(i+16) e6(i+17) e7(i+17) .... e6(i+31) e7(i+31) - tmp4 = simde_mm256_unpacklo_epi16(tmp0,tmp1); // e0(i+!6) e1(i+16) e2(i+16) e3(i+16) ... e0(i+23) e1(i+23) e2(i+23) e3(i+23) - tmp5 = simde_mm256_unpacklo_epi16(tmp2,tmp3); // e4(i+16) e5(i+16) e6(i+16) e7(i+16) ... e4(i+23) e5(i+23) e6(i+23) e7(i+23) - f_256[k+4] = simde_mm256_unpacklo_epi16(tmp4,tmp5); // e0(i+16) e1(i+16) e2(i+16) e3(i+16) e4(i+16) e5(i+16) e6(i+16) e7(i+16)... e0(i+19) e1(i+19) e2(i+19) e3(i+19) e4(i+19) e5(i+19) e6(i+19) e7(i+19)) - f_256[k+5] = simde_mm256_unpackhi_epi16(tmp4,tmp5); // e0(i+20) e1(i+20) e2(i+20) e3(i+20) e4(i+20) e5(i+20) e6(i+20) e7(i+20)... e0(i+23) e1(i+23) e2(i+23) e3(i+23) e4(i+23) e5(i+23) e6(i+23) e7(i+23)) - - tmp4 = simde_mm256_unpackhi_epi16(tmp0,tmp1); // e0(i+24) e1(i+24) e2(i+24) e3(i+24) ... e0(i+31) e1(i+31) e2(i+31) e3(i+31) - tmp5 = simde_mm256_unpackhi_epi16(tmp2,tmp3); // e4(i+24) e5(i+24) e6(i+24) e7(i+24) ... e4(i+31) e5(i+31) e6(i+31) e7(i+31) - f_256[k+6] = simde_mm256_unpacklo_epi16(tmp4,tmp5); // e0(i+24) e1(i+24) e2(i+24) e3(i+24) e4(i+24) e5(i+24) e6(i+24) e7(i+24)... e0(i+27) e1(i+27) e2(i+27) e3(i+27) e4(i+27) e5(i+27) e6(i+27) e7(i+27)) - f_256[k+7] = simde_mm256_unpackhi_epi16(tmp4,tmp5); // e0(i+28) e1(i+28) e2(i+28) e3(i+28) e4(i+28) e5(i+28) e6(i+28) e7(i+28)... e0(i+31) e1(i+31) e2(i+31) e3(i+31) e4(i+31) e5(i+31) e6(i+31) e7(i+31)) - } - break; - default: AssertFatal(1==0,"Should be here!\n"); - } - -#else - // original unoptimized loops - /* - for (int j = 0; j< EQm; j++,j2+=2){ - for (int i = 0; i< Qm; i++){ - f[(i+j*Qm)] = e[(i*EQm + j)]; - } - } - */ - - fp = f; - switch (Qm) { - case 2: - e0 = e; - e1 = e0 + EQm; - for (int j = 0, j2 = 0; j < EQm; j++, j2 += 2) { - fp = &f[j2]; - fp[0] = e0[j]; - fp[1] = e1[j]; + case 2: { + uint8_t *e0 = e; + uint8_t *e1 = e0 + EQm; + int i = 0; +#ifdef __AVX512VBMI__ + // clang-format off + const __m512i p8a = _mm512_set_epi8(95, 31, 94, 30, 93, 29, 92, 28, 91, 27, 90, 26, 89, 25, 88, 24, + 87, 23, 86, 22, 85, 21, 84, 20, 83, 19, 82, 18, 81, 17, 80, 16, + 79, 15, 78, 14, 77, 13, 76, 12, 75, 11, 74, 10, 73, 9, 72, 8, + 71, 7, 70, 6, 69, 5, 68, 4, 67, 3, 66, 2, 65, 1, 64, 0); + const __m512i p8b = _mm512_set_epi8(127, 63, 126, 62, 125, 61, 124, 60, 123, 59, 122, 58, 121, 57, 120, + 56, 119, 55, 118, 54, 117, 53, 116, 52, 115, 51, 114, 50, 113, 49, 112, + 48, 111, 47, 110, 46, 109, 45, 108, 44, 107, 43, 106, 42, 105, 41, 104, + 40, 103, 39, 102, 38, 101, 37, 100, 36, 99, 35, 98, 34, 97, 33, 96, 32); + // clang-format on + __m512i *f_512 = (__m512i *)f; + __m512i *e0_512 = (__m512i *)e0; + __m512i *e1_512 = (__m512i *)e1; + for (; i < (EQm & ~63); i += 64) { + __m512i e0j = _mm512_loadu_si512(e0_512++); + __m512i e1j = _mm512_loadu_si512(e1_512++); + // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi8(e0j, p8a, e1j)); + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi8(e0j, p8b, e1j)); } - break; - case 4: - e0 = e; - e1 = e0 + EQm; - e2 = e1 + EQm; - e3 = e2 + EQm; - for (int j = 0, j2 = 0; j < EQm; j++, j2 += 4) { - fp = &f[j2]; - fp[0] = e0[j]; - fp[1] = e1[j]; - fp[2] = e2[j]; - fp[3] = e3[j]; - } - break; - case 6: - e0 = e; - e1 = e0 + EQm; - e2 = e1 + EQm; - e3 = e2 + EQm; - e4 = e3 + EQm; - e5 = e4 + EQm; - fp = f; - for (int j = 0; j < EQm; j++) { - *fp++ = e0[j]; - *fp++ = e1[j]; - *fp++ = e2[j]; - *fp++ = e3[j]; - *fp++ = e4[j]; - *fp++ = e5[j]; - } - break; - case 8: - e0 = e; - e1 = e0 + EQm; - e2 = e1 + EQm; - e3 = e2 + EQm; - e4 = e3 + EQm; - e5 = e4 + EQm; - e6 = e5 + EQm; - e7 = e6 + EQm; - for (int j = 0, j2 = 0; j < EQm; j++, j2 += 8) { - fp = &f[j2]; - fp[0] = e0[j]; - fp[1] = e1[j]; - fp[2] = e2[j]; - fp[3] = e3[j]; - fp[4] = e4[j]; - fp[5] = e5[j]; - fp[6] = e6[j]; - fp[7] = e7[j]; - } - break; - default: - AssertFatal(1 == 0, "Should never be here!\n"); - } + e0 = (uint8_t *)e0_512; + e1 = (uint8_t *)e1_512; + f = (uint8_t *)f_512; #endif +#ifdef USE128BIT + simde__m128i *f_128 = (simde__m128i *)f; + simde__m128i *e0_128 = (simde__m128i *)e0; + simde__m128i *e1_128 = (simde__m128i *)e1; + for (; i < (EQm & ~15); i += 64) { + simde__m128i e0j = simde_mm_loadu_si128(e0_128++); + simde__m128i e1j = simde_mm_loadu_si128(e1_128++); + simde_mm_storeu_si128(f_128++, simde_mm_unpacklo_epi8(e0j, e1j)); + simde_mm_storeu_si128(f_128++, simde_mm_unpackhi_epi8(e0j, e1j)); + } + e0 = (uint8_t *)e0_128; + e1 = (uint8_t *)e1_128; + f = (uint8_t *)f_128; +#endif + for (; i < EQm; i++) { + *f++ = *e0++; + *f++ = *e1++; + } + } break; + case 4: { + uint8_t *e0 = e; + uint8_t *e1 = e0 + EQm; + uint8_t *e2 = e1 + EQm; + uint8_t *e3 = e2 + EQm; + int i = 0; +#ifdef __AVX512VBMI__ + // clang-format off + const __m512i p8a = _mm512_set_epi8(95, 31, 94, 30, 93, 29, 92, 28, 91, 27, 90, 26, 89, 25, 88, 24, 87, 23, 86, + 22, 85, 21, 84, 20, 83, 19, 82, 18, 81, 17, 80, 16, 79, 15, 78, 14, 77, 13, + 76, 12, 75, 11, 74, 10, 73, 9, 72, 8, 71, 7, 70, 6, 69, 5, 68, 4, 67, 3, 66, 2, 65, 1, 64, 0); + const __m512i p8b = _mm512_set_epi8(127, 63, 126, 62, 125, 61, 124, 60, 123, 59, 122, 58, 121, 57, 120, 56, 119, + 55, 118, 54, 117, 53, 116, 52, 115, 51, 114, 50, 113, 49, 112, 48, 111, 47, + 110, 46, 109, 45, 108, 44, 107, 43, 106, 42, 105, 41, 104, 40, 103, 39, 102, + 38, 101, 37, 100, 36, 99, 35, 98, 34, 97, 33, 96, 32); + const __m512i p16a = _mm512_set_epi16(47, 15, 46, 14, 45, 13, 44, 12, 43, 11, 42, 10, 41, 9, 40, 8, 39, 7, 38, 6, + 37, 5, 36, 4, 35, 3, 34, 2, 33, 1, 32, 0); + const __m512i p16b = _mm512_set_epi16(63, 31, 62, 30, 61, 29, 60, 28, 59, 27, 58, 26, 57, 25, 56, 24, 55, 23, 54, + 22, 53, 21, 52, 20, 51, 19, 50, 18, 49, 17, 48, 16); + // clang-format on + __m512i *e0_512 = (__m512i *)e0; + __m512i *e1_512 = (__m512i *)e1; + __m512i *e2_512 = (__m512i *)e2; + __m512i *e3_512 = (__m512i *)e3; + __m512i *f_512 = (__m512i *)f; + for (; i < (EQm & ~63); i += 64) { + __m512i e0j = _mm512_loadu_si512(e0_512++); + __m512i e1j = _mm512_loadu_si512(e1_512++); + __m512i e2j = _mm512_loadu_si512(e2_512++); + __m512i e3j = _mm512_loadu_si512(e3_512++); + __m512i tmp0 = _mm512_permutex2var_epi8(e0j, p8a, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15) + __m512i tmp1 = _mm512_permutex2var_epi8(e2j, p8a, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15) + // e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp0, p16a, tmp1)); + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp0, p16b, tmp1)); + tmp0 = _mm512_permutex2var_epi8(e0j, p8b, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15) + tmp1 = _mm512_permutex2var_epi8(e2j, p8b, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15) + // e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp0, p16a, tmp1)); + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp0, p16b, tmp1)); + } + e0 = (uint8_t *)e0_512; + e1 = (uint8_t *)e1_512; + e2 = (uint8_t *)e2_512; + e3 = (uint8_t *)e3_512; + f = (uint8_t *)f_512; +#endif +#ifdef USE128BIT + simde__m128i *e0_128 = (simde__m128i *)e0; + simde__m128i *e1_128 = (simde__m128i *)e1; + simde__m128i *e2_128 = (simde__m128i *)e2; + simde__m128i *e3_128 = (simde__m128i *)e3; + simde__m128i *f_128 = (simde__m128i *)f; + for (; i < (EQm & ~15); i += 16) { + simde__m128i e0j = simde_mm_loadu_si128(e0_128++); + simde__m128i e1j = simde_mm_loadu_si128(e1_128++); + simde__m128i e2j = simde_mm_loadu_si128(e2_128++); + simde__m128i e3j = simde_mm_loadu_si128(e3_128++); + simde__m128i tmp0 = simde_mm_unpacklo_epi8(e0j, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+7) e1(i+7) + simde__m128i tmp1 = simde_mm_unpacklo_epi8(e2j, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+7) e3(i+7) + simde_mm_storeu_si128(f_128++, + simde_mm_unpacklo_epi16(tmp0, tmp1)); // e0(i) e1(i) e2(i) e3(i) ... e0(i+3) e1(i+3) e2(i+3) e3(i+3) + simde_mm_storeu_si128( + f_128++, + simde_mm_unpackhi_epi16(tmp0, tmp1)); // e0(i+4) e1(i+4) e2(i+4) e3(i+4) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) + tmp0 = simde_mm_unpackhi_epi8(e0j, e1j); // e0(i+8) e1(i+8) e0(i+9) e1(i+9) .... e0(i+15) e1(i+15) + tmp1 = simde_mm_unpackhi_epi8(e2j, e3j); // e2(i+8) e3(i+9) e2(i+10) e3(i+10) .... e2(i+31) e3(i+31) + simde_mm_storeu_si128(f_128++, simde_mm_unpacklo_epi16(tmp0, tmp1)); + simde_mm_storeu_si128(f_128++, simde_mm_unpackhi_epi16(tmp0, tmp1)); + } + e0 = (uint8_t *)e0_128; + e1 = (uint8_t *)e1_128; + e2 = (uint8_t *)e2_128; + e3 = (uint8_t *)e3_128; + f = (uint8_t *)f_128; +#endif + for (; i < EQm; i++) { + *f++ = *e0++; + *f++ = *e1++; + *f++ = *e2++; + *f++ = *e3++; + } + } break; + case 6: { + uint8_t *e0 = e; + uint8_t *e1 = e0 + EQm; + uint8_t *e2 = e1 + EQm; + uint8_t *e3 = e2 + EQm; + uint8_t *e4 = e3 + EQm; + uint8_t *e5 = e4 + EQm; + int i = 0; +#ifdef __AVX512VBMI__ + // clang-format off + const __m512i p8a = _mm512_set_epi8(95, 31, 94, 30, 93, 29, 92, 28, 91, 27, 90, 26, 89, 25, 88, 24, 87, 23, + 86, 22, 85, 21, 84, 20, 83, 19, 82, 18, 81, 17, 80, 16, 79, 15, 78, 14, + 77, 13, 76, 12, 75, 11, 74, 10, 73, 9, 72, 8, 71, 7, 70, 6, 69, 5, 68, 4, 67, 3, 66, 2, 65, 1, 64, 0); + const __m512i p8b = _mm512_set_epi8(127, 63, 126, 62, 125, 61, 124, 60, 123, 59, 122, 58, 121, 57, 120, 56, 119, + 55, 118, 54, 117, 53, 116, 52, 115, 51, 114, 50, 113, 49, 112, 48, 111, 47, 110, + 46, 109, 45, 108, 44, 107, 43, 106, 42, 105, 41, 104, 40, 103, 39, 102, 38, 101, 37, 100, 36, 99, 35, 98, 34, 97, 33, 96, 32); + const __m512i p16a = _mm512_set_epi16(47, 15, 46, 14, 45, 13, 44, 12, 43, 11, 42, 10, 41, 9, 40, 8, 39, 7, 38, 6, 37, 5, 36, 4, 35, 3, 34, 2, 33, 1, 32, 0); + const __m512i p16b = _mm512_set_epi16(63, 31, 62, 30, 61, 29, 60, 28, 59, 27, 58, 26, 57, 25, 56, 24, 55, 23, 54, 22, 53, 21, 52, 20, 51, 19, 50, 18, 49, 17, 48, 16); + const __m512i p16c = _mm512_set_epi16(21, 20, 41, 19, 18, 40, 17, 16, 39, 15, 14, 38, 13, 12, 37, 11, 10, 36, 9, 8, 35, 7, 6, 34, 5, 4, 33, 3, 2, 32, 1, 0); + const __m512i p16d = _mm512_set_epi16(10, 52, 9, 8, 51, 7, 6, 50, 5, 4, 49, 3, 2, 48, 1, 0, 47, 31, 30, 46, 29, 28, 45, 27, 26, 44, 25, 24, 43, 23, 22, 42); + const __m512i p16d2 = _mm512_set_epi16(32 + 10, 30, 32 + 9, 32 + 8, 27, 32 + 7, 32 + 6, 24, 32 + 5, 32 + 4, 21, 32 + 3, 32 + 2, 18, 32 + 1, 32 + 0, + 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); + const __m512i p16e = _mm512_set_epi16(63, 31, 30, 62, 29, 28, 61, 27, 26, 60, 25, 24, 59, 23, 22, 58, 21, 20, 57, 19, 18, 56, 17, 16, 55, 15, 14, 54, 13, 12, 53, 11); + // clang-format on + __m512i *e0_512 = (__m512i *)e0; + __m512i *e1_512 = (__m512i *)e1; + __m512i *e2_512 = (__m512i *)e2; + __m512i *e3_512 = (__m512i *)e3; + __m512i *e4_512 = (__m512i *)e4; + __m512i *e5_512 = (__m512i *)e5; + __m512i *f_512 = (__m512i *)f; + for (; i < (EQm & ~63); i += 64) { + __m512i e0j = _mm512_loadu_si512(e0_512++); + __m512i e1j = _mm512_loadu_si512(e1_512++); + __m512i e2j = _mm512_loadu_si512(e2_512++); + __m512i e3j = _mm512_loadu_si512(e3_512++); + __m512i e4j = _mm512_loadu_si512(e4_512++); + __m512i e5j = _mm512_loadu_si512(e5_512++); + __m512i tmp0 = _mm512_permutex2var_epi8(e0j, p8a, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+31) e1(i+31) + __m512i tmp1 = _mm512_permutex2var_epi8(e2j, p8a, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+31) e3(i+31) + __m512i tmp2 = _mm512_permutex2var_epi8(e4j, p8a, e5j); // e4(i) e5(i) e4(i+1) e5(i+1) .... e4(i+31) e5(i+31) + // e0(i) e1(i) e2(i) e3(i) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) + __m512i tmp3 = _mm512_permutex2var_epi16(tmp0, p16a, tmp1); + // e0(i+16) e1(i+16) e2(i+16) e3(i+16) ... e0(i+31) e1(i+31) e2(i+31) e3(i+31) + __m512i tmp4 = _mm512_permutex2var_epi16(tmp0, p16b, tmp1); + // e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) ... e0(i+9) e1(i+9) e2(i+9) e3(i+9) e4(i+9) e5(i+9) e0(i+10) e1(i+10) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp3, p16c, tmp2)); + // e2(i+10) e3(i+10) e4(i+10) e5(i+10) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) e4(i+15) + // e5(i+15) x x x x e4(i+16) e5(i+16) x x x x .... e4(i+20) e5(i+20) x x + __m512i tmp5 = _mm512_permutex2var_epi16(tmp3, p16d, tmp2); + // e2(i+10) e3(i+10) e4(i+10) e5(i+10) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) + // e4(i+15) e5(i+15) e0(i+16) e1(i+16) e2(i+16) e3(i+16) e4(i+16) e5(i+16) e0(i+20) + // e1(i+20) e2(i+20) e3(i+20) e4(i+20) e5(i+20) e0(i+21) e1(i+21) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp5, p16d2, tmp4)); + // e2(i+21) e3(i+21) e4(i+21) e5(i+21) .... e0(i+31) e1(i+31) e2(i+31) e3(i+31) e4(i+31) e5(i+31) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp4, p16e, tmp2)); + + tmp0 = _mm512_permutex2var_epi8(e0j, p8b, e1j); // e0(i+32) e1(i+32) e0(i+32) e1(i+32) .... e0(i+63) e1(i+63) + tmp1 = _mm512_permutex2var_epi8(e2j, p8b, e3j); // e2(i+32) e3(i+32) e2(i+32) e3(i+32) .... e2(i+63) e3(i+63) + tmp2 = _mm512_permutex2var_epi8(e4j, p8b, e5j); // e4(i+32) e5(i+32) e4(i+32) e5(i+32) .... e4(i+63) e5(i+63) + tmp3 = _mm512_permutex2var_epi16(tmp0, p16a, tmp1); // e0(i) e1(i) e2(i) e3(i) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) + // e0(i+16) e1(i+16) e2(i+16) e3(i+16) ... e0(i+31) e1(i+31) e2(i+31) e3(i+31) + tmp4 = _mm512_permutex2var_epi16(tmp0, p16b, tmp1); + // e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) ... e0(i+9) e1(i+9) e2(i+9) e3(i+9) e4(i+9) e5(i+9) e0(i+10) e1(i+10) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp3, p16c, tmp2)); + // e2(i+10) e3(i+10) e4(i+10) e5(i+10) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) + // e4(i+15) e5(i+15) x x x x e4(i+16) e5(i+16) x x x x .... e4(i+20) e5(i+20) x x + tmp5 = _mm512_permutex2var_epi16(tmp3, p16d, tmp2); + // e2(i+10) e3(i+10) e4(i+10) e5(i+10) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) + // e4(i+15) e5(i+15) e0(i+16) e1(i+16) e2(i+16) e3(i+16) e4(i+16) e5(i+16) e0(i+20) + // e1(i+20) e2(i+20) e3(i+20) e4(i+20) e5(i+20) e0(i+21) e1(i+21) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp5, p16d2, tmp4)); + // e2(i+21) e3(i+21) e4(i+21) e5(i+21) .... e0(i+31) e1(i+31) e2(i+31) e3(i+31) e4(i+31) e5(i+31) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp4, p16e, tmp2)); + } + e0 = (uint8_t *)e0_512; + e1 = (uint8_t *)e1_512; + e2 = (uint8_t *)e2_512; + e3 = (uint8_t *)e3_512; + e4 = (uint8_t *)e4_512; + e5 = (uint8_t *)e5_512; + f = (uint8_t *)f_512; +#endif + for (; i < EQm; i++) { + *f++ = *e0++; + *f++ = *e1++; + *f++ = *e2++; + *f++ = *e3++; + *f++ = *e4++; + *f++ = *e5++; + } + } break; + case 8: { + uint8_t *e0 = e; + uint8_t *e1 = e0 + EQm; + uint8_t *e2 = e1 + EQm; + uint8_t *e3 = e2 + EQm; + uint8_t *e4 = e3 + EQm; + uint8_t *e5 = e4 + EQm; + uint8_t *e6 = e5 + EQm; + uint8_t *e7 = e6 + EQm; + + int i = 0; +#ifdef __AVX512VBMI__ + // clang-format off + const __m512i p8a = _mm512_set_epi8(95, 31, 94, 30, 93, 29, 92, 28, 91, 27, 90, 26, 89, 25, 88, 24, 87, 23, + 86, 22, 85, 21, 84, 20, 83, 19, 82, 18, 81, 17, 80, 16, 79, 15, 78, 14, 77, 13, + 76, 12, 75, 11, 74, 10, 73, 9, 72, 8, 71, 7, 70, 6, 69, 5, 68, 4, 67, 3, 66, 2, 65, 1, 64, 0); + const __m512i p8b = _mm512_set_epi8(127, 63, 126, 62, 125, 61, 124, 60, 123, 59, 122, 58, 121, 57, 120, 56, 119, 55, + 118, 54, 117, 53, 116, 52, 115, 51, 114, 50, 113, 49, 112, 48, 111, 47, 110, 46, + 109, 45, 108, 44, 107, 43, 106, 42, 105, 41, 104, 40, 103, 39, 102, 38, 101, 37, 100, 36, 99, 35, 98, 34, 97, 33, 96, 32); + + const __m512i p16a = _mm512_set_epi16(47, 15, 46, 14, 45, 13, 44, 12, 43, 11, 42, 10, 41, 9, 40, 8, 39, 7, 38, 6, 37, 5, 36, 4, 35, 3, 34, 2, 33, 1, 32, 0); + const __m512i p16b = _mm512_set_epi16(63, 31, 62, 30, 61, 29, 60, 28, 59, 27, 58, 26, 57, 25, 56, 24, 55, 23, 54, 22, 53, 21, 52, 20, 51, 19, 50, 18, 49, 17, 48, 16); + + const __m512i p32a = _mm512_set_epi32(23, 7, 22, 6, 21, 5, 20, 4, 19, 3, 18, 2, 17, 1, 16, 0); + const __m512i p32b = _mm512_set_epi32(31, 15, 30, 14, 29, 13, 28, 12, 27, 11, 26, 10, 25, 9, 24, 8); + // clang-format on + __m512i *e0_512 = (__m512i *)e0; + __m512i *e1_512 = (__m512i *)e1; + __m512i *e2_512 = (__m512i *)e2; + __m512i *e3_512 = (__m512i *)e3; + __m512i *e4_512 = (__m512i *)e4; + __m512i *e5_512 = (__m512i *)e5; + __m512i *e6_512 = (__m512i *)e6; + __m512i *e7_512 = (__m512i *)e7; + __m512i *f_512 = (__m512i *)f; + for (; i < (EQm & ~63); i += 64) { + __m512i e0j = _mm512_loadu_si512(e0_512++); + __m512i e1j = _mm512_loadu_si512(e1_512++); + __m512i e2j = _mm512_loadu_si512(e2_512++); + __m512i e3j = _mm512_loadu_si512(e3_512++); + __m512i e4j = _mm512_loadu_si512(e4_512++); + __m512i e5j = _mm512_loadu_si512(e5_512++); + __m512i e6j = _mm512_loadu_si512(e6_512++); + __m512i e7j = _mm512_loadu_si512(e7_512++); + __m512i tmp0 = _mm512_permutex2var_epi8(e0j, p8a, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15) + __m512i tmp1 = _mm512_permutex2var_epi8(e2j, p8a, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15) + __m512i tmp2 = _mm512_permutex2var_epi8(e4j, p8a, e5j); // e4(i) e5(i) e4(i+1) e5(i+1) .... e4(i+15) e5(i+15) + __m512i tmp3 = _mm512_permutex2var_epi8(e6j, p8a, e7j); // e6(i) e7(i) e6(i+1) e7(i+1) .... e6(i+15) e7(i+15) + __m512i tmp4 = _mm512_permutex2var_epi16(tmp0, p16a, tmp1); // e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) + // e4(i) e5(i) e6(i) e7(i) ... e4(i+7) e5(i+7) e6(i+7) e7(i+7) + // e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) e6(i) e7(i)... e0(i+3) e1(i+3) + __m512i tmp5 = _mm512_permutex2var_epi16(tmp2, p16a, tmp3); + // e2(i+3) e3(i+3) e4(i+3) e5(i+3) e6(i+3) e7(i+3)) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32a, tmp5)); + // e0(i+4) e1(i+4) e2(i+4) e3(i+4) e4(i+4) e5(i+4) e6(i+4) e7(i+4)... + // e0(i+7) e1(i+7) e2(i+7) e3(i+7) e4(i+7) e5(i+7) e6(i+7) e7(i+7)) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32b, tmp5)); + // e0(i+8) e1(i+8) e2(i+8) e3(i+8) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) + tmp4 = _mm512_permutex2var_epi16(tmp0, p16b, tmp1); + // e4(i+8) e5(i+8) e6(i+8) e7(i+8) ... e4(i+15) e5(i+15) e6(i+15) e7(i+15) + tmp5 = _mm512_permutex2var_epi16(tmp2, p16b, tmp3); + // e0(i+8) e1(i+8) e2(i+8) e3(i+8) e4(i+8) e5(i+8) e6(i+8) e7(i+8)... e0(i+11) + // e1(i+11) e2(i+11) e3(i+11) e4(i+11) e5(i+11) e6(i+11) e7(i+11)) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32a, tmp5)); + // e0(i+12) e1(i+12) e2(i+12) e3(i+12) e4(i+12) e5(i+12) e6(i+12) e7(i+12)... e0(i+15) + // e1(i+15) e2(i+15) e3(i+15) e4(i+15) e5(i+15) e6(i+15) e7(i+15)) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32b, tmp5)); + + tmp0 = _mm512_permutex2var_epi8(e0j, p8b, e1j); // e0(i+16) e1(i+16) e0(i+17) e1(i+17) .... e0(i+31) e1(i+31) + tmp1 = _mm512_permutex2var_epi8(e2j, p8b, e3j); // e2(i+16) e3(i+16) e2(i+17) e3(i+17) .... e2(i+31) e3(i+31) + tmp2 = _mm512_permutex2var_epi8(e4j, p8b, e5j); // e4(i+16) e5(i+16) e4(i+17) e5(i+17) .... e4(i+31) e5(i+31) + tmp3 = _mm512_permutex2var_epi8(e6j, p8b, e7j); // e6(i+16) e7(i+16) e6(i+17) e7(i+17) .... e6(i+31) e7(i+31) + // e0(i+!6) e1(i+16) e2(i+16) e3(i+16) ... e0(i+23) e1(i+23) e2(i+23) e3(i+23) + tmp4 = _mm512_permutex2var_epi16(tmp0, p16a, tmp1); + // e4(i+16) e5(i+16) e6(i+16) e7(i+16) ... e4(i+23) e5(i+23) e6(i+23) e7(i+23) + tmp5 = _mm512_permutex2var_epi16(tmp2, p16a, tmp3); + // e0(i+16) e1(i+16) e2(i+16) e3(i+16) e4(i+16) e5(i+16) e6(i+16) e7(i+16)... e0(i+19) + // e1(i+19) e2(i+19) e3(i+19) e4(i+19) e5(i+19) e6(i+19) e7(i+19)) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32a, tmp5)); + // e0(i+20) e1(i+20) e2(i+20) e3(i+20) e4(i+20) e5(i+20) e6(i+20) e7(i+20)... e0(i+23) + // e1(i+23) e2(i+23) e3(i+23) e4(i+23) e5(i+23) e6(i+23) e7(i+23)) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32b, tmp5)); + // e0(i+24) e1(i+24) e2(i+24) e3(i+24) ... e0(i+31) e1(i+31) e2(i+31) e3(i+31) + tmp4 = _mm512_permutex2var_epi16(tmp0, p16b, tmp1); + // e4(i+24) e5(i+24) e6(i+24) e7(i+24) ... e4(i+31) e5(i+31) e6(i+31) e7(i+31) + tmp5 = _mm512_permutex2var_epi16(tmp2, p16b, tmp3); + // e0(i+24) e1(i+24) e2(i+24) e3(i+24) e4(i+24) e5(i+24) e6(i+24) e7(i+24)... e0(i+27) + // e1(i+27) e2(i+27) e3(i+27) e4(i+27) e5(i+27) e6(i+27) e7(i+27)) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32a, tmp5)); + // e0(i+28) e1(i+28) e2(i+28) e3(i+28) e4(i+28) e5(i+28) e6(i+28) e7(i+28)... e0(i+31) + // e1(i+31) e2(i+31) e3(i+31) e4(i+31) e5(i+31) e6(i+31) e7(i+31)) + _mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32b, tmp5)); + } + e0 = (uint8_t *)e0_512; + e1 = (uint8_t *)e1_512; + e2 = (uint8_t *)e2_512; + e3 = (uint8_t *)e3_512; + e4 = (uint8_t *)e4_512; + e5 = (uint8_t *)e5_512; + e6 = (uint8_t *)e6_512; + e7 = (uint8_t *)e7_512; + f = (uint8_t *)f_512; +#endif +#ifdef USE128BIT + e0_128 = (simde__m128i *)e0; + e1_128 = (simde__m128i *)e1; + e2_128 = (simde__m128i *)e2; + e3_128 = (simde__m128i *)e3; + e4_128 = (simde__m128i *)e4; + e5_128 = (simde__m128i *)e5; + e6_128 = (simde__m128i *)e6; + e7_128 = (simde__m128i *)e7; + for (; i < (EQm & ~15); i += 16) { + simde__m128i e0j = simde_mm_loadu_si128(e0_128++); + simde__m128i e1j = simde_mm_loadu_si128(e1_128++); + simde__m128i e2j = simde_mm_loadu_si128(e2_128++); + simde__m128i e3j = simde_mm_loadu_si128(e3_128++); + simde__m128i e4j = simde_mm_loadu_si128(e4_128++); + simde__m128i e5j = simde_mm_loadu_si128(e5_128++); + simde__m128i e6j = simde_mm_loadu_si128(e6_128++); + simde__m128i e7j = simde_mm_loadu_si128(e7_128++); + simde__m128i tmp0 = simde_mm_unpacklo_epi8(e0j, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+7) e1(i+7) + simde__m128i tmp1 = simde_mm_unpacklo_epi8(e2j, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+7) e3(i+7) + // e0(i) e1(i) e2(i) e3(i) e0(i+1) e1(i+1) e2(i+1) e3(i+1) ... e0(i+3) e1(i+3) e2(i+3) e3(i+3) + simde__m128i tmp2 = simde_mm_unpacklo_epi16(tmp0, tmp1); + // e0(i+4) e1(i+4) e2(i+4) e3(i+4) e0(i+5) e1(i+5) e2(i+5) e3(i+5) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) + simde__m128i tmp3 = simde_mm_unpackhi_epi16(tmp0, tmp1); + simde__m128i tmp4 = simde_mm_unpacklo_epi8(e4j, e5j); // e4(i) e5(i) e4(i+1) e5(i+1) .... e4(i+7) e5(i+7) + simde__m128i tmp5 = simde_mm_unpacklo_epi8(e6j, e7j); // e6(i) e7(i) e6(i+1) e7(i+1) .... e6(i+7) e7(i+7) + // e4(i) e5(i) e6(i) e7(i) e4(i+1) e5(i+1) e6(i+1) e7(i+1) ... e4(i+3) e5(i+3) e6(i+) e7(i+3) + simde__m128i tmp6 = simde_mm_unpacklo_epi16(tmp4, tmp5); + // e4(i+4) e5(i+4) e6(i+4) e7(i+4) e4(i+5) e5(i+5) e6(i+5) e7(i+5) ... e4(i+7) e5(i+7) e6(i+7) e7(i+7) + simde__m128i tmp7 = simde_mm_unpackhi_epi16(tmp4, tmp5); + // e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) e6(i) e7(i) e0(i+1) ... e7(i+1) + simde_mm_storeu_si128(f_128++, simde_mm_unpacklo_epi32(tmp2, tmp6)); + // e0(i+2) e1(i+2) e2(i+2) e3(i+2) e4(i+2) e5(i+2) e6(i+2) e7(i+2) e0(i+3) e1(i+3) ... e7(i+3) + simde_mm_storeu_si128(f_128++, simde_mm_unpackhi_epi32(tmp2, tmp6)); + // e0(i+4) e1(i+4) e2(i+4) e3(i+4) e4(i+4) e5(i+4) e6(i+4) e7+4(i) e0(i+5) ... e7(i+5) + simde_mm_storeu_si128(f_128++, simde_mm_unpacklo_epi32(tmp3, tmp7)); + // e0(i+6) e1(i+6) e2(i+6) e3(i+6) e4(i+6) e5(i+6) e6(i+6) e7(i+6) e0(i+7) e0(i+7) ... e7(i+7) + simde_mm_storeu_si128(f_128++, simde_mm_unpackhi_epi32(tmp3, tmp7)); + + tmp0 = simde_mm_unpackhi_epi8(e0j, e1j); // e0(i+8) e1(i+8) e0(i+9) e1(i+9) .... e0(i+15) e1(i+15) + tmp1 = simde_mm_unpackhi_epi8(e2j, e3j); // e2(i+8) e3(i+8) e2(i+9) e3(i+9) .... e2(i+15) e3(i+15) + // e0(i) e1(i) e2(i) e3(i) e0(i+1) e1(i+1) e2(i+1) e3(i+1) ... e0(i+3) e1(i+3) e2(i+3) e3(i+3) + tmp2 = simde_mm_unpacklo_epi16(tmp0, tmp1); + // e0(i+4) e1(i+4) e2(i+4) e3(i+4) e0(i+5) e1(i+5) e2(i+5) e3(i+5) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7) + tmp3 = simde_mm_unpackhi_epi16(tmp0, tmp1); + tmp4 = simde_mm_unpackhi_epi8(e4j, e5j); // e4(i+8) e5(i+8) e4(i+9) e5(i+9) .... e4(i+15) e515i+7) + tmp5 = simde_mm_unpackhi_epi8(e6j, e7j); // e6(i+8) e7(i+8) e6(i+9) e7(i+9) .... e6(i+15) e7(i+15) + // e4(i) e5(i) e6(i) e7(i) e4(i+1) e5(i+1) e6(i+1) e7(i+1) ... e4(i+3) e5(i+3) e6(i+) e7(i+3) + tmp6 = simde_mm_unpacklo_epi16(tmp4, tmp5); + // e4(i+4) e5(i+4) e6(i+4) e7(i+4) e4(i+5) e5(i+5) e6(i+5) e7(i+5) ... e4(i+7) e5(i+7) e6(i+7) e7(i+7) + tmp7 = simde_mm_unpackhi_epi16(tmp4, tmp5); + // e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) e6(i) e7(i) e0(i+1) ... e7(i+1) + simde_mm_storeu_si128(f_128++, simde_mm_unpacklo_epi32(tmp2, tmp6)); + // e0(i+2) e1(i+2) e2(i+2) e3(i+2) e4(i+2) e5(i+2) e6(i+2) e7(i+2) e0(i+3) e1(i+3) ... e7(i+3) + simde_mm_storeu_si128(f_128++, simde_mm_unpackhi_epi32(tmp2, tmp6)); + // e0(i+4) e1(i+4) e2(i+4) e3(i+4) e4(i+4) e5(i+4) e6(i+4) e7+4(i) e0(i+5) ... e7(i+5) + simde_mm_storeu_si128(f_128++, simde_mm_unpacklo_epi32(tmp3, tmp7)); + // e0(i+6) e1(i+6) e2(i+6) e3(i+6) e4(i+6) e5(i+6) e6(i+6) e7(i+6) e0(i+7) e0(i+7) ... e7(i+7) + simde_mm_storeu_si128(f_128++, simde_mm_unpackhi_epi32(tmp3, tmp7)); + } + e0 = (uint8_t *)e0_128; + e1 = (uint8_t *)e1_128; + e2 = (uint8_t *)e2_128; + e3 = (uint8_t *)e3_128; + e4 = (uint8_t *)e4_128; + e5 = (uint8_t *)e5_128; + e6 = (uint8_t *)e6_128; + e7 = (uint8_t *)e7_128; + f = (uint8_t *)f_128; +#endif + for (; i < EQm; i++) { + *f++ = *e0++; + *f++ = *e1++; + *f++ = *e2++; + *f++ = *e3++; + *f++ = *e4++; + *f++ = *e5++; + *f++ = *e6++; + *f++ = *e7++; + } + } break; + default: + AssertFatal(false, "Should be here!\n"); + } } void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e, int16_t *f) @@ -454,8 +599,11 @@ int nr_rate_matching_ldpc(uint32_t Tbslbrm, printf("RM_TX k%u Ind: %u (%d)\n", k, ind, d[ind]); #endif - if (d[ind] != NR_NULL) - e[k++] = d[ind]; + if (ind == Foffset) + ind = F + Foffset; // skip filler bits + + e[k++] = d[ind]; + } } diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.h b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.h index ac6a496801..597a53070a 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.h +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.h @@ -24,8 +24,6 @@ #include -#define NR_NULL 2 - /** * \brief interleave a code segment after encoding and rate matching * \param E size of the code segment in bits diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_t2/nrLDPC_coding_t2.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_t2/nrLDPC_coding_t2.c index c16b21bfdc..6eb8f0dacc 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_t2/nrLDPC_coding_t2.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_t2/nrLDPC_coding_t2.c @@ -650,21 +650,44 @@ static int retrieve_ldpc_enc_op(struct rte_bbdev_enc_op **ops, nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters) { + uint8_t *p_out = NULL; unsigned int j = 0; for (unsigned int h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h){ - for (unsigned int i = 0; i < nrLDPC_slot_encoding_parameters->TBs[h].C; ++i) { + int E_sum = 0; + int bit_offset = 0; + int byte_offset = 0; + p_out = nrLDPC_slot_encoding_parameters->TBs[h].output; + for (unsigned int r = 0; r < nrLDPC_slot_encoding_parameters->TBs[h].C; ++r) { struct rte_bbdev_op_data *output = &ops[j]->ldpc_enc.output; struct rte_mbuf *m = output->data; uint16_t data_len = rte_pktmbuf_data_len(m) - output->offset; - uint8_t *out = nrLDPC_slot_encoding_parameters->TBs[h].segments[i].output; - const char *data = m->buf_addr + m->data_off; - const char *end = data + data_len; - while (data < end) { - uint8_t byte = *data++; // get the current byte - for (int bit = 7; bit >= 0; --bit) { - *out++ = (byte >> bit) & 1; // extract each bit + uint8_t *data = m->buf_addr + m->data_off; + reverse_bits_u8(data, data_len, data); + if (bit_offset == 0) { + memcpy(&p_out[byte_offset], data, data_len); + } else { + size_t i = 0; + for (; i < (data_len & ~0x7); i += 8) { + uint8_t carry = *data << bit_offset; + p_out[byte_offset + i - 1] |= carry; + + simde__m64 current = *((simde__m64 *)data); + data += 8; + current = simde_mm_srli_si64(current, 8 - bit_offset); + *(simde__m64 *)&p_out[byte_offset + i] = current; + } + for (; i < data_len; i++) { + uint8_t current = *data++; + + uint8_t carry = current << bit_offset; + p_out[byte_offset + i - 1] |= carry; + + p_out[byte_offset + i] = (current >> (8 - bit_offset)); } } + E_sum += nrLDPC_slot_encoding_parameters->TBs[h].segments[r].E; + byte_offset = (E_sum + 7) / 8; + bit_offset = E_sum % 8; rte_pktmbuf_free(m); rte_pktmbuf_free(ops[j]->ldpc_enc.input.data); ++j; @@ -815,6 +838,10 @@ static int pmd_lcore_ldpc_enc(void *arg) AssertFatal(ret == 0, "Allocation failed for %d ops", num_segments); set_ldpc_enc_op(ops_enq, 0, bufs->inputs, bufs->hard_outputs, nrLDPC_slot_encoding_parameters); + if (nrLDPC_slot_encoding_parameters->tprep != NULL) + stop_meas(nrLDPC_slot_encoding_parameters->tprep); + if (nrLDPC_slot_encoding_parameters->tparity != NULL) + start_meas(nrLDPC_slot_encoding_parameters->tparity); for (enq = 0, deq = 0; enq < num_segments;) { num_to_enq = num_segments; if (unlikely(num_segments - enq < num_to_enq)) @@ -828,10 +855,14 @@ static int pmd_lcore_ldpc_enc(void *arg) time_out++; DevAssert(time_out <= TIME_OUT_POLL); } - + if (nrLDPC_slot_encoding_parameters->tparity != NULL) + stop_meas(nrLDPC_slot_encoding_parameters->tparity); + if (nrLDPC_slot_encoding_parameters->toutput != NULL) + start_meas(nrLDPC_slot_encoding_parameters->toutput); ret = retrieve_ldpc_enc_op(ops_deq, nrLDPC_slot_encoding_parameters); AssertFatal(ret == 0, "Failed to retrieve LDPC encoding op!"); - + if (nrLDPC_slot_encoding_parameters->toutput != NULL) + stop_meas(nrLDPC_slot_encoding_parameters->toutput); rte_bbdev_enc_op_free_bulk(ops_enq, num_segments); rte_free(ops_enq); rte_free(ops_deq); @@ -1074,6 +1105,8 @@ int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_dec int32_t nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters) { pthread_mutex_lock(&encode_mutex); + if (nrLDPC_slot_encoding_parameters->tprep != NULL) + start_meas(nrLDPC_slot_encoding_parameters->tprep); // hardcoded to use the first found board struct active_device *ad = active_devs; int ret; diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/cnProc_gen_BG1_128.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/cnProc_gen_BG1_128.c index e4d971472f..9e3d212697 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/cnProc_gen_BG1_128.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_cnProc/cnProc_gen_BG1_128.c @@ -24,7 +24,9 @@ #include #include "../../nrLDPCdecoder_defs.h" -#define AVOID_MM256_SIGN 1 +#ifdef __aarch64__ +#define AVOID_SIGN 1 +#endif #define DROP_MAXLLR 1 void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) { @@ -126,7 +128,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[0]>>4)+lut_idxCnProcG3[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -138,7 +144,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif // Store result // min = simde_mm_min_epu8(min, maxLLR); // 128 in epi8 is -127 #ifndef DROP_MAXLLR @@ -185,7 +195,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[1]>>4)+lut_idxCnProcG4[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -199,7 +213,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); - fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else + fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif } // Store result @@ -252,7 +270,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[2]>>4)+lut_idxCnProcG5[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -266,7 +288,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); - fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else + fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif } // Store result @@ -319,7 +345,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[3]>>4)+lut_idxCnProcG6[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -333,7 +363,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); - fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else + fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif } // Store result @@ -389,7 +423,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[4]>>4)+lut_idxCnProcG7[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -403,7 +441,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); - fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else + fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif } // Store result @@ -460,7 +502,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[5]>>4)+lut_idxCnProcG8[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -474,7 +520,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); - fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else + fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif } // Store result @@ -531,7 +581,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[6]>>4)+lut_idxCnProcG9[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -545,7 +599,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); - fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else + fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif } // Store result @@ -603,7 +661,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[7]>>4)+lut_idxCnProcG10[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -617,7 +679,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); - fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else + fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif } // Store result @@ -678,7 +744,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[8]>>4)+lut_idxCnProcG19[j][0]*2); // sgn = simde_mm_sign_epi8(ones, ymm0); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n"); +#else fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n"); +#endif // min = simde_mm_abs_epi8(ymm0); fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n"); @@ -692,7 +762,11 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R) fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n"); // sgn = simde_mm_sign_epi8(sgn, ymm0); - fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#ifdef AVOID_SIGN + fprintf(fd," sgn = simde_mm_xor_si128(sgn, ymm0);\n"); +#else + fprintf(fd," sgn = simde_mm_sign_epi8(sgn, ymm0);\n"); +#endif } // Store result diff --git a/openair1/PHY/CODING/nrLDPC_defs.h b/openair1/PHY/CODING/nrLDPC_defs.h index 3db41a0e29..2298400078 100644 --- a/openair1/PHY/CODING/nrLDPC_defs.h +++ b/openair1/PHY/CODING/nrLDPC_defs.h @@ -28,7 +28,7 @@ /** \brief LDPC encoder parameter structure \var n_segments number of segments in the transport block - \var macro_num index of the subset of segments to encode + \var first_seg index of the first segment of the subset to encode within the transport block \var gen_code flag to generate parity check code 0 -> encoding @@ -52,7 +52,7 @@ */ typedef struct { unsigned int n_segments; // optim8seg - unsigned int macro_num; // optim8segmulti + unsigned int first_seg; // optim8segmulti unsigned char gen_code; //orig time_stats_t *tinput; time_stats_t *tprep; @@ -92,6 +92,6 @@ typedef int32_t(LDPC_decoderfunc_t)(t_nrLDPC_dec_params *p_decParams, int8_t *p_out, t_nrLDPC_time_stats *, decode_abort_t *ab); -typedef int32_t(LDPC_encoderfunc_t)(uint8_t **, uint8_t **, encoder_implemparams_t *); +typedef int32_t(LDPC_encoderfunc_t)(uint8_t **, uint8_t *, encoder_implemparams_t *); #endif diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc384_simd512_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc384_simd512_byte.c new file mode 100644 index 0000000000..16ddbd3e48 --- /dev/null +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc384_simd512_byte.c @@ -0,0 +1,151 @@ +#include "PHY/sse_intrin.h" +// generated code for Zc=384, byte encoding +static inline void ldpc384_byte(uint8_t *c,uint8_t *d) { + __m512i *csimd=(__m512i *)c,*dsimd=(__m512i *)d; + + __m512i *c2,*d2; + + int i2; + for (i2=0; i2<6; i2++) { + c2=&csimd[i2]; + d2=&dsimd[i2]; + +//row: 0 + d2[0]=_mm512_xor_si512(c2[13468],_mm512_xor_si512(c2[3169],_mm512_xor_si512(c2[3435],_mm512_xor_si512(c2[5284],_mm512_xor_si512(c2[5028],_mm512_xor_si512(c2[15327],_mm512_xor_si512(c2[6085],_mm512_xor_si512(c2[13224],_mm512_xor_si512(c2[3193],_mm512_xor_si512(c2[2141],_mm512_xor_si512(c2[12977],_mm512_xor_si512(c2[2413],_mm512_xor_si512(c2[36],_mm512_xor_si512(c2[8500],_mm512_xor_si512(c2[3221],_mm512_xor_si512(c2[5068],_mm512_xor_si512(c2[14054],_mm512_xor_si512(c2[4286],_mm512_xor_si512(c2[64],_mm512_xor_si512(c2[6411],_mm512_xor_si512(c2[8786],_mm512_xor_si512(c2[1923],_mm512_xor_si512(c2[2993],_mm512_xor_si512(c2[2992],_mm512_xor_si512(c2[6686],_mm512_xor_si512(c2[3005],_mm512_xor_si512(c2[8546],_mm512_xor_si512(c2[14880],_mm512_xor_si512(c2[16216],_mm512_xor_si512(c2[13310],_mm512_xor_si512(c2[16740],_mm512_xor_si512(c2[8572],_mm512_xor_si512(c2[386],_mm512_xor_si512(c2[1178],_mm512_xor_si512(c2[12013],_mm512_xor_si512(c2[10432],_mm512_xor_si512(c2[13072],_mm512_xor_si512(c2[4632],_mm512_xor_si512(c2[5957],_mm512_xor_si512(c2[10443],_mm512_xor_si512(c2[9929],_mm512_xor_si512(c2[2271],_mm512_xor_si512(c2[5705],_mm512_xor_si512(c2[6771],_mm512_xor_si512(c2[6505],_mm512_xor_si512(c2[5451],_mm512_xor_si512(c2[6255],_mm512_xor_si512(c2[9421],_mm512_xor_si512(c2[14172],_mm512_xor_si512(c2[11281],_mm512_xor_si512(c2[9173],_mm512_xor_si512(c2[12868],_mm512_xor_si512(c2[13405],_mm512_xor_si512(c2[998],_mm512_xor_si512(c2[11824],_mm512_xor_si512(c2[13419],_mm512_xor_si512(c2[12891],_mm512_xor_si512(c2[4180],_mm512_xor_si512(c2[13958],_mm512_xor_si512(c2[3137],_mm512_xor_si512(c2[3663],_mm512_xor_si512(c2[2885],_mm512_xor_si512(c2[3672],_mm512_xor_si512(c2[10536],_mm512_xor_si512(c2[7121],_mm512_xor_si512(c2[12925],c2[10025])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 1 + d2[6]=_mm512_xor_si512(c2[13468],_mm512_xor_si512(c2[13732],_mm512_xor_si512(c2[3433],_mm512_xor_si512(c2[3699],_mm512_xor_si512(c2[5548],_mm512_xor_si512(c2[5028],_mm512_xor_si512(c2[5292],_mm512_xor_si512(c2[15591],_mm512_xor_si512(c2[6349],_mm512_xor_si512(c2[13224],_mm512_xor_si512(c2[13488],_mm512_xor_si512(c2[3457],_mm512_xor_si512(c2[2405],_mm512_xor_si512(c2[12977],_mm512_xor_si512(c2[13241],_mm512_xor_si512(c2[2677],_mm512_xor_si512(c2[300],_mm512_xor_si512(c2[8764],_mm512_xor_si512(c2[3485],_mm512_xor_si512(c2[5332],_mm512_xor_si512(c2[14054],_mm512_xor_si512(c2[14318],_mm512_xor_si512(c2[4550],_mm512_xor_si512(c2[328],_mm512_xor_si512(c2[6411],_mm512_xor_si512(c2[6675],_mm512_xor_si512(c2[9050],_mm512_xor_si512(c2[2187],_mm512_xor_si512(c2[3257],_mm512_xor_si512(c2[3256],_mm512_xor_si512(c2[6950],_mm512_xor_si512(c2[3269],_mm512_xor_si512(c2[8810],_mm512_xor_si512(c2[15144],_mm512_xor_si512(c2[16216],_mm512_xor_si512(c2[16480],_mm512_xor_si512(c2[13574],_mm512_xor_si512(c2[109],_mm512_xor_si512(c2[8572],_mm512_xor_si512(c2[8836],_mm512_xor_si512(c2[650],_mm512_xor_si512(c2[1442],_mm512_xor_si512(c2[12013],_mm512_xor_si512(c2[12277],_mm512_xor_si512(c2[10696],_mm512_xor_si512(c2[13336],_mm512_xor_si512(c2[4632],_mm512_xor_si512(c2[4896],_mm512_xor_si512(c2[6221],_mm512_xor_si512(c2[10707],_mm512_xor_si512(c2[9929],_mm512_xor_si512(c2[10193],_mm512_xor_si512(c2[2535],_mm512_xor_si512(c2[5969],_mm512_xor_si512(c2[7035],_mm512_xor_si512(c2[6769],_mm512_xor_si512(c2[5715],_mm512_xor_si512(c2[6255],_mm512_xor_si512(c2[6519],_mm512_xor_si512(c2[9685],_mm512_xor_si512(c2[14436],_mm512_xor_si512(c2[11281],_mm512_xor_si512(c2[11545],_mm512_xor_si512(c2[9437],_mm512_xor_si512(c2[13132],_mm512_xor_si512(c2[13669],_mm512_xor_si512(c2[1262],_mm512_xor_si512(c2[12088],_mm512_xor_si512(c2[13419],_mm512_xor_si512(c2[13683],_mm512_xor_si512(c2[13155],_mm512_xor_si512(c2[4444],_mm512_xor_si512(c2[13958],_mm512_xor_si512(c2[14222],_mm512_xor_si512(c2[3401],_mm512_xor_si512(c2[3927],_mm512_xor_si512(c2[2885],_mm512_xor_si512(c2[3149],_mm512_xor_si512(c2[3936],_mm512_xor_si512(c2[10800],_mm512_xor_si512(c2[7121],_mm512_xor_si512(c2[7385],_mm512_xor_si512(c2[13189],c2[10289]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 2 + d2[12]=_mm512_xor_si512(c2[13732],_mm512_xor_si512(c2[3433],_mm512_xor_si512(c2[3435],_mm512_xor_si512(c2[3699],_mm512_xor_si512(c2[5284],_mm512_xor_si512(c2[5548],_mm512_xor_si512(c2[5292],_mm512_xor_si512(c2[15327],_mm512_xor_si512(c2[15591],_mm512_xor_si512(c2[6085],_mm512_xor_si512(c2[6349],_mm512_xor_si512(c2[13488],_mm512_xor_si512(c2[3457],_mm512_xor_si512(c2[2141],_mm512_xor_si512(c2[2405],_mm512_xor_si512(c2[13241],_mm512_xor_si512(c2[2677],_mm512_xor_si512(c2[36],_mm512_xor_si512(c2[300],_mm512_xor_si512(c2[8764],_mm512_xor_si512(c2[3221],_mm512_xor_si512(c2[3485],_mm512_xor_si512(c2[5068],_mm512_xor_si512(c2[5332],_mm512_xor_si512(c2[14318],_mm512_xor_si512(c2[4550],_mm512_xor_si512(c2[64],_mm512_xor_si512(c2[328],_mm512_xor_si512(c2[6675],_mm512_xor_si512(c2[8786],_mm512_xor_si512(c2[9050],_mm512_xor_si512(c2[1923],_mm512_xor_si512(c2[2187],_mm512_xor_si512(c2[3257],_mm512_xor_si512(c2[2992],_mm512_xor_si512(c2[3256],_mm512_xor_si512(c2[6686],_mm512_xor_si512(c2[6950],_mm512_xor_si512(c2[3269],_mm512_xor_si512(c2[8546],_mm512_xor_si512(c2[8810],_mm512_xor_si512(c2[14880],_mm512_xor_si512(c2[15144],_mm512_xor_si512(c2[16480],_mm512_xor_si512(c2[13574],_mm512_xor_si512(c2[16740],_mm512_xor_si512(c2[109],_mm512_xor_si512(c2[8836],_mm512_xor_si512(c2[386],_mm512_xor_si512(c2[650],_mm512_xor_si512(c2[1178],_mm512_xor_si512(c2[1442],_mm512_xor_si512(c2[12277],_mm512_xor_si512(c2[10696],_mm512_xor_si512(c2[13072],_mm512_xor_si512(c2[13336],_mm512_xor_si512(c2[4896],_mm512_xor_si512(c2[6221],_mm512_xor_si512(c2[10443],_mm512_xor_si512(c2[10707],_mm512_xor_si512(c2[10193],_mm512_xor_si512(c2[2271],_mm512_xor_si512(c2[2535],_mm512_xor_si512(c2[5705],_mm512_xor_si512(c2[5969],_mm512_xor_si512(c2[7035],_mm512_xor_si512(c2[6505],_mm512_xor_si512(c2[6769],_mm512_xor_si512(c2[5451],_mm512_xor_si512(c2[5715],_mm512_xor_si512(c2[6519],_mm512_xor_si512(c2[9685],_mm512_xor_si512(c2[14172],_mm512_xor_si512(c2[14436],_mm512_xor_si512(c2[11545],_mm512_xor_si512(c2[9437],_mm512_xor_si512(c2[12868],_mm512_xor_si512(c2[13132],_mm512_xor_si512(c2[13669],_mm512_xor_si512(c2[998],_mm512_xor_si512(c2[1262],_mm512_xor_si512(c2[11824],_mm512_xor_si512(c2[12088],_mm512_xor_si512(c2[13683],_mm512_xor_si512(c2[12891],_mm512_xor_si512(c2[13155],_mm512_xor_si512(c2[4180],_mm512_xor_si512(c2[4444],_mm512_xor_si512(c2[14222],_mm512_xor_si512(c2[3401],_mm512_xor_si512(c2[3663],_mm512_xor_si512(c2[3927],_mm512_xor_si512(c2[3149],_mm512_xor_si512(c2[3672],_mm512_xor_si512(c2[3936],_mm512_xor_si512(c2[10536],_mm512_xor_si512(c2[10800],_mm512_xor_si512(c2[7385],_mm512_xor_si512(c2[13189],_mm512_xor_si512(c2[10025],c2[10289])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 3 + d2[18]=_mm512_xor_si512(c2[13732],_mm512_xor_si512(c2[3433],_mm512_xor_si512(c2[3699],_mm512_xor_si512(c2[5284],_mm512_xor_si512(c2[5548],_mm512_xor_si512(c2[5292],_mm512_xor_si512(c2[15591],_mm512_xor_si512(c2[6085],_mm512_xor_si512(c2[6349],_mm512_xor_si512(c2[13488],_mm512_xor_si512(c2[3457],_mm512_xor_si512(c2[2405],_mm512_xor_si512(c2[13241],_mm512_xor_si512(c2[2677],_mm512_xor_si512(c2[36],_mm512_xor_si512(c2[300],_mm512_xor_si512(c2[8764],_mm512_xor_si512(c2[3485],_mm512_xor_si512(c2[5068],_mm512_xor_si512(c2[5332],_mm512_xor_si512(c2[14318],_mm512_xor_si512(c2[4550],_mm512_xor_si512(c2[328],_mm512_xor_si512(c2[6675],_mm512_xor_si512(c2[9050],_mm512_xor_si512(c2[1923],_mm512_xor_si512(c2[2187],_mm512_xor_si512(c2[3257],_mm512_xor_si512(c2[3256],_mm512_xor_si512(c2[6686],_mm512_xor_si512(c2[6950],_mm512_xor_si512(c2[3269],_mm512_xor_si512(c2[8810],_mm512_xor_si512(c2[14880],_mm512_xor_si512(c2[15144],_mm512_xor_si512(c2[16480],_mm512_xor_si512(c2[13574],_mm512_xor_si512(c2[109],_mm512_xor_si512(c2[8836],_mm512_xor_si512(c2[650],_mm512_xor_si512(c2[1178],_mm512_xor_si512(c2[1442],_mm512_xor_si512(c2[12277],_mm512_xor_si512(c2[10696],_mm512_xor_si512(c2[13072],_mm512_xor_si512(c2[13336],_mm512_xor_si512(c2[4896],_mm512_xor_si512(c2[6221],_mm512_xor_si512(c2[10443],_mm512_xor_si512(c2[10707],_mm512_xor_si512(c2[10193],_mm512_xor_si512(c2[2535],_mm512_xor_si512(c2[5705],_mm512_xor_si512(c2[5969],_mm512_xor_si512(c2[7035],_mm512_xor_si512(c2[6769],_mm512_xor_si512(c2[5451],_mm512_xor_si512(c2[5715],_mm512_xor_si512(c2[6519],_mm512_xor_si512(c2[9685],_mm512_xor_si512(c2[14436],_mm512_xor_si512(c2[11545],_mm512_xor_si512(c2[9437],_mm512_xor_si512(c2[12868],_mm512_xor_si512(c2[13132],_mm512_xor_si512(c2[13669],_mm512_xor_si512(c2[1262],_mm512_xor_si512(c2[11824],_mm512_xor_si512(c2[12088],_mm512_xor_si512(c2[13683],_mm512_xor_si512(c2[13155],_mm512_xor_si512(c2[4180],_mm512_xor_si512(c2[4444],_mm512_xor_si512(c2[14222],_mm512_xor_si512(c2[3401],_mm512_xor_si512(c2[3927],_mm512_xor_si512(c2[3149],_mm512_xor_si512(c2[3936],_mm512_xor_si512(c2[10536],_mm512_xor_si512(c2[10800],_mm512_xor_si512(c2[7385],_mm512_xor_si512(c2[13189],_mm512_xor_si512(c2[10025],c2[10289]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 4 + d2[24]=_mm512_xor_si512(c2[3173],c2[14006]); + +//row: 5 + d2[30]=_mm512_xor_si512(c2[4225],_mm512_xor_si512(c2[10827],_mm512_xor_si512(c2[11093],_mm512_xor_si512(c2[12936],_mm512_xor_si512(c2[795],_mm512_xor_si512(c2[12686],_mm512_xor_si512(c2[6084],_mm512_xor_si512(c2[13743],_mm512_xor_si512(c2[3708],_mm512_xor_si512(c2[3987],_mm512_xor_si512(c2[10851],_mm512_xor_si512(c2[9793],_mm512_xor_si512(c2[3734],_mm512_xor_si512(c2[10071],_mm512_xor_si512(c2[7694],_mm512_xor_si512(c2[13501],_mm512_xor_si512(c2[16152],_mm512_xor_si512(c2[10873],_mm512_xor_si512(c2[12720],_mm512_xor_si512(c2[4817],_mm512_xor_si512(c2[11944],_mm512_xor_si512(c2[7716],_mm512_xor_si512(c2[14069],_mm512_xor_si512(c2[16444],_mm512_xor_si512(c2[9581],_mm512_xor_si512(c2[10645],_mm512_xor_si512(c2[10644],_mm512_xor_si512(c2[14344],_mm512_xor_si512(c2[10657],_mm512_xor_si512(c2[16204],_mm512_xor_si512(c2[5643],_mm512_xor_si512(c2[6973],_mm512_xor_si512(c2[4073],_mm512_xor_si512(c2[7503],_mm512_xor_si512(c2[16224],_mm512_xor_si512(c2[8044],_mm512_xor_si512(c2[8836],_mm512_xor_si512(c2[2776],_mm512_xor_si512(c2[1189],_mm512_xor_si512(c2[3829],_mm512_xor_si512(c2[12290],_mm512_xor_si512(c2[13609],_mm512_xor_si512(c2[1200],_mm512_xor_si512(c2[10178],_mm512_xor_si512(c2[686],_mm512_xor_si512(c2[9929],_mm512_xor_si512(c2[13357],_mm512_xor_si512(c2[14429],_mm512_xor_si512(c2[14163],_mm512_xor_si512(c2[13109],_mm512_xor_si512(c2[13913],_mm512_xor_si512(c2[184],_mm512_xor_si512(c2[4935],_mm512_xor_si512(c2[2044],_mm512_xor_si512(c2[16825],_mm512_xor_si512(c2[3625],_mm512_xor_si512(c2[13131],_mm512_xor_si512(c2[4168],_mm512_xor_si512(c2[8656],_mm512_xor_si512(c2[2581],_mm512_xor_si512(c2[4176],_mm512_xor_si512(c2[3648],_mm512_xor_si512(c2[11832],_mm512_xor_si512(c2[4721],_mm512_xor_si512(c2[10789],_mm512_xor_si512(c2[11321],_mm512_xor_si512(c2[10537],_mm512_xor_si512(c2[11330],_mm512_xor_si512(c2[1299],_mm512_xor_si512(c2[14773],_mm512_xor_si512(c2[3688],_mm512_xor_si512(c2[782],c2[13716])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 6 + d2[36]=_mm512_xor_si512(c2[5812],_mm512_xor_si512(c2[340],_mm512_xor_si512(c2[384],_mm512_xor_si512(c2[8321],_mm512_xor_si512(c2[7549],_mm512_xor_si512(c2[16311],_mm512_xor_si512(c2[4968],c2[8955]))))))); + +//row: 7 + d2[42]=_mm512_xor_si512(c2[2376],_mm512_xor_si512(c2[16380],_mm512_xor_si512(c2[15892],_mm512_xor_si512(c2[3521],_mm512_xor_si512(c2[9076],c2[13369]))))); + +//row: 8 + d2[48]=_mm512_xor_si512(c2[14261],_mm512_xor_si512(c2[7921],_mm512_xor_si512(c2[3962],_mm512_xor_si512(c2[14523],_mm512_xor_si512(c2[4228],_mm512_xor_si512(c2[14525],_mm512_xor_si512(c2[14789],_mm512_xor_si512(c2[6077],_mm512_xor_si512(c2[16368],_mm512_xor_si512(c2[16632],_mm512_xor_si512(c2[13468],_mm512_xor_si512(c2[5821],_mm512_xor_si512(c2[16382],_mm512_xor_si512(c2[16120],_mm512_xor_si512(c2[9516],_mm512_xor_si512(c2[9780],_mm512_xor_si512(c2[6878],_mm512_xor_si512(c2[280],_mm512_xor_si512(c2[544],_mm512_xor_si512(c2[13478],_mm512_xor_si512(c2[14017],_mm512_xor_si512(c2[7683],_mm512_xor_si512(c2[3986],_mm512_xor_si512(c2[14547],_mm512_xor_si512(c2[2928],_mm512_xor_si512(c2[13225],_mm512_xor_si512(c2[13489],_mm512_xor_si512(c2[13764],_mm512_xor_si512(c2[7430],_mm512_xor_si512(c2[3206],_mm512_xor_si512(c2[13767],_mm512_xor_si512(c2[829],_mm512_xor_si512(c2[11126],_mm512_xor_si512(c2[11390],_mm512_xor_si512(c2[9806],_mm512_xor_si512(c2[9293],_mm512_xor_si512(c2[2953],_mm512_xor_si512(c2[4008],_mm512_xor_si512(c2[14305],_mm512_xor_si512(c2[14569],_mm512_xor_si512(c2[5861],_mm512_xor_si512(c2[16152],_mm512_xor_si512(c2[16416],_mm512_xor_si512(c2[14847],_mm512_xor_si512(c2[8513],_mm512_xor_si512(c2[5079],_mm512_xor_si512(c2[15640],_mm512_xor_si512(c2[857],_mm512_xor_si512(c2[11148],_mm512_xor_si512(c2[11412],_mm512_xor_si512(c2[7204],_mm512_xor_si512(c2[864],_mm512_xor_si512(c2[9579],_mm512_xor_si512(c2[2981],_mm512_xor_si512(c2[3245],_mm512_xor_si512(c2[2716],_mm512_xor_si512(c2[13013],_mm512_xor_si512(c2[13277],_mm512_xor_si512(c2[3780],_mm512_xor_si512(c2[14341],_mm512_xor_si512(c2[3785],_mm512_xor_si512(c2[14076],_mm512_xor_si512(c2[14340],_mm512_xor_si512(c2[7479],_mm512_xor_si512(c2[881],_mm512_xor_si512(c2[1145],_mm512_xor_si512(c2[3792],_mm512_xor_si512(c2[14353],_mm512_xor_si512(c2[9339],_mm512_xor_si512(c2[2741],_mm512_xor_si512(c2[3005],_mm512_xor_si512(c2[15673],_mm512_xor_si512(c2[9075],_mm512_xor_si512(c2[9339],_mm512_xor_si512(c2[108],_mm512_xor_si512(c2[10669],_mm512_xor_si512(c2[14103],_mm512_xor_si512(c2[7769],_mm512_xor_si512(c2[638],_mm512_xor_si512(c2[10935],_mm512_xor_si512(c2[11199],_mm512_xor_si512(c2[9365],_mm512_xor_si512(c2[3025],_mm512_xor_si512(c2[1179],_mm512_xor_si512(c2[11476],_mm512_xor_si512(c2[11740],_mm512_xor_si512(c2[1971],_mm512_xor_si512(c2[12268],_mm512_xor_si512(c2[12532],_mm512_xor_si512(c2[12806],_mm512_xor_si512(c2[6472],_mm512_xor_si512(c2[11225],_mm512_xor_si512(c2[4885],_mm512_xor_si512(c2[13865],_mm512_xor_si512(c2[7261],_mm512_xor_si512(c2[7525],_mm512_xor_si512(c2[5425],_mm512_xor_si512(c2[15986],_mm512_xor_si512(c2[6744],_mm512_xor_si512(c2[410],_mm512_xor_si512(c2[11236],_mm512_xor_si512(c2[4632],_mm512_xor_si512(c2[4896],_mm512_xor_si512(c2[4896],_mm512_xor_si512(c2[10716],_mm512_xor_si512(c2[4382],_mm512_xor_si512(c2[3064],_mm512_xor_si512(c2[13361],_mm512_xor_si512(c2[13625],_mm512_xor_si512(c2[6492],_mm512_xor_si512(c2[16789],_mm512_xor_si512(c2[158],_mm512_xor_si512(c2[7564],_mm512_xor_si512(c2[1224],_mm512_xor_si512(c2[7298],_mm512_xor_si512(c2[700],_mm512_xor_si512(c2[964],_mm512_xor_si512(c2[6244],_mm512_xor_si512(c2[16541],_mm512_xor_si512(c2[16805],_mm512_xor_si512(c2[7048],_mm512_xor_si512(c2[708],_mm512_xor_si512(c2[10214],_mm512_xor_si512(c2[3880],_mm512_xor_si512(c2[14965],_mm512_xor_si512(c2[8367],_mm512_xor_si512(c2[8631],_mm512_xor_si512(c2[12074],_mm512_xor_si512(c2[5740],_mm512_xor_si512(c2[9960],_mm512_xor_si512(c2[3626],_mm512_xor_si512(c2[13661],_mm512_xor_si512(c2[7057],_mm512_xor_si512(c2[7321],_mm512_xor_si512(c2[10488],_mm512_xor_si512(c2[14198],_mm512_xor_si512(c2[7864],_mm512_xor_si512(c2[1791],_mm512_xor_si512(c2[12088],_mm512_xor_si512(c2[12352],_mm512_xor_si512(c2[12617],_mm512_xor_si512(c2[6013],_mm512_xor_si512(c2[6277],_mm512_xor_si512(c2[14212],_mm512_xor_si512(c2[7872],_mm512_xor_si512(c2[13684],_mm512_xor_si512(c2[7080],_mm512_xor_si512(c2[7344],_mm512_xor_si512(c2[4973],_mm512_xor_si512(c2[15264],_mm512_xor_si512(c2[15528],_mm512_xor_si512(c2[14751],_mm512_xor_si512(c2[8417],_mm512_xor_si512(c2[3924],_mm512_xor_si512(c2[14485],_mm512_xor_si512(c2[4456],_mm512_xor_si512(c2[14753],_mm512_xor_si512(c2[15017],_mm512_xor_si512(c2[8679],_mm512_xor_si512(c2[3672],_mm512_xor_si512(c2[14233],_mm512_xor_si512(c2[4465],_mm512_xor_si512(c2[14762],_mm512_xor_si512(c2[15026],_mm512_xor_si512(c2[11329],_mm512_xor_si512(c2[4731],_mm512_xor_si512(c2[4995],_mm512_xor_si512(c2[7908],_mm512_xor_si512(c2[1574],_mm512_xor_si512(c2[13718],_mm512_xor_si512(c2[7384],_mm512_xor_si512(c2[10812],_mm512_xor_si512(c2[4214],_mm512_xor_si512(c2[4478],c2[12929])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 9 + d2[54]=_mm512_xor_si512(c2[12149],_mm512_xor_si512(c2[10575],_mm512_xor_si512(c2[389],_mm512_xor_si512(c2[1454],_mm512_xor_si512(c2[15204],_mm512_xor_si512(c2[12616],_mm512_xor_si512(c2[16848],c2[4993]))))))); + +//row: 10 + d2[60]=_mm512_xor_si512(c2[9781],_mm512_xor_si512(c2[5045],_mm512_xor_si512(c2[4804],_mm512_xor_si512(c2[12493],_mm512_xor_si512(c2[16733],c2[9149]))))); + +//row: 11 + d2[66]=_mm512_xor_si512(c2[268],_mm512_xor_si512(c2[10032],_mm512_xor_si512(c2[10296],_mm512_xor_si512(c2[6864],_mm512_xor_si512(c2[3],_mm512_xor_si512(c2[7130],_mm512_xor_si512(c2[269],_mm512_xor_si512(c2[8979],_mm512_xor_si512(c2[2112],_mm512_xor_si512(c2[12672],_mm512_xor_si512(c2[8729],_mm512_xor_si512(c2[1598],_mm512_xor_si512(c2[1862],_mm512_xor_si512(c2[2127],_mm512_xor_si512(c2[12161],_mm512_xor_si512(c2[9780],_mm512_xor_si512(c2[2919],_mm512_xor_si512(c2[10045],_mm512_xor_si512(c2[24],_mm512_xor_si512(c2[9794],_mm512_xor_si512(c2[10058],_mm512_xor_si512(c2[6888],_mm512_xor_si512(c2[27],_mm512_xor_si512(c2[5836],_mm512_xor_si512(c2[15864],_mm512_xor_si512(c2[16672],_mm512_xor_si512(c2[9541],_mm512_xor_si512(c2[9805],_mm512_xor_si512(c2[6108],_mm512_xor_si512(c2[16142],_mm512_xor_si512(c2[3737],_mm512_xor_si512(c2[13765],_mm512_xor_si512(c2[12195],_mm512_xor_si512(c2[5328],_mm512_xor_si512(c2[6916],_mm512_xor_si512(c2[49],_mm512_xor_si512(c2[8763],_mm512_xor_si512(c2[1896],_mm512_xor_si512(c2[854],_mm512_xor_si512(c2[10624],_mm512_xor_si512(c2[10888],_mm512_xor_si512(c2[7981],_mm512_xor_si512(c2[1120],_mm512_xor_si512(c2[3759],_mm512_xor_si512(c2[13793],_mm512_xor_si512(c2[10106],_mm512_xor_si512(c2[2981],_mm512_xor_si512(c2[3245],_mm512_xor_si512(c2[12481],_mm512_xor_si512(c2[5620],_mm512_xor_si512(c2[5618],_mm512_xor_si512(c2[15652],_mm512_xor_si512(c2[6688],_mm512_xor_si512(c2[16716],_mm512_xor_si512(c2[6687],_mm512_xor_si512(c2[16721],_mm512_xor_si512(c2[10381],_mm512_xor_si512(c2[3520],_mm512_xor_si512(c2[6700],_mm512_xor_si512(c2[16728],_mm512_xor_si512(c2[12241],_mm512_xor_si512(c2[5380],_mm512_xor_si512(c2[1680],_mm512_xor_si512(c2[11714],_mm512_xor_si512(c2[3016],_mm512_xor_si512(c2[12780],_mm512_xor_si512(c2[13044],_mm512_xor_si512(c2[110],_mm512_xor_si512(c2[10144],_mm512_xor_si512(c2[3540],_mm512_xor_si512(c2[13574],_mm512_xor_si512(c2[12267],_mm512_xor_si512(c2[5136],_mm512_xor_si512(c2[5400],_mm512_xor_si512(c2[4081],_mm512_xor_si512(c2[14115],_mm512_xor_si512(c2[4873],_mm512_xor_si512(c2[14907],_mm512_xor_si512(c2[15708],_mm512_xor_si512(c2[8583],_mm512_xor_si512(c2[8847],_mm512_xor_si512(c2[14127],_mm512_xor_si512(c2[7260],_mm512_xor_si512(c2[16767],_mm512_xor_si512(c2[9900],_mm512_xor_si512(c2[8333],_mm512_xor_si512(c2[1202],_mm512_xor_si512(c2[1466],_mm512_xor_si512(c2[9652],_mm512_xor_si512(c2[2785],_mm512_xor_si512(c2[14138],_mm512_xor_si512(c2[7277],_mm512_xor_si512(c2[2256],_mm512_xor_si512(c2[13624],_mm512_xor_si512(c2[6493],_mm512_xor_si512(c2[6757],_mm512_xor_si512(c2[5966],_mm512_xor_si512(c2[16000],_mm512_xor_si512(c2[9400],_mm512_xor_si512(c2[2533],_mm512_xor_si512(c2[10466],_mm512_xor_si512(c2[3605],_mm512_xor_si512(c2[10200],_mm512_xor_si512(c2[3339],_mm512_xor_si512(c2[9146],_mm512_xor_si512(c2[2285],_mm512_xor_si512(c2[9950],_mm512_xor_si512(c2[2825],_mm512_xor_si512(c2[3089],_mm512_xor_si512(c2[13116],_mm512_xor_si512(c2[6255],_mm512_xor_si512(c2[972],_mm512_xor_si512(c2[11006],_mm512_xor_si512(c2[14976],_mm512_xor_si512(c2[7851],_mm512_xor_si512(c2[8115],_mm512_xor_si512(c2[12868],_mm512_xor_si512(c2[6001],_mm512_xor_si512(c2[16563],_mm512_xor_si512(c2[9696],_mm512_xor_si512(c2[12600],_mm512_xor_si512(c2[205],_mm512_xor_si512(c2[10239],_mm512_xor_si512(c2[4693],_mm512_xor_si512(c2[14727],_mm512_xor_si512(c2[15519],_mm512_xor_si512(c2[8652],_mm512_xor_si512(c2[219],_mm512_xor_si512(c2[9989],_mm512_xor_si512(c2[10253],_mm512_xor_si512(c2[16586],_mm512_xor_si512(c2[9725],_mm512_xor_si512(c2[7875],_mm512_xor_si512(c2[1008],_mm512_xor_si512(c2[758],_mm512_xor_si512(c2[10528],_mm512_xor_si512(c2[10792],_mm512_xor_si512(c2[6832],_mm512_xor_si512(c2[16860],_mm512_xor_si512(c2[7358],_mm512_xor_si512(c2[497],_mm512_xor_si512(c2[6580],_mm512_xor_si512(c2[16344],_mm512_xor_si512(c2[16608],_mm512_xor_si512(c2[7373],_mm512_xor_si512(c2[506],_mm512_xor_si512(c2[14237],_mm512_xor_si512(c2[7370],_mm512_xor_si512(c2[10816],_mm512_xor_si512(c2[3685],_mm512_xor_si512(c2[3949],_mm512_xor_si512(c2[16620],_mm512_xor_si512(c2[9759],_mm512_xor_si512(c2[13720],_mm512_xor_si512(c2[6853],c2[16094]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 12 + d2[72]=_mm512_xor_si512(c2[3433],_mm512_xor_si512(c2[15326],_mm512_xor_si512(c2[12266],_mm512_xor_si512(c2[10695],_mm512_xor_si512(c2[13356],c2[2857]))))); + +//row: 13 + d2[78]=_mm512_xor_si512(c2[9772],_mm512_xor_si512(c2[10036],_mm512_xor_si512(c2[16632],_mm512_xor_si512(c2[3],_mm512_xor_si512(c2[1852],_mm512_xor_si512(c2[15052],_mm512_xor_si512(c2[1332],_mm512_xor_si512(c2[1596],_mm512_xor_si512(c2[11895],_mm512_xor_si512(c2[2653],_mm512_xor_si512(c2[9528],_mm512_xor_si512(c2[9792],_mm512_xor_si512(c2[16656],_mm512_xor_si512(c2[15604],_mm512_xor_si512(c2[9281],_mm512_xor_si512(c2[9545],_mm512_xor_si512(c2[15876],_mm512_xor_si512(c2[13505],_mm512_xor_si512(c2[12974],_mm512_xor_si512(c2[5068],_mm512_xor_si512(c2[16684],_mm512_xor_si512(c2[1636],_mm512_xor_si512(c2[10358],_mm512_xor_si512(c2[10622],_mm512_xor_si512(c2[854],_mm512_xor_si512(c2[13527],_mm512_xor_si512(c2[2715],_mm512_xor_si512(c2[2979],_mm512_xor_si512(c2[5354],_mm512_xor_si512(c2[15386],_mm512_xor_si512(c2[16456],_mm512_xor_si512(c2[16455],_mm512_xor_si512(c2[3254],_mm512_xor_si512(c2[2728],_mm512_xor_si512(c2[16468],_mm512_xor_si512(c2[5114],_mm512_xor_si512(c2[11448],_mm512_xor_si512(c2[12520],_mm512_xor_si512(c2[12784],_mm512_xor_si512(c2[9878],_mm512_xor_si512(c2[13308],_mm512_xor_si512(c2[4876],_mm512_xor_si512(c2[5140],_mm512_xor_si512(c2[13849],_mm512_xor_si512(c2[14641],_mm512_xor_si512(c2[8317],_mm512_xor_si512(c2[8581],_mm512_xor_si512(c2[7000],_mm512_xor_si512(c2[9640],_mm512_xor_si512(c2[936],_mm512_xor_si512(c2[1200],_mm512_xor_si512(c2[2525],_mm512_xor_si512(c2[7011],_mm512_xor_si512(c2[6233],_mm512_xor_si512(c2[6497],_mm512_xor_si512(c2[15734],_mm512_xor_si512(c2[2273],_mm512_xor_si512(c2[3339],_mm512_xor_si512(c2[3073],_mm512_xor_si512(c2[2019],_mm512_xor_si512(c2[2559],_mm512_xor_si512(c2[2823],_mm512_xor_si512(c2[5989],_mm512_xor_si512(c2[10740],_mm512_xor_si512(c2[7585],_mm512_xor_si512(c2[7849],_mm512_xor_si512(c2[5741],_mm512_xor_si512(c2[9436],_mm512_xor_si512(c2[9973],_mm512_xor_si512(c2[14461],_mm512_xor_si512(c2[8392],_mm512_xor_si512(c2[9723],_mm512_xor_si512(c2[9987],_mm512_xor_si512(c2[9459],_mm512_xor_si512(c2[748],_mm512_xor_si512(c2[10262],_mm512_xor_si512(c2[10526],_mm512_xor_si512(c2[16600],_mm512_xor_si512(c2[231],_mm512_xor_si512(c2[16084],_mm512_xor_si512(c2[16348],_mm512_xor_si512(c2[240],_mm512_xor_si512(c2[7104],_mm512_xor_si512(c2[13705],_mm512_xor_si512(c2[3425],_mm512_xor_si512(c2[3689],_mm512_xor_si512(c2[9493],c2[6593]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 14 + d2[84]=_mm512_xor_si512(c2[3698],_mm512_xor_si512(c2[14931],_mm512_xor_si512(c2[2558],_mm512_xor_si512(c2[6793],_mm512_xor_si512(c2[7337],c2[3420]))))); + +//row: 15 + d2[90]=_mm512_xor_si512(c2[267],_mm512_xor_si512(c2[6869],_mm512_xor_si512(c2[7129],_mm512_xor_si512(c2[8714],_mm512_xor_si512(c2[8978],_mm512_xor_si512(c2[12939],_mm512_xor_si512(c2[8728],_mm512_xor_si512(c2[2126],_mm512_xor_si512(c2[9521],_mm512_xor_si512(c2[9785],_mm512_xor_si512(c2[540],_mm512_xor_si512(c2[29],_mm512_xor_si512(c2[6893],_mm512_xor_si512(c2[5835],_mm512_xor_si512(c2[16671],_mm512_xor_si512(c2[6113],_mm512_xor_si512(c2[3472],_mm512_xor_si512(c2[3736],_mm512_xor_si512(c2[12194],_mm512_xor_si512(c2[6915],_mm512_xor_si512(c2[8498],_mm512_xor_si512(c2[8762],_mm512_xor_si512(c2[853],_mm512_xor_si512(c2[7980],_mm512_xor_si512(c2[3758],_mm512_xor_si512(c2[10105],_mm512_xor_si512(c2[12480],_mm512_xor_si512(c2[5353],_mm512_xor_si512(c2[5617],_mm512_xor_si512(c2[6687],_mm512_xor_si512(c2[6686],_mm512_xor_si512(c2[10116],_mm512_xor_si512(c2[10380],_mm512_xor_si512(c2[6699],_mm512_xor_si512(c2[12240],_mm512_xor_si512(c2[1421],_mm512_xor_si512(c2[1685],_mm512_xor_si512(c2[3015],_mm512_xor_si512(c2[109],_mm512_xor_si512(c2[3545],_mm512_xor_si512(c2[12266],_mm512_xor_si512(c2[4080],_mm512_xor_si512(c2[4608],_mm512_xor_si512(c2[4872],_mm512_xor_si512(c2[4875],_mm512_xor_si512(c2[15713],_mm512_xor_si512(c2[14126],_mm512_xor_si512(c2[16502],_mm512_xor_si512(c2[16766],_mm512_xor_si512(c2[8332],_mm512_xor_si512(c2[9651],_mm512_xor_si512(c2[13873],_mm512_xor_si512(c2[14137],_mm512_xor_si512(c2[13623],_mm512_xor_si512(c2[5965],_mm512_xor_si512(c2[9135],_mm512_xor_si512(c2[9399],_mm512_xor_si512(c2[16528],_mm512_xor_si512(c2[10465],_mm512_xor_si512(c2[10205],_mm512_xor_si512(c2[8881],_mm512_xor_si512(c2[9145],_mm512_xor_si512(c2[9949],_mm512_xor_si512(c2[13121],_mm512_xor_si512(c2[977],_mm512_xor_si512(c2[14981],_mm512_xor_si512(c2[12867],_mm512_xor_si512(c2[16298],_mm512_xor_si512(c2[16562],_mm512_xor_si512(c2[204],_mm512_xor_si512(c2[4692],_mm512_xor_si512(c2[15254],_mm512_xor_si512(c2[15518],_mm512_xor_si512(c2[218],_mm512_xor_si512(c2[16585],_mm512_xor_si512(c2[7610],_mm512_xor_si512(c2[7874],_mm512_xor_si512(c2[14736],_mm512_xor_si512(c2[757],_mm512_xor_si512(c2[6831],_mm512_xor_si512(c2[7357],_mm512_xor_si512(c2[6579],_mm512_xor_si512(c2[7372],_mm512_xor_si512(c2[13972],_mm512_xor_si512(c2[14236],_mm512_xor_si512(c2[10815],_mm512_xor_si512(c2[16625],_mm512_xor_si512(c2[13455],c2[13719])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 16 + d2[96]=_mm512_xor_si512(c2[11621],_mm512_xor_si512(c2[1322],_mm512_xor_si512(c2[1588],_mm512_xor_si512(c2[3437],_mm512_xor_si512(c2[3181],_mm512_xor_si512(c2[13480],_mm512_xor_si512(c2[4238],_mm512_xor_si512(c2[3444],_mm512_xor_si512(c2[11377],_mm512_xor_si512(c2[1346],_mm512_xor_si512(c2[288],_mm512_xor_si512(c2[11124],_mm512_xor_si512(c2[566],_mm512_xor_si512(c2[15084],_mm512_xor_si512(c2[4793],_mm512_xor_si512(c2[6653],_mm512_xor_si512(c2[1368],_mm512_xor_si512(c2[3221],_mm512_xor_si512(c2[12207],_mm512_xor_si512(c2[2439],_mm512_xor_si512(c2[15112],_mm512_xor_si512(c2[4564],_mm512_xor_si512(c2[6939],_mm512_xor_si512(c2[76],_mm512_xor_si512(c2[1140],_mm512_xor_si512(c2[1145],_mm512_xor_si512(c2[4839],_mm512_xor_si512(c2[1152],_mm512_xor_si512(c2[6699],_mm512_xor_si512(c2[13033],_mm512_xor_si512(c2[14369],_mm512_xor_si512(c2[11463],_mm512_xor_si512(c2[14893],_mm512_xor_si512(c2[6725],_mm512_xor_si512(c2[15434],_mm512_xor_si512(c2[16226],_mm512_xor_si512(c2[10166],_mm512_xor_si512(c2[8585],_mm512_xor_si512(c2[11225],_mm512_xor_si512(c2[15180],_mm512_xor_si512(c2[2785],_mm512_xor_si512(c2[4104],_mm512_xor_si512(c2[8596],_mm512_xor_si512(c2[8076],_mm512_xor_si512(c2[424],_mm512_xor_si512(c2[3852],_mm512_xor_si512(c2[4924],_mm512_xor_si512(c2[4658],_mm512_xor_si512(c2[3604],_mm512_xor_si512(c2[4408],_mm512_xor_si512(c2[7574],_mm512_xor_si512(c2[12325],_mm512_xor_si512(c2[9434],_mm512_xor_si512(c2[7320],_mm512_xor_si512(c2[11021],_mm512_xor_si512(c2[11558],_mm512_xor_si512(c2[16046],_mm512_xor_si512(c2[9977],_mm512_xor_si512(c2[11572],_mm512_xor_si512(c2[11044],_mm512_xor_si512(c2[2333],_mm512_xor_si512(c2[12111],_mm512_xor_si512(c2[1284],_mm512_xor_si512(c2[1816],_mm512_xor_si512(c2[1032],_mm512_xor_si512(c2[1825],_mm512_xor_si512(c2[8689],_mm512_xor_si512(c2[8956],_mm512_xor_si512(c2[5268],_mm512_xor_si512(c2[11078],c2[8172])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 17 + d2[102]=_mm512_xor_si512(c2[1060],_mm512_xor_si512(c2[12580],_mm512_xor_si512(c2[4681],_mm512_xor_si512(c2[10241],c2[14777])))); + +//row: 18 + d2[108]=_mm512_xor_si512(c2[542],_mm512_xor_si512(c2[9386],_mm512_xor_si512(c2[6496],_mm512_xor_si512(c2[1274],c2[1284])))); + +//row: 19 + d2[114]=_mm512_xor_si512(c2[4490],_mm512_xor_si512(c2[5559],_mm512_xor_si512(c2[6425],_mm512_xor_si512(c2[13299],c2[1443])))); + +//row: 20 + d2[120]=_mm512_xor_si512(c2[12149],_mm512_xor_si512(c2[1850],_mm512_xor_si512(c2[2116],_mm512_xor_si512(c2[3965],_mm512_xor_si512(c2[15578],_mm512_xor_si512(c2[3709],_mm512_xor_si512(c2[14008],_mm512_xor_si512(c2[4766],_mm512_xor_si512(c2[11905],_mm512_xor_si512(c2[1874],_mm512_xor_si512(c2[816],_mm512_xor_si512(c2[11652],_mm512_xor_si512(c2[1094],_mm512_xor_si512(c2[15612],_mm512_xor_si512(c2[3735],_mm512_xor_si512(c2[7181],_mm512_xor_si512(c2[1896],_mm512_xor_si512(c2[3749],_mm512_xor_si512(c2[12735],_mm512_xor_si512(c2[2967],_mm512_xor_si512(c2[15640],_mm512_xor_si512(c2[5092],_mm512_xor_si512(c2[7467],_mm512_xor_si512(c2[604],_mm512_xor_si512(c2[1668],_mm512_xor_si512(c2[1673],_mm512_xor_si512(c2[5367],_mm512_xor_si512(c2[1680],_mm512_xor_si512(c2[7227],_mm512_xor_si512(c2[13561],_mm512_xor_si512(c2[14897],_mm512_xor_si512(c2[11991],_mm512_xor_si512(c2[15421],_mm512_xor_si512(c2[2224],_mm512_xor_si512(c2[7253],_mm512_xor_si512(c2[15962],_mm512_xor_si512(c2[16754],_mm512_xor_si512(c2[10694],_mm512_xor_si512(c2[9113],_mm512_xor_si512(c2[11753],_mm512_xor_si512(c2[5681],_mm512_xor_si512(c2[3313],_mm512_xor_si512(c2[4632],_mm512_xor_si512(c2[9124],_mm512_xor_si512(c2[8604],_mm512_xor_si512(c2[952],_mm512_xor_si512(c2[4380],_mm512_xor_si512(c2[5452],_mm512_xor_si512(c2[5186],_mm512_xor_si512(c2[4132],_mm512_xor_si512(c2[4936],_mm512_xor_si512(c2[8102],_mm512_xor_si512(c2[12853],_mm512_xor_si512(c2[9962],_mm512_xor_si512(c2[7848],_mm512_xor_si512(c2[11549],_mm512_xor_si512(c2[12086],_mm512_xor_si512(c2[16574],_mm512_xor_si512(c2[10505],_mm512_xor_si512(c2[12100],_mm512_xor_si512(c2[11572],_mm512_xor_si512(c2[2861],_mm512_xor_si512(c2[12639],_mm512_xor_si512(c2[1812],_mm512_xor_si512(c2[2344],_mm512_xor_si512(c2[1560],_mm512_xor_si512(c2[2353],_mm512_xor_si512(c2[9217],_mm512_xor_si512(c2[5796],_mm512_xor_si512(c2[11606],c2[8700])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 21 + d2[126]=_mm512_xor_si512(c2[3447],_mm512_xor_si512(c2[10093],_mm512_xor_si512(c2[2309],_mm512_xor_si512(c2[5787],c2[8965])))); + +//row: 22 + d2[132]=_mm512_xor_si512(c2[7920],_mm512_xor_si512(c2[3048],_mm512_xor_si512(c2[10983],c2[6012]))); + +//row: 23 + d2[138]=_mm512_xor_si512(c2[6348],_mm512_xor_si512(c2[6625],_mm512_xor_si512(c2[16224],c2[7344]))); + +//row: 24 + d2[144]=_mm512_xor_si512(c2[7658],_mm512_xor_si512(c2[14260],_mm512_xor_si512(c2[14520],_mm512_xor_si512(c2[16369],_mm512_xor_si512(c2[11092],_mm512_xor_si512(c2[16119],_mm512_xor_si512(c2[9517],_mm512_xor_si512(c2[281],_mm512_xor_si512(c2[7420],_mm512_xor_si512(c2[14284],_mm512_xor_si512(c2[13226],_mm512_xor_si512(c2[7167],_mm512_xor_si512(c2[13504],_mm512_xor_si512(c2[11127],_mm512_xor_si512(c2[7958],_mm512_xor_si512(c2[2690],_mm512_xor_si512(c2[14306],_mm512_xor_si512(c2[16153],_mm512_xor_si512(c2[11403],_mm512_xor_si512(c2[8244],_mm512_xor_si512(c2[15377],_mm512_xor_si512(c2[11149],_mm512_xor_si512(c2[601],_mm512_xor_si512(c2[2976],_mm512_xor_si512(c2[13008],_mm512_xor_si512(c2[14078],_mm512_xor_si512(c2[14077],_mm512_xor_si512(c2[876],_mm512_xor_si512(c2[14090],_mm512_xor_si512(c2[2736],_mm512_xor_si512(c2[9076],_mm512_xor_si512(c2[10406],_mm512_xor_si512(c2[7500],_mm512_xor_si512(c2[10936],_mm512_xor_si512(c2[2762],_mm512_xor_si512(c2[11477],_mm512_xor_si512(c2[12269],_mm512_xor_si512(c2[6209],_mm512_xor_si512(c2[4622],_mm512_xor_si512(c2[7262],_mm512_xor_si512(c2[5153],_mm512_xor_si512(c2[15723],_mm512_xor_si512(c2[147],_mm512_xor_si512(c2[4633],_mm512_xor_si512(c2[4119],_mm512_xor_si512(c2[13356],_mm512_xor_si512(c2[16790],_mm512_xor_si512(c2[961],_mm512_xor_si512(c2[701],_mm512_xor_si512(c2[16536],_mm512_xor_si512(c2[445],_mm512_xor_si512(c2[3617],_mm512_xor_si512(c2[8368],_mm512_xor_si512(c2[5477],_mm512_xor_si512(c2[3363],_mm512_xor_si512(c2[7058],_mm512_xor_si512(c2[7601],_mm512_xor_si512(c2[12089],_mm512_xor_si512(c2[6014],_mm512_xor_si512(c2[7609],_mm512_xor_si512(c2[7081],_mm512_xor_si512(c2[15265],_mm512_xor_si512(c2[8148],_mm512_xor_si512(c2[14222],_mm512_xor_si512(c2[14748],_mm512_xor_si512(c2[13970],_mm512_xor_si512(c2[14763],_mm512_xor_si512(c2[4732],_mm512_xor_si512(c2[1311],_mm512_xor_si512(c2[7121],c2[4215])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 25 + d2[150]=_mm512_xor_si512(c2[2125],_mm512_xor_si512(c2[4560],_mm512_xor_si512(c2[16721],c2[14956]))); + +//row: 26 + d2[156]=_mm512_xor_si512(c2[1849],_mm512_xor_si512(c2[4513],_mm512_xor_si512(c2[3217],c2[2294]))); + +//row: 27 + d2[162]=_mm512_xor_si512(c2[543],_mm512_xor_si512(c2[603],c2[9865])); + +//row: 28 + d2[168]=_mm512_xor_si512(c2[7923],_mm512_xor_si512(c2[5064],_mm512_xor_si512(c2[13959],c2[5008]))); + +//row: 29 + d2[174]=_mm512_xor_si512(c2[528],_mm512_xor_si512(c2[7130],_mm512_xor_si512(c2[7396],_mm512_xor_si512(c2[8981],_mm512_xor_si512(c2[9245],_mm512_xor_si512(c2[8989],_mm512_xor_si512(c2[2393],_mm512_xor_si512(c2[9782],_mm512_xor_si512(c2[10046],_mm512_xor_si512(c2[15855],_mm512_xor_si512(c2[290],_mm512_xor_si512(c2[7154],_mm512_xor_si512(c2[6096],_mm512_xor_si512(c2[37],_mm512_xor_si512(c2[6374],_mm512_xor_si512(c2[3733],_mm512_xor_si512(c2[3997],_mm512_xor_si512(c2[12461],_mm512_xor_si512(c2[7176],_mm512_xor_si512(c2[8765],_mm512_xor_si512(c2[9029],_mm512_xor_si512(c2[1120],_mm512_xor_si512(c2[8247],_mm512_xor_si512(c2[4025],_mm512_xor_si512(c2[10372],_mm512_xor_si512(c2[12747],_mm512_xor_si512(c2[5620],_mm512_xor_si512(c2[5884],_mm512_xor_si512(c2[6948],_mm512_xor_si512(c2[6953],_mm512_xor_si512(c2[10383],_mm512_xor_si512(c2[10647],_mm512_xor_si512(c2[6960],_mm512_xor_si512(c2[12507],_mm512_xor_si512(c2[1682],_mm512_xor_si512(c2[1946],_mm512_xor_si512(c2[3276],_mm512_xor_si512(c2[376],_mm512_xor_si512(c2[3806],_mm512_xor_si512(c2[12533],_mm512_xor_si512(c2[4347],_mm512_xor_si512(c2[4875],_mm512_xor_si512(c2[5139],_mm512_xor_si512(c2[15974],_mm512_xor_si512(c2[14393],_mm512_xor_si512(c2[16769],_mm512_xor_si512(c2[132],_mm512_xor_si512(c2[8593],_mm512_xor_si512(c2[9912],_mm512_xor_si512(c2[14140],_mm512_xor_si512(c2[14404],_mm512_xor_si512(c2[13884],_mm512_xor_si512(c2[6232],_mm512_xor_si512(c2[9396],_mm512_xor_si512(c2[9660],_mm512_xor_si512(c2[10732],_mm512_xor_si512(c2[10466],_mm512_xor_si512(c2[9148],_mm512_xor_si512(c2[9412],_mm512_xor_si512(c2[1488],_mm512_xor_si512(c2[10216],_mm512_xor_si512(c2[13382],_mm512_xor_si512(c2[1238],_mm512_xor_si512(c2[15242],_mm512_xor_si512(c2[13128],_mm512_xor_si512(c2[16565],_mm512_xor_si512(c2[16829],_mm512_xor_si512(c2[471],_mm512_xor_si512(c2[4959],_mm512_xor_si512(c2[15521],_mm512_xor_si512(c2[15785],_mm512_xor_si512(c2[485],_mm512_xor_si512(c2[16852],_mm512_xor_si512(c2[7877],_mm512_xor_si512(c2[8141],_mm512_xor_si512(c2[5234],_mm512_xor_si512(c2[1024],_mm512_xor_si512(c2[7092],_mm512_xor_si512(c2[7624],_mm512_xor_si512(c2[6840],_mm512_xor_si512(c2[7633],_mm512_xor_si512(c2[14233],_mm512_xor_si512(c2[14497],_mm512_xor_si512(c2[11076],_mm512_xor_si512(c2[16886],_mm512_xor_si512(c2[13716],c2[13980])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 30 + d2[180]=_mm512_xor_si512(c2[3696],_mm512_xor_si512(c2[10298],_mm512_xor_si512(c2[10300],_mm512_xor_si512(c2[10564],_mm512_xor_si512(c2[12149],_mm512_xor_si512(c2[12413],_mm512_xor_si512(c2[8186],_mm512_xor_si512(c2[12157],_mm512_xor_si512(c2[5297],_mm512_xor_si512(c2[5561],_mm512_xor_si512(c2[12950],_mm512_xor_si512(c2[13214],_mm512_xor_si512(c2[3458],_mm512_xor_si512(c2[10322],_mm512_xor_si512(c2[9000],_mm512_xor_si512(c2[9264],_mm512_xor_si512(c2[3205],_mm512_xor_si512(c2[9542],_mm512_xor_si512(c2[6901],_mm512_xor_si512(c2[7165],_mm512_xor_si512(c2[15629],_mm512_xor_si512(c2[10080],_mm512_xor_si512(c2[10344],_mm512_xor_si512(c2[11933],_mm512_xor_si512(c2[12197],_mm512_xor_si512(c2[4288],_mm512_xor_si512(c2[11415],_mm512_xor_si512(c2[6929],_mm512_xor_si512(c2[7193],_mm512_xor_si512(c2[13540],_mm512_xor_si512(c2[15651],_mm512_xor_si512(c2[15915],_mm512_xor_si512(c2[8788],_mm512_xor_si512(c2[9052],_mm512_xor_si512(c2[10116],_mm512_xor_si512(c2[9857],_mm512_xor_si512(c2[10121],_mm512_xor_si512(c2[13551],_mm512_xor_si512(c2[13815],_mm512_xor_si512(c2[10128],_mm512_xor_si512(c2[15411],_mm512_xor_si512(c2[15675],_mm512_xor_si512(c2[4850],_mm512_xor_si512(c2[5114],_mm512_xor_si512(c2[6444],_mm512_xor_si512(c2[3544],_mm512_xor_si512(c2[6710],_mm512_xor_si512(c2[6974],_mm512_xor_si512(c2[15701],_mm512_xor_si512(c2[7251],_mm512_xor_si512(c2[7515],_mm512_xor_si512(c2[8043],_mm512_xor_si512(c2[8307],_mm512_xor_si512(c2[9891],_mm512_xor_si512(c2[2247],_mm512_xor_si512(c2[660],_mm512_xor_si512(c2[3036],_mm512_xor_si512(c2[3300],_mm512_xor_si512(c2[11761],_mm512_xor_si512(c2[13080],_mm512_xor_si512(c2[413],_mm512_xor_si512(c2[677],_mm512_xor_si512(c2[157],_mm512_xor_si512(c2[9136],_mm512_xor_si512(c2[9400],_mm512_xor_si512(c2[12564],_mm512_xor_si512(c2[12828],_mm512_xor_si512(c2[1216],_mm512_xor_si512(c2[13900],_mm512_xor_si512(c2[13370],_mm512_xor_si512(c2[13634],_mm512_xor_si512(c2[12316],_mm512_xor_si512(c2[12580],_mm512_xor_si512(c2[13384],_mm512_xor_si512(c2[16550],_mm512_xor_si512(c2[4142],_mm512_xor_si512(c2[4406],_mm512_xor_si512(c2[1515],_mm512_xor_si512(c2[16296],_mm512_xor_si512(c2[2832],_mm512_xor_si512(c2[3096],_mm512_xor_si512(c2[3639],_mm512_xor_si512(c2[7863],_mm512_xor_si512(c2[8127],_mm512_xor_si512(c2[1788],_mm512_xor_si512(c2[2052],_mm512_xor_si512(c2[3653],_mm512_xor_si512(c2[2861],_mm512_xor_si512(c2[3125],_mm512_xor_si512(c2[11045],_mm512_xor_si512(c2[11309],_mm512_xor_si512(c2[4192],_mm512_xor_si512(c2[10260],_mm512_xor_si512(c2[10528],_mm512_xor_si512(c2[10792],_mm512_xor_si512(c2[10008],_mm512_xor_si512(c2[10537],_mm512_xor_si512(c2[10801],_mm512_xor_si512(c2[506],_mm512_xor_si512(c2[770],_mm512_xor_si512(c2[14244],_mm512_xor_si512(c2[3159],_mm512_xor_si512(c2[16884],c2[253]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 31 + d2[186]=_mm512_xor_si512(c2[13994],_mm512_xor_si512(c2[13730],_mm512_xor_si512(c2[3701],_mm512_xor_si512(c2[3437],_mm512_xor_si512(c2[3961],_mm512_xor_si512(c2[3697],_mm512_xor_si512(c2[5810],_mm512_xor_si512(c2[5282],_mm512_xor_si512(c2[5546],_mm512_xor_si512(c2[5560],_mm512_xor_si512(c2[5296],_mm512_xor_si512(c2[15853],_mm512_xor_si512(c2[15589],_mm512_xor_si512(c2[6617],_mm512_xor_si512(c2[6089],_mm512_xor_si512(c2[6353],_mm512_xor_si512(c2[9517],_mm512_xor_si512(c2[13756],_mm512_xor_si512(c2[13492],_mm512_xor_si512(c2[3725],_mm512_xor_si512(c2[3461],_mm512_xor_si512(c2[2667],_mm512_xor_si512(c2[2403],_mm512_xor_si512(c2[13503],_mm512_xor_si512(c2[13239],_mm512_xor_si512(c2[2945],_mm512_xor_si512(c2[2681],_mm512_xor_si512(c2[568],_mm512_xor_si512(c2[40],_mm512_xor_si512(c2[304],_mm512_xor_si512(c2[9026],_mm512_xor_si512(c2[8762],_mm512_xor_si512(c2[3747],_mm512_xor_si512(c2[3483],_mm512_xor_si512(c2[5594],_mm512_xor_si512(c2[5066],_mm512_xor_si512(c2[5330],_mm512_xor_si512(c2[14580],_mm512_xor_si512(c2[14316],_mm512_xor_si512(c2[4812],_mm512_xor_si512(c2[4548],_mm512_xor_si512(c2[590],_mm512_xor_si512(c2[326],_mm512_xor_si512(c2[6937],_mm512_xor_si512(c2[6673],_mm512_xor_si512(c2[9312],_mm512_xor_si512(c2[9048],_mm512_xor_si512(c2[2449],_mm512_xor_si512(c2[1921],_mm512_xor_si512(c2[2185],_mm512_xor_si512(c2[3519],_mm512_xor_si512(c2[3255],_mm512_xor_si512(c2[3518],_mm512_xor_si512(c2[3254],_mm512_xor_si512(c2[7212],_mm512_xor_si512(c2[6684],_mm512_xor_si512(c2[6948],_mm512_xor_si512(c2[6159],_mm512_xor_si512(c2[3531],_mm512_xor_si512(c2[3267],_mm512_xor_si512(c2[9072],_mm512_xor_si512(c2[8808],_mm512_xor_si512(c2[15412],_mm512_xor_si512(c2[14884],_mm512_xor_si512(c2[15148],_mm512_xor_si512(c2[16742],_mm512_xor_si512(c2[16478],_mm512_xor_si512(c2[13836],_mm512_xor_si512(c2[13572],_mm512_xor_si512(c2[377],_mm512_xor_si512(c2[113],_mm512_xor_si512(c2[9098],_mm512_xor_si512(c2[8834],_mm512_xor_si512(c2[912],_mm512_xor_si512(c2[648],_mm512_xor_si512(c2[1704],_mm512_xor_si512(c2[1176],_mm512_xor_si512(c2[1440],_mm512_xor_si512(c2[12545],_mm512_xor_si512(c2[12281],_mm512_xor_si512(c2[10958],_mm512_xor_si512(c2[10694],_mm512_xor_si512(c2[13598],_mm512_xor_si512(c2[13070],_mm512_xor_si512(c2[13334],_mm512_xor_si512(c2[5164],_mm512_xor_si512(c2[4900],_mm512_xor_si512(c2[6483],_mm512_xor_si512(c2[6219],_mm512_xor_si512(c2[10969],_mm512_xor_si512(c2[10441],_mm512_xor_si512(c2[10705],_mm512_xor_si512(c2[10455],_mm512_xor_si512(c2[10191],_mm512_xor_si512(c2[2797],_mm512_xor_si512(c2[2533],_mm512_xor_si512(c2[6231],_mm512_xor_si512(c2[5703],_mm512_xor_si512(c2[5967],_mm512_xor_si512(c2[7297],_mm512_xor_si512(c2[7033],_mm512_xor_si512(c2[7037],_mm512_xor_si512(c2[6773],_mm512_xor_si512(c2[5977],_mm512_xor_si512(c2[5449],_mm512_xor_si512(c2[5713],_mm512_xor_si512(c2[6781],_mm512_xor_si512(c2[6517],_mm512_xor_si512(c2[9953],_mm512_xor_si512(c2[9689],_mm512_xor_si512(c2[14704],_mm512_xor_si512(c2[14440],_mm512_xor_si512(c2[11813],_mm512_xor_si512(c2[11549],_mm512_xor_si512(c2[9699],_mm512_xor_si512(c2[9435],_mm512_xor_si512(c2[13394],_mm512_xor_si512(c2[12866],_mm512_xor_si512(c2[13130],_mm512_xor_si512(c2[13937],_mm512_xor_si512(c2[13673],_mm512_xor_si512(c2[1524],_mm512_xor_si512(c2[1260],_mm512_xor_si512(c2[12350],_mm512_xor_si512(c2[11822],_mm512_xor_si512(c2[12086],_mm512_xor_si512(c2[13945],_mm512_xor_si512(c2[13681],_mm512_xor_si512(c2[13417],_mm512_xor_si512(c2[13153],_mm512_xor_si512(c2[4706],_mm512_xor_si512(c2[4178],_mm512_xor_si512(c2[4442],_mm512_xor_si512(c2[14484],_mm512_xor_si512(c2[14220],_mm512_xor_si512(c2[3663],_mm512_xor_si512(c2[3399],_mm512_xor_si512(c2[4189],_mm512_xor_si512(c2[3925],_mm512_xor_si512(c2[3411],_mm512_xor_si512(c2[3147],_mm512_xor_si512(c2[4204],_mm512_xor_si512(c2[3940],_mm512_xor_si512(c2[11068],_mm512_xor_si512(c2[10540],_mm512_xor_si512(c2[10804],_mm512_xor_si512(c2[7647],_mm512_xor_si512(c2[7383],_mm512_xor_si512(c2[13457],_mm512_xor_si512(c2[13193],_mm512_xor_si512(c2[10551],_mm512_xor_si512(c2[10023],c2[10287])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 32 + d2[192]=_mm512_xor_si512(c2[5019],_mm512_xor_si512(c2[11621],_mm512_xor_si512(c2[11617],_mm512_xor_si512(c2[11881],_mm512_xor_si512(c2[13466],_mm512_xor_si512(c2[13730],_mm512_xor_si512(c2[10033],_mm512_xor_si512(c2[13480],_mm512_xor_si512(c2[6614],_mm512_xor_si512(c2[6878],_mm512_xor_si512(c2[14273],_mm512_xor_si512(c2[14537],_mm512_xor_si512(c2[4781],_mm512_xor_si512(c2[11645],_mm512_xor_si512(c2[10323],_mm512_xor_si512(c2[10587],_mm512_xor_si512(c2[4528],_mm512_xor_si512(c2[10865],_mm512_xor_si512(c2[8224],_mm512_xor_si512(c2[8488],_mm512_xor_si512(c2[51],_mm512_xor_si512(c2[11403],_mm512_xor_si512(c2[11667],_mm512_xor_si512(c2[13250],_mm512_xor_si512(c2[13514],_mm512_xor_si512(c2[5605],_mm512_xor_si512(c2[12732],_mm512_xor_si512(c2[8246],_mm512_xor_si512(c2[8510],_mm512_xor_si512(c2[14857],_mm512_xor_si512(c2[73],_mm512_xor_si512(c2[337],_mm512_xor_si512(c2[10105],_mm512_xor_si512(c2[10369],_mm512_xor_si512(c2[11439],_mm512_xor_si512(c2[11174],_mm512_xor_si512(c2[11438],_mm512_xor_si512(c2[14868],_mm512_xor_si512(c2[15132],_mm512_xor_si512(c2[11451],_mm512_xor_si512(c2[16728],_mm512_xor_si512(c2[97],_mm512_xor_si512(c2[6173],_mm512_xor_si512(c2[6437],_mm512_xor_si512(c2[7767],_mm512_xor_si512(c2[4861],_mm512_xor_si512(c2[8033],_mm512_xor_si512(c2[8297],_mm512_xor_si512(c2[123],_mm512_xor_si512(c2[8568],_mm512_xor_si512(c2[8832],_mm512_xor_si512(c2[9360],_mm512_xor_si512(c2[9624],_mm512_xor_si512(c2[3564],_mm512_xor_si512(c2[1983],_mm512_xor_si512(c2[4359],_mm512_xor_si512(c2[4623],_mm512_xor_si512(c2[13084],_mm512_xor_si512(c2[14403],_mm512_xor_si512(c2[1730],_mm512_xor_si512(c2[1994],_mm512_xor_si512(c2[2523],_mm512_xor_si512(c2[1480],_mm512_xor_si512(c2[10453],_mm512_xor_si512(c2[10717],_mm512_xor_si512(c2[13887],_mm512_xor_si512(c2[14151],_mm512_xor_si512(c2[15217],_mm512_xor_si512(c2[14693],_mm512_xor_si512(c2[14957],_mm512_xor_si512(c2[13633],_mm512_xor_si512(c2[13897],_mm512_xor_si512(c2[12578],_mm512_xor_si512(c2[14701],_mm512_xor_si512(c2[972],_mm512_xor_si512(c2[5465],_mm512_xor_si512(c2[5729],_mm512_xor_si512(c2[2832],_mm512_xor_si512(c2[724],_mm512_xor_si512(c2[4155],_mm512_xor_si512(c2[4419],_mm512_xor_si512(c2[4956],_mm512_xor_si512(c2[9180],_mm512_xor_si512(c2[9444],_mm512_xor_si512(c2[3111],_mm512_xor_si512(c2[3375],_mm512_xor_si512(c2[4970],_mm512_xor_si512(c2[4178],_mm512_xor_si512(c2[4442],_mm512_xor_si512(c2[12362],_mm512_xor_si512(c2[12626],_mm512_xor_si512(c2[5509],_mm512_xor_si512(c2[11583],_mm512_xor_si512(c2[11845],_mm512_xor_si512(c2[12109],_mm512_xor_si512(c2[11331],_mm512_xor_si512(c2[11860],_mm512_xor_si512(c2[12124],_mm512_xor_si512(c2[1829],_mm512_xor_si512(c2[2093],_mm512_xor_si512(c2[15567],_mm512_xor_si512(c2[4476],_mm512_xor_si512(c2[1312],c2[1576]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 33 + d2[198]=_mm512_xor_si512(c2[809],_mm512_xor_si512(c2[2136],_mm512_xor_si512(c2[10961],c2[11077]))); + +//row: 34 + d2[204]=_mm512_xor_si512(c2[10035],_mm512_xor_si512(c2[5366],_mm512_xor_si512(c2[2823],c2[14992]))); + +//row: 35 + d2[210]=_mm512_xor_si512(c2[16106],_mm512_xor_si512(c2[5813],_mm512_xor_si512(c2[6073],_mm512_xor_si512(c2[7922],_mm512_xor_si512(c2[7672],_mm512_xor_si512(c2[1070],_mm512_xor_si512(c2[8729],_mm512_xor_si512(c2[17],_mm512_xor_si512(c2[15868],_mm512_xor_si512(c2[5837],_mm512_xor_si512(c2[4779],_mm512_xor_si512(c2[15615],_mm512_xor_si512(c2[5057],_mm512_xor_si512(c2[2680],_mm512_xor_si512(c2[11138],_mm512_xor_si512(c2[5859],_mm512_xor_si512(c2[7706],_mm512_xor_si512(c2[16692],_mm512_xor_si512(c2[6924],_mm512_xor_si512(c2[2702],_mm512_xor_si512(c2[9049],_mm512_xor_si512(c2[11424],_mm512_xor_si512(c2[4561],_mm512_xor_si512(c2[4037],_mm512_xor_si512(c2[5631],_mm512_xor_si512(c2[5630],_mm512_xor_si512(c2[9324],_mm512_xor_si512(c2[5643],_mm512_xor_si512(c2[11184],_mm512_xor_si512(c2[629],_mm512_xor_si512(c2[1959],_mm512_xor_si512(c2[15948],_mm512_xor_si512(c2[2489],_mm512_xor_si512(c2[11210],_mm512_xor_si512(c2[3024],_mm512_xor_si512(c2[3816],_mm512_xor_si512(c2[14657],_mm512_xor_si512(c2[13070],_mm512_xor_si512(c2[15710],_mm512_xor_si512(c2[7276],_mm512_xor_si512(c2[8595],_mm512_xor_si512(c2[13081],_mm512_xor_si512(c2[672],_mm512_xor_si512(c2[12567],_mm512_xor_si512(c2[4909],_mm512_xor_si512(c2[8343],_mm512_xor_si512(c2[9409],_mm512_xor_si512(c2[9149],_mm512_xor_si512(c2[8089],_mm512_xor_si512(c2[8893],_mm512_xor_si512(c2[12065],_mm512_xor_si512(c2[16816],_mm512_xor_si512(c2[13925],_mm512_xor_si512(c2[11811],_mm512_xor_si512(c2[15506],_mm512_xor_si512(c2[16049],_mm512_xor_si512(c2[3636],_mm512_xor_si512(c2[14462],_mm512_xor_si512(c2[16057],_mm512_xor_si512(c2[15529],_mm512_xor_si512(c2[6818],_mm512_xor_si512(c2[16596],_mm512_xor_si512(c2[5775],_mm512_xor_si512(c2[6301],_mm512_xor_si512(c2[5523],_mm512_xor_si512(c2[6316],_mm512_xor_si512(c2[13180],_mm512_xor_si512(c2[9759],_mm512_xor_si512(c2[15569],c2[12663]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 36 + d2[216]=_mm512_xor_si512(c2[4755],_mm512_xor_si512(c2[15220],_mm512_xor_si512(c2[11008],c2[5760]))); + +//row: 37 + d2[222]=_mm512_xor_si512(c2[10032],_mm512_xor_si512(c2[10296],_mm512_xor_si512(c2[3],_mm512_xor_si512(c2[269],_mm512_xor_si512(c2[2112],_mm512_xor_si512(c2[1598],_mm512_xor_si512(c2[1862],_mm512_xor_si512(c2[12161],_mm512_xor_si512(c2[2919],_mm512_xor_si512(c2[3448],_mm512_xor_si512(c2[9794],_mm512_xor_si512(c2[10058],_mm512_xor_si512(c2[27],_mm512_xor_si512(c2[15864],_mm512_xor_si512(c2[9541],_mm512_xor_si512(c2[9805],_mm512_xor_si512(c2[16142],_mm512_xor_si512(c2[13765],_mm512_xor_si512(c2[5328],_mm512_xor_si512(c2[49],_mm512_xor_si512(c2[1896],_mm512_xor_si512(c2[10624],_mm512_xor_si512(c2[10888],_mm512_xor_si512(c2[1120],_mm512_xor_si512(c2[13793],_mm512_xor_si512(c2[2981],_mm512_xor_si512(c2[3245],_mm512_xor_si512(c2[5620],_mm512_xor_si512(c2[15652],_mm512_xor_si512(c2[16716],_mm512_xor_si512(c2[16721],_mm512_xor_si512(c2[3520],_mm512_xor_si512(c2[16728],_mm512_xor_si512(c2[5380],_mm512_xor_si512(c2[11714],_mm512_xor_si512(c2[12780],_mm512_xor_si512(c2[13044],_mm512_xor_si512(c2[10144],_mm512_xor_si512(c2[13574],_mm512_xor_si512(c2[5136],_mm512_xor_si512(c2[5400],_mm512_xor_si512(c2[14115],_mm512_xor_si512(c2[14907],_mm512_xor_si512(c2[8583],_mm512_xor_si512(c2[8847],_mm512_xor_si512(c2[7260],_mm512_xor_si512(c2[9900],_mm512_xor_si512(c2[1202],_mm512_xor_si512(c2[1466],_mm512_xor_si512(c2[2785],_mm512_xor_si512(c2[7277],_mm512_xor_si512(c2[6493],_mm512_xor_si512(c2[6757],_mm512_xor_si512(c2[16000],_mm512_xor_si512(c2[2533],_mm512_xor_si512(c2[4909],_mm512_xor_si512(c2[3605],_mm512_xor_si512(c2[3339],_mm512_xor_si512(c2[2285],_mm512_xor_si512(c2[2825],_mm512_xor_si512(c2[3089],_mm512_xor_si512(c2[6255],_mm512_xor_si512(c2[11006],_mm512_xor_si512(c2[7851],_mm512_xor_si512(c2[8115],_mm512_xor_si512(c2[6001],_mm512_xor_si512(c2[9696],_mm512_xor_si512(c2[10239],_mm512_xor_si512(c2[14727],_mm512_xor_si512(c2[8652],_mm512_xor_si512(c2[9989],_mm512_xor_si512(c2[10253],_mm512_xor_si512(c2[9725],_mm512_xor_si512(c2[1008],_mm512_xor_si512(c2[10528],_mm512_xor_si512(c2[10792],_mm512_xor_si512(c2[16860],_mm512_xor_si512(c2[497],_mm512_xor_si512(c2[16344],_mm512_xor_si512(c2[16608],_mm512_xor_si512(c2[506],_mm512_xor_si512(c2[7370],_mm512_xor_si512(c2[3685],_mm512_xor_si512(c2[3949],_mm512_xor_si512(c2[9759],c2[6853]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 38 + d2[228]=_mm512_xor_si512(c2[15050],_mm512_xor_si512(c2[13046],_mm512_xor_si512(c2[8836],c2[5955]))); + +//row: 39 + d2[234]=_mm512_xor_si512(c2[544],_mm512_xor_si512(c2[7693],_mm512_xor_si512(c2[6953],c2[11056]))); + +//row: 40 + d2[240]=_mm512_xor_si512(c2[12410],_mm512_xor_si512(c2[9864],c2[14992])); + +//row: 41 + d2[246]=_mm512_xor_si512(c2[13740],_mm512_xor_si512(c2[15352],_mm512_xor_si512(c2[3014],c2[8668]))); + +//row: 42 + d2[252]=_mm512_xor_si512(c2[3698],_mm512_xor_si512(c2[10300],_mm512_xor_si512(c2[10296],_mm512_xor_si512(c2[10560],_mm512_xor_si512(c2[12145],_mm512_xor_si512(c2[12409],_mm512_xor_si512(c2[12937],_mm512_xor_si512(c2[12159],_mm512_xor_si512(c2[5293],_mm512_xor_si512(c2[5557],_mm512_xor_si512(c2[12952],_mm512_xor_si512(c2[13216],_mm512_xor_si512(c2[3460],_mm512_xor_si512(c2[10324],_mm512_xor_si512(c2[9002],_mm512_xor_si512(c2[9266],_mm512_xor_si512(c2[3207],_mm512_xor_si512(c2[9544],_mm512_xor_si512(c2[6903],_mm512_xor_si512(c2[7167],_mm512_xor_si512(c2[15625],_mm512_xor_si512(c2[10082],_mm512_xor_si512(c2[10346],_mm512_xor_si512(c2[11929],_mm512_xor_si512(c2[12193],_mm512_xor_si512(c2[3744],_mm512_xor_si512(c2[4284],_mm512_xor_si512(c2[11417],_mm512_xor_si512(c2[6925],_mm512_xor_si512(c2[7189],_mm512_xor_si512(c2[13536],_mm512_xor_si512(c2[15653],_mm512_xor_si512(c2[15917],_mm512_xor_si512(c2[8784],_mm512_xor_si512(c2[9048],_mm512_xor_si512(c2[10118],_mm512_xor_si512(c2[9853],_mm512_xor_si512(c2[10117],_mm512_xor_si512(c2[13553],_mm512_xor_si512(c2[13817],_mm512_xor_si512(c2[10130],_mm512_xor_si512(c2[15413],_mm512_xor_si512(c2[15677],_mm512_xor_si512(c2[4852],_mm512_xor_si512(c2[5116],_mm512_xor_si512(c2[6446],_mm512_xor_si512(c2[3540],_mm512_xor_si512(c2[6712],_mm512_xor_si512(c2[6976],_mm512_xor_si512(c2[15697],_mm512_xor_si512(c2[7253],_mm512_xor_si512(c2[7517],_mm512_xor_si512(c2[8045],_mm512_xor_si512(c2[8309],_mm512_xor_si512(c2[2249],_mm512_xor_si512(c2[662],_mm512_xor_si512(c2[3038],_mm512_xor_si512(c2[3302],_mm512_xor_si512(c2[11763],_mm512_xor_si512(c2[13082],_mm512_xor_si512(c2[409],_mm512_xor_si512(c2[673],_mm512_xor_si512(c2[159],_mm512_xor_si512(c2[9132],_mm512_xor_si512(c2[9396],_mm512_xor_si512(c2[12566],_mm512_xor_si512(c2[12830],_mm512_xor_si512(c2[13896],_mm512_xor_si512(c2[13372],_mm512_xor_si512(c2[13636],_mm512_xor_si512(c2[12312],_mm512_xor_si512(c2[12576],_mm512_xor_si512(c2[13380],_mm512_xor_si512(c2[16552],_mm512_xor_si512(c2[4144],_mm512_xor_si512(c2[4408],_mm512_xor_si512(c2[1517],_mm512_xor_si512(c2[16298],_mm512_xor_si512(c2[2834],_mm512_xor_si512(c2[3098],_mm512_xor_si512(c2[3641],_mm512_xor_si512(c2[7865],_mm512_xor_si512(c2[8129],_mm512_xor_si512(c2[1790],_mm512_xor_si512(c2[2054],_mm512_xor_si512(c2[3649],_mm512_xor_si512(c2[2857],_mm512_xor_si512(c2[3121],_mm512_xor_si512(c2[11041],_mm512_xor_si512(c2[11305],_mm512_xor_si512(c2[4188],_mm512_xor_si512(c2[10262],_mm512_xor_si512(c2[10524],_mm512_xor_si512(c2[10788],_mm512_xor_si512(c2[10010],_mm512_xor_si512(c2[10539],_mm512_xor_si512(c2[10803],_mm512_xor_si512(c2[508],_mm512_xor_si512(c2[772],_mm512_xor_si512(c2[14246],_mm512_xor_si512(c2[3161],_mm512_xor_si512(c2[16886],c2[255])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 43 + d2[258]=_mm512_xor_si512(c2[7393],_mm512_xor_si512(c2[13995],_mm512_xor_si512(c2[14261],_mm512_xor_si512(c2[15840],_mm512_xor_si512(c2[16104],_mm512_xor_si512(c2[15854],_mm512_xor_si512(c2[9252],_mm512_xor_si512(c2[16647],_mm512_xor_si512(c2[16],_mm512_xor_si512(c2[12949],_mm512_xor_si512(c2[7155],_mm512_xor_si512(c2[14019],_mm512_xor_si512(c2[12961],_mm512_xor_si512(c2[6902],_mm512_xor_si512(c2[13239],_mm512_xor_si512(c2[10598],_mm512_xor_si512(c2[10862],_mm512_xor_si512(c2[2425],_mm512_xor_si512(c2[14041],_mm512_xor_si512(c2[15624],_mm512_xor_si512(c2[15888],_mm512_xor_si512(c2[7985],_mm512_xor_si512(c2[15112],_mm512_xor_si512(c2[10884],_mm512_xor_si512(c2[336],_mm512_xor_si512(c2[2717],_mm512_xor_si512(c2[12485],_mm512_xor_si512(c2[12749],_mm512_xor_si512(c2[13813],_mm512_xor_si512(c2[13812],_mm512_xor_si512(c2[353],_mm512_xor_si512(c2[617],_mm512_xor_si512(c2[13825],_mm512_xor_si512(c2[2477],_mm512_xor_si512(c2[8547],_mm512_xor_si512(c2[8811],_mm512_xor_si512(c2[10141],_mm512_xor_si512(c2[7241],_mm512_xor_si512(c2[10671],_mm512_xor_si512(c2[2497],_mm512_xor_si512(c2[11212],_mm512_xor_si512(c2[11740],_mm512_xor_si512(c2[12004],_mm512_xor_si512(c2[5944],_mm512_xor_si512(c2[4357],_mm512_xor_si512(c2[6733],_mm512_xor_si512(c2[6997],_mm512_xor_si512(c2[15458],_mm512_xor_si512(c2[16777],_mm512_xor_si512(c2[4104],_mm512_xor_si512(c2[4368],_mm512_xor_si512(c2[3854],_mm512_xor_si512(c2[13097],_mm512_xor_si512(c2[16261],_mm512_xor_si512(c2[16525],_mm512_xor_si512(c2[696],_mm512_xor_si512(c2[436],_mm512_xor_si512(c2[16013],_mm512_xor_si512(c2[16277],_mm512_xor_si512(c2[180],_mm512_xor_si512(c2[3352],_mm512_xor_si512(c2[8103],_mm512_xor_si512(c2[5212],_mm512_xor_si512(c2[3098],_mm512_xor_si512(c2[6529],_mm512_xor_si512(c2[6793],_mm512_xor_si512(c2[1250],_mm512_xor_si512(c2[7336],_mm512_xor_si512(c2[11824],_mm512_xor_si512(c2[5485],_mm512_xor_si512(c2[5749],_mm512_xor_si512(c2[7344],_mm512_xor_si512(c2[6816],_mm512_xor_si512(c2[14736],_mm512_xor_si512(c2[15000],_mm512_xor_si512(c2[13417],_mm512_xor_si512(c2[7889],_mm512_xor_si512(c2[13957],_mm512_xor_si512(c2[14489],_mm512_xor_si512(c2[13705],_mm512_xor_si512(c2[14498],_mm512_xor_si512(c2[4203],_mm512_xor_si512(c2[4467],_mm512_xor_si512(c2[1046],_mm512_xor_si512(c2[6856],_mm512_xor_si512(c2[3686],c2[3950])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 44 + d2[264]=_mm512_xor_si512(c2[1323],_mm512_xor_si512(c2[7925],_mm512_xor_si512(c2[8185],_mm512_xor_si512(c2[10034],_mm512_xor_si512(c2[4225],_mm512_xor_si512(c2[9784],_mm512_xor_si512(c2[3182],_mm512_xor_si512(c2[10841],_mm512_xor_si512(c2[1085],_mm512_xor_si512(c2[7949],_mm512_xor_si512(c2[6891],_mm512_xor_si512(c2[832],_mm512_xor_si512(c2[7169],_mm512_xor_si512(c2[4792],_mm512_xor_si512(c2[13250],_mm512_xor_si512(c2[7971],_mm512_xor_si512(c2[9818],_mm512_xor_si512(c2[1909],_mm512_xor_si512(c2[9036],_mm512_xor_si512(c2[4814],_mm512_xor_si512(c2[11161],_mm512_xor_si512(c2[13536],_mm512_xor_si512(c2[6673],_mm512_xor_si512(c2[7743],_mm512_xor_si512(c2[7742],_mm512_xor_si512(c2[11436],_mm512_xor_si512(c2[3781],_mm512_xor_si512(c2[7755],_mm512_xor_si512(c2[13296],_mm512_xor_si512(c2[2741],_mm512_xor_si512(c2[4071],_mm512_xor_si512(c2[1165],_mm512_xor_si512(c2[4601],_mm512_xor_si512(c2[9350],_mm512_xor_si512(c2[13322],_mm512_xor_si512(c2[5136],_mm512_xor_si512(c2[5928],_mm512_xor_si512(c2[16769],_mm512_xor_si512(c2[15182],_mm512_xor_si512(c2[927],_mm512_xor_si512(c2[9388],_mm512_xor_si512(c2[10707],_mm512_xor_si512(c2[15193],_mm512_xor_si512(c2[14679],_mm512_xor_si512(c2[7021],_mm512_xor_si512(c2[10455],_mm512_xor_si512(c2[11521],_mm512_xor_si512(c2[11261],_mm512_xor_si512(c2[10201],_mm512_xor_si512(c2[11005],_mm512_xor_si512(c2[14177],_mm512_xor_si512(c2[2033],_mm512_xor_si512(c2[16037],_mm512_xor_si512(c2[13923],_mm512_xor_si512(c2[723],_mm512_xor_si512(c2[1260],_mm512_xor_si512(c2[5748],_mm512_xor_si512(c2[16574],_mm512_xor_si512(c2[1274],_mm512_xor_si512(c2[746],_mm512_xor_si512(c2[8930],_mm512_xor_si512(c2[1813],_mm512_xor_si512(c2[7887],_mm512_xor_si512(c2[8413],_mm512_xor_si512(c2[7635],_mm512_xor_si512(c2[8428],_mm512_xor_si512(c2[15292],_mm512_xor_si512(c2[11871],_mm512_xor_si512(c2[780],c2[14775]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + +//row: 45 + d2[270]=_mm512_xor_si512(c2[1862],_mm512_xor_si512(c2[5618],c2[4080])); + } +} diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encode_parity_check.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encode_parity_check.c index 55e02eea6a..94eb0a4d92 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encode_parity_check.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encode_parity_check.c @@ -37,7 +37,11 @@ #include "common/utils/LOG/log.h" +#ifdef __AVX512F__ +#include "ldpc384_simd512_byte.c" +#else #include "ldpc384_byte.c" +#endif #include "ldpc384_byte_128.c" #include "ldpc352_byte.c" #include "ldpc352_byte_128.c" @@ -87,7 +91,7 @@ static void encode_parity_check_part_optim(uint8_t *cc, uint8_t *d, short BG,short Zc,short Kb, int simd_size, int ncols) { - unsigned char c[2 * 22 * Zc * simd_size] __attribute__((aligned(32))); //double size matrix of c + unsigned char c[2 * 22 * Zc * simd_size] __attribute__((aligned(64))); //double size matrix of c for (int i1 = 0; i1 < ncols; i1++) { memcpy(&c[2 * i1 * Zc], &cc[i1 * Zc], Zc * sizeof(unsigned char)); memcpy(&c[(2 * i1 + 1) * Zc], &cc[i1 * Zc], Zc * sizeof(unsigned char)); @@ -95,7 +99,6 @@ static void encode_parity_check_part_optim(uint8_t *cc, uint8_t *d, short BG,sho for (int i1 = 1; i1 < simd_size; i1++) { memcpy(&c[(2 * ncols * Zc * i1)], &c[i1], (2 * ncols * Zc * sizeof(unsigned char)) - i1); } - if (BG == 1) { switch (Zc) { case 176: diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c index ebcb6bf4f5..055c0a7eb6 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c @@ -41,11 +41,11 @@ #include "openair1/PHY/CODING/nrLDPC_extern.h" #include "ldpc_generate_coefficient.c" -int LDPCencoder(unsigned char **inputArray, unsigned char **outputArray, encoder_implemparams_t *impp) +int LDPCencoder(unsigned char **inputArray, unsigned char *outputArray, encoder_implemparams_t *impp) { const unsigned char *input = inputArray[0]; // channel input is the output of this function! - unsigned char *output = outputArray[0]; + unsigned char *output = outputArray; const int Zc = impp->Zc; const int Kb = impp->Kb; const short block_length = impp->K; @@ -114,7 +114,13 @@ int LDPCencoder(unsigned char **inputArray, unsigned char **outputArray, encoder fprintf(fd,"#include \"PHY/sse_intrin.h\"\n"); fprintf(fd2,"#include \"PHY/sse_intrin.h\"\n"); - if (gen_code == 1 && (Zc&31)==0) { + if (gen_code == 1 && (Zc&63)==0) { + shift=6; + mask=63; + strcpy(data_type,"__m512i"); + strcpy(xor_command,"_mm512_xor_si512"); + } + else if (gen_code == 1 && (Zc&31)==0) { shift=5; // AVX2 - 256-bit SIMD mask=31; strcpy(data_type,"simde__m256i"); diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim.c deleted file mode 100644 index deaba29e0d..0000000000 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim.c +++ /dev/null @@ -1,128 +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 ldpc_encoder_optim.c - * \brief Defines the optimized LDPC encoder - * \author Florian Kaltenberger, Raymond Knopp, Kien le Trung (Eurecom) - * \email openair_tech@eurecom.fr - * \date 27-03-2018 - * \version 1.0 - * \note - * \warning - */ - -#include -#include -#include -#include -#include "assertions.h" -#include "common/utils/LOG/log.h" -#include "time_meas.h" -#include "openair1/PHY/CODING/nrLDPC_defs.h" -#include "openair1/PHY/CODING/nrLDPC_extern.h" -#include "ldpc_encode_parity_check.c" -#include "ldpc_generate_coefficient.c" - -int LDPCencoder(uint8_t **test_input, uint8_t **channel_input, encoder_implemparams_t *impp) -{ - int Zc = impp->Zc; - int Kb = impp->Kb; - int block_length = impp->K; - int BG = impp->BG; - int nrows=0,ncols=0; - int rate=3; - int no_punctured_columns,removed_bit; - - int simd_size; - - //determine number of bits in codeword - //if (block_length>3840) - if (BG==1) - { - //BG=1; - nrows=46; //parity check bits - ncols=22; //info bits - rate=3; - } - //else if (block_length<=3840) - else if (BG==2) - { - //BG=2; - nrows=42; //parity check bits - ncols=10; // info bits - rate=5; - - } - - -#ifdef DEBUG_LDPC - LOG_D(PHY,"ldpc_encoder_optim_8seg: BG %d, Zc %d, Kb %d, block_length %d\n",BG,Zc,Kb,block_length); - LOG_D(PHY,"ldpc_encoder_optim_8seg: PDU %x %x %x %x\n",test_input[0][0],test_input[0][1],test_input[0][2],test_input[0][3]); -#endif - - if ((Zc&31) > 0) simd_size = 16; - else simd_size = 32; - - uint8_t c[22*Zc] __attribute__((aligned(32))); //padded input, unpacked, max size - uint8_t d[46*Zc] __attribute__((aligned(32))); //coded parity part output, unpacked, max size - - // calculate number of punctured bits - no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*rate)/Zc; - removed_bit = (nrows - no_punctured_columns - 2) * Zc + block_length - block_length * rate; - // printf("%d\n",no_punctured_columns); - // printf("%d\n",removed_bit); - // unpack input - memset(c, 0, sizeof(c)); - memset(d, 0, sizeof(d)); - - if(impp->tinput != NULL) start_meas(impp->tinput); - for (int i=0; i>(i&7)))>>(7-(i&7)); - //printf("c(%d,%d)=%d\n",j,i,temp); - } - - if(impp->tinput != NULL) stop_meas(impp->tinput); - - if ((BG==1 && Zc>=176) || (BG==2 && Zc>=72)) { - // extend matrix - if(impp->tprep != NULL) start_meas(impp->tprep); - if(impp->tprep != NULL) stop_meas(impp->tprep); - //parity check part - if(impp->tparity != NULL) start_meas(impp->tparity); - encode_parity_check_part_optim(c, d, BG, Zc, Kb,simd_size, ncols); - if(impp->tparity != NULL) stop_meas(impp->tparity); - } - else { - if (encode_parity_check_part_orig(c, d, BG, Zc, Kb, block_length)!=0) { - printf("Problem with encoder\n"); - return(-1); - } - } - if(impp->toutput != NULL) start_meas(impp->toutput); - // information part and puncture columns - memcpy(&channel_input[0][0], &c[2*Zc], (block_length-2*Zc)*sizeof(unsigned char)); - memcpy(&channel_input[0][block_length-2*Zc], &d[0], ((nrows-no_punctured_columns) * Zc-removed_bit)*sizeof(unsigned char)); - - if(impp->toutput != NULL) stop_meas(impp->toutput); - return 0; -} - - diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8seg.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8seg.c deleted file mode 100644 index a45aac2474..0000000000 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8seg.c +++ /dev/null @@ -1,201 +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 ldpc_encoder_optim8seg.c - * \brief Defines the optimized LDPC encoder - * \author Florian Kaltenberger, Raymond Knopp, Kien le Trung (Eurecom) - * \email openair_tech@eurecom.fr - * \date 27-03-2018 - * \version 1.0 - * \note - * \warning - */ - -#include -#include -#include -#include -#include "assertions.h" -#include "common/utils/LOG/log.h" -#include "time_meas.h" -#include "openair1/PHY/CODING/nrLDPC_defs.h" -#include "openair1/PHY/CODING/nrLDPC_extern.h" -#include "ldpc_encode_parity_check.c" -#include "ldpc_generate_coefficient.c" -#include "PHY/sse_intrin.h" - -int LDPCencoder(uint8_t **test_input, uint8_t **channel_input, encoder_implemparams_t *impp) -{ - int Zc = impp->Zc; - int Kb = impp->Kb; - short block_length = impp->K; - short BG = impp->BG; - - short nrows=0,ncols=0; - int i,i1,j,rate=3; - int no_punctured_columns,removed_bit; - char temp; - int simd_size; - - simde__m256i shufmask = simde_mm256_set_epi64x(0x0303030303030303, 0x0202020202020202,0x0101010101010101, 0x0000000000000000); - simde__m256i andmask = simde_mm256_set1_epi64x(0x0102040810204080); // every 8 bits -> 8 bytes, pattern repeats. - simde__m256i zero256 = simde_mm256_setzero_si256(); - simde__m256i masks[8]; - register simde__m256i c256; - masks[0] = simde_mm256_set1_epi8(0x1); - masks[1] = simde_mm256_set1_epi8(0x2); - masks[2] = simde_mm256_set1_epi8(0x4); - masks[3] = simde_mm256_set1_epi8(0x8); - masks[4] = simde_mm256_set1_epi8(0x10); - masks[5] = simde_mm256_set1_epi8(0x20); - masks[6] = simde_mm256_set1_epi8(0x40); - masks[7] = simde_mm256_set1_epi8(0x80); - - AssertFatal((impp->n_segments>0&&impp->n_segments<=8),"0 < n_segments %d <= 8\n",impp->n_segments); - - //determine number of bits in codeword - //if (block_length>3840) - if (BG==1) - { - nrows=46; //parity check bits - ncols=22; //info bits - rate=3; - } - //else if (block_length<=3840) - else if (BG==2) - { - //BG=2; - nrows=42; //parity check bits - ncols=10; // info bits - rate=5; - - } - -#ifdef DEBUG_LDPC - LOG_D(PHY,"ldpc_encoder_optim_8seg: BG %d, Zc %d, Kb %d, block_length %d, segments %d\n",BG,Zc,Kb,block_length,n_segments); - LOG_D(PHY,"ldpc_encoder_optim_8seg: PDU (seg 0) %x %x %x %x\n",test_input[0][0],test_input[0][1],test_input[0][2],test_input[0][3]); -#endif - - AssertFatal(Zc>0,"no valid Zc found for block length %d\n",block_length); - - if ((Zc&31) > 0) simd_size = 16; - else simd_size = 32; - - unsigned char c[22*Zc] __attribute__((aligned(32))); //padded input, unpacked, max size - unsigned char d[46*Zc] __attribute__((aligned(32))); //coded parity part output, unpacked, max size - - - // calculate number of punctured bits - no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*rate)/Zc; - removed_bit=(nrows-no_punctured_columns-2) * Zc+block_length-(int)(block_length*rate); - // printf("%d\n",no_punctured_columns); - // printf("%d\n",removed_bit); - // unpack input - memset(c,0,sizeof(unsigned char) * ncols * Zc); - memset(d,0,sizeof(unsigned char) * nrows * Zc); - - if(impp->tinput != NULL) start_meas(impp->tinput); -#if 0 - for (i=0; i>(i&7)))>>(7-(i&7)); - //printf("c(%d,%d)=%d\n",j,i,temp); - c[i] |= (temp << j); - } - } -#else - for (i=0; i>5; i++) { - c256 = simde_mm256_and_si256(simde_mm256_cmpeq_epi8(simde_mm256_andnot_si256(simde_mm256_shuffle_epi8(simde_mm256_set1_epi32(((uint32_t*)test_input[0])[i]), shufmask),andmask),zero256),masks[0]); - for (j=1; jn_segments; j++) { - c256 = simde_mm256_or_si256(simde_mm256_and_si256(simde_mm256_cmpeq_epi8(simde_mm256_andnot_si256(simde_mm256_shuffle_epi8(simde_mm256_set1_epi32(((uint32_t*)test_input[j])[i]), shufmask),andmask),zero256),masks[j]),c256); - } - ((simde__m256i *)c)[i] = c256; - } - - for (i=(block_length>>5)<<5;in_segments; j++) { - - temp = (test_input[j][i/8]&(128>>(i&7)))>>(7-(i&7)); - //printf("c(%d,%d)=%d\n",j,i,temp); - c[i] |= (temp << j); - } - } -#endif - - if(impp->tinput != NULL) stop_meas(impp->tinput); - - if ((BG==1 && Zc>=176) || (BG==2 && Zc>=72)) { - // extend matrix - if(impp->tprep != NULL) start_meas(impp->tprep); - if(impp->tprep != NULL) stop_meas(impp->tprep); - //parity check part - if(impp->tparity != NULL) start_meas(impp->tparity); - encode_parity_check_part_optim(c, d, BG, Zc, Kb, simd_size, ncols); - if(impp->tparity != NULL) stop_meas(impp->tparity); - } - else { - if (encode_parity_check_part_orig(c, d, BG, Zc, Kb, block_length)!=0) { - printf("Problem with encoder\n"); - return(-1); - } - } - if(impp->toutput != NULL) start_meas(impp->toutput); - // information part and puncture columns - /* - memcpy(&channel_input[0], &c[2*Zc], (block_length-2*Zc)*sizeof(unsigned char)); - memcpy(&channel_input[block_length-2*Zc], &d[0], ((nrows-no_punctured_columns) * Zc-removed_bit)*sizeof(unsigned char)); - */ - if ((((2*Zc)&31) == 0) && (((block_length-(2*Zc))&31) == 0)) { - //AssertFatal(((2*Zc)&31) == 0,"2*Zc needs to be a multiple of 32 for now\n"); - //AssertFatal(((block_length-(2*Zc))&31) == 0,"block_length-(2*Zc) needs to be a multiple of 32 for now\n"); - uint32_t l1 = (block_length-(2*Zc))>>5; - uint32_t l2 = ((nrows-no_punctured_columns) * Zc-removed_bit)>>5; - simde__m256i *c256p = (simde__m256i *)&c[2*Zc]; - simde__m256i *d256p = (simde__m256i *)&d[0]; - // if (((block_length-(2*Zc))&31)>0) l1++; - - for (i=0;in_segments;j++) ((simde__m256i *)channel_input[j])[i] = simde_mm256_and_si256(simde_mm256_srai_epi16(c256p[i],j),masks[0]); - - // if ((((nrows-no_punctured_columns) * Zc-removed_bit)&31)>0) l2++; - - for (i1=0;i1n_segments;j++) ((simde__m256i *)channel_input[j])[i] = simde_mm256_and_si256(simde_mm256_srai_epi16(d256p[i1],j),masks[0]); - } - else { -#ifdef DEBUG_LDPC - LOG_W(PHY,"using non-optimized version\n"); -#endif - // do non-SIMD version - for (i=0;i<(block_length-2*Zc);i++) - for (j=0; jn_segments; j++) - channel_input[j][i] = (c[2*Zc+i]>>j)&1; - for (i=0;i<((nrows-no_punctured_columns) * Zc-removed_bit);i++) - for (j=0; jn_segments; j++) - channel_input[j][block_length-2*Zc+i] = (d[i]>>j)&1; - } - - if(impp->toutput != NULL) stop_meas(impp->toutput); - return 0; -} - - diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c index b91d1f5825..b8f46969ec 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c @@ -43,7 +43,7 @@ #include "ldpc_encode_parity_check.c" #include "ldpc_generate_coefficient.c" -int LDPCencoder(uint8_t **input, uint8_t **output, encoder_implemparams_t *impp) +int LDPCencoder(uint8_t **input, uint8_t *output, encoder_implemparams_t *impp) { //set_log(PHY, 4); @@ -61,27 +61,11 @@ int LDPCencoder(uint8_t **input, uint8_t **output, encoder_implemparams_t *impp) unsigned int macro_segment, macro_segment_end; - macro_segment = 8*impp->macro_num; - macro_segment_end = (impp->n_segments > 8*(impp->macro_num+1)) ? 8*(impp->macro_num+1) : impp->n_segments; + macro_segment = impp->first_seg; + macro_segment_end = (impp->n_segments > impp->first_seg + 8) ? impp->first_seg + 8 : impp->n_segments; ///printf("macro_segment: %d\n", macro_segment); ///printf("macro_segment_end: %d\n", macro_segment_end ); - simde__m256i shufmask = simde_mm256_set_epi64x(0x0303030303030303, 0x0202020202020202,0x0101010101010101, 0x0000000000000000); - simde__m256i andmask = simde_mm256_set1_epi64x(0x0102040810204080); // every 8 bits -> 8 bytes, pattern repeats. - simde__m256i zero256 = simde_mm256_setzero_si256(); - simde__m256i masks[8]; - register simde__m256i c256; - masks[0] = simde_mm256_set1_epi8(0x1); - masks[1] = simde_mm256_set1_epi8(0x2); - masks[2] = simde_mm256_set1_epi8(0x4); - masks[3] = simde_mm256_set1_epi8(0x8); - masks[4] = simde_mm256_set1_epi8(0x10); - masks[5] = simde_mm256_set1_epi8(0x20); - masks[6] = simde_mm256_set1_epi8(0x40); - masks[7] = simde_mm256_set1_epi8(0x80); - - - //determine number of bits in codeword if (BG==1) { @@ -103,10 +87,12 @@ int LDPCencoder(uint8_t **input, uint8_t **output, encoder_implemparams_t *impp) AssertFatal(Zc > 0, "no valid Zc found for block length %d\n", block_length); if ((Zc&31) > 0) simd_size = 16; - else - simd_size = 32; - unsigned char cc[22*Zc] __attribute__((aligned(32))); //padded input, unpacked, max size - unsigned char dd[46*Zc] __attribute__((aligned(32))); //coded parity part output, unpacked, max size +#ifdef __AVX512F__ + else if ((BG==1) && Zc==384) simd_size =64; +#endif + else simd_size=32; + unsigned char cc[22*Zc] __attribute__((aligned(64))); //padded input, unpacked, max size + unsigned char dd[46*Zc] __attribute__((aligned(64))); //coded parity part output, unpacked, max size // calculate number of punctured bits no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*rate)/Zc; @@ -114,40 +100,95 @@ int LDPCencoder(uint8_t **input, uint8_t **output, encoder_implemparams_t *impp) //printf("%d\n",no_punctured_columns); //printf("%d\n",removed_bit); // unpack input - memset(cc,0,sizeof(unsigned char) * ncols * Zc); - memset(dd,0,sizeof(unsigned char) * nrows * Zc); + memset(cc,0,sizeof(cc)); + memset(dd,0,sizeof(dd)); if(impp->tinput != NULL) start_meas(impp->tinput); -#if 0 - for (i=0; i>(i&7); - //printf("c(%d,%d)=%d\n",j,i,temp); - c[i] |= (temp << (j-macro_segment)); + unsigned int i_byte = 0; + +#if defined(__AVX512F__) && defined(__AVX512BW__) && defined(__AVX512VBMI__) + const __m512i masks5[8] = { _mm512_set1_epi8(0x1), _mm512_set1_epi8(0x2), + _mm512_set1_epi8(0x4), _mm512_set1_epi8(0x8), + _mm512_set1_epi8(0x10), _mm512_set1_epi8(0x20), + _mm512_set1_epi8(0x40), _mm512_set1_epi8(0x80)}; + const __m512i zero512 = _mm512_setzero_si512(); + const uint8_t perm[64]__attribute__((aligned(64))) = {7,6,5,4,3,2,1,0, 15,14,13,12,11,10,9,8, + 23,22,21,20,19,18,17,16, 31,30,29,28,27,26,25,24, + 39,38,37,36,35,34,33,32, 47,46,45,44,43,42,41,40, + 55,54,53,52,51,50,49,48, 63,62,61,60,59,58,57,56}; + register __m512i c512; + + for (; i_byte < ((block_length >> 6) << 6); i_byte += 64) { + unsigned int i = i_byte >> 6; + c512 = _mm512_mask_blend_epi8(((uint64_t *)&input[macro_segment][0])[i], zero512, masks5[0]); + for (int j = macro_segment + 1; j < macro_segment_end; j++) { + c512 = _mm512_or_si512(c512, _mm512_mask_blend_epi8(((uint64_t *)&input[j][0])[i], zero512, masks5[j - macro_segment])); } + c512 = _mm512_permutexvar_epi8(*(__m512i*)perm, c512); + ((__m512i *)cc)[i] = c512; } -#else - for (int i=0; i>5; i++) { +#endif + +#ifndef __aarch64__ + simde__m256i shufmask = simde_mm256_set_epi64x(0x0303030303030303, 0x0202020202020202,0x0101010101010101, 0x0000000000000000); + simde__m256i andmask = simde_mm256_set1_epi64x(0x0102040810204080); // every 8 bits -> 8 bytes, pattern repeats. + simde__m256i zero256 = simde_mm256_setzero_si256(); + simde__m256i masks[8]; + register simde__m256i c256; + masks[0] = simde_mm256_set1_epi8(0x1); + masks[1] = simde_mm256_set1_epi8(0x2); + masks[2] = simde_mm256_set1_epi8(0x4); + masks[3] = simde_mm256_set1_epi8(0x8); + masks[4] = simde_mm256_set1_epi8(0x10); + masks[5] = simde_mm256_set1_epi8(0x20); + masks[6] = simde_mm256_set1_epi8(0x40); + masks[7] = simde_mm256_set1_epi8(0x80); + + for (; i_byte < ((block_length >> 5 ) << 5); i_byte += 32) { + unsigned int i = i_byte >> 5; c256 = simde_mm256_and_si256(simde_mm256_cmpeq_epi8(simde_mm256_andnot_si256(simde_mm256_shuffle_epi8(simde_mm256_set1_epi32(((uint32_t*)input[macro_segment])[i]), shufmask),andmask),zero256),masks[0]); - //for (j=1; j>5)<<5;i 8 bytes, pattern repeats. + simde__m128i zero128 = simde_mm_setzero_si128(); + simde__m128i masks[8]; + register simde__m128i c128; + masks[0] = simde_mm_set1_epi8(0x1); + masks[1] = simde_mm_set1_epi8(0x2); + masks[2] = simde_mm_set1_epi8(0x4); + masks[3] = simde_mm_set1_epi8(0x8); + masks[4] = simde_mm_set1_epi8(0x10); + masks[5] = simde_mm_set1_epi8(0x20); + masks[6] = simde_mm_set1_epi8(0x40); + masks[7] = simde_mm_set1_epi8(0x80); - temp = (input[j][i/8]&(128>>(i&7)))>>(7-(i&7)); - //printf("c(%d,%d)=%d\n",j,i,temp); + for (; i_byte < ((block_length >> 4 ) << 4); i_byte += 16) { + unsigned int i = i_byte >> 4; + c128 = simde_mm_and_si128(simde_mm_cmpeq_epi8(simde_mm_andnot_si128(simde_mm_shuffle_epi8(simde_mm_set1_epi16(((uint16_t*)input[macro_segment])[i]), shufmask),andmask),zero128),masks[0]); + for (int j=macro_segment+1; j < macro_segment_end; j++) { + c128 = simde_mm_or_si128(simde_mm_and_si128(simde_mm_cmpeq_epi8(simde_mm_andnot_si128(simde_mm_shuffle_epi8(simde_mm_set1_epi32(((uint16_t*)input[j])[i]), shufmask),andmask),zero128),masks[j-macro_segment]),c128); + } + ((simde__m128i *)cc)[i] = c128; + } +#endif + + for (; i_byte < block_length; i_byte++) { + unsigned int i = i_byte; + for (int j = macro_segment; j < macro_segment_end; j++) { + + temp = (input[j][i/8]&(128>>(i&7)))>>(7-(i&7)); cc[i] |= (temp << (j-macro_segment)); } } -#endif if(impp->tinput != NULL) stop_meas(impp->tinput); @@ -166,48 +207,8 @@ int LDPCencoder(uint8_t **input, uint8_t **output, encoder_implemparams_t *impp) return(-1); } } - if(impp->toutput != NULL) start_meas(impp->toutput); - // information part and puncture columns - /* - memcpy(&output[0], &c[2*Zc], (block_length-2*Zc)*sizeof(unsigned char)); - memcpy(&output[block_length-2*Zc], &d[0], ((nrows-no_punctured_columns) * Zc-removed_bit)*sizeof(unsigned char)); - */ - if ((((2*Zc)&31) == 0) && (((block_length-(2*Zc))&31) == 0)) { - //AssertFatal(((2*Zc)&31) == 0,"2*Zc needs to be a multiple of 32 for now\n"); - //AssertFatal(((block_length-(2*Zc))&31) == 0,"block_length-(2*Zc) needs to be a multiple of 32 for now\n"); - uint32_t l1 = (block_length-(2*Zc))>>5; - uint32_t l2 = ((nrows-no_punctured_columns) * Zc-removed_bit)>>5; - simde__m256i *c256p = (simde__m256i *)&cc[2*Zc]; - simde__m256i *d256p = (simde__m256i *)&dd[0]; - // if (((block_length-(2*Zc))&31)>0) l1++; - - for (int i=0;i0) l2++; - - for (int i1=0, i=l1;i1>(j-macro_segment))&1; - for (int i=0;i<((nrows-no_punctured_columns) * Zc-removed_bit);i++) - //for (j=0; j>(j-macro_segment))&1; - } - - if(impp->toutput != NULL) stop_meas(impp->toutput); + memcpy(output,&cc[2*Zc],(block_length-(2*Zc))); + memcpy(output+block_length-(2*Zc),dd,((nrows-no_punctured_columns) * Zc-removed_bit)); return 0; } diff --git a/openair1/PHY/CODING/nr_segmentation.c b/openair1/PHY/CODING/nr_segmentation.c index 8db12fd3c0..57c21a5980 100644 --- a/openair1/PHY/CODING/nr_segmentation.c +++ b/openair1/PHY/CODING/nr_segmentation.c @@ -151,13 +151,8 @@ else for (r=0; r<*C; r++) { k = 0; - - while (k<((Kprime - L)>>3)) { - output_buffers[r][k] = input_buffer[s]; - //printf("encoding segment %d : byte %d (%d) => %d\n",r,k,(Kprime-L)>>3,input_buffer[s]); - k++; - s++; - } + memcpy(output_buffers[r],input_buffer+s,(Kprime-L)>>3); + s+=(Kprime-L)>>3; if (*C > 1) { // add CRC crc = crc24b(output_buffers[r],Kprime-L)>>8; diff --git a/openair1/PHY/CODING/tests/CMakeLists.txt b/openair1/PHY/CODING/tests/CMakeLists.txt new file mode 100644 index 0000000000..8d7fac20d7 --- /dev/null +++ b/openair1/PHY/CODING/tests/CMakeLists.txt @@ -0,0 +1,263 @@ +# Define a macro to add tests for different physical simulators +macro(add_physim_test test_gen test_exec test_description test_label) + # catch all the arguments past the last expected arqument and store them in the options_list + set(options_list ${ARGN}) + set(test_name physim.${test_gen}.${test_exec}.${test_description}) + add_test( + NAME ${test_name} + COMMAND ${test_exec} ${options_list} + COMMAND_EXPAND_LISTS + ) + set_tests_properties(${test_name} PROPERTIES + LABELS "${test_exec}: ${test_label};${test_exec}" + ENVIRONMENT "LD_LIBRARY_PATH=." + ) + add_dependencies(tests ${test_exec}) +endmacro() + +#################################################################################### +###### dlsim unit test ###### +#################################################################################### + +add_physim_test(4g dlsim basic.test1 "10 MHz, R2.FDD (MCS 5), EVA5, -1dB" -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=1500 -B=50 -c=2 -z=2 -Tperf=60) +add_physim_test(4g dlsim basic.test2 "1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)" -m=4 -g=F -s=0 -w=1.0 -f=.2 -n=1500 -B=6 -c=4 -z=2 -Tperf=60) +add_physim_test(4g dlsim basic.test3 "10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)" -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=1500 -B=50 -c=2 -z=2 -Tperf=60) +add_physim_test(4g dlsim basic.test4 "5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)" -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=1500 -B=25 -c=2 -z=2 -Tperf=60) +add_physim_test(4g dlsim basic.test5 "10 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)" -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=1500 -B=50 -c=2 -z=2 -Tperf=25) +add_physim_test(4g dlsim basic.test6 "5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)" -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=1500 -B=25 -c=2 -z=2 -Tperf=25) +add_physim_test(4g dlsim basic.test7 "5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)" -m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=1500 -B=25 -c=3 -z=2 -Tperf=60) +add_physim_test(4g dlsim basic.test8 "5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)" -m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=1500 -B=25 -c=3 -z=2 -r=1022 -Tperf=60) +add_physim_test(4g dlsim basic.test9 "10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)" -m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=1500 -B=50 -c=2 -z=2 -Tperf=60) +add_physim_test(4g dlsim 100rb.tm2.test1 "20 MHz, R.9 FDD (MCS 26), EVA5, 17.6dB (70%)" -m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=1500 -B=100 -c=2 -z=2 -Tperf=60) +add_physim_test(4g dlsim 100rb.tm2.test2 "20 MHz, R.9-2 FDD (MCS 26, 17PRB), EVA5, 17.3dB (70%)" -m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=1500 -B=100 -c=2 -z=2 -r=1600 -Tperf=60) +add_physim_test(4g dlsim 100rb.tm2.test3 "20 MHz, R.9-1 FDD (MCS 26, 83 PRB), EVA5, 16.6dB (70%)" -m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=1500 -B=100 -c=2 -z=2 -r=1899 -Tperf=60) +add_physim_test(4g dlsim 100rb.tm2.test4 "10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)" -m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=1500 -B=50 -c=2 -x=2 -y=2 -z=2 -Tperf=60) +add_physim_test(4g dlsim 100rb.tm2.test5 "5 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)" -m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=1500 -B=25 -c=3 -x=2 -y=2 -z=2 -Tperf=60) + +#################################################################################### +###### ulsim unit test ###### +#################################################################################### + +add_physim_test(4g ulsim test1 "5 MHz, FDD (MCS 5), AWGN, 6dB" -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=1500 -Tperf=70) +add_physim_test(4g ulsim test2 "5 MHz, FDD (MCS 16), AWGN , 12dB (70%)" -BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=1500 -Tperf=70) +add_physim_test(4g ulsim test3 "10 MHz, R3.FDD (MCS 5), AWGN, 6dB (70%)" -BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=1500 -Tperf=70) +add_physim_test(4g ulsim test4 "10 MHz, R3-1.FDD (MCS 16), AWGN, 12dB (70%)" -BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=1500 -Tperf=70) +add_physim_test(4g ulsim test5 "20 MHz, FDD (MCS 5), AWGN, 6dB (70%)" -BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=1500 -Tperf=70) +add_physim_test(4g ulsim test6 "20 MHz, FDD (MCS 16), AWGN, 12 dB (70%)" -BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=1500 -Tperf=70) + +#################################################################################### +###### ldpctest unit test ###### +#################################################################################### + +add_physim_test(5g ldpctest test1 "block length = 3872, BG1" -l3872 -s10 -n300) +add_physim_test(5g ldpctest test2 "block length = 4224, BG1" -l4224 -s10 -n300) +add_physim_test(5g ldpctest test3 "block length = 4576, BG1" -l4576 -s10 -n300) +add_physim_test(5g ldpctest test4 "block length = 4928, BG1" -l4928 -s10 -n300) +add_physim_test(5g ldpctest test5 "block length = 5280, BG1" -l5280 -s10 -n300) +add_physim_test(5g ldpctest test6 "block length = 5632, BG1" -l5632 -s10 -n300) +add_physim_test(5g ldpctest test7 "block length = 6336, BG1" -l6336 -s10 -n300) +add_physim_test(5g ldpctest test8 "block length = 7040, BG1" -l7040 -s10 -n300) +add_physim_test(5g ldpctest test9 "block length = 7744, BG1" -l7744 -s10 -n300) +add_physim_test(5g ldpctest test10 "block length = 8448, BG1" -l8448 -s10 -n300) +add_physim_test(5g ldpctest test11 "block length = 1, BG2" -l1 -s10 -n300) +add_physim_test(5g ldpctest test12 "block length = 100, BG2" -l100 -s10 -n300) +add_physim_test(5g ldpctest test13 "block length = 193, BG2" -l193 -s10 -n300) +add_physim_test(5g ldpctest test14 "block length = 500, BG2" -l500 -s10 -n300) +add_physim_test(5g ldpctest test15 "block length = 561, BG2" -l561 -s10 -n300) +add_physim_test(5g ldpctest test16 "block length = 600, BG2" -l600 -s10 -n300) +add_physim_test(5g ldpctest test17 "block length = 641, BG2" -l641 -s10 -n300) +add_physim_test(5g ldpctest test18 "block length = 2000, BG1" -l2000 -s10 -n300) +add_physim_test(5g ldpctest test19 "block length = 3000, BG1" -l3000 -s10 -n300) +add_physim_test(5g ldpctest test20 "block length = 3840, BG1" -l3840 -s10 -n300) + +#################################################################################### +###### polartest unit test ###### +#################################################################################### + +add_physim_test(5g polartest test1 "PBCH polar test" -q -s-10 -f0) +add_physim_test(5g polartest test2 "DCI polar test" -q -s-10 -f0 -m1) +add_physim_test(5g polartest test3 "UCI polar test,6-bit CRC" -q -s-2 -f2 -m2 -k12) +add_physim_test(5g polartest test4 "UCI polar test,11-bit CRC" -q -s-2 -f2 -m2 -k20) + +#################################################################################### +###### nr_pbchsim unit test ###### +#################################################################################### + +add_physim_test(5g nr_pbchsim 106rb.test1 "PBCH-only, 106 PRB, NID 2" -s-11 -S-8 -n30 -R106 -N2) +add_physim_test(5g nr_pbchsim 106rb.test2 "PBCH and synchronization, 106PBR" -s-11 -S-8 -n30 -o8000 -I -R106) +add_physim_test(5g nr_pbchsim 106rb.test3 "PBCH and synchronization, 106PBR, SSB SC OFFSET 6" -s-11 -S-8 -n30 -R106 -c6) +add_physim_test(5g nr_pbchsim 217rb.test1 "PBCH-only, 217 PRB" -s-10 -S-8 -n30 -R217) +add_physim_test(5g nr_pbchsim 217rb.test2 "PBCH and synchronization, 217 RPB" -s-10 -S-8 -n30 -o8000 -I -R217) +add_physim_test(5g nr_pbchsim 273rb.test1 "PBCH-only, 273 PRB" -s-10 -S-8 -n30 -R273) +add_physim_test(5g nr_pbchsim 273rb.test2 "PBCH and synchronization, 273 PRB" -s-10 -S-8 -n30 -o8000 -I -R273) +add_physim_test(5g nr_pbchsim otherSCS.test1 "PBCH-only, 15Khz, 5Mhz" -s-10 -S-8 -n30 -m0 -R25) +add_physim_test(5g nr_pbchsim otherSCS.test2 "PBCH-only, 120Khz, 50Mhz" -s-10 -S-8 -n30 -m3 -R32) + +#################################################################################### +###### nr_dlsim unit test ###### +#################################################################################### + +add_physim_test(5g nr_dlsim basic.test1 "106 PRB" -n300 -R106 -b106 -s5) +add_physim_test(5g nr_dlsim basic.test2 "217 PRB" -n300 -R217 -b217 -s5) +add_physim_test(5g nr_dlsim basic.test3 "273 PRB" -n300 -R273 -b273 -s5) +add_physim_test(5g nr_dlsim basic.test4 "HARQ test 25% TP 4 rounds" -n300 -s1 -S2 -t25) +add_physim_test(5g nr_dlsim basic.test5 "HARQ test 33% TP 3 rounds" -n300 -s1 -S2 -t33) +add_physim_test(5g nr_dlsim basic.test6 "HARQ test 50% TP 2 rounds" -n300 -s5 -S7 -t50) +add_physim_test(5g nr_dlsim basic.test7 "25 PRBs, 15 kHz SCS" -n300 -m0 -e0 -R25 -b25 -i 2 1 0) +add_physim_test(5g nr_dlsim basic.test8 "32 PRBs, 120 kHz SCS" -n300 -s5 -m3 -R32 -b32) +add_physim_test(5g nr_dlsim offset.test1 "106 PRB 25 PDSCH-Offset" -n300 -R106 -a25 -s5) +add_physim_test(5g nr_dlsim offset.test2 "106 PRB 51 PDSCH-Offset" -n300 -R106 -a51 -s5) +add_physim_test(5g nr_dlsim offset.test3 "217 PRB 100 PDSCH-PRBs" -n300 -R217 -b100 -s5) +add_physim_test(5g nr_dlsim offset.test4 "217 PRB 80 PDSCH-Offset" -n300 -R217 -a80 -s5) +add_physim_test(5g nr_dlsim offset.test5 "217 PRB 100 PDSCH-PRBs 110 PDSCH-Offset" -n300 -R217 -a110 -s5 -b100) +add_physim_test(5g nr_dlsim mcs.mimo.test1 "106 PRBs 50 PDSCH-PRBs MCS Index 27" -n300 -e27 -s30) +add_physim_test(5g nr_dlsim mcs.mimo.test2 "106 PRBs 50 PDSCH-PRBs MCS Index 16" -n300 -e16 -s11 -S13) +add_physim_test(5g nr_dlsim mcs.mimo.test3 "106 MCS-TABLE 256 QAM MCS Index 26" -n300 -q1 -e26 -s30) +add_physim_test(5g nr_dlsim mcs.mimo.test4 "MCS 0, low SNR performance" -n300 -e0 -t95 -S-1.0 -i 2 1 0) +add_physim_test(5g nr_dlsim mcs.mimo.test5 "4x4 MIMO, 1 Layer" -n30 -s20 -U 3 0 0 2 -gA -x1 -y4 -z4) +add_physim_test(5g nr_dlsim mcs.mimo.test6 "4x4 MIMO, 2 Layers" -n30 -s20 -U 3 0 0 2 -gA -x2 -y4 -z4) +add_physim_test(5g nr_dlsim mcs.mimo.test7 "4x4 MIMO, 4 Layers" -n30 -s20 -U 3 0 0 2 -x4 -y4 -z4) +add_physim_test(5g nr_dlsim dmrs.ptrs.test1 "3 PTRS, 8 Interpolated Symbols" -n300 -s5 -T 2 2 2) +add_physim_test(5g nr_dlsim dmrs.ptrs.test2 "6 PTRS, 5 Interpolated Symbols" -n300 -s5 -T 2 1 2) +add_physim_test(5g nr_dlsim dmrs.ptrs.test3 "11 PTRS, 0 Interpolated Symbols" -n300 -s5 -T 2 0 4) +add_physim_test(5g nr_dlsim dmrs.ptrs.test4 "Mapping type A, 2 DMRS Symbols" -n300 -s5 -S7 -U 2 0 1) +add_physim_test(5g nr_dlsim dmrs.ptrs.test5 "Mapping type A, 3 DMRS Symbols" -n300 -s5 -S7 -U 2 0 2) +add_physim_test(5g nr_dlsim dmrs.ptrs.test6 "Mapping type B, 4 DMRS Symbols" -n300 -s5 -S7 -U 2 1 3) + +#################################################################################### +###### nr_dlschsim unit test ###### +#################################################################################### + +add_physim_test(5g nr_dlschsim test1 "106 PRBs" -R 106 -m9 -s13 -n300) +add_physim_test(5g nr_dlschsim test2 "217 PRBs" -R 217 -m15 -s15 -n300) +add_physim_test(5g nr_dlschsim test3 "273 PRBs" -R 273 -m19 -s20 -n300) + +#################################################################################### +###### smallblocktest unit test ###### +#################################################################################### + +add_physim_test(5g smallblocktest test1 "3 bits" -l 3 -s -4 -d 1 -i 10000) +add_physim_test(5g smallblocktest test2 "6 bits" -l 6 -s -4 -d 1 -i 10000) +add_physim_test(5g smallblocktest test3 "7 bits" -l 7 -s -4 -d 1 -i 10000) +add_physim_test(5g smallblocktest test4 "11 bits" -l 11 -s -4 -d 1 -i 10000) + +#################################################################################### +###### nr_ulschsim unit test ###### +#################################################################################### + +add_physim_test(5g nr_ulschsim test1 "106 PRBs" -R 106 -m9 -s13 -n300) +add_physim_test(5g nr_ulschsim test2 "217 PRBs" -R 217 -m15 -s15 -n300) +add_physim_test(5g nr_ulschsim test3 "273 PRBs" -R 273 -m19 -s20 -n300) +add_physim_test(5g nr_ulschsim test4 "106 PRBs 4-layer MIMO" -R 106 -m9 -s13 -n300 -y4 -z4 -W4) + +#################################################################################### +###### nr_pucchsim unit test ###### +#################################################################################### + +add_physim_test(5g nr_pucchsim test1 "Format 0 1-bit ACK miss 106 PRB" -R 106 -i 1 -P 0 -b 1 -s-2 -n3000) +add_physim_test(5g nr_pucchsim test2 "Format 0 2-bit ACK miss 106 PRB" -R 106 -i 1 -P 0 -b 2 -s-2 -n3000) +add_physim_test(5g nr_pucchsim test3 "Format 0 2-bit ACK miss, 1-bit SR 106 PRB" -R 106 -i 1 -P 0 -b 2 -s-2 -c -n3000) +add_physim_test(5g nr_pucchsim test4 "Format 2 3-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 3 -s0 -n3000) +add_physim_test(5g nr_pucchsim test5 "Format 2 4-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 4 -s0 -n3000) +add_physim_test(5g nr_pucchsim test6 "Format 2 5-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 5 -s1 -n3000) +add_physim_test(5g nr_pucchsim test7 "Format 2 6-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 6 -s2 -n3000) +add_physim_test(5g nr_pucchsim test8 "Format 2 7-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 7 -s3 -n3000) +add_physim_test(5g nr_pucchsim test9 "Format 2 8-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 8 -s4 -n3000) +add_physim_test(5g nr_pucchsim test10 "Format 2 9-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 9 -s5 -n3000) +add_physim_test(5g nr_pucchsim test11 "Format 2 10-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 10 -s6 -n3000) +add_physim_test(5g nr_pucchsim test12 "Format 2 11-bit 2/106 PRB" -R 106 -i 1 -P 2 -b 11 -s6 -n3000) +add_physim_test(5g nr_pucchsim test13 "Format 2 12-bit 4/106 PRB" -R 106 -i 1 -P 2 -q4 -b 12 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test14 "Format 2 19-bit 4/106 PRB" -R 106 -i 1 -P 2 -q4 -b 19 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test15 "Format 2 12-bit 8/106 PRB" -R 106 -i 1 -P 2 -q8 -b 12 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test16 "Format 2 19-bit 8/106 PRB" -R 106 -i 1 -P 2 -q8 -b 19 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test17 "Format 2 32-bit 8/106 PRB" -R 106 -i 1 -P 2 -q8 -b 32 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test18 "Format 2 32-bit 16/106 PRB" -R 106 -i 1 -P 2 -q16 -b 32 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test19 "Format 2 64-bit 16/106 PRB" -R 106 -i 1 -P 2 -q16 -b 64 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test20 "Format 0 1-bit Ack miss 273 PRB" -R 273 -z8 -i 1 -P 0 -b 1 -s-2 -n3000) +add_physim_test(5g nr_pucchsim test21 "Format 0 2-bit Ack miss 273 PRB" -R 273 -z8 -i 1 -P 0 -b 2 -s-2 -n3000) +add_physim_test(5g nr_pucchsim test22 "Format 0 2-bit Ack miss+SR 273 PRB" -R 273 -z8 -i 1 -P 0 -b 2 -s-2 -c -n3000) +add_physim_test(5g nr_pucchsim test23 "Format 2 4-bit 2/273 PRB" -R 273 -z8 -i 1 -P 2 -b 4 -s-8 -S0 -n3000) +add_physim_test(5g nr_pucchsim test24 "Format 2 7-bit 2/273 PRB" -R 273 -z8 -i 1 -P 2 -b 7 -s3 -n3000) +add_physim_test(5g nr_pucchsim test25 "Format 2 11-bit 2/273 PRB" -R 273 -z8 -i 1 -P 2 -b 11 -s6 -n3000) +add_physim_test(5g nr_pucchsim test26 "Format 2 12-bit 8/273 PRB" -R 273 -z8 -i 1 -P 2 -q8 -b 12 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test27 "Format 2 19-bit 8/273 PRB" -R 273 -z8 -i 1 -P 2 -q8 -b 19 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test28 "Format 2 64-bit 16/273 PRB" -R 273 -z8 -i 1 -P 2 -q16 -b 64 -s-3 -n3000) +add_physim_test(5g nr_pucchsim test29 "Format 2 64-bit 16/273 PRB Delay 2us" -R 273 -z8 -i 1 -P 2 -q16 -b 64 -s0 -S7 -d 2 -n3000) + +#################################################################################### +###### nr_ulsim unit test ###### +#################################################################################### + +add_physim_test(5g nr_ulsim misc.test1 "MCS 9 106 PRBs" -n300 -m9 -r106 -s5) +add_physim_test(5g nr_ulsim misc.test2 "MCS 16 50 PRBs" -n300 -m16 -s10) +add_physim_test(5g nr_ulsim misc.test3 "MCS 28 50 PRBs" -n300 -m28 -s20) +add_physim_test(5g nr_ulsim misc.test4 "MCS 27 50 PRBs 256QAM" -n300 -m27 -s25 -q1) +add_physim_test(5g nr_ulsim misc.test5 "MCS 9 217 PRBs" -n300 -m9 -R217 -r217 -s5) +add_physim_test(5g nr_ulsim misc.test6 "MCS 9 273 PRBs" -n300 -m9 -R273 -r273 -s5) +add_physim_test(5g nr_ulsim misc.test7 "PUSCH Type A, 2 DMRS Symbols" -n300 -s5 -U 0,1,1,1) +add_physim_test(5g nr_ulsim misc.test8 "PUSCH Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols" -n300 -s5 -T 1,2 -U 0,2,1,1) +add_physim_test(5g nr_ulsim misc.test9 "PUSCH Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols" -n300 -s5 -T 2,2 -U 1,2,1,1) +add_physim_test(5g nr_ulsim misc.test10 "PUSCH Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols" -n300 -s5 -a4 -b8 -T 1,2 -U 1,3,1,1) +add_physim_test(5g nr_ulsim misc.test11 "25 PRBs, 15 kHz SCS" -n300 -u0 -m0 -R25 -r25 -i 1,0) +add_physim_test(5g nr_ulsim misc.test12 "32 PRBs, 120 kHz SCS" -n300 -s5 -r32 -R32 -u3) +add_physim_test(5g nr_ulsim misc.test13 "MCS 0, low SNR performance" -n300 -m0 -S -0.6 -i 1,0) +add_physim_test(5g nr_ulsim misc.test14 "MCS 28, 106 PRBs, Time shift 8" -n300 -m28 -R106 -r106 -t90 -s24 -S24 -d 8) +add_physim_test(5g nr_ulsim misc.test15 "SRS, SNR 40 dB" -n300 -s40 -E 1) +add_physim_test(5g nr_ulsim sc-fdma.test1 "SC-FDMA, 50 PRBs" -n300 -s5 -Z) +add_physim_test(5g nr_ulsim sc-fdma.test2 "SC-FDMA, 75 PRBs" -n300 -s5 -Z -r75) +add_physim_test(5g nr_ulsim sc-fdma.test3 "SC-FDMA, 216 PRBs" -n150 -s5 -Z -r216 -R217) +add_physim_test(5g nr_ulsim sc-fdma.test4 "SC-FDMA, 273 PRBs" -n150 -s5 -Z -r270 -R273) +add_physim_test(5g nr_ulsim sc-fdma.test5 "SC-FDMA, 3 DMRS" -n300 -s5 -Z -U 0,2,1,2) +add_physim_test(5g nr_ulsim mimo.test1 "MCS 19 50 PRBs 2 RX_Antenna" -n300 -m19 -s10 -S15 -z2) +add_physim_test(5g nr_ulsim mimo.test2 "MCS 9 106 PRBs MIMO 2 layers" -n300 -m9 -r106 -s8 -W2 -y2 -z2) +add_physim_test(5g nr_ulsim mimo.test3 "MCS 10 106 PRBs MIMO 2 layers" -n300 -m10 -r106 -s12 -W2 -y2 -z2) +add_physim_test(5g nr_ulsim mimo.test4 "MCS 19 106 PRBs MIMO 2 layers" -n300 -m19 -r106 -s22 -W2 -y2 -z2) +add_physim_test(5g nr_ulsim mimo.test5 "MCS 9 106 PRBs MIMO 4 layers" -n300 -m9 -r106 -s10 -W4 -y4 -z4) +add_physim_test(5g nr_ulsim 3gpp.test1 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z2 -s12.4 -S12.4) +add_physim_test(5g nr_ulsim 3gpp.test2 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z4 -s8.5 -S8.5) +add_physim_test(5g nr_ulsim 3gpp.test3 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z8 -s5.4 -S5.4) +add_physim_test(5g nr_ulsim 3gpp.test4 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z2 -s12.5 -S12.5) +add_physim_test(5g nr_ulsim 3gpp.test5 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z4 -s8.9 -S8.9) +add_physim_test(5g nr_ulsim 3gpp.test6 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z8 -s5.7 -S5.7) +add_physim_test(5g nr_ulsim 3gpp.test7 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z2 -s12.6 -S12.6) +add_physim_test(5g nr_ulsim 3gpp.test8 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z4 -s8.9 -S8.9) +add_physim_test(5g nr_ulsim 3gpp.test9 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z8 -s5.8 -S5.8) +add_physim_test(5g nr_ulsim 3gpp.test10 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z2 -s12.3 -S12.3) +add_physim_test(5g nr_ulsim 3gpp.test11 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z4 -s8.8 -S8.8) +add_physim_test(5g nr_ulsim 3gpp.test12 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.7 -S5.7) +add_physim_test(5g nr_ulsim 3gpp.test13 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z2 -s12.5 -S12.5) +add_physim_test(5g nr_ulsim 3gpp.test14 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z4 -s8.6 -S8.6) +add_physim_test(5g nr_ulsim 3gpp.test15 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z8 -s5.6 -S5.6) +add_physim_test(5g nr_ulsim 3gpp.test16 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z2 -s12.5 -S12.5) +add_physim_test(5g nr_ulsim 3gpp.test17 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z4 -s8.6 -S8.6) +add_physim_test(5g nr_ulsim 3gpp.test18 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z8 -s5.6 -S5.6) +add_physim_test(5g nr_ulsim 3gpp.test19 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z2 -s12.5 -S12.5) +add_physim_test(5g nr_ulsim 3gpp.test20 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z4 -s8.7 -S8.7) +add_physim_test(5g nr_ulsim 3gpp.test21 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.5 -S5.5) +add_physim_test(5g nr_ulsim 3gpp.test22 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z2 -s13.1 -S13.1) +add_physim_test(5g nr_ulsim 3gpp.test23 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z4 -s9.2 -S9.2) +add_physim_test(5g nr_ulsim 3gpp.test24 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" -n300 -b14 -I8 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9) +add_physim_test(5g nr_ulsim 3gpp.test25 "3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers" -n300 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s1.7 -S1.7) +add_physim_test(5g nr_ulsim 3gpp.test26 "3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers" -n300 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s-2.1 -S-2.1) +add_physim_test(5g nr_ulsim 3gpp.test27 "3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers" -n300 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s18.7 -S18.7) +add_physim_test(5g nr_ulsim 3gpp.test28 "3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers" -n300 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s11.2 -S11.2) + +#################################################################################### +###### nr_prachsim unit test ###### +#################################################################################### + +add_physim_test(5g nr_prachsim test1 "30kHz SCS, 106 PRBs, Prach format A2" -a -s -30 -n 300 -p 63 -R 106) +add_physim_test(5g nr_prachsim test2 "30kHz SCS, 217 PRBs, Prach format A2" -a -s -30 -n 300 -p 63 -R 217) +add_physim_test(5g nr_prachsim test3 "30kHz SCS, 273 PRBs, Prach format A2" -a -s -30 -n 300 -p 63 -R 273) +add_physim_test(5g nr_prachsim test4 "30kHz SCS, 106 PRBs, Prach format 0" -a -s -30 -n 300 -p 63 -R 106 -c 4) +add_physim_test(5g nr_prachsim test5 "120kHz SCS, 32 PRBs, Prach format A2" -a -s -30 -n 300 -p 32 -R 32 -m 3 -c52) +add_physim_test(5g nr_prachsim test6 "120kHz SCS, 66 PRBs, Prach format A2" -a -s -30 -n 300 -p 32 -R 66 -m 3 -c52) +add_physim_test(5g nr_prachsim test7 "120kHz SCS, 66 PRBs, High Speed Enabled" -a -s -30 -n 300 -R 66 -m 3 -c52 -H) +add_physim_test(5g nr_prachsim test8 "15kHz SCS, 25 PRBs" -a -s -30 -n 300 -p 99 -R 25 -m 0) + +#################################################################################### +###### nr_psbchsim unit test ###### +#################################################################################### + +add_physim_test(5g nr_psbchsim test1 "SLSS Search" -I) +add_physim_test(5g nr_psbchsim test2 "PSBCH TxRx" -n 30) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index f4f0f7e50e..b167cebc26 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -261,9 +261,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) // ceil((NB_RB*8(max allocation per RB)*2(QPSK))/32) ue->nr_csi_info = malloc16_clear(sizeof(nr_csi_info_t)); - ue->nr_csi_info->csi_rs_generated_signal = malloc16(NR_MAX_NB_PORTS * sizeof(int32_t *)); + ue->nr_csi_info->csi_rs_generated_signal = malloc16(NR_MAX_NB_PORTS * sizeof(*ue->nr_csi_info->csi_rs_generated_signal)); for (int i = 0; i < NR_MAX_NB_PORTS; i++) { - ue->nr_csi_info->csi_rs_generated_signal[i] = malloc16_clear(fp->samples_per_frame_wCP * sizeof(int32_t)); + ue->nr_csi_info->csi_rs_generated_signal[i] = + malloc16_clear(fp->samples_per_frame_wCP * sizeof(**ue->nr_csi_info->csi_rs_generated_signal)); } ue->nr_srs_info = malloc16_clear(sizeof(nr_srs_info_t)); diff --git a/openair1/PHY/NR_REFSIG/nr_refsig.h b/openair1/PHY/NR_REFSIG/nr_refsig.h index ceb9048d7f..12a01769d3 100644 --- a/openair1/PHY/NR_REFSIG/nr_refsig.h +++ b/openair1/PHY/NR_REFSIG/nr_refsig.h @@ -39,13 +39,6 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB, uint8_t dmrs_type, int16_t dmrs_scaling); -void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms, - int32_t **dataF, - const int16_t amp, - const nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params, - const int slot, - const csi_mapping_parms_t *phy_csi_parms); - void nr_generate_modulation_table(void); extern simde__m128i byte2m128i[256]; diff --git a/openair1/PHY/NR_TRANSPORT/nr_csi_rs.c b/openair1/PHY/NR_TRANSPORT/nr_csi_rs.c deleted file mode 100644 index 50c1b73d01..0000000000 --- a/openair1/PHY/NR_TRANSPORT/nr_csi_rs.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -#include "PHY/MODULATION/nr_modulation.h" -#include "PHY/NR_REFSIG/nr_refsig.h" - -//#define NR_CSIRS_DEBUG - -void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms, - int32_t **dataF, - const int16_t amp, - const nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params, - const int slot, - const csi_mapping_parms_t *phy_csi_parms) -{ -#ifdef NR_CSIRS_DEBUG - LOG_I(NR_PHY, "csi_params->subcarrier_spacing = %i\n", csi_params->subcarrier_spacing); - LOG_I(NR_PHY, "csi_params->cyclic_prefix = %i\n", csi_params->cyclic_prefix); - LOG_I(NR_PHY, "csi_params->start_rb = %i\n", csi_params->start_rb); - LOG_I(NR_PHY, "csi_params->nr_of_rbs = %i\n", csi_params->nr_of_rbs); - LOG_I(NR_PHY, "csi_params->csi_type = %i (0:TRS, 1:CSI-RS NZP, 2:CSI-RS ZP)\n", csi_params->csi_type); - LOG_I(NR_PHY, "csi_params->row = %i\n", csi_params->row); - LOG_I(NR_PHY, "csi_params->freq_domain = %i\n", csi_params->freq_domain); - LOG_I(NR_PHY, "csi_params->symb_l0 = %i\n", csi_params->symb_l0); - LOG_I(NR_PHY, "csi_params->symb_l1 = %i\n", csi_params->symb_l1); - LOG_I(NR_PHY, "csi_params->cdm_type = %i\n", csi_params->cdm_type); - LOG_I(NR_PHY, "csi_params->freq_density = %i (0: dot5 (even RB), 1: dot5 (odd RB), 2: one, 3: three)\n", csi_params->freq_density); - LOG_I(NR_PHY, "csi_params->scramb_id = %i\n", csi_params->scramb_id); - LOG_I(NR_PHY, "csi_params->power_control_offset = %i\n", csi_params->power_control_offset); - LOG_I(NR_PHY, "csi_params->power_control_offset_ss = %i\n", csi_params->power_control_offset_ss); -#endif - - // setting the frequency density from its index - double rho = get_csi_rho(csi_params->freq_density); - int csi_length = get_csi_modulation_length(rho, - csi_params->freq_density, - phy_csi_parms->kprime, - csi_params->start_rb, - csi_params->nr_of_rbs); - -#ifdef NR_CSIRS_DEBUG - printf(" start rb %d, nr of rbs %d, csi length %d\n", csi_params->start_rb, csi_params->nr_of_rbs, csi_length); -#endif - - //*8(max allocation per RB)*2(QPSK)) - int16_t mod_csi[frame_parms->symbols_per_slot][(frame_parms->N_RB_DL << 4) >> 1] __attribute__((aligned(16))); - get_modulated_csi_symbols(frame_parms->symbols_per_slot, - slot, - frame_parms->N_RB_DL, - csi_length, - mod_csi, - phy_csi_parms->lprime, - csi_params->symb_l0, - csi_params->symb_l1, - csi_params->row, - csi_params->scramb_id); - - uint32_t beta = get_csi_beta_amplitude(amp, csi_params->power_control_offset_ss); - double alpha = 0; - if (phy_csi_parms->ports == 1) - alpha = rho; - else - alpha = 2 * rho; - -#ifdef NR_CSIRS_DEBUG - printf(" rho %f, alpha %f\n", rho, alpha); -#endif - - // CDM group size from CDM type index - int gs = get_cdm_group_size(csi_params->cdm_type); - - int dataF_offset = slot * frame_parms->samples_per_slot_wCP; - - csi_rs_resource_mapping(dataF, - frame_parms->N_RB_DL << 4, - mod_csi, - frame_parms->ofdm_symbol_size, - dataF_offset, - frame_parms->first_carrier_offset, - phy_csi_parms, - csi_params->start_rb, - csi_params->nr_of_rbs, - alpha, - beta, - rho, - gs, - csi_params->freq_density); -} diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 517d0ab974..6e68a459c9 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -600,14 +600,14 @@ static int do_one_dlsch(unsigned char *input_ptr, PHY_VARS_gNB *gNB, NR_gNB_DLSC printf("\nEncoded payload:\n"); for (int i = 0; i < encoded_length; i += 8) { for (int j = 0; j < 8; j++) - printf("%d", input_ptr[i + j]); + printf("%d", (input_ptr[i >> 3] >> j) & 1); printf("\t"); } printf("\n"); #endif if (IS_SOFTMODEM_DLSIM) - memcpy(harq->f, input_ptr, encoded_length); + memcpy(harq->f, input_ptr, (encoded_length + 7) >> 3); c16_t mod_symbs[rel15->NrOfCodewords][encoded_length] __attribute__((aligned(64))); for (int codeWord = 0; codeWord < rel15->NrOfCodewords; codeWord++) { @@ -763,11 +763,11 @@ static int do_one_dlsch(unsigned char *input_ptr, PHY_VARS_gNB *gNB, NR_gNB_DLSC } stop_meas(&gNB->dlsch_precoding_stats); - /* output and its parts for each dlsch should be aligned on 64 bytes - * should remain a multiple of 64 with enough offset to fit each dlsch + /* output and its parts for each dlsch should be aligned on 64 bytes (or 8 * 64 bits) + * should remain a multiple of 8 * 64 with enough offset to fit each dlsch */ uint32_t size_output_tb = rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers; - return ceil_mod(size_output_tb,64); + return ((size_output_tb + 511) >> 9) << 6; } void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) @@ -817,15 +817,15 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot) /// CRC, coding, interleaving and rate matching AssertFatal(harq->pdu != NULL, "%4d.%2d no HARQ PDU for PDSCH generation\n", msgTx->frame, msgTx->slot); - /* output and its parts for each dlsch should be aligned on 64 bytes - * => size_output is a sum of parts sizes rounded up to a multiple of 64 + /* output and its parts for each dlsch should be aligned on 64 bytes (or 8 * 64 bits) + * => size_output is a sum of parts sizes rounded up to a multiple of 8 * 64 */ size_t size_output_tb = rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers; - size_output += ceil_mod(size_output_tb, 64); + size_output += ceil_mod(size_output_tb, 8 * 64); } - unsigned char output[size_output] __attribute__((aligned(64))); - bzero(output, size_output); + unsigned char output[size_output >> 3] __attribute__((aligned(64))); + bzero(output, sizeof(output)); start_meas(dlsch_encoding_stats); if (nr_dlsch_encoding(gNB, diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c index 29ea38232c..56a849a4af 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c @@ -265,15 +265,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, TB_parameters->tbslbrm = rel15->maintenance_parms_v3.tbSizeLbrmBytes; + TB_parameters->output = &output[dlsch_offset >> 3]; TB_parameters->segments = &segments[segments_offset]; - size_t r_offset = 0; for (int r = 0; r < TB_parameters->C; r++) { nrLDPC_segment_encoding_parameters_t *segment_parameters = &TB_parameters->segments[r]; segment_parameters->c = harq->c[r]; segment_parameters->E = nr_get_E(TB_parameters->G, TB_parameters->C, TB_parameters->Qm, rel15->nrOfLayers, r); - segment_parameters->output = &output[dlsch_offset + r_offset]; - r_offset += segment_parameters->E; reset_meas(&segment_parameters->ts_interleave); reset_meas(&segment_parameters->ts_rate_match); @@ -282,11 +280,11 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, segments_offset += TB_parameters->C; - /* output and its parts for each dlsch should be aligned on 64 bytes - * => dlsch_offset should remain a multiple of 64 with enough offset to fit each dlsch + /* output and its parts for each dlsch should be aligned on 64 bytes (or 8 * 64 bits) + * => dlsch_offset should remain a multiple of 8 * 64 with enough offset to fit each dlsch */ const size_t dlsch_size = rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * rel15->qamModOrder[0] * rel15->nrOfLayers; - dlsch_offset += ceil_mod(dlsch_size, 64); + dlsch_offset += ceil_mod(dlsch_size, 8 * 64); } gNB->nrLDPC_coding_interface.nrLDPC_coding_encoder(&slot_parameters); diff --git a/openair1/PHY/NR_TRANSPORT/nr_scrambling.c b/openair1/PHY/NR_TRANSPORT/nr_scrambling.c index b71ee0cce0..9577f943e4 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_scrambling.c +++ b/openair1/PHY/NR_TRANSPORT/nr_scrambling.c @@ -33,11 +33,26 @@ void nr_codeword_scrambling(uint8_t *in, { const int roundedSz = (size + 31) / 32; uint32_t *seq = gold_cache((n_RNTI << 15) + (q << 14) + Nid, roundedSz); - for (int i = 0; i < roundedSz; i++) { - simde__m256i c = ((simde__m256i*)in)[i]; - uint32_t in32 = simde_mm256_movemask_epi8(simde_mm256_slli_epi16(c, 7)); - out[i] = in32 ^ seq[i]; - DEBUG_SCRAMBLING(LOG_D(PHY, "in[%d] %x => %x\n", i, in32, out[i])); + unsigned int i_32 = 0; +#if defined(__AVX512F__) && defined(__AVX512VL__) + for (; i_32 < ((roundedSz >> 3) << 3); i_32 += 8) { + __m256i in_256 = _mm256_load_epi32(&((uint32_t *)in)[i_32]); + __m256i seq_256 = _mm256_load_epi32(&seq[i_32]); + _mm256_storeu_epi32(&out[i_32], _mm256_xor_si256(in_256, seq_256)); + } +#endif +#if defined(__aarch64__) + for (; i_32 < ((roundedSz >> 2) << 2); i_32 += 4) { + unsigned int i = i_32 >> 2; + uint32x4_t in_32x4 = vld1q_u32(&((uint32_t *)in)[i_32]); + uint32x4_t seq_32x4 = vld1q_u32(&seq[i_32]); + ((uint32x4_t *)out)[i] = veorq_u32(in_32x4, seq_32x4); + } +#endif + for (; i_32 < roundedSz; i_32++) { + unsigned int i = i_32; + out[i] = ((uint32_t *)in)[i] ^ seq[i]; + DEBUG_SCRAMBLING(LOG_D(PHY, "in[%d] %x => %x\n", i, ((uint32_t*)in)[i], out[i])); } } diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index 1201dfb033..1729c8c8c4 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -587,10 +587,10 @@ static uint8_t nr_ulsch_mmse_2layers(NR_DL_FRAME_PARMS *frame_parms, ch01 = ul_ch_estimates_ext[1][0]; ch10 = ul_ch_estimates_ext[0][1]; ch11 = ul_ch_estimates_ext[1][1]; - ch20 = ul_ch_estimates_ext[2][0]; - ch21 = ul_ch_estimates_ext[2][1]; - ch30 = ul_ch_estimates_ext[3][0]; - ch31 = ul_ch_estimates_ext[3][1]; + ch20 = ul_ch_estimates_ext[0][2]; + ch21 = ul_ch_estimates_ext[1][2]; + ch30 = ul_ch_estimates_ext[0][3]; + ch31 = ul_ch_estimates_ext[1][3]; break; default: diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index e1ad1bf0b1..33ba3e0829 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -173,10 +173,10 @@ static int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue, const nr_csi_info_t *nr_csi_info, const csi_mapping_parms_t *csi_mapping, const int CDM_group_size, - int32_t csi_rs_received_signal[][ue->frame_parms.samples_per_slot_wCP], + c16_t csi_rs_received_signal[][ue->frame_parms.samples_per_slot_wCP], uint32_t *rsrp, int *rsrp_dBm, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) + const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) { const NR_DL_FRAME_PARMS *fp = &ue->frame_parms; uint16_t meas_count = 0; @@ -203,8 +203,8 @@ static int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue, for (int lp = 0; lp <= csi_mapping->lprime; lp++) { uint16_t symb = lp + csi_mapping->loverline[cdm_id]; uint64_t symbol_offset = symb * fp->ofdm_symbol_size; - c16_t *rx_signal = &rxdataF[ant_rx][symbol_offset]; - c16_t *rx_csi_rs_signal = (c16_t*)&csi_rs_received_signal[ant_rx][symbol_offset]; + const c16_t *rx_signal = &rxdataF[ant_rx][symbol_offset]; + c16_t *rx_csi_rs_signal = &csi_rs_received_signal[ant_rx][symbol_offset]; rx_csi_rs_signal[k].r = rx_signal[k].r; rx_csi_rs_signal[k].i = rx_signal[k].i; @@ -216,7 +216,7 @@ static int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue, #ifdef NR_CSIRS_DEBUG int dataF_offset = proc->nr_slot_rx * fp->samples_per_slot_wCP; uint16_t port_tx = s + csi_mapping->j[cdm_id] * CDM_group_size; - c16_t *tx_csi_rs_signal = (c16_t*)&nr_csi_info->csi_rs_generated_signal[port_tx][symbol_offset + dataF_offset]; + c16_t *tx_csi_rs_signal = &nr_csi_info->csi_rs_generated_signal[port_tx][symbol_offset + dataF_offset]; LOG_I(NR_PHY, "l,k (%2d,%4d) |\tport_tx %d (%4d,%4d)\tant_rx %d (%4d,%4d)\n", symb, @@ -268,8 +268,8 @@ static int nr_csi_rs_channel_estimation( const UE_nr_rxtx_proc_t *proc, const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, const nr_csi_info_t *nr_csi_info, - const int32_t **csi_rs_generated_signal, - const int32_t csi_rs_received_signal[][fp->samples_per_slot_wCP], + const c16_t **csi_rs_generated_signal, + const c16_t csi_rs_received_signal[][fp->samples_per_slot_wCP], const csi_mapping_parms_t *csi_mapping, const int CDM_group_size, uint8_t mem_offset, @@ -314,8 +314,8 @@ static int nr_csi_rs_channel_estimation( for (int lp = 0; lp <= csi_mapping->lprime; lp++) { uint16_t symb = lp + csi_mapping->loverline[cdm_id]; uint64_t symbol_offset = symb * fp->ofdm_symbol_size; - c16_t *tx_csi_rs_signal = (c16_t*)&csi_rs_generated_signal[port_tx][symbol_offset+dataF_offset]; - c16_t *rx_csi_rs_signal = (c16_t*)&csi_rs_received_signal[ant_rx][symbol_offset]; + const c16_t *tx_csi_rs_signal = &csi_rs_generated_signal[port_tx][symbol_offset+dataF_offset]; + const c16_t *rx_csi_rs_signal = &csi_rs_received_signal[ant_rx][symbol_offset]; c16_t tmp = c16MulConjShift(tx_csi_rs_signal[k], rx_csi_rs_signal[k], nr_csi_info->csi_rs_generated_signal_bits); // This is not just the LS estimation for each (k,l), but also the sum of the different contributions // for the sake of optimizing the memory used. @@ -705,7 +705,7 @@ static void nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu, uint32_t *interference_plus_noise_power, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) + const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) { const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; @@ -739,7 +739,7 @@ static void nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue, for (int ant_rx = 0; ant_rx < frame_parms->nb_antennas_rx; ant_rx++) { - c16_t *rx_signal = &rxdataF[ant_rx][symbol_offset]; + const c16_t *rx_signal = &rxdataF[ant_rx][symbol_offset]; for (int rb = csiim_config_pdu->start_rb; rb < end_rb; rb++) { @@ -778,7 +778,7 @@ static void nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue, void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], + const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu) { @@ -796,69 +796,9 @@ void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, ue->nr_csi_info->csi_im_meas_computed = true; } -static void nr_ue_generate_csi_rs(const fapi_nr_dl_config_csirs_pdu_rel15_t *csi_params, - const csi_mapping_parms_t *mapping_parms, - const NR_DL_FRAME_PARMS *frame_parms, - const int16_t amp, - const int slot, - int32_t **dataF) -{ - // setting the frequency density from its index - double rho = get_csi_rho(csi_params->freq_density); - int csi_length = get_csi_modulation_length(rho, - csi_params->freq_density, - mapping_parms->kprime, - csi_params->start_rb, - csi_params->nr_of_rbs); - - //*8(max allocation per RB)*2(QPSK)) - int16_t mod_csi[frame_parms->symbols_per_slot][(frame_parms->N_RB_DL << 4) >> 1] __attribute__((aligned(16))); - get_modulated_csi_symbols(frame_parms->symbols_per_slot, - slot, - frame_parms->N_RB_DL, - csi_length, - mod_csi, - mapping_parms->lprime, - csi_params->symb_l0, - csi_params->symb_l1, - csi_params->row, - csi_params->scramb_id); - - uint32_t beta = get_csi_beta_amplitude(amp, csi_params->power_control_offset_ss); - double alpha = 0; - if (mapping_parms->ports == 1) - alpha = rho; - else - alpha = 2 * rho; - -#ifdef NR_CSIRS_DEBUG - printf(" rho %f, alpha %f\n", rho, alpha); -#endif - - // CDM group size from CDM type index - int gs = get_cdm_group_size(csi_params->cdm_type); - - int dataF_offset = slot * frame_parms->samples_per_slot_wCP; - - csi_rs_resource_mapping(dataF, - frame_parms->N_RB_DL << 4, - mod_csi, - frame_parms->ofdm_symbol_size, - dataF_offset, - frame_parms->first_carrier_offset, - mapping_parms, - csi_params->start_rb, - csi_params->nr_of_rbs, - alpha, - beta, - rho, - gs, - csi_params->freq_density); -} - void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], + const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu) { @@ -895,12 +835,20 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, csirs_config_pdu->symb_l0, csirs_config_pdu->symb_l1); nr_csi_info_t *csi_info = ue->nr_csi_info; - nr_ue_generate_csi_rs(csirs_config_pdu, - &mapping_parms, - frame_parms, - AMP, - proc->nr_slot_rx, - csi_info->csi_rs_generated_signal); + nr_generate_csi_rs(frame_parms, + &mapping_parms, + AMP, + proc->nr_slot_rx, + csirs_config_pdu->freq_density, + csirs_config_pdu->start_rb, + csirs_config_pdu->nr_of_rbs, + csirs_config_pdu->symb_l0, + csirs_config_pdu->symb_l1, + csirs_config_pdu->row, + csirs_config_pdu->scramb_id, + csirs_config_pdu->power_control_offset_ss, + csirs_config_pdu->cdm_type, + csi_info->csi_rs_generated_signal); csi_info->csi_rs_generated_signal_bits = log2_approx(AMP); @@ -914,7 +862,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, // Doing >> 2 <=> /sizeof(int32_t), we know what is the index offset of the array. uint8_t mem_offset = (((32 - ((long)&csi_rs_estimated_channel_freq[0][0][frame_parms->first_carrier_offset])) & 0x1F) >> 2); int CDM_group_size = get_cdm_group_size(csirs_config_pdu->cdm_type); - int32_t csi_rs_received_signal[frame_parms->nb_antennas_rx][frame_parms->samples_per_slot_wCP]; + c16_t csi_rs_received_signal[frame_parms->nb_antennas_rx][frame_parms->samples_per_slot_wCP]; uint32_t rsrp = 0; int rsrp_dBm = 0; nr_get_csi_rs_signal(ue, @@ -938,7 +886,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, proc, csirs_config_pdu, csi_info, - (const int32_t **) csi_info->csi_rs_generated_signal, + (const c16_t **)csi_info->csi_rs_generated_signal, csi_rs_received_signal, &mapping_parms, CDM_group_size, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c index bed86bf852..2eeb27d457 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c @@ -156,7 +156,11 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue, NR_UL_UE_HARQ_t *harq_process = &ue->ul_harq_processes[harq_pid]; TB_parameters->segments = segments[pusch_id]; - int r_offset = 0; + const nfapi_nr_ue_pusch_pdu_t *pusch_pdu = &ulsch->pusch_pdu; + uint16_t nb_rb = pusch_pdu->rb_size; + memset(harq_process->f, 0, 14 * nb_rb * 12 * 16); + TB_parameters->output = harq_process->f; + for (int r = 0; r < TB_parameters->C; r++) { nrLDPC_segment_encoding_parameters_t *segment_parameters = &TB_parameters->segments[r]; segment_parameters->c = harq_process->c[r]; @@ -165,8 +169,6 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue, TB_parameters->Qm, TB_parameters->nb_layers, r); - segment_parameters->output = harq_process->f + r_offset; - r_offset += segment_parameters->E; reset_meas(&segment_parameters->ts_interleave); reset_meas(&segment_parameters->ts_rate_match); diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index a78840e662..f22e3e212b 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -314,7 +314,7 @@ typedef struct { typedef struct { uint8_t csi_rs_generated_signal_bits; - int32_t **csi_rs_generated_signal; + c16_t **csi_rs_generated_signal; bool csi_im_meas_computed; uint32_t interference_plus_noise_power; } nr_csi_info_t; diff --git a/openair1/PHY/nr_phy_common/inc/nr_phy_common.h b/openair1/PHY/nr_phy_common/inc/nr_phy_common.h index 94809ccb46..97e9bee87e 100644 --- a/openair1/PHY/nr_phy_common/inc/nr_phy_common.h +++ b/openair1/PHY/nr_phy_common/inc/nr_phy_common.h @@ -44,35 +44,8 @@ typedef struct { int koverline[16]; int loverline[16]; } csi_mapping_parms_t; -void get_modulated_csi_symbols(int symbols_per_slot, - int slot, - int N_RB_DL, - int mod_length, - int16_t mod_csi[][(N_RB_DL << 4) >> 1], - int lprime, - int l0, - int l1, - int row, - int scramb_id); -void csi_rs_resource_mapping(int32_t **dataF, - int csi_rs_length, - int16_t mod_csi[][csi_rs_length >> 1], - int ofdm_symbol_size, - int dataF_offset, - int start_sc, - const csi_mapping_parms_t *mapping_parms, - int start_rb, - int nb_rbs, - double alpha, - int beta, - double rho, - int gs, - int freq_density); csi_mapping_parms_t get_csi_mapping_parms(int row, int b, int l0, int l1); int get_cdm_group_size(int cdm_type); -double get_csi_rho(int freq_density); -uint32_t get_csi_beta_amplitude(const int16_t amp, int power_control_offset_ss); -int get_csi_modulation_length(double rho, int freq_density, int kprime, int start_rb, int nb_rbs); void nr_qpsk_llr(int32_t *rxdataF_comp, int16_t *llr, uint32_t nb_re); void nr_16qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag_in, int16_t *llr, uint32_t nb_re); void nr_64qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag, int32_t *ch_mag2, int16_t *llr, uint32_t nb_re); @@ -81,5 +54,19 @@ 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); unsigned int nr_get_tx_amp(int power_dBm, int power_max_dBm, int total_nb_rb, int nb_rb); void nr_fo_compensation(double fo_Hz, int samples_per_ms, int sample_offset, const c16_t *rxdata_in, c16_t *rxdata_out, int size); +void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms, + const csi_mapping_parms_t *phy_csi_parms, + const int16_t amp, + const int slot, + const uint8_t freq_density, + const uint16_t start_rb, + const uint16_t nr_of_rbs, + const uint8_t symb_l0, + const uint8_t symb_l1, + const uint8_t row, + const uint16_t scramb_id, + const uint8_t power_control_offset_ss, + const uint8_t cdm_type, + c16_t **dataF); #endif diff --git a/openair1/PHY/nr_phy_common/src/nr_phy_common_csirs.c b/openair1/PHY/nr_phy_common/src/nr_phy_common_csirs.c index bba93b35e6..557214c63f 100644 --- a/openair1/PHY/nr_phy_common/src/nr_phy_common_csirs.c +++ b/openair1/PHY/nr_phy_common/src/nr_phy_common_csirs.c @@ -21,20 +21,20 @@ #include "PHY/nr_phy_common/inc/nr_phy_common.h" -void csi_rs_resource_mapping(int32_t **dataF, - int csi_rs_length, - int16_t mod_csi[][csi_rs_length >> 1], - int ofdm_symbol_size, - int dataF_offset, - int start_sc, - const csi_mapping_parms_t *mapping_parms, - int start_rb, - int nb_rbs, - double alpha, - int beta, - double rho, - int gs, - int freq_density) +static void csi_rs_resource_mapping(c16_t **dataF, + int csi_rs_length, + int16_t mod_csi[][csi_rs_length >> 1], + int ofdm_symbol_size, + int dataF_offset, + int start_sc, + const csi_mapping_parms_t *mapping_parms, + int start_rb, + int nb_rbs, + double alpha, + int beta, + double rho, + int gs, + int freq_density) { // resource mapping according to 38.211 7.4.1.5.3 for (int n = start_rb; n < (start_rb + nb_rbs); n++) { @@ -66,17 +66,17 @@ void csi_rs_resource_mapping(int32_t **dataF, else wt = -1; } - int index = ((l * ofdm_symbol_size + k) << 1) + (2 * dataF_offset); - ((int16_t*)dataF[p])[index] = (beta * wt * wf * mod_csi[l][mprime << 1]) >> 15; - ((int16_t*)dataF[p])[index + 1] = (beta * wt * wf * mod_csi[l][(mprime << 1) + 1]) >> 15; + int index = (l * ofdm_symbol_size + k) + dataF_offset; + dataF[p][index].r = (beta * wt * wf * mod_csi[l][mprime << 1]) >> 15; + dataF[p][index].i = (beta * wt * wf * mod_csi[l][(mprime << 1) + 1]) >> 15; LOG_D(PHY, "l,k (%d,%d) seq. index %d \t port %d \t (%d,%d)\n", l, k, mprime, p + 3000, - ((int16_t*)dataF[p])[index], - ((int16_t*)dataF[p])[index + 1]); + dataF[p][index].r, + dataF[p][index].i); } } } @@ -85,16 +85,16 @@ void csi_rs_resource_mapping(int32_t **dataF, } } -void get_modulated_csi_symbols(int symbols_per_slot, - int slot, - int N_RB_DL, - int mod_length, - int16_t mod_csi[][(N_RB_DL << 4) >> 1], - int lprime, - int l0, - int l1, - int row, - int scramb_id) +static void get_modulated_csi_symbols(int symbols_per_slot, + int slot, + int N_RB_DL, + int mod_length, + int16_t mod_csi[][(N_RB_DL << 4) >> 1], + int lprime, + int l0, + int l1, + int row, + int scramb_id) { for (int lp = 0; lp <= lprime; lp++) { int symb = l0; @@ -120,7 +120,7 @@ void get_modulated_csi_symbols(int symbols_per_slot, } } -uint32_t get_csi_beta_amplitude(const int16_t amp, int power_control_offset_ss) +static uint32_t get_csi_beta_amplitude(const int16_t amp, int power_control_offset_ss) { uint32_t beta = amp; // assuming amp is the amplitude of SSB channels @@ -143,7 +143,7 @@ uint32_t get_csi_beta_amplitude(const int16_t amp, int power_control_offset_ss) return beta; } -int get_csi_modulation_length(double rho, int freq_density, int kprime, int start_rb, int nr_rbs) +static int get_csi_modulation_length(double rho, int freq_density, int kprime, int start_rb, int nr_rbs) { int csi_length = 0; if (rho < 1) { @@ -158,7 +158,7 @@ int get_csi_modulation_length(double rho, int freq_density, int kprime, int star return csi_length; } -double get_csi_rho(int freq_density) +static double get_csi_rho(int freq_density) { // setting the frequency density from its index double rho = 0; @@ -561,3 +561,81 @@ csi_mapping_parms_t get_csi_mapping_parms(int row, int b, int l0, int l1) return csi_parms; } +void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms, + const csi_mapping_parms_t *phy_csi_parms, + const int16_t amp, + const int slot, + const uint8_t freq_density, + const uint16_t start_rb, + const uint16_t nr_of_rbs, + const uint8_t symb_l0, + const uint8_t symb_l1, + const uint8_t row, + const uint16_t scramb_id, + const uint8_t power_control_offset_ss, + const uint8_t cdm_type, + c16_t **dataF) +{ +#ifdef NR_CSIRS_DEBUG + LOG_I(NR_PHY, + "CSI Params: start_rb = %i, nr_of_rbs = %i, row = %i, symb_l0 = %i, symb_l1 = %i, cdm_type = %i, freq_density = %i (0: " + "dot5 (even RB), 1: dot5 (odd RB), 2: one, 3: three), scramb_id = %i, power_control_offset_ss = %i\n", + start_rb, + nr_of_rbs, + row, + symb_l0, + symb_l1, + cdm_type, + freq_density, + scramb_id, + power_control_offset_ss); +#endif + + // setting the frequency density from its index + const double rho = get_csi_rho(freq_density); + const int csi_length = get_csi_modulation_length(rho, freq_density, phy_csi_parms->kprime, start_rb, nr_of_rbs); + +#ifdef NR_CSIRS_DEBUG + printf(" start rb %d, nr of rbs %d, csi length %d\n", start_rb, nr_of_rbs, csi_length); +#endif + + //*8(max allocation per RB)*2(QPSK)) + int16_t mod_csi[frame_parms->symbols_per_slot][(frame_parms->N_RB_DL << 4) >> 1] __attribute__((aligned(16))); + get_modulated_csi_symbols(frame_parms->symbols_per_slot, + slot, + frame_parms->N_RB_DL, + csi_length, + mod_csi, + phy_csi_parms->lprime, + symb_l0, + symb_l1, + row, + scramb_id); + + const uint32_t beta = get_csi_beta_amplitude(amp, power_control_offset_ss); + const double alpha = (phy_csi_parms->ports == 1) ? rho : 2 * rho; + +#ifdef NR_CSIRS_DEBUG + printf(" rho %f, alpha %f\n", rho, alpha); +#endif + + // CDM group size from CDM type index + const int gs = get_cdm_group_size(cdm_type); + + const int dataF_offset = slot * frame_parms->samples_per_slot_wCP; + + csi_rs_resource_mapping(dataF, + frame_parms->N_RB_DL << 4, + mod_csi, + frame_parms->ofdm_symbol_size, + dataF_offset, + frame_parms->first_carrier_offset, + phy_csi_parms, + start_rb, + nr_of_rbs, + alpha, + beta, + rho, + gs, + freq_density); +} diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index b294368ac9..095c41d0da 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -279,11 +279,19 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, csi_bitmap); nr_generate_csi_rs(&gNB->frame_parms, - (int32_t **)gNB->common_vars.txdataF[beam_nb], + &mapping_parms, gNB->TX_AMP, - csi_params, slot, - &mapping_parms); + csi_params->freq_density, + csi_params->start_rb, + csi_params->nr_of_rbs, + csi_params->symb_l0, + csi_params->symb_l1, + csi_params->row, + csi_params->scramb_id, + csi_params->power_control_offset_ss, + csi_params->cdm_type, + gNB->common_vars.txdataF[beam_nb]); csirs->active = 0; } } diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h index 222788bce1..c7f0deb118 100644 --- a/openair1/SCHED_NR_UE/defs.h +++ b/openair1/SCHED_NR_UE/defs.h @@ -147,12 +147,12 @@ int nr_ue_pdcch_procedures(PHY_VARS_NR_UE *ue, void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], + const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu); void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, - c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], + const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu); int psbch_pscch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_data_t *phy_data); diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 5cfb21f8b0..5e6140db9d 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -892,7 +892,7 @@ int main(int argc, char **argv) { set_glog_onlinelog(true); // enable these lines if you need debug info set_glog(loglvl); - SET_LOG_DEBUG(DEBUG_UE_TIMING); + // SET_LOG_DEBUG(DEBUG_UE_TIMING); // moreover you need to init itti with the following line // however itti will catch all signals, so ctrl-c won't work anymore // alternatively you can disable ITTI completely in CMakeLists.txt diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index 36fe9daa50..c475bfc039 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -512,8 +512,8 @@ int main(int argc, char **argv) //printf("crc32: [0]->0x%08x\n",crc24c(test_input, 32)); // generate signal - unsigned char output[rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS] __attribute__((aligned(32))); - bzero(output,rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS); + unsigned char output[rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * NR_MAX_NB_LAYERS] __attribute__((aligned(64))); + bzero(output, sizeof(output)); if (input_fd == NULL) { msgDataTx.num_pdsch_slot = 1; nr_dlsch_encoding(gNB, &msgDataTx, frame, slot, frame_parms, output, NULL, NULL, NULL, NULL, NULL, NULL, NULL); @@ -533,12 +533,12 @@ int main(int argc, char **argv) //if (i<16) // printf("encoder output f[%d] = %d\n",i,dlsch->harq_processes[0]->f[i]); - if (output[i] == 0) + if ((output[i >> 3] & (1 << (i & 7))) == 0) modulated_input[i] = 1.0; ///sqrt(2); //QPSK else modulated_input[i] = -1.0; ///sqrt(2); - //if (i<16) printf("modulated_input[%d] = %d\n",i,modulated_input[i]); + //if (i<16) printf("modulated_input[%d] = %f (%d)\n",i,modulated_input[i],output[i]); //SNR =10; SNR_lin = pow(10, SNR / 10.0); sigma = 1.0 / sqrt(2 * SNR_lin); diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 8babb7598d..e36d50c6ad 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -943,8 +943,7 @@ printf("%d\n", slot); nr_ue_phy_config_request(&UE_mac->phy_config); //NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels; - int n_errs = 0; - + int ret = 1; initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool"); initNotifiedFIFO(&gNB->L1_tx_free); initNotifiedFIFO(&gNB->L1_tx_filled); @@ -1371,10 +1370,10 @@ printf("%d\n", slot); if (effRate > (eff_tp_check*TBS)) { printf("PDSCH test OK\n"); + ret = 0; break; } - n_errs = n_errors[0]; } // NSR free(Sched_INFO); @@ -1423,7 +1422,7 @@ printf("%d\n", slot); free(filename_csv); } - return n_errs; + return ret; } diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index ef92fe23b9..4fc6f788b7 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -146,6 +146,7 @@ int main(int argc, char **argv) // int subframe_offset; // char fname[40], vname[40]; int trial,n_trials=1,n_errors=0,n_errors_payload=0; + int ret_test = 1; uint8_t transmission_mode = 1,n_tx=1,n_rx=1; uint16_t Nid_cell=0; uint64_t SSB_positions=0x01; @@ -771,6 +772,7 @@ int main(int argc, char **argv) if (((float)n_errors/(float)n_trials <= target_error_rate) && (n_errors_payload==0)) { printf("PBCH test OK\n"); + ret_test = 0; break; } @@ -816,6 +818,6 @@ int main(int argc, char **argv) loader_reset(); logTerm(); - return(n_errors); + return ret_test; } diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 96840c27b2..8c9f2961c4 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -109,6 +109,7 @@ int main(int argc, char **argv) //int subframe_offset; //char fname[40], vname[40]; int trial,n_trials=100,n_errors=0,ack_nack_errors=0,sr_errors=0; + int ret = 1; uint8_t transmission_mode = 1,n_tx=1,n_rx=1; uint16_t Nid_cell=0; uint64_t SSB_positions=0x01; @@ -758,6 +759,7 @@ int main(int argc, char **argv) printf("ACK/NACK: SNR=%f, n_trials=%d, n_bit_errors=%d\n",SNR,n_trials,ack_nack_errors); if((float)(ack_nack_errors+sr_errors)/(float)(n_trials)<=target_error_rate){ printf("PUCCH test OK\n"); + ret = 0; break; } } @@ -799,5 +801,5 @@ int main(int argc, char **argv) loader_reset(); logTerm(); - return(n_errors); + return ret; } diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index f68f6885a6..ef6fd34ee4 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -542,7 +542,7 @@ int main(int argc, char **argv) } */ - if (harq_process_ul_ue->f[i] == 0) + if ((harq_process_ul_ue->f[i >> 3] & (1 << (i & 7))) == 0) modulated_input[i] = 1.0; ///sqrt(2); //QPSK else modulated_input[i] = -1.0; ///sqrt(2); diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 2ca025865f..da85ef0de4 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -248,7 +248,9 @@ int main(int argc, char *argv[]) InitSinLUT(); int c; - while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:jk:m:n:p:q:r:s:t:u:v:w:y:z:A:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) { + bool setAffinity=false; + char gNBthreads[128]="n"; + while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:jk:m:n:p:q:r:s:t:u:v:w:y:z:A:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:Y:")) != -1) { /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ if (c == 1 || c == '-' || c == 'O') @@ -493,6 +495,13 @@ int main(int argc, char *argv[]) AssertFatal(filename_csv != NULL, "strdup() error: errno %d\n", errno); break; + case 'Y': + threadCnt = sizeof(gNBthreads)-1; + strncpy(gNBthreads, optarg, threadCnt); + gNBthreads[threadCnt]=0; + setAffinity=true; + break; + case 'Z': transform_precoding = transformPrecoder_enabled; num_dmrs_cdm_grps_no_data = 2; @@ -591,7 +600,11 @@ int main(int argc, char *argv[]) gNB->RU_list[0] = calloc(1, sizeof(**gNB->RU_list)); gNB->RU_list[0]->rfdevice.openair0_cfg = openair0_cfg; - initFloatingCoresTpool(threadCnt, &gNB->threadPool, false, "gNB-tpool"); + if (setAffinity == false) + initFloatingCoresTpool(threadCnt, &gNB->threadPool, false, "gNB-tpool"); + else + initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool"); + initNotifiedFIFO(&gNB->respDecode); initNotifiedFIFO(&gNB->respPuschSymb); diff --git a/openair2/COMMON/e1ap_messages_def.h b/openair2/COMMON/e1ap_messages_def.h index 83de2f82c8..479aba28eb 100644 --- a/openair2/COMMON/e1ap_messages_def.h +++ b/openair2/COMMON/e1ap_messages_def.h @@ -44,6 +44,8 @@ MESSAGE_DEF(E1AP_BEARER_CONTEXT_SETUP_FAILURE , MESSAGE_PRIORITY_MED , e1ap_bear MESSAGE_DEF(E1AP_BEARER_CONTEXT_MODIFICATION_REQ , MESSAGE_PRIORITY_MED , e1ap_bearer_mod_req_t , e1ap_bearer_mod_req) /* E1AP Bearer Context Modification Response: gNB-CU-UP -> gNB-CU-CP */ MESSAGE_DEF(E1AP_BEARER_CONTEXT_MODIFICATION_RESP, MESSAGE_PRIORITY_MED, e1ap_bearer_modif_resp_t, e1ap_bearer_modif_resp) +/* E1AP Bearer Context Modification Failure: gNB-CU-UP -> gNB-CU-CP */ +MESSAGE_DEF(E1AP_BEARER_CONTEXT_MODIFICATION_FAIL, MESSAGE_PRIORITY_MED, e1ap_bearer_context_mod_failure_t, e1ap_bearer_modif_fail) /* E1AP Bearer Context Release Request: gNB-CU-CP -> gNB-CU-UP */ MESSAGE_DEF(E1AP_BEARER_CONTEXT_RELEASE_CMD, MESSAGE_PRIORITY_MED, e1ap_bearer_release_cmd_t, e1ap_bearer_release_cmd) /* E1AP Bearer Context Release Response: gNB-CU-UP -> gNB-CU-CP */ diff --git a/openair2/COMMON/e1ap_messages_types.h b/openair2/COMMON/e1ap_messages_types.h index 0cfeb7fd73..f4e9090f66 100644 --- a/openair2/COMMON/e1ap_messages_types.h +++ b/openair2/COMMON/e1ap_messages_types.h @@ -53,6 +53,7 @@ #define E1AP_BEARER_CONTEXT_SETUP_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_setup_fail #define E1AP_BEARER_CONTEXT_MODIFICATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_mod_req #define E1AP_BEARER_CONTEXT_MODIFICATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_modif_resp +#define E1AP_BEARER_CONTEXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_modif_fail #define E1AP_BEARER_CONTEXT_RELEASE_CMD(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_release_cmd #define E1AP_BEARER_CONTEXT_RELEASE_CPLT(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_release_cplt #define E1AP_LOST_CONNECTION(mSGpTR) (mSGpTR)->ittiMsg.e1ap_lost_connection @@ -520,8 +521,7 @@ typedef struct e1ap_bearer_mod_req_s { typedef struct e1ap_bearer_release_cmd_s { uint32_t gNB_cu_cp_ue_id; uint32_t gNB_cu_up_ue_id; - long cause_type; - long cause; + e1ap_cause_t cause; } e1ap_bearer_release_cmd_t; typedef struct e1ap_bearer_release_cplt_s { @@ -626,5 +626,14 @@ typedef struct e1ap_lost_connection_t { int dummy; } e1ap_lost_connection_t; +/// @brief 9.2.2.6 BEARER CONTEXT MODIFICATION FAILURE +typedef struct e1ap_bearer_context_mod_failure_s { + // gNB-CU-CP UE E1AP ID (M) + uint32_t gNB_cu_cp_ue_id; + // gNB-CU-UP UE E1AP ID (M) + uint32_t gNB_cu_up_ue_id; + // NG-RAN PDU Session Resource Modified List (O) + e1ap_cause_t cause; +} e1ap_bearer_context_mod_failure_t; #endif /* E1AP_MESSAGES_TYPES_H */ diff --git a/openair2/E1AP/e1ap.c b/openair2/E1AP/e1ap.c index 42baaaa165..1eff4ea529 100644 --- a/openair2/E1AP/e1ap.c +++ b/openair2/E1AP/e1ap.c @@ -57,7 +57,7 @@ const e1ap_message_processing_t e1ap_message_processing[E1AP_NUM_MSG_HANDLERS][3 e1apCUCP_handle_BEARER_CONTEXT_SETUP_FAILURE}, /* bearerContextSetup */ {e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_REQUEST, e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_RESPONSE, - 0}, /* bearerContextModification */ + e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE}, /* bearerContextModification */ {0, 0, 0}, /* bearerContextModificationRequired */ {e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND, e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE, 0}, /* bearerContextRelease */ {0, 0, 0}, /* bearerContextReleaseRequired */ @@ -451,10 +451,11 @@ static int e1apCUUP_send_BEARER_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc return e1ap_encode_send(UPtype, assoc_id, pdu, 0, __func__); } -int e1apCUUP_send_BEARER_CONTEXT_MODIFICATION_FAILURE(instance_t instance) +static int e1apCUUP_send_BEARER_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id, const e1ap_bearer_context_mod_failure_t *out) { - AssertFatal(false, "Not implemented yet\n"); - return -1; + E1AP_E1AP_PDU_t *pdu = encode_E1_bearer_context_mod_failure(out); + e1ap_encode_send(UPtype, assoc_id, pdu, 0, __func__); + return 0; } /** @@ -490,13 +491,21 @@ int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, return 0; } -int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE(instance_t instance, - sctp_assoc_t assoc_id, - uint32_t stream, - E1AP_E1AP_PDU_t *pdu) +int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { - AssertFatal(false, "Not implemented yet\n"); - return -1; + e1ap_bearer_context_mod_failure_t failure = {0}; + if (!decode_E1_bearer_context_mod_failure(&failure, pdu)) { + free_E1_bearer_context_mod_failure(&failure); + return -1; + } + LOG_E(E1AP, + "Received Bearer Context Modification Failure from CU-UP %d with cause value %d \n", + failure.gNB_cu_up_ue_id, + failure.cause.value); + MessageDef *msg = itti_alloc_new_message(TASK_CUUP_E1, 0, E1AP_BEARER_CONTEXT_MODIFICATION_FAIL); + E1AP_BEARER_CONTEXT_MODIFICATION_FAIL(msg) = cp_E1_bearer_context_mod_failure(&failure); + itti_send_msg_to_task(TASK_RRC_GNB, 0, msg); + return 0; } int e1apCUUP_send_BEARER_CONTEXT_MODIFICATION_REQUIRED(instance_t instance) @@ -532,70 +541,16 @@ int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_CONFIRM(instance_t instance, BEARER CONTEXT RELEASE */ -static int fill_BEARER_CONTEXT_RELEASE_COMMAND(e1ap_bearer_release_cmd_t *const cmd, E1AP_E1AP_PDU_t *pdu) +static int e1apCUCP_send_BEARER_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, e1ap_bearer_release_cmd_t *const cmd) { - pdu->present = E1AP_E1AP_PDU_PR_initiatingMessage; - asn1cCalloc(pdu->choice.initiatingMessage, msg); - msg->procedureCode = E1AP_ProcedureCode_id_bearerContextRelease; - msg->criticality = E1AP_Criticality_reject; - msg->value.present = E1AP_InitiatingMessage__value_PR_BearerContextReleaseCommand; - E1AP_BearerContextReleaseCommand_t *out = &pdu->choice.initiatingMessage->value.choice.BearerContextReleaseCommand; - /* mandatory */ - /* c1. gNB-CU-CP UE E1AP ID */ - asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCommandIEs_t, ieC1); - ieC1->id = E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID; - ieC1->criticality = E1AP_Criticality_reject; - ieC1->value.present = E1AP_BearerContextReleaseCommandIEs__value_PR_GNB_CU_CP_UE_E1AP_ID; - ieC1->value.choice.GNB_CU_CP_UE_E1AP_ID = cmd->gNB_cu_cp_ue_id; - /* mandatory */ - /* c2. gNB-CU-UP UE E1AP ID */ - asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCommandIEs_t, ieC2); - ieC2->id = E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID; - ieC2->criticality = E1AP_Criticality_reject; - ieC2->value.present = E1AP_BearerContextReleaseCommandIEs__value_PR_GNB_CU_UP_UE_E1AP_ID; - ieC2->value.choice.GNB_CU_UP_UE_E1AP_ID = cmd->gNB_cu_cp_ue_id; - - return 0; -} - -int e1apCUCP_send_BEARER_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, e1ap_bearer_release_cmd_t *const cmd) -{ - E1AP_E1AP_PDU_t pdu = {0}; - fill_BEARER_CONTEXT_RELEASE_COMMAND(cmd, &pdu); - return e1ap_encode_send(CPtype, assoc_id, &pdu, 0, __func__); -} - -static int fill_BEARER_CONTEXT_RELEASE_COMPLETE(const e1ap_bearer_release_cplt_t *cplt, E1AP_E1AP_PDU_t *pdu) -{ - pdu->present = E1AP_E1AP_PDU_PR_successfulOutcome; - asn1cCalloc(pdu->choice.successfulOutcome, msg); - msg->procedureCode = E1AP_ProcedureCode_id_bearerContextRelease; - msg->criticality = E1AP_Criticality_reject; - msg->value.present = E1AP_SuccessfulOutcome__value_PR_BearerContextReleaseComplete; - E1AP_BearerContextReleaseComplete_t *out = &pdu->choice.successfulOutcome->value.choice.BearerContextReleaseComplete; - /* mandatory */ - /* c1. gNB-CU-CP UE E1AP ID */ - asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCompleteIEs_t, ieC1); - ieC1->id = E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID; - ieC1->criticality = E1AP_Criticality_reject; - ieC1->value.present = E1AP_BearerContextReleaseCompleteIEs__value_PR_GNB_CU_CP_UE_E1AP_ID; - ieC1->value.choice.GNB_CU_CP_UE_E1AP_ID = cplt->gNB_cu_cp_ue_id; - /* mandatory */ - /* c2. gNB-CU-UP UE E1AP ID */ - asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCompleteIEs_t, ieC2); - ieC2->id = E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID; - ieC2->criticality = E1AP_Criticality_reject; - ieC2->value.present = E1AP_BearerContextReleaseCompleteIEs__value_PR_GNB_CU_UP_UE_E1AP_ID; - ieC2->value.choice.GNB_CU_UP_UE_E1AP_ID = cplt->gNB_cu_cp_ue_id; - - return 0; + E1AP_E1AP_PDU_t *pdu = encode_e1_bearer_context_release_command(cmd); + return e1ap_encode_send(CPtype, assoc_id, pdu, 0, __func__); } int e1apCUUP_send_BEARER_CONTEXT_RELEASE_COMPLETE(sctp_assoc_t assoc_id, const e1ap_bearer_release_cplt_t *cplt) { - E1AP_E1AP_PDU_t pdu = {0}; - fill_BEARER_CONTEXT_RELEASE_COMPLETE(cplt, &pdu); - return e1ap_encode_send(CPtype, assoc_id, &pdu, 0, __func__); + E1AP_E1AP_PDU_t *pdu = encode_e1_bearer_context_release_complete(cplt); + return e1ap_encode_send(CPtype, assoc_id, pdu, 0, __func__); } int e1apCUUP_send_BEARER_CONTEXT_RELEASE_REQUEST(instance_t instance) @@ -604,102 +559,27 @@ int e1apCUUP_send_BEARER_CONTEXT_RELEASE_REQUEST(instance_t instance) return -1; } -void extract_BEARER_CONTEXT_RELEASE_COMMAND(const E1AP_E1AP_PDU_t *pdu, e1ap_bearer_release_cmd_t *bearerCxt) +int e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu) { - const E1AP_BearerContextReleaseCommand_t *in = &pdu->choice.initiatingMessage->value.choice.BearerContextReleaseCommand; - E1AP_BearerContextReleaseCommandIEs_t *ie; - - LOG_D(E1AP, "Bearer context setup number of IEs %d\n", in->protocolIEs.list.count); - - for (int i = 0; i < in->protocolIEs.list.count; i++) { - ie = in->protocolIEs.list.array[i]; - - switch(ie->id) { - case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID: - DevAssert(ie->criticality == E1AP_Criticality_reject); - DevAssert(ie->value.present == E1AP_BearerContextReleaseCommandIEs__value_PR_GNB_CU_CP_UE_E1AP_ID); - bearerCxt->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID; - break; - - case E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID: - DevAssert(ie->criticality == E1AP_Criticality_reject); - DevAssert(ie->value.present == E1AP_BearerContextReleaseCommandIEs__value_PR_GNB_CU_UP_UE_E1AP_ID); - bearerCxt->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID; - break; - - case E1AP_ProtocolIE_ID_id_Cause: - DevAssert(ie->criticality == E1AP_Criticality_ignore); - DevAssert(ie->value.present == E1AP_BearerContextReleaseCommandIEs__value_PR_Cause); - bearerCxt->cause_type = ie->value.choice.Cause.present; - if ((ie->value.choice.Cause.present != E1AP_Cause_PR_NOTHING) && - (ie->value.choice.Cause.present != E1AP_Cause_PR_choice_extension)) - bearerCxt->cause = ie->value.choice.Cause.choice.radioNetwork; - break; - - default: - LOG_E(E1AP, "Handle for this IE is not implemented (or) invalid IE detected\n"); - break; - } + e1ap_bearer_release_cmd_t release = {0}; + if(!decode_e1_bearer_context_release_command(&release, pdu)) { + free_e1_bearer_context_release_command(&release); + return -1; } -} - -int e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *e1_inst, const E1AP_E1AP_PDU_t *pdu) -{ - DevAssert(pdu != NULL); - DevAssert(pdu->present == E1AP_E1AP_PDU_PR_initiatingMessage); - DevAssert(pdu->choice.initiatingMessage->procedureCode == E1AP_ProcedureCode_id_bearerContextRelease); - DevAssert(pdu->choice.initiatingMessage->criticality == E1AP_Criticality_reject); - DevAssert(pdu->choice.initiatingMessage->value.present == E1AP_InitiatingMessage__value_PR_BearerContextReleaseCommand); - - e1ap_bearer_release_cmd_t bearerCxt = {0}; - extract_BEARER_CONTEXT_RELEASE_COMMAND(pdu, &bearerCxt); - e1_bearer_release_cmd(&bearerCxt); + e1_bearer_release_cmd(&release); return 0; } -void extract_BEARER_CONTEXT_RELEASE_COMPLETE(const E1AP_E1AP_PDU_t *pdu, e1ap_bearer_release_cplt_t *bearerCxt) -{ - const E1AP_BearerContextReleaseComplete_t *in = &pdu->choice.successfulOutcome->value.choice.BearerContextReleaseComplete; - E1AP_BearerContextReleaseCompleteIEs_t *ie; - - LOG_D(E1AP, "Bearer context setup number of IEs %d\n", in->protocolIEs.list.count); - - for (int i = 0; i < in->protocolIEs.list.count; i++) { - ie = in->protocolIEs.list.array[i]; - - switch(ie->id) { - case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID: - DevAssert(ie->criticality == E1AP_Criticality_reject); - DevAssert(ie->value.present == E1AP_BearerContextReleaseCompleteIEs__value_PR_GNB_CU_CP_UE_E1AP_ID); - bearerCxt->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID; - break; - - case E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID: - DevAssert(ie->criticality == E1AP_Criticality_reject); - DevAssert(ie->value.present == E1AP_BearerContextReleaseCompleteIEs__value_PR_GNB_CU_UP_UE_E1AP_ID); - bearerCxt->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID; - break; - - default: - LOG_E(E1AP, "Handle for this IE is not implemented (or) invalid IE detected\n"); - break; - } - } -} - int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *e1_inst, const E1AP_E1AP_PDU_t *pdu) { - DevAssert(pdu != NULL); - DevAssert(pdu->present == E1AP_E1AP_PDU_PR_successfulOutcome); - DevAssert(pdu->choice.successfulOutcome->procedureCode == E1AP_ProcedureCode_id_bearerContextRelease); - DevAssert(pdu->choice.successfulOutcome->criticality == E1AP_Criticality_reject); - DevAssert(pdu->choice.successfulOutcome->value.present == E1AP_SuccessfulOutcome__value_PR_BearerContextReleaseComplete); - e1ap_bearer_release_cplt_t bearerCxt = {0}; - extract_BEARER_CONTEXT_RELEASE_COMPLETE(pdu, &bearerCxt); + if(!decode_e1_bearer_context_release_complete(&bearerCxt, pdu)) { + free_e1_bearer_context_release_complete(&bearerCxt); + return -1; + } MessageDef *msg = itti_alloc_new_message(TASK_CUUP_E1, 0, E1AP_BEARER_CONTEXT_RELEASE_CPLT); e1ap_bearer_release_cplt_t *cplt = &E1AP_BEARER_CONTEXT_RELEASE_CPLT(msg); - *cplt = bearerCxt; + *cplt = cp_bearer_context_release_complete(&bearerCxt); itti_send_msg_to_task(TASK_RRC_GNB, 0, msg); return 0; } @@ -974,6 +854,7 @@ void *E1AP_CUCP_task(void *arg) case E1AP_BEARER_CONTEXT_RELEASE_CMD: e1apCUCP_send_BEARER_CONTEXT_RELEASE_COMMAND(assoc_id, &E1AP_BEARER_CONTEXT_RELEASE_CMD(msg)); + free_e1_bearer_context_release_command(&E1AP_BEARER_CONTEXT_RELEASE_CMD(msg)); break; default: @@ -1056,6 +937,14 @@ void *E1AP_CUUP_task(void *arg) free_e1ap_context_mod_response(resp); } break; + case E1AP_BEARER_CONTEXT_MODIFICATION_FAIL: { + const e1ap_bearer_context_mod_failure_t *fail = &E1AP_BEARER_CONTEXT_MODIFICATION_FAIL(msg); + const e1ap_upcp_inst_t *inst = getCxtE1(myInstance); + AssertFatal(inst, "no E1 instance found for instance %ld\n", myInstance); + e1apCUUP_send_BEARER_CONTEXT_MODIFICATION_FAILURE(inst->cuup.assoc_id, fail); + free_E1_bearer_context_mod_failure(fail); + } break; + case E1AP_BEARER_CONTEXT_RELEASE_CPLT: { const e1ap_bearer_release_cplt_t *cplt = &E1AP_BEARER_CONTEXT_RELEASE_CPLT(msg); const e1ap_upcp_inst_t *inst = getCxtE1(myInstance); diff --git a/openair2/E1AP/e1ap.h b/openair2/E1AP/e1ap.h index b41559de09..66984f3b13 100644 --- a/openair2/E1AP/e1ap.h +++ b/openair2/E1AP/e1ap.h @@ -44,6 +44,8 @@ int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_REQUEST(sctp_assoc_t assoc_id, e int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_RESPONSE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *e1_inst, const E1AP_E1AP_PDU_t *pdu); +int e1apCUCP_handle_BEARER_CONTEXT_MODIFICATION_FAILURE(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu); + void e1apCUUP_send_BEARER_CONTEXT_SETUP_RESPONSE(sctp_assoc_t assoc_id, const e1ap_bearer_setup_resp_t *resp); int e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND(sctp_assoc_t assoc_id, e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *pdu); diff --git a/openair2/E1AP/lib/e1ap_bearer_context_management.c b/openair2/E1AP/lib/e1ap_bearer_context_management.c index be8b37ee45..2c4f938a24 100644 --- a/openair2/E1AP/lib/e1ap_bearer_context_management.c +++ b/openair2/E1AP/lib/e1ap_bearer_context_management.c @@ -1189,6 +1189,198 @@ void free_e1_bearer_context_setup_failure(const e1ap_bearer_context_setup_failur // do nothing } +/* =============================== + * E1AP Bearer Context Release + * =============================== */ + +/** @brief Bearer Context Release Command encoding (9.2.2.9, 3GPP TS 38.463) + * gNB-CU-CP → gNB-CU-UP */ +E1AP_E1AP_PDU_t *encode_e1_bearer_context_release_command(const e1ap_bearer_release_cmd_t *msg) +{ + E1AP_E1AP_PDU_t *pdu = calloc_or_fail(1, sizeof(*pdu)); + pdu->present = E1AP_E1AP_PDU_PR_initiatingMessage; + + // Type (M) + asn1cCalloc(pdu->choice.initiatingMessage, type); + type->procedureCode = E1AP_ProcedureCode_id_bearerContextRelease; + type->criticality = E1AP_Criticality_reject; + type->value.present = E1AP_InitiatingMessage__value_PR_BearerContextReleaseCommand; + E1AP_BearerContextReleaseCommand_t *out = &pdu->choice.initiatingMessage->value.choice.BearerContextReleaseCommand; + + // gNB-CU-CP UE E1AP ID (M) + asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCommandIEs_t, ie1); + ie1->id = E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID; + ie1->criticality = E1AP_Criticality_reject; + ie1->value.present = E1AP_BearerContextReleaseCommandIEs__value_PR_GNB_CU_CP_UE_E1AP_ID; + ie1->value.choice.GNB_CU_CP_UE_E1AP_ID = msg->gNB_cu_cp_ue_id; + + // gNB-CU-UP UE E1AP ID (M) + asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCommandIEs_t, ie2); + ie2->id = E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID; + ie2->criticality = E1AP_Criticality_reject; + ie2->value.present = E1AP_BearerContextReleaseCommandIEs__value_PR_GNB_CU_UP_UE_E1AP_ID; + ie2->value.choice.GNB_CU_UP_UE_E1AP_ID = msg->gNB_cu_up_ue_id; + + // Cause (M) + asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCommandIEs_t, ie3); + ie3->id = E1AP_ProtocolIE_ID_id_Cause; + ie3->criticality = E1AP_Criticality_reject; + ie3->value.present = E1AP_BearerContextReleaseCommandIEs__value_PR_Cause; + ie3->value.choice.Cause = e1_encode_cause_ie(&msg->cause); + + return pdu; +} + +/** @brief Bearer Context Release Command decoding (9.2.2.9, 3GPP TS 38.463) + * gNB-CU-CP → gNB-CU-UP */ +bool decode_e1_bearer_context_release_command(e1ap_bearer_release_cmd_t *out, const E1AP_E1AP_PDU_t *pdu) +{ + DevAssert(pdu != NULL); + _E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_initiatingMessage); + E1AP_InitiatingMessage_t *type = pdu->choice.initiatingMessage; + _E1_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextRelease); + _E1_EQ_CHECK_INT(type->value.present, E1AP_InitiatingMessage__value_PR_BearerContextReleaseCommand); + const E1AP_BearerContextReleaseCommand_t *in = &type->value.choice.BearerContextReleaseCommand; + + // Check mandatory IEs + E1AP_BearerContextReleaseCommandIEs_t *ie; + E1AP_LIB_FIND_IE(E1AP_BearerContextReleaseCommandIEs_t, ie, in, E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID, true); + E1AP_LIB_FIND_IE(E1AP_BearerContextReleaseCommandIEs_t, ie, in, E1AP_ProtocolIE_ID_id_Cause, true); + E1AP_LIB_FIND_IE(E1AP_BearerContextReleaseCommandIEs_t, ie, in, E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID, true); + + for (int i = 0; i < in->protocolIEs.list.count; i++) { + ie = in->protocolIEs.list.array[i]; + AssertFatal(ie != NULL, "in->protocolIEs.list.array[i] shall not be null"); + switch (ie->id) { + case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID: + out->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID; + break; + case E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID: + out->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID; + break; + case E1AP_ProtocolIE_ID_id_Cause: + out->cause = e1_decode_cause_ie(&ie->value.choice.Cause); + break; + default: + PRINT_ERROR("%s decoding failure: IE %ld is invalid\n", __func__, ie->id) + return false; + break; + } + } + return true; +} + +/** @brief Bearer Context Release Command equality check */ +bool eq_bearer_context_release_command(const e1ap_bearer_release_cmd_t *a, const e1ap_bearer_release_cmd_t *b) +{ + _E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id); + _E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id); + _E1_EQ_CHECK_INT(a->cause.type, b->cause.type); + _E1_EQ_CHECK_INT(a->cause.value, b->cause.value); + return true; +} + +/** @brief Bearer Context Release Command deep copy */ +e1ap_bearer_release_cmd_t cp_bearer_context_release_command(const e1ap_bearer_release_cmd_t *msg) +{ + // Shallow copy only + e1ap_bearer_release_cmd_t cp = *msg; + return cp; +} + +/** @brief Bearer Context Release Command equality check */ +void free_e1_bearer_context_release_command(const e1ap_bearer_release_cmd_t *msg) +{ + // do nothing +} + +/** + * @brief Bearer Context Release Complete encoding (9.2.2.10, 3GPP TS 38.463) + * gNB-CU-UP → gNB-CU-CP + */ +E1AP_E1AP_PDU_t *encode_e1_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *cplt) +{ + E1AP_E1AP_PDU_t *pdu = calloc_or_fail(1, sizeof(*pdu)); + pdu->present = E1AP_E1AP_PDU_PR_successfulOutcome; + // Message Type (M) + asn1cCalloc(pdu->choice.successfulOutcome, msg); + msg->procedureCode = E1AP_ProcedureCode_id_bearerContextRelease; + msg->criticality = E1AP_Criticality_reject; + msg->value.present = E1AP_SuccessfulOutcome__value_PR_BearerContextReleaseComplete; + + E1AP_BearerContextReleaseComplete_t *out = &msg->value.choice.BearerContextReleaseComplete; + // gNB-CU-CP UE E1AP ID (M) + asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCompleteIEs_t, ie1); + ie1->id = E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID; + ie1->criticality = E1AP_Criticality_reject; + ie1->value.present = E1AP_BearerContextReleaseCompleteIEs__value_PR_GNB_CU_CP_UE_E1AP_ID; + ie1->value.choice.GNB_CU_CP_UE_E1AP_ID = cplt->gNB_cu_cp_ue_id; + // gNB-CU-UP UE E1AP ID (M) + asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextReleaseCompleteIEs_t, ie2); + ie2->id = E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID; + ie2->criticality = E1AP_Criticality_reject; + ie2->value.present = E1AP_BearerContextReleaseCompleteIEs__value_PR_GNB_CU_UP_UE_E1AP_ID; + ie2->value.choice.GNB_CU_UP_UE_E1AP_ID = cplt->gNB_cu_up_ue_id; + return pdu; +} + +/** + * @brief Bearer Context Release Complete decoding (9.2.2.10, 3GPP TS 38.463) + * gNB-CU-UP → gNB-CU-CP + */ +bool decode_e1_bearer_context_release_complete(e1ap_bearer_release_cplt_t *out, const E1AP_E1AP_PDU_t *pdu) +{ + DevAssert(pdu != NULL); + _E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_successfulOutcome); + E1AP_SuccessfulOutcome_t *type = pdu->choice.successfulOutcome; + _E1_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextRelease); + _E1_EQ_CHECK_INT(type->value.present, E1AP_SuccessfulOutcome__value_PR_BearerContextReleaseComplete); + const E1AP_BearerContextReleaseComplete_t *in = &type->value.choice.BearerContextReleaseComplete; + + // Check mandatory IEs + E1AP_BearerContextReleaseCompleteIEs_t *ie; + E1AP_LIB_FIND_IE(E1AP_BearerContextReleaseCompleteIEs_t, ie, in, E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID, true); + E1AP_LIB_FIND_IE(E1AP_BearerContextReleaseCompleteIEs_t, ie, in, E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID, true); + + for (int i = 0; i < in->protocolIEs.list.count; i++) { + ie = in->protocolIEs.list.array[i]; + AssertFatal(ie != NULL, "in->protocolIEs.list.array[i] shall not be null"); + switch (ie->id) { + case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID: + out->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID; + break; + case E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID: + out->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID; + break; + default: + PRINT_ERROR("%s decoding failure: IE %ld is not handled or invalid\n", __func__, ie->id) + break; + } + } + return true; +} + +/** @brief Bearer Context Release Complete equality check */ +bool eq_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *a, const e1ap_bearer_release_cplt_t *b) +{ + _E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id); + _E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id); + return true; +} + +/** @brief Bearer Context Release Complete deep copy */ +e1ap_bearer_release_cplt_t cp_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *src) +{ + e1ap_bearer_release_cplt_t dst = *src; + return dst; +} + +/** @brief Bearer Context Release Complete equality check */ +void free_e1_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *msg) +{ + // No dynamic memory, do nothing +} + /* ============================================ * E1AP Bearer Context Modification Request * ============================================ */ @@ -2242,3 +2434,101 @@ void free_e1ap_context_mod_response(const e1ap_bearer_modif_resp_t *msg) free(msg->pduSessionMod[i].ng_DL_UP_TL_info); } } + +/* =========================================== + * E1AP Bearer Context Modification Failure + * ============================================ */ + +/** @brief Bearer Context Modification Failure encoding (9.2.2.6 38.463) + * gNB-CU-UP → gNB-CU-CP */ +struct E1AP_E1AP_PDU *encode_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *msg) +{ + E1AP_E1AP_PDU_t *pdu = calloc_or_fail(1, sizeof(*pdu)); + pdu->present = E1AP_E1AP_PDU_PR_unsuccessfulOutcome; + asn1cCalloc(pdu->choice.unsuccessfulOutcome, type); + type->procedureCode = E1AP_ProcedureCode_id_bearerContextModification; + type->criticality = E1AP_Criticality_reject; + type->value.present = E1AP_UnsuccessfulOutcome__value_PR_BearerContextModificationFailure; + E1AP_BearerContextModificationFailure_t *out = &type->value.choice.BearerContextModificationFailure; + // gNB-CU-CP UE E1AP ID (M) + asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextModificationFailureIEs_t, ie1); + ie1->id = E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID; + ie1->criticality = E1AP_Criticality_reject; + ie1->value.present = E1AP_BearerContextModificationFailureIEs__value_PR_GNB_CU_CP_UE_E1AP_ID; + ie1->value.choice.GNB_CU_CP_UE_E1AP_ID = msg->gNB_cu_cp_ue_id; + // gNB-CU-UP UE E1AP ID (M) + asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextModificationFailureIEs_t, ie2); + ie2->id = E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID; + ie2->criticality = E1AP_Criticality_reject; + ie2->value.present = E1AP_BearerContextModificationFailureIEs__value_PR_GNB_CU_UP_UE_E1AP_ID; + ie2->value.choice.GNB_CU_UP_UE_E1AP_ID = msg->gNB_cu_up_ue_id; + // Cause (M) + asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextModificationFailureIEs_t, ie3); + ie3->id = E1AP_ProtocolIE_ID_id_Cause; + ie3->criticality = E1AP_Criticality_reject; + ie3->value.present = E1AP_BearerContextModificationFailureIEs__value_PR_Cause; + ie3->value.choice.Cause = e1_encode_cause_ie(&msg->cause); + return pdu; +} + +/** @brief Bearer Context Modification Failure decoding (9.2.2.6 38.463) + * gNB-CU-UP → gNB-CU-CP */ +bool decode_E1_bearer_context_mod_failure(e1ap_bearer_context_mod_failure_t *out, const E1AP_E1AP_PDU_t *pdu) +{ + DevAssert(pdu != NULL); + _E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_unsuccessfulOutcome); + E1AP_UnsuccessfulOutcome_t *type = pdu->choice.unsuccessfulOutcome; + _E1_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextModification); + _E1_EQ_CHECK_INT(type->value.present, E1AP_UnsuccessfulOutcome__value_PR_BearerContextModificationFailure); + const E1AP_BearerContextModificationFailure_t *in = &type->value.choice.BearerContextModificationFailure; + // Check mandatory IEs first + E1AP_BearerContextModificationFailureIEs_t *ie; + E1AP_LIB_FIND_IE(E1AP_BearerContextModificationFailureIEs_t, ie, in, E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID, true); + E1AP_LIB_FIND_IE(E1AP_BearerContextModificationFailureIEs_t, ie, in, E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID, true); + E1AP_LIB_FIND_IE(E1AP_BearerContextModificationFailureIEs_t, ie, in, E1AP_ProtocolIE_ID_id_Cause, true); + for (int i = 0; i < in->protocolIEs.list.count; i++) { + ie = in->protocolIEs.list.array[i]; + AssertFatal(ie != NULL, "in->protocolIEs.list.array[i] shall not be null"); + switch (ie->id) { + case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID: + out->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID; + break; + case E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID: + out->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID; + break; + case E1AP_ProtocolIE_ID_id_Cause: + out->cause = e1_decode_cause_ie(&ie->value.choice.Cause); + break; + default: + PRINT_ERROR("Invalid or unhandled optional IE (%ld) in Bearer Context Modification Failure message\n", ie->id); + break; + } + } + return true; +} + +/** @brief E1AP Bearer Context Modification Failure: deep copy */ +e1ap_bearer_context_mod_failure_t cp_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *msg) +{ + e1ap_bearer_context_mod_failure_t cp = {0}; + cp = *msg; + return cp; +} + +/** @brief E1AP Bearer Context Modification Failure: equality check */ +bool eq_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *a, const e1ap_bearer_context_mod_failure_t *b) +{ + if (!a || !b) + return false; // Null-check both inputs + _E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id); + _E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id); + _E1_EQ_CHECK_INT(a->cause.type, b->cause.type); + _E1_EQ_CHECK_INT(a->cause.value, b->cause.value); + return true; +} + +/** @brief E1AP Bearer Context Modification Failure: free */ +void free_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *msg) +{ + // do nothing +} diff --git a/openair2/E1AP/lib/e1ap_bearer_context_management.h b/openair2/E1AP/lib/e1ap_bearer_context_management.h index 86c2ca0635..c04a485dac 100644 --- a/openair2/E1AP/lib/e1ap_bearer_context_management.h +++ b/openair2/E1AP/lib/e1ap_bearer_context_management.h @@ -46,6 +46,18 @@ e1ap_bearer_context_setup_failure_t cp_bearer_context_setup_failure(const e1ap_b bool eq_bearer_context_setup_failure(const e1ap_bearer_context_setup_failure_t *a, const e1ap_bearer_context_setup_failure_t *b); void free_e1_bearer_context_setup_failure(const e1ap_bearer_context_setup_failure_t *msg); +struct E1AP_E1AP_PDU *encode_e1_bearer_context_release_command(const e1ap_bearer_release_cmd_t *msg); +bool decode_e1_bearer_context_release_command(e1ap_bearer_release_cmd_t *out, const struct E1AP_E1AP_PDU *pdu); +bool eq_bearer_context_release_command(const e1ap_bearer_release_cmd_t *a, const e1ap_bearer_release_cmd_t *b); +e1ap_bearer_release_cmd_t cp_bearer_context_release_command(const e1ap_bearer_release_cmd_t *msg); +void free_e1_bearer_context_release_command(const e1ap_bearer_release_cmd_t *msg); + +struct E1AP_E1AP_PDU *encode_e1_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *cplt); +bool decode_e1_bearer_context_release_complete(e1ap_bearer_release_cplt_t *out, const struct E1AP_E1AP_PDU *pdu); +bool eq_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *a, const e1ap_bearer_release_cplt_t *b); +e1ap_bearer_release_cplt_t cp_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *src); +void free_e1_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *msg); + struct E1AP_E1AP_PDU *encode_E1_bearer_context_mod_request(const e1ap_bearer_mod_req_t *msg); bool decode_E1_bearer_context_mod_request(const struct E1AP_E1AP_PDU *pdu, e1ap_bearer_mod_req_t *out); void free_e1ap_context_mod_request(const e1ap_bearer_mod_req_t *msg); @@ -58,4 +70,10 @@ void free_e1ap_context_mod_response(const e1ap_bearer_modif_resp_t *msg); e1ap_bearer_modif_resp_t cp_bearer_context_mod_response(const e1ap_bearer_modif_resp_t *msg); bool eq_bearer_context_mod_response(const e1ap_bearer_modif_resp_t *a, const e1ap_bearer_modif_resp_t *b); +struct E1AP_E1AP_PDU *encode_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *msg); +bool decode_E1_bearer_context_mod_failure(e1ap_bearer_context_mod_failure_t *out, const struct E1AP_E1AP_PDU *pdu); +void free_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *msg); +e1ap_bearer_context_mod_failure_t cp_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *msg); +bool eq_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *a, const e1ap_bearer_context_mod_failure_t *b); + #endif /* E1AP_BEARER_CONTEXT_MANAGEMENT_H_ */ diff --git a/openair2/E1AP/tests/e1ap_lib_test.c b/openair2/E1AP/tests/e1ap_lib_test.c index bae85684de..a9fd7aa390 100644 --- a/openair2/E1AP/tests/e1ap_lib_test.c +++ b/openair2/E1AP/tests/e1ap_lib_test.c @@ -265,6 +265,85 @@ static void test_bearer_context_setup_failure(void) free_e1_bearer_context_setup_failure(&cp); } +/** @brief Test E1AP Bearer Context Release Command encoding/decoding */ +static void test_bearer_context_release_command(void) +{ + e1ap_bearer_release_cmd_t orig = { + .gNB_cu_cp_ue_id = 0x1234, + .gNB_cu_up_ue_id = 0x5678, + .cause.type = E1AP_CAUSE_RADIO_NETWORK, + .cause.value = E1AP_RADIO_CAUSE_MULTIPLE_QOS_FLOW_ID_INSTANCES, + }; + + // Encode the original message + E1AP_E1AP_PDU_t *enc = encode_e1_bearer_context_release_command(&orig); + + // E1AP decode the encoded message + E1AP_E1AP_PDU_t *dec = e1ap_encode_decode(enc); + + // Free the E1AP encoded message + e1ap_msg_free(enc); + + // Decode the encoded message + e1ap_bearer_release_cmd_t decoded = {0}; + AssertFatal(decode_e1_bearer_context_release_command(&decoded, dec), "decode_e1_bearer_context_release_command failed"); + + // Free the E1AP decoded message + e1ap_msg_free(dec); + + // Equality check original/decoded + AssertFatal(eq_bearer_context_release_command(&orig, &decoded), "eq_bearer_context_release_command: decoded message does not match original"); + + // Free the memory for the decoded message + free_e1_bearer_context_release_command(&decoded); + + // Deep copy and equality check of the original message + e1ap_bearer_release_cmd_t cp = cp_bearer_context_release_command(&orig); + AssertFatal(eq_bearer_context_release_command(&orig, &cp), "eq_bearer_context_release_command(): copied message doesn't match\n"); + + // Cleanup + free_e1_bearer_context_release_command(&orig); + free_e1_bearer_context_release_command(&cp); +} + +/** @brief Test E1AP Bearer Context Release Complete encoding/decoding */ +static void test_bearer_context_release_complete(void) +{ + e1ap_bearer_release_cplt_t orig = { + .gNB_cu_cp_ue_id = 0x1234, + .gNB_cu_up_ue_id = 0x5678, + }; + + // Encode the original message + E1AP_E1AP_PDU_t *enc = encode_e1_bearer_context_release_complete(&orig); + + // E1AP decode the encoded message + E1AP_E1AP_PDU_t *dec = e1ap_encode_decode(enc); + + // Free the E1AP encoded message + e1ap_msg_free(enc); + + // Decode the encoded message + e1ap_bearer_release_cplt_t decoded = {0}; + AssertFatal(decode_e1_bearer_context_release_complete(&decoded, dec), "decode_e1_bearer_context_release_complete failed"); + + // Free the E1AP decoded message + e1ap_msg_free(dec); + + // Equality check original/decoded + AssertFatal(eq_bearer_context_release_complete(&orig, &decoded), "eq_bearer_context_release_complete: decoded message does not match original"); + + // Free the memory for the decoded message + free_e1_bearer_context_release_complete(&decoded); + + // Deep copy and equality check of the original message + e1ap_bearer_release_cplt_t cp = cp_bearer_context_release_complete(&orig); + AssertFatal(eq_bearer_context_release_complete(&orig, &cp), "eq_bearer_context_release_complete(): copied message doesn't match\n"); + + // Cleanup + free_e1_bearer_context_release_complete(&orig); + free_e1_bearer_context_release_complete(&cp); +} /** * @brief Test CU-UP Setup Request encoding/decoding @@ -661,6 +740,49 @@ static void test_bearer_context_modification_response_fail(void) free_e1ap_context_mod_response(&orig); } +/** @brief Test E1AP Bearer Context Modification Failure encoding/decoding */ +static void test_bearer_context_modification_failure(void) +{ + // Create the original failure struct + e1ap_bearer_context_mod_failure_t orig = { + .gNB_cu_cp_ue_id = 0x1111, + .gNB_cu_up_ue_id = 0x2222, + .cause.type = E1AP_CAUSE_TRANSPORT, + .cause.value = E1AP_TRANSPORT_CAUSE_RESOURCE_UNAVAILABLE, + }; + + // Encode the original message + E1AP_E1AP_PDU_t *enc = encode_E1_bearer_context_mod_failure(&orig); + + // Decode the encoded message + E1AP_E1AP_PDU_t *dec = e1ap_encode_decode(enc); + + // Free the encoded message + e1ap_msg_free(enc); + + // Decode into a new struct + e1ap_bearer_context_mod_failure_t decoded = {0}; + AssertFatal(decode_E1_bearer_context_mod_failure(&decoded, dec), + "decode_E1_bearer_context_mod_failure(): could not decode message\n"); + + // Free the decoded PDU + e1ap_msg_free(dec); + + // Compare original and decoded messages + AssertFatal(eq_E1_bearer_context_mod_failure(&orig, &decoded), + "eq_E1_bearer_context_mod_failure(): decoded message doesn't match\n"); + + // Deep copy the original message + e1ap_bearer_context_mod_failure_t cp = cp_E1_bearer_context_mod_failure(&orig); + + // Compare original and copied messages + AssertFatal(eq_E1_bearer_context_mod_failure(&orig, &cp), "eq_E1_bearer_context_mod_failure(): copied message doesn't match\n"); + + // Free the decoded and copied messages + free_E1_bearer_context_mod_failure(&decoded); + free_E1_bearer_context_mod_failure(&cp); +} + int main() { // E1 Bearer Context Setup @@ -671,9 +793,13 @@ int main() test_e1_cuup_setup_request(); test_e1_cuup_setup_response(); test_e1_cuup_setup_failure(); - // E1 Bearer Context Modification Request + // E1 Bearer Context Modification test_bearer_context_modification_request(); test_bearer_context_modification_response(); test_bearer_context_modification_response_fail(); + test_bearer_context_modification_failure(); + // Bearer Context Release + test_bearer_context_release_command(); + test_bearer_context_release_complete(); return 0; } diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index 8df27ad16e..2607d8f587 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -66,6 +66,11 @@ typedef struct { uint64_t s_map; } nr_prach_info_t; +typedef struct { + uint16_t bwpStart; + uint16_t bwpSize; +} bwp_info_t; + uint32_t get_Y(const NR_SearchSpace_t *ss, int slot, rnti_t rnti); uint8_t get_BG(uint32_t A, uint16_t R); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index e1e9bfd982..63700d2a72 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -935,7 +935,8 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP, ra->Msg3_tda_id, ra->msg3_TPC, 1, // Not toggling NDI in msg3 retransmissions - ul_bwp); + ul_bwp, + ss->searchSpaceType->present); // Reset TPC to 0 dB to not request new gain multiple times before computing new value for SNR ra->msg3_TPC = 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 226fe80dbb..4086588660 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -381,35 +381,39 @@ void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid) UE->mac_stats.dl.errors++; } -typedef struct { - int bwpStart; - int bwpSize; -} dl_bwp_info_t; - -static dl_bwp_info_t get_bwp_start_size(gNB_MAC_INST *mac, NR_UE_info_t *UE) +static bwp_info_t get_pdsch_bwp_start_size(gNB_MAC_INST *nr_mac, NR_UE_info_t *UE) { NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - // UE is scheduled in a set of contiguously allocated resource blocks within the active bandwidth part of size N_BWP PRBs - // except for the case when DCI format 1_0 is decoded in any common search space - // in which case the size of CORESET 0 shall be used if CORESET 0 is configured for the cell - // and the size of initial DL bandwidth part shall be used if CORESET 0 is not configured for the cell. - // TS 38.214 Section 5.1.2.2.2 - dl_bwp_info_t bwp_info; - bwp_info.bwpSize = dl_bwp->BWPSize; - bwp_info.bwpStart = dl_bwp->BWPStart; - if (sched_ctrl->search_space->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common && - dl_bwp->dci_format == NR_DL_DCI_FORMAT_1_0) { - if (mac->cset0_bwp_size != 0) { - bwp_info.bwpStart = mac->cset0_bwp_start; - bwp_info.bwpSize = mac->cset0_bwp_size; + bwp_info_t bwp_info; + + // 3GPP TS 38.214 Section 5.1.2.2 Resource allocation in frequency domain + // For a PDSCH scheduled with a DCI format 1_0 in any type of PDCCH common search space, regardless of which bandwidth part is the + // active bandwidth part, RB numbering starts from the lowest RB of the CORESET in which the DCI was received; otherwise RB + // numbering starts from the lowest RB in the determined downlink bandwidth part. + // + // 3GPP TS 38.214 Section 5.1.2.2.2 Downlink resource allocation type 1 + // In downlink resource allocation of type 1, the resource block assignment information indicates to a scheduled UE a set of + // contiguously allocated non-interleaved or interleaved virtual resource blocks within the active bandwidth part of size PRBs + // except for the case when DCI format 1_0 is decoded in any common search space in which case the size of CORESET 0 shall be + // used if CORESET 0 is configured for the cell and the size of initial DL bandwidth part shall be used if CORESET 0 is not + // configured for the cell. + if (dl_bwp->dci_format == NR_DL_DCI_FORMAT_1_0 && sched_ctrl->search_space->searchSpaceType + && sched_ctrl->search_space->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common + && dl_bwp->pdsch_Config->resourceAllocation == NR_PDSCH_Config__resourceAllocation_resourceAllocationType1) { + if (sched_ctrl->coreset->controlResourceSetId == 0) { + bwp_info.bwpStart = nr_mac->cset0_bwp_start; + } else { + bwp_info.bwpStart = dl_bwp->BWPStart + sched_ctrl->sched_pdcch.rb_start; } - else { - // TODO this is not entirely correct - // start would be the start of CORESET not of the initial BWP - bwp_info.bwpStart = UE->sc_info.initial_dl_BWPStart; - bwp_info.bwpSize = UE->sc_info.initial_dl_BWPSize; + if (nr_mac->cset0_bwp_size > 0) { + bwp_info.bwpSize = min(dl_bwp->BWPSize - bwp_info.bwpStart, nr_mac->cset0_bwp_size); + } else { + bwp_info.bwpSize = min(dl_bwp->BWPSize - bwp_info.bwpStart, UE->sc_info.initial_dl_BWPSize); } + } else { + bwp_info.bwpSize = dl_bwp->BWPSize; + bwp_info.bwpStart = dl_bwp->BWPStart; } return bwp_info; } @@ -463,7 +467,7 @@ static bool allocate_dl_retransmission(module_id_t module_id, uint16_t *rballoc_mask = nr_mac->common_channels[CC_id].vrb_map[beam_idx]; - dl_bwp_info_t bwp_info = get_bwp_start_size(nr_mac, UE); + bwp_info_t bwp_info = get_pdsch_bwp_start_size(nr_mac, UE); int rbStart = bwp_info.bwpStart; int rbStop = bwp_info.bwpStart + bwp_info.bwpSize - 1; int rbSize = 0; @@ -758,7 +762,7 @@ static void pf_dl(module_id_t module_id, const uint16_t slbitmap = SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols); uint16_t *rballoc_mask = mac->common_channels[CC_id].vrb_map[beam.idx]; - dl_bwp_info_t bwp_info = get_bwp_start_size(mac, iterator->UE); + bwp_info_t bwp_info = get_pdsch_bwp_start_size(mac, iterator->UE); int rbStart = 0; // WRT BWP start int rbStop = bwp_info.bwpSize - 1; int bwp_start = bwp_info.bwpStart; @@ -1060,7 +1064,7 @@ void nr_schedule_ue_spec(module_id_t module_id, const int pduindex = gNB_mac->pdu_index[CC_id]++; pdsch_pdu->pduIndex = pduindex; - dl_bwp_info_t bwp_info = get_bwp_start_size(gNB_mac, UE); + bwp_info_t bwp_info = get_pdsch_bwp_start_size(gNB_mac, UE); pdsch_pdu->BWPSize = bwp_info.bwpSize; pdsch_pdu->BWPStart = bwp_info.bwpStart; @@ -1176,9 +1180,20 @@ void nr_schedule_ue_spec(module_id_t module_id, AssertFatal(pdsch_Config == NULL || pdsch_Config->resourceAllocation == NR_PDSCH_Config__resourceAllocation_resourceAllocationType1, "Only frequency resource allocation type 1 is currently supported\n"); - dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu->rbSize, - pdsch_pdu->rbStart, - pdsch_pdu->BWPSize); + // 3GPP TS 38.214 Section 5.1.2.2.2 Downlink resource allocation type 1 + uint16_t riv_bwp_size = pdsch_pdu->BWPSize; + if (current_BWP->dci_format == NR_DL_DCI_FORMAT_1_0 + && sched_ctrl->search_space->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common + && pdsch_Config->resourceAllocation == NR_PDSCH_Config__resourceAllocation_resourceAllocationType1) { + if (gNB_mac->cset0_bwp_size > 0) { + riv_bwp_size = gNB_mac->cset0_bwp_size; + } else { + riv_bwp_size = UE->sc_info.initial_dl_BWPSize; + } + } + dci_payload.frequency_domain_assignment.val = + PRBalloc_to_locationandbandwidth0(pdsch_pdu->rbSize, pdsch_pdu->rbStart, riv_bwp_size); + dci_payload.format_indicator = 1; dci_payload.time_domain_assignment.val = sched_pdsch->time_domain_allocation; dci_payload.mcs = sched_pdsch->mcs; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 03ec701880..5ceff85296 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -497,13 +497,21 @@ NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac, pdcch.ShiftIndex = 0; } - int N_rb = 0; // nb of rbs of coreset per symbol - for (int i=0;i<6;i++) { - for (int t=0;t<8;t++) { - N_rb+=((coreset->frequencyDomainResources.buf[i]>>t)&1); + uint16_t N_rb = 0; // nb of rbs of coreset per symbol + uint16_t rb_start = 0; + for (int i = 0; i < 6; i++) { + for (int t = 0; t < 8; t++) { + if (coreset->frequencyDomainResources.buf[i] >> (7 - t) & 1) { + if (N_rb == 0) { + rb_start = 48 * i + t * 6; + } + N_rb++; + } } } - pdcch.n_rb = N_rb*=6; // each bit of frequencyDomainResources represents 6 PRBs + + pdcch.rb_start = rb_start; + pdcch.n_rb = N_rb *= 6; // each bit of frequencyDomainResources represents 6 PRBs return pdcch; } @@ -782,13 +790,20 @@ void config_uldci(const NR_UE_ServingCell_Info_t *sc_info, int time_domain_assignment, uint8_t tpc, uint8_t ndi, - NR_UE_UL_BWP_t *ul_bwp) + NR_UE_UL_BWP_t *ul_bwp, + NR_SearchSpace__searchSpaceType_PR ss_type) { int bwp_id = ul_bwp->bwp_id; nr_dci_format_t dci_format = ul_bwp->dci_format; + // 3GPP TS 38.214 Section 6.1.2.2.2 Uplink resource allocation type 1 + uint16_t riv_bwp_size = ul_bwp->BWPSize; + if (dci_format == NR_UL_DCI_FORMAT_0_0 && ss_type == NR_SearchSpace__searchSpaceType_PR_common && ul_bwp->pusch_Config + && ul_bwp->pusch_Config->resourceAllocation == NR_PUSCH_Config__resourceAllocation_resourceAllocationType1) { + riv_bwp_size = sc_info->initial_ul_BWPSize; + } dci_pdu_rel15->frequency_domain_assignment.val = - PRBalloc_to_locationandbandwidth0(pusch_pdu->rb_size, pusch_pdu->rb_start, ul_bwp->BWPSize); + PRBalloc_to_locationandbandwidth0(pusch_pdu->rb_size, pusch_pdu->rb_start, riv_bwp_size); dci_pdu_rel15->time_domain_assignment.val = time_domain_assignment; dci_pdu_rel15->frequency_hopping_flag.val = pusch_pdu->frequency_hopping; dci_pdu_rel15->mcs = pusch_pdu->mcs_index; @@ -3261,6 +3276,9 @@ void reset_beam_status(NR_beam_info_t *beam_info, int frame, int slot, int beam_ void beam_selection_procedures(gNB_MAC_INST *mac, NR_UE_info_t *UE) { + // do not perform beam procedures if there is no beam information + if (!mac->beam_info.beam_allocation) + return; RSRP_report_t *rsrp_report = &UE->UE_sched_ctrl.CSI_report.ssb_rsrp_report; // simple beam switching algorithm -> we select beam with highest RSRP from CSI report int new_bf_index = get_fapi_beamforming_index(mac, rsrp_report->resource_id[0]); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index c554dc7cea..35c817b975 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -65,6 +65,28 @@ int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot) return 0; // if FDD or not mixed slot in TDD, for now use default TDA (TODO handle CSI-RS slots) } +static bwp_info_t get_pusch_bwp_start_size(NR_UE_info_t *UE) +{ + NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; + NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; + bwp_info_t bwp_info; + bwp_info.bwpStart = ul_bwp->BWPStart; + + // 3GPP TS 38.214 Section 6.1.2.2.2 Uplink resource allocation type 1 + // In uplink resource allocation of type 1, the resource block assignment information indicates to a scheduled UE a set of + // contiguously allocated non-interleaved virtual resource blocks within the active bandwidth part of size PRBs except for the + // case when DCI format 0_0 is decoded in any common search space in which case the size of the initial UL bandwidth part shall + // be used. + if (ul_bwp->dci_format == NR_UL_DCI_FORMAT_0_0 && sched_ctrl->search_space->searchSpaceType + && sched_ctrl->search_space->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common + && ul_bwp->pusch_Config->resourceAllocation == NR_PUSCH_Config__resourceAllocation_resourceAllocationType1) { + bwp_info.bwpSize = min(ul_bwp->BWPSize, UE->sc_info.initial_ul_BWPSize); + } else { + bwp_info.bwpSize = ul_bwp->BWPSize; + } + return bwp_info; +} + static int compute_ph_factor(int mu, int tbs_bits, int rb, int n_layers, int n_symbols, int n_dmrs, long *deltaMCS, bool include_bw) { // 38.213 7.1.1 @@ -1673,8 +1695,9 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; int rbStart = 0; // wrt BWP start - const uint32_t bwpSize = ul_bwp->BWPSize; - const uint32_t bwpStart = ul_bwp->BWPStart; + bwp_info_t bwp_info = get_pusch_bwp_start_size(UE); + const uint32_t bwpSize = bwp_info.bwpSize; + const uint32_t bwpStart = bwp_info.bwpStart; const uint8_t nrOfLayers = retInfo->nrOfLayers; LOG_D(NR_MAC,"retInfo->time_domain_allocation = %d, tda = %d\n", retInfo->time_domain_allocation, tda); LOG_D(NR_MAC,"tbs %d\n",retInfo->tb_size); @@ -1963,8 +1986,9 @@ static void pf_ul(module_id_t module_id, min_rb, rbStart, sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data); - const uint32_t bwpSize = current_BWP->BWPSize; - const uint32_t bwpStart = current_BWP->BWPStart; + bwp_info_t bwp_info = get_pusch_bwp_start_size(UE); + const uint32_t bwpStart = bwp_info.bwpStart; + const uint32_t bwpSize = bwp_info.bwpSize; const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols); while (rbStart < bwpSize && (rballoc_mask[rbStart + bwpStart] & slbitmap)) rbStart++; @@ -2112,8 +2136,9 @@ static void pf_ul(module_id_t module_id, int rbStart = 0; const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols); - const uint32_t bwpSize = current_BWP->BWPSize; - const uint32_t bwpStart = current_BWP->BWPStart; + bwp_info_t bwp_info = get_pusch_bwp_start_size(iterator->UE); + const uint32_t bwpStart = bwp_info.bwpStart; + const uint32_t bwpSize = bwp_info.bwpSize; while (rbStart < bwpSize && (rballoc_mask[rbStart + bwpStart] & slbitmap)) rbStart++; sched_pusch->rbStart = rbStart; @@ -2662,7 +2687,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_ sched_pusch->time_domain_allocation, UE->UE_sched_ctrl.tpc0, cur_harq->ndi, - current_BWP); + current_BWP, + ss->searchSpaceType->present); // Reset TPC to 0 dB to not request new gain multiple times before computing new value for SNR UE->UE_sched_ctrl.tpc0 = 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index c78c061820..f0b59c73de 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -166,7 +166,8 @@ void config_uldci(const NR_UE_ServingCell_Info_t *sc_info, int time_domain_assignment, uint8_t tpc, uint8_t ndi, - NR_UE_UL_BWP_t *ul_bwp); + NR_UE_UL_BWP_t *ul_bwp, + NR_SearchSpace__searchSpaceType_PR ss_type); void nr_schedule_pucch(gNB_MAC_INST *nrmac, frame_t frameP, slot_t slotP); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 1e7ac572ef..0b977de276 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -198,7 +198,8 @@ typedef struct NR_sched_pdcch { uint8_t InterleaverSize; uint16_t ShiftIndex; uint8_t DurationSymbols; - int n_rb; + uint16_t n_rb; + uint16_t rb_start; } NR_sched_pdcch_t; /*! \brief gNB template for the Random access information */ diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index ac4f25109e..dfb5b9e231 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -348,6 +348,12 @@ static uint64_t get_ssb_bitmap(const NR_ServingCellConfigCommon_t *scc) return bitmap; } +static bool check_periodicity(int val, int ideal_period, const frame_structure_t *fs) +{ + bool valid_periodicity_for_tdd_period = fs->frame_type == FDD ? true : (val % fs->numb_slots_period == 0); + return (ideal_period < val + 1) && valid_periodicity_for_tdd_period; +} + static int set_ideal_period(bool is_csi) { const frame_structure_t *fs = &RC.nrmac[0]->frame_structure; @@ -360,50 +366,50 @@ static int set_ideal_period(bool is_csi) static void set_csirs_periodicity(NR_NZP_CSI_RS_Resource_t *nzpcsi0, int id, int ideal_period, - int nb_slots_per_period, - int nb_dl_slots_period) + const frame_structure_t *fs) { nzpcsi0->periodicityAndOffset = calloc(1,sizeof(*nzpcsi0->periodicityAndOffset)); // TODO ideal period to be set according to estimation by the gNB on how fast the channel changes - const int offset = nb_slots_per_period * id; - if (ideal_period < 5) { + const int offset = fs->numb_slots_period * id; + if (check_periodicity(4, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots4; nzpcsi0->periodicityAndOffset->choice.slots4 = offset; } - else if (ideal_period < 6) { + else if (check_periodicity(5, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots5; nzpcsi0->periodicityAndOffset->choice.slots5 = offset; } - else if (ideal_period < 9) { + else if (check_periodicity(8, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots8; nzpcsi0->periodicityAndOffset->choice.slots8 = offset; } - else if (ideal_period < 11) { + else if (check_periodicity(10, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots10; nzpcsi0->periodicityAndOffset->choice.slots10 = offset; } - else if (ideal_period < 17) { + else if (check_periodicity(16, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots16; nzpcsi0->periodicityAndOffset->choice.slots16 = offset; } - else if (ideal_period < 21) { + else if (check_periodicity(20, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots20; nzpcsi0->periodicityAndOffset->choice.slots20 = offset; } - else if (ideal_period < 41) { + else if (check_periodicity(40, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots40; nzpcsi0->periodicityAndOffset->choice.slots40 = offset; } - else if (ideal_period < 81) { + else if (check_periodicity(80, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots80; nzpcsi0->periodicityAndOffset->choice.slots80 = offset; } - else if (ideal_period < 161) { + else if (check_periodicity(160, ideal_period, fs)) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots160; nzpcsi0->periodicityAndOffset->choice.slots160 = offset; } else { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots320; + const int nb_dl_slots_period = get_full_dl_slots_per_period(fs); // full DL slots AssertFatal(offset / 320 < nb_dl_slots_period, "Cannot allocate CSI-RS for BWP %d. Not enough resources for CSI-RS\n", id); nzpcsi0->periodicityAndOffset->choice.slots320 = (offset % 320) + (offset / 320); } @@ -480,8 +486,7 @@ static void config_csirs(const NR_ServingCellConfigCommon_t *servingcellconfigco const int ideal_period = set_ideal_period(true); // same periodicity as CSI measurement report const frame_structure_t *fs = &(RC.nrmac[0]->frame_structure); - const int nb_dl_slots_period = get_full_dl_slots_per_period(fs); // full DL slots - set_csirs_periodicity(nzpcsi0, id, ideal_period, fs->numb_slots_period, nb_dl_slots_period); + set_csirs_periodicity(nzpcsi0, id, ideal_period, fs); nzpcsi0->qcl_InfoPeriodicCSI_RS = calloc(1,sizeof(*nzpcsi0->qcl_InfoPeriodicCSI_RS)); *nzpcsi0->qcl_InfoPeriodicCSI_RS = 0; @@ -669,59 +674,59 @@ static struct NR_SRS_Resource__resourceType__periodic *configure_periodic_srs(co const int ideal_period = set_ideal_period(false); struct NR_SRS_Resource__resourceType__periodic *periodic_srs = calloc(1,sizeof(*periodic_srs)); - if (ideal_period < 5) { + if (check_periodicity(4, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl4; periodic_srs->periodicityAndOffset_p.choice.sl4 = offset; } - else if (ideal_period < 6) { + else if (check_periodicity(5, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl5; periodic_srs->periodicityAndOffset_p.choice.sl5 = offset; } - else if (ideal_period < 9) { + else if (check_periodicity(8, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl8; periodic_srs->periodicityAndOffset_p.choice.sl8 = offset; } - else if (ideal_period < 11) { + else if (check_periodicity(10, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl10; periodic_srs->periodicityAndOffset_p.choice.sl10 = offset; } - else if (ideal_period < 17) { + else if (check_periodicity(16, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl16; periodic_srs->periodicityAndOffset_p.choice.sl16 = offset; } - else if (ideal_period < 21) { + else if (check_periodicity(20, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl20; periodic_srs->periodicityAndOffset_p.choice.sl20 = offset; } - else if (ideal_period < 33) { + else if (check_periodicity(32, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl32; periodic_srs->periodicityAndOffset_p.choice.sl32 = offset; } - else if (ideal_period < 41) { + else if (check_periodicity(40, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl40; periodic_srs->periodicityAndOffset_p.choice.sl40 = offset; } - else if (ideal_period < 65) { + else if (check_periodicity(64, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl64; periodic_srs->periodicityAndOffset_p.choice.sl64 = offset; } - else if (ideal_period < 81) { + else if (check_periodicity(80, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl80; periodic_srs->periodicityAndOffset_p.choice.sl80 = offset; } - else if (ideal_period < 161) { + else if (check_periodicity(160, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl160; periodic_srs->periodicityAndOffset_p.choice.sl160 = offset; } - else if (ideal_period < 321) { + else if (check_periodicity(320, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl320; periodic_srs->periodicityAndOffset_p.choice.sl320 = offset; } - else if (ideal_period < 641) { + else if (check_periodicity(640, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl640; periodic_srs->periodicityAndOffset_p.choice.sl640 = offset; } - else if (ideal_period < 1281) { + else if (check_periodicity(1280, ideal_period, fs)) { periodic_srs->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl1280; periodic_srs->periodicityAndOffset_p.choice.sl1280 = offset; } @@ -1722,31 +1727,31 @@ static void set_csi_meas_periodicity(const NR_ServingCellConfigCommon_t *scc, LOG_D(NR_MAC, "set_csi_meas_periodicity: uid = %d, offset = %d, ideal_period = %d", uid, offset, ideal_period); AssertFatal(offset < 320, "Not enough UL slots to accomodate all possible UEs. Need to rework the implementation\n"); - if (ideal_period < 5) { + if (check_periodicity(4, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots4; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots4 = offset; - } else if (ideal_period < 6) { + } else if (check_periodicity(5, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots5; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots5 = offset; - } else if (ideal_period < 9) { + } else if (check_periodicity(8, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots8; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots8 = offset; - } else if (ideal_period < 11) { + } else if (check_periodicity(10, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots10; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots10 = offset; - } else if (ideal_period < 17) { + } else if (check_periodicity(16, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots16; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots16 = offset; - } else if (ideal_period < 21) { + } else if (check_periodicity(20, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots20; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots20 = offset; - } else if (ideal_period < 41) { + } else if (check_periodicity(40, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots40; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots40 = offset; - } else if (ideal_period < 81) { + } else if (check_periodicity(80, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots80; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots80 = offset; - } else if (ideal_period < 161) { + } else if (check_periodicity(160, ideal_period, fs)) { csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots160; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots160 = offset; } else { diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index c99c6e205a..213d4a8f8a 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -2582,6 +2582,23 @@ void rrc_gNB_process_e1_bearer_context_modif_resp(const e1ap_bearer_modif_resp_t } } +/** @brief E1AP Bearer Context Modification Failure processing on CU-CP */ +static void rrc_gNB_process_e1_bearer_context_modif_fail(const e1ap_bearer_context_mod_failure_t *fail) +{ + gNB_RRC_INST *rrc = RC.nrrrc[0]; + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc, fail->gNB_cu_cp_ue_id); + if (ue_context_p == NULL) { + LOG_E(NR_RRC, "No UE with CU-CP UE ID %d found (Bearer Context Modification Failure)\n", fail->gNB_cu_cp_ue_id); + return; + } + + LOG_W(NR_RRC, + "Bearer Context Modification Failure received for UE ID %d (CU-UP ID %d), cause: %d\n", + fail->gNB_cu_cp_ue_id, + fail->gNB_cu_up_ue_id, + fail->cause.value); +} + /** * @brief E1AP Bearer Context Release processing */ @@ -2886,6 +2903,10 @@ void *rrc_gnb_task(void *args_p) { free_e1ap_context_mod_response(&E1AP_BEARER_CONTEXT_MODIFICATION_RESP(msg_p)); break; + case E1AP_BEARER_CONTEXT_MODIFICATION_FAIL: + rrc_gNB_process_e1_bearer_context_modif_fail(&E1AP_BEARER_CONTEXT_MODIFICATION_FAIL(msg_p)); + break; + case E1AP_BEARER_CONTEXT_RELEASE_CPLT: rrc_gNB_process_e1_bearer_context_release_cplt(&E1AP_BEARER_CONTEXT_RELEASE_CPLT(msg_p)); break; diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index fadbea4825..6d0264152a 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -1274,9 +1274,11 @@ int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(MessageDef *msg_p, instance_ * session (intentionally, or because of erros) */ if (ue_associated_to_cuup(rrc, UE)) { sctp_assoc_t assoc_id = get_existing_cuup_for_ue(rrc, UE); + e1ap_cause_t cause = {.type = E1AP_CAUSE_RADIO_NETWORK, .value = E1AP_RADIO_CAUSE_NORMAL_RELEASE}; e1ap_bearer_release_cmd_t cmd = { .gNB_cu_cp_ue_id = UE->rrc_ue_id, .gNB_cu_up_ue_id = UE->rrc_ue_id, + .cause = cause, }; rrc->cucp_cuup.bearer_context_release(assoc_id, &cmd); } diff --git a/radio/fhi_72/CMakeLists.txt b/radio/fhi_72/CMakeLists.txt index 0b78bf055b..a874d4cc01 100644 --- a/radio/fhi_72/CMakeLists.txt +++ b/radio/fhi_72/CMakeLists.txt @@ -16,13 +16,16 @@ add_library(oran_fhlib_5g MODULE oran-init.c ) +set(E_VERSION 5.1.5) +set(F_VERSION 6.1.3) + find_package(xran REQUIRED) -if(xran_VERSION VERSION_EQUAL 5.1.5) +if(xran_VERSION VERSION_EQUAL E_VERSION) target_compile_definitions(oran_fhlib_5g PRIVATE E_RELEASE) -elseif(xran_VERSION VERSION_EQUAL 6.1.2) +elseif(xran_VERSION VERSION_EQUAL F_VERSION) target_compile_definitions(oran_fhlib_5g PRIVATE F_RELEASE) else() - message(FATAL_ERROR "Found xran version ${xran_VERSION} but needed 5.1.5 (E release) or 6.1.2 (F release)") + message(FATAL_ERROR "Found xran version ${xran_VERSION} but needed ${E_VERSION} (E release) or ${F_VERSION} (F release)") endif() # Ignore xran-specific warning: we don't care/can't change the following warning, so suppress diff --git a/radio/fhi_72/mplane/CMakeLists.txt b/radio/fhi_72/mplane/CMakeLists.txt index a6bd7e62d7..65faa6dfbd 100644 --- a/radio/fhi_72/mplane/CMakeLists.txt +++ b/radio/fhi_72/mplane/CMakeLists.txt @@ -6,9 +6,9 @@ add_library(oran_fhlib_5g_mplane MODULE ) add_dependencies(oran_fhlib_5g_mplane oran_fhlib_5g) -if(xran_VERSION VERSION_EQUAL 5.1.4) +if(xran_VERSION VERSION_EQUAL E_VERSION) target_compile_definitions(oran_fhlib_5g_mplane PRIVATE E_RELEASE) -elseif(xran_VERSION VERSION_EQUAL 6.1.1) +elseif(xran_VERSION VERSION_EQUAL F_VERSION) target_compile_definitions(oran_fhlib_5g_mplane PRIVATE F_RELEASE) endif() diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf index ff1de3cc21..c7d8cb3269 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf @@ -113,7 +113,7 @@ gNBs = hoppingId = 40; p0_nominal = -90; - ssb_PositionsInBurst_Bitmap = 3; + ssb_PositionsInBurst_Bitmap = 2; # ssb_periodicityServingCell # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf index 97fd75bda8..bd4cd59f06 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-foxconn.conf @@ -257,7 +257,7 @@ fhi_72 = { io_core = 1; worker_cores = (2); ru_addr = ("6c:ad:ad:00:04:dc", "6c:ad:ad:00:04:dc"); - mtu = 8000; + mtu = 9600; fh_config = ({ T1a_cp_dl = (285, 470); T1a_cp_ul = (285, 429); diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf index 465bb6d71e..43f6f9cef8 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf @@ -19,7 +19,7 @@ gNBs = pdsch_AntennaPorts_XP = 2; pdsch_AntennaPorts_N1 = 2; - maxMIMO_layers = 2; + maxMIMO_layers = 4; pusch_AntennaPorts = 4; do_CSIRS = 1; do_SRS = 0; @@ -33,12 +33,12 @@ gNBs = # n_TimingAdvanceOffset = 0; # downlinkConfigCommon #frequencyInfoDL - # center frequency = 3450.72 MHz - # selected SSB frequency = 3450.72 MHz - absoluteFrequencySSB = 630048; + # center frequency = 3350.01 MHz + # selected SSB frequency = 3349.92 MHz + absoluteFrequencySSB = 623328; dl_frequencyBand = 78; - # frequency point A = 3401.58 MHz - dl_absoluteFrequencyPointA = 626772; + # frequency point A = 3300.87 MHz + dl_absoluteFrequencyPointA = 620058; #scs-SpecificCarrierList dl_offstToCarrier = 0; # subcarrierSpacing @@ -257,15 +257,16 @@ fhi_72 = { system_core = 0; io_core = 1; worker_cores = (2); - ru_addr = ("e8:c7:4f:1e:c7:11", "e8:c7:4f:1e:c7:11"); + ru_addr = ("e8:c7:4f:25:81:b3", "e8:c7:4f:25:81:b3"); + mtu = 9600; # note: 1500 works as well, with both E and F releases fh_config = ({ T1a_cp_dl = (285, 429); T1a_cp_ul = (285, 429); T1a_up = (96, 196); Ta4 = (110, 180); ru_config = { - iq_width = 8; - iq_width_prach = 8; + iq_width = 9; + iq_width_prach = 9; }; prach_config = { kbar = 0; diff --git a/tools/scripts/multi-ue.sh b/tools/scripts/multi-ue.sh old mode 100644 new mode 100755 index b495012de6..90a0f66e05 --- a/tools/scripts/multi-ue.sh +++ b/tools/scripts/multi-ue.sh @@ -2,6 +2,11 @@ ue_id=-1 +die() { + echo "$@" + exit 1 +} + create_namespace() { ue_id=$1 local name="ue$ue_id" @@ -33,27 +38,67 @@ list_namespaces() { } open_namespace() { - if [[ $ue_id -lt 1 ]]; then echo "error: no last UE processed"; exit 1; fi + [[ $ue_id -ge 1 ]] || die "error: no last UE processed" local name="ue$ue_id" echo "opening shell in namespace ${name}" echo "type 'ip netns exec $name bash' in additional terminals" ip netns exec $name bash } +inter_namespace_communication() { + [[ $# -eq 2 ]] || die "error: expected 2 UE IDs" + local id1=$1 + local id2=$2 + + [[ $id1 -ne $id2 ]] || die "error: UE IDs must be different" + + local ns1="ue$id1" + local ns2="ue$id2" + local if1="v-inter-ue_${id1}${id2}" + local if2="v-inter-ue_${id2}${id1}" + + ip netns list | grep -q "$ns1" || die "error: namespace $ns1 does not exist" + + ip netns list | grep -q "$ns2" || die "error: namespace $ns2 does not exist" + + local combo1="${id1}${id2}" + local combo2="${id2}${id1}" + + local subnet + if [[ $combo1 -gt $combo2 ]]; then + subnet=$combo1 + else + subnet=$combo2 + fi + + echo "Creating connection between $ns1 and $ns2 with subnet 172.16.$subnet.0/24" + ip link add $if1 type veth peer name $if2 + ip link set $if1 netns $ns1 + ip link set $if2 netns $ns2 + + ip netns exec $ns1 ip addr add 172.16.$subnet.$combo1/24 dev $if1 + ip netns exec $ns2 ip addr add 172.16.$subnet.$combo2/24 dev $if2 + + ip netns exec $ns1 ip link set dev $if1 up + ip netns exec $ns2 ip link set dev $if2 up + + echo "Connection established between $ns1 ($ns1: 172.16.$subnet.$combo1) and $ns2 ($ns2: 172.16.$subnet.$combo2)" +} usage () { echo "$1 -c : create namespace \"ue\"" echo "$1 -d : delete namespace \"ue\"" echo "$1 -e : execute shell in last processed namespace" echo "$1 -l : list namespaces" echo "$1 -o : open shell in namespace \"ue\"" + echo "$1 -i : create inter-namespace communication between \"ue\" and \"ue\"" } prog_name=$(basename $0) -if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root"; exit 1; fi -if [[ $# -eq 0 ]]; then echo "error: no parameters given"; usage $prog_name; exit 1; fi +[[ $(id -u) -eq 0 ]] || die "Please run as root" +[[ $# -eq 0 ]] && { usage $prog_name; die "error: no parameters given"; } -while getopts c:d:ehlo: cmd +while getopts :c:d:i:ehlo: cmd do case "${cmd}" in c) create_namespace ${OPTARG};; @@ -61,7 +106,13 @@ do e) open_namespace; exit;; h) usage ${prog_name}; exit;; l) list_namespaces;; + i) shift $((OPTIND-2)) + [[ $# -ge 2 ]] || { usage ${prog_name}; die "error: -i requires two UE IDs"; } + inter_namespace_communication $1 $2 + shift 2 + OPTIND=1 + ;; o) ue_id=${OPTARG}; open_namespace;; - /?) echo "Invalid option"; usage ${prog_name}; exit;; + ?) usage ${prog_name}; die "Invalid option: -${OPTARG}";; esac done