Compare commits

..

1 Commits

Author SHA1 Message Date
Cedric Roux
54027d27d9 fix tutorial: use "docker-compose", not "docker compose" 2023-04-30 16:34:41 +02:00
474 changed files with 16628 additions and 50327 deletions

4
.gitmodules vendored
View File

@@ -1,4 +0,0 @@
[submodule "openair2/E2AP/flexric"]
path = openair2/E2AP/flexric
url = https://gitlab.eurecom.fr/mosaic5g/flexric.git
branch = rebased-mir-dev

View File

@@ -46,24 +46,6 @@ include_directories(${CONFIG_INCLUDE_DIRS})
pkg_search_module(CRYPTO libcrypto REQUIRED)
include_directories(${CRYPTO_INCLUDE_DIRS})
# Check if asn1c is installed, and check if it supports all options we need
# a user can provide ASN1C_EXEC to override an asn1c to use (e.g., parallel
# installation)
find_program(ASN1C_EXEC_PATH asn1c HINTS /opt/asn1c/bin)
set(ASN1C_EXEC ${ASN1C_EXEC_PATH} CACHE FILEPATH "path to asn1c executable")
if(NOT ASN1C_EXEC)
message(FATAL_ERROR "No asn1c found!
You might want to re-run ./build_oai -I
Or provide a path to asn1c using
./build_oai ... --cmake-opt -DASN1C_EXEC=/path/to/asn1c
")
endif()
check_option(${ASN1C_EXEC} -gen-APER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-UPER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-JER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-BER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-OER ASN1C_EXEC)
#uhd 4.0 and iris installs by default in /usr/local
include_directories("/usr/local/include/")
#use native cmake method as this package is not in pkg-config
@@ -325,68 +307,6 @@ if (DEBUG_ASN1C)
add_definitions(-DHAVE_CONFIG_H)
endif()
# asn1c skeletons need this
add_definitions(-DHAVE_NETINET_IN_H)
#########################
##### E2 AGENT
#########################
#add_boolean_option() does not work -- why?
set(E2_AGENT "OFF" CACHE STRING "O-RAN E2 Agent")
set_property(CACHE E2_AGENT PROPERTY STRINGS "ON" "OFF")
if(E2_AGENT)
set(E2AP_DIR ${OPENAIR2_DIR}/E2AP)
add_subdirectory ("${E2AP_DIR}")
include_directories ("${E2AP_DIR}")
add_library(nr_e2_ran_func
${E2AP_DIR}/RAN_FUNCTION/NR/init_ran_func.c
${E2AP_DIR}/RAN_FUNCTION/NR/CUSTOMIZED/ran_func_gtp.c
${E2AP_DIR}/RAN_FUNCTION/NR/CUSTOMIZED/ran_func_mac.c
${E2AP_DIR}/RAN_FUNCTION/NR/CUSTOMIZED/ran_func_pdcp.c
${E2AP_DIR}/RAN_FUNCTION/NR/CUSTOMIZED/ran_func_rlc.c
${E2AP_DIR}/RAN_FUNCTION/NR/CUSTOMIZED/ran_func_slice.c
${E2AP_DIR}/RAN_FUNCTION/NR/CUSTOMIZED/ran_func_tc.c
${E2AP_DIR}/RAN_FUNCTION/NR/O-RAN/ran_func_kpm.c
${E2AP_DIR}/RAN_FUNCTION/NR/O-RAN/ran_func_rc.c
# For testing purposes
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_mac.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_rlc.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_pdcp.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_gtp.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_slice.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_tc.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_kpm.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_rc.c
${E2AP_DIR}/flexric/src/util/time_now_us.c
)
target_link_libraries(nr_e2_ran_func PRIVATE nr_rrc asn1_nr_rrc_hdrs lte_rrc asn1_lte_rrc_hdrs)
add_library(e2_ran_func
${E2AP_DIR}/RAN_FUNCTION/LTE/init_ran_func.c
${E2AP_DIR}/RAN_FUNCTION/LTE/CUSTOMIZED/ran_func_gtp.c
${E2AP_DIR}/RAN_FUNCTION/LTE/CUSTOMIZED/ran_func_mac.c
${E2AP_DIR}/RAN_FUNCTION/LTE/CUSTOMIZED/ran_func_pdcp.c
${E2AP_DIR}/RAN_FUNCTION/LTE/CUSTOMIZED/ran_func_rlc.c
${E2AP_DIR}/RAN_FUNCTION/LTE/CUSTOMIZED/ran_func_slice.c
${E2AP_DIR}/RAN_FUNCTION/LTE/CUSTOMIZED/ran_func_tc.c
${E2AP_DIR}/RAN_FUNCTION/LTE/O-RAN/ran_func_kpm.c
${E2AP_DIR}/RAN_FUNCTION/LTE/O-RAN/ran_func_rc.c
# For testing purposes
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_mac.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_rlc.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_pdcp.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_gtp.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_slice.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_tc.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_kpm.c
${E2AP_DIR}/flexric/test/rnd/fill_rnd_data_rc.c
${E2AP_DIR}/flexric/src/util/time_now_us.c
)
target_link_libraries(e2_ran_func PRIVATE nr_rrc asn1_nr_rrc_hdrs lte_rrc asn1_lte_rrc_hdrs)
endif()
##################################################
# ASN.1 grammar C code generation & dependencies #
##################################################
@@ -529,6 +449,7 @@ add_library(f1ap
${F1AP_DIR}/f1ap_cu_task.c
${F1AP_DIR}/f1ap_cu_ue_context_management.c
${F1AP_DIR}/f1ap_cu_warning_message_transmission.c
${F1AP_DIR}/f1ap_decoder.c
${F1AP_DIR}/f1ap_du_interface_management.c
${F1AP_DIR}/f1ap_du_paging.c
${F1AP_DIR}/f1ap_du_rrc_message_transfer.c
@@ -852,25 +773,34 @@ add_library(UTIL
${OPENAIR_DIR}/common/utils/time_stat.c
)
set(SECURITY_SRC
set(SECU_OSA_SRC
${OPENAIR2_DIR}/UTIL/OSA/osa_key_deriver.c
${OPENAIR2_DIR}/UTIL/OSA/osa_rijndael.c
${OPENAIR2_DIR}/UTIL/OSA/osa_snow3g.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eea.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
)
add_library(SECU_OSA ${SECU_OSA_SRC} $<TARGET_OBJECTS:ds> )
target_include_directories(SECU_OSA PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
set(SECU_CN_SRC
${OPENAIR3_DIR}/SECU/secu_defs.c
${OPENAIR3_DIR}/SECU/kdf.c
${OPENAIR3_DIR}/SECU/aes_128_ctr.c
${OPENAIR3_DIR}/SECU/aes_128_cbc_cmac.c
${OPENAIR3_DIR}/SECU/aes_128_ecb.c
${OPENAIR3_DIR}/SECU/sha_256_hmac.c
${OPENAIR3_DIR}/SECU/rijndael.c
${OPENAIR3_DIR}/SECU/snow3g.c
${OPENAIR3_DIR}/SECU/key_nas_deriver.c
${OPENAIR3_DIR}/SECU/nas_stream_eea0.c
${OPENAIR3_DIR}/SECU/nas_stream_eea1.c
${OPENAIR3_DIR}/SECU/nas_stream_eia1.c
${OPENAIR3_DIR}/SECU/nas_stream_eea2.c
${OPENAIR3_DIR}/SECU/nas_stream_eia2.c
)
add_library(SECURITY ${SECURITY_SRC} $<TARGET_OBJECTS:ds>)
target_include_directories(SECURITY PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
add_library(SECU_CN ${SECU_CN_SRC} $<TARGET_OBJECTS:ds>)
target_include_directories(SECU_CN PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
# Physical Channel Procedures Scheduling
################################"
@@ -1248,6 +1178,7 @@ 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_UE_ESTIMATION/filt16a_32.c
${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_measurements_gNB.c
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
@@ -1298,6 +1229,7 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold_ue.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/filt16a_32.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
@@ -1421,8 +1353,9 @@ set(NR_PDCP_SRC
#these files should not be here, will be removed at some point when the
#computation is done directly inside nr_pdcp_integrity_nia1.c instead
#of reusing code of osa_stream_eia.c
#${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
#${OPENAIR2_DIR}/UTIL/OSA/osa_snow3g.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
${OPENAIR2_DIR}/UTIL/OSA/osa_snow3g.c
${OPENAIR2_DIR}/UTIL/OSA/osa_rijndael.c
)
set(NR_SDAP_SRC
@@ -1626,11 +1559,6 @@ add_library(L2
)
target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap)
target_link_libraries(L2 PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
if(E2_AGENT)
target_link_libraries(L2 PUBLIC e2_agent e2_ran_func)
target_compile_definitions(L2 PRIVATE E2_AGENT)
endif()
add_library(MAC_NR ${MAC_NR_SRC})
target_link_libraries(MAC_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
@@ -1661,11 +1589,6 @@ add_library(e1_pdcp_if
target_link_libraries(e1_pdcp_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap)
if(E2_AGENT)
target_link_libraries(L2_NR PUBLIC e2_agent nr_e2_ran_func)
target_compile_definitions(L2_NR PRIVATE E2_AGENT)
endif()
add_library(L2_LTE_NR
${L2_RRC_SRC}
@@ -2074,7 +1997,7 @@ add_library(LIB_5GNAS_GNB
)
target_include_directories(LIB_5GNAS_GNB PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
target_link_libraries(LIB_5GNAS_GNB PRIVATE SECURITY ${CRYPTO_LIBRARIES})
target_link_libraries(LIB_5GNAS_GNB PRIVATE SECU_CN ${CRYPTO_LIBRARIES})
target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# Simulation library
@@ -2177,6 +2100,9 @@ add_custom_target (
DEPENDS ${OPENAIR_DIR}/common/utils/T/T_IDs.h
)
# Hack on a test of asn1c version (already dirty)
add_definitions(-DASN1_MINIMUM_VERSION=924)
#################################
# add executables for operation
#################################
@@ -2234,7 +2160,7 @@ add_dependencies(lte-softmodem oai_iqplayer)
target_link_libraries(lte-softmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECURITY UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI SIMU SIMU_ETH
-Wl,--end-group z dl)
@@ -2243,9 +2169,6 @@ target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYP
target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
if(E2_AGENT)
target_compile_definitions(lte-softmodem PRIVATE E2_AGENT)
endif()
add_executable(oairu
${OPENAIR_DIR}/executables/lte-ru.c
@@ -2299,7 +2222,7 @@ endif()
target_link_libraries(lte-uesoftmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
SECURITY UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
PHY_UE PHY_RU L2_UE L2_LTE SIMU SIMU_ETH NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI ${ATLAS_LIBRARIES}
-Wl,--end-group z dl)
@@ -2339,7 +2262,7 @@ add_executable(nr-softmodem
target_link_libraries(nr-softmodem PRIVATE
-Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECURITY
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECU_CN SECU_OSA
ITTI ${NAS_UE_LIB} lte_rrc nr_rrc
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU SIMU_ETH
x2ap f1ap m2ap m3ap e1ap
@@ -2358,10 +2281,6 @@ endif()
# force the generation of ASN.1 so that we don't need to wait during the build
target_link_libraries(nr-softmodem PRIVATE
asn1_lte_rrc asn1_nr_rrc asn1_s1ap asn1_ngap asn1_m2ap asn1_m3ap asn1_x2ap asn1_f1ap asn1_lpp)
if(E2_AGENT)
target_compile_definitions(nr-softmodem PRIVATE E2_AGENT)
endif()
add_executable(nr-cuup
executables/nr-cuup.c
@@ -2378,9 +2297,9 @@ add_executable(nr-cuup
target_link_libraries(nr-cuup PRIVATE
CONFIG_LIB ITTI SCTP_CLIENT
GTPV1U e1ap e1_pdcp_if f1ap SIMU_ETH
SECURITY ${OPENSSL_LIBRARIES} crypt z sctp dl pthread)
SECU_OSA SECU_CN ${OPENSSL_LIBRARIES} crypt z sctp dl pthread)
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
# nr-uesoftmodem is UE implementation
#######################################
@@ -2405,7 +2324,7 @@ add_executable(nr-uesoftmodem
target_link_libraries(nr-uesoftmodem PRIVATE
-Wl,--start-group
nr_rrc SECURITY UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB
nr_rrc SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB MISC_NFAPI_NR_LIB
ITTI ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU SIMU_ETH
@@ -2549,7 +2468,7 @@ add_executable(nr_dlsim
${SHLIB_LOADER_SOURCES}
)
target_link_libraries(nr_dlsim PRIVATE
-Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
-Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECU_CN ngap -lz -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
)
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2598,7 +2517,7 @@ if (ENABLE_LDPC_T1)
endif()
target_link_libraries(nr_ulsim PRIVATE
-Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
-Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECU_CN ngap -lz -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
)
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2637,7 +2556,7 @@ foreach(myExe s1ap
${OPENAIR3_DIR}/TEST/test_${myExe}.c
)
target_link_libraries (test_${myExe}
-Wl,--start-group SECURITY UTIL -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} CONFIG_LIB
-Wl,--start-group SECU_CN UTIL -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} CONFIG_LIB
)
endforeach(myExe)
@@ -2658,7 +2577,7 @@ if (${T_TRACER})
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap
params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer
oai_eth_transpro oai_mobipass coding HASHTABLE UTIL OMG_SUMO
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR ngap

View File

@@ -36,6 +36,7 @@ pipeline {
label nodeExecutor
}
options {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
ansiColor('xterm')
@@ -424,46 +425,28 @@ pipeline {
}
}
}
stage ("Interop-F1") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-Interop-F1', 'Interop-F1')
}
}
post {
always {
script {
finalizeSlaveJob('RAN-Interop-F1')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
stage ("Sanity-Check OAI-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerCN5GSlaveJob ('OAI-CN5G-COTS-UE-Test', 'OAI-CN5G-COTS-UE-Test')
}
}
post {
always {
script {
finalizeSlaveJob('OAI-CN5G-COTS-UE-Test')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
//avra is offline, re-enable once it is available
//stage ("T1-Offload-Test") {
// when { expression {do5Gtest} }
// steps {
// script {
// triggerSlaveJob ('RAN-T1-Offload-Test', 'T1-Offload-Test')
// }
// }
// post {
// always {
// script {
// finalizeSlaveJob('RAN-T1-Offload-Test')
// }
// }
// failure {
// script {
// currentBuild.result = 'FAILURE'
// }
// }
// }
//}
}
}
stage ("DockerHub-Push") {
@@ -558,36 +541,8 @@ def triggerSlaveJob (jobName, gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
}
}
}
def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
if ("MERGE".equals(env.gitlabActionType)) {
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" --abbrev=8 ' + env.gitlabMergeRequestLastCommit
shortenShaOne = shortenShaOne.trim()
fullRanTag = 'porcepix.sboai.cs.eurecom.fr/oai-gnb:' + env.gitlabSourceBranch + '-' + shortenShaOne
} else {
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" --abbrev=8 ' + env.GIT_COMMIT
shortenShaOne = shortenShaOne.trim()
fullRanTag = 'porcepix.sboai.cs.eurecom.fr/oai-gnb:develop-' + shortenShaOne
}
// Workaround for the "cancelled" GitLab pipeline notification
// The slave job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
localStatus = build job: jobName,
parameters: [
string(name: 'FULL_RAN_TAG', value: String.valueOf(fullRanTag))
], propagate: false
localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
echo "${jobName} Slave Job is KO"
sh "ci-scripts/fail.sh"
}
}
}
@@ -616,18 +571,15 @@ def triggerSlaveJobNoGitLab (jobName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
echo "${jobName} Slave Job is KO"
sh "ci-scripts/fail.sh"
}
}
def finalizeSlaveJob(jobName) {
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
if (jobName == 'OAI-CN5G-COTS-UE-Test') {
fileName = "test_results_oai_cn5g_cots_ue.html"
} else {
fileName = "test_results-${jobName}.html"
}
fileName = "test_results-${jobName}.html"
if (!fileExists(fileName)) {
copyArtifacts(projectName: jobName,
filter: 'test_results*.html',

View File

@@ -61,6 +61,7 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
timestamps()
ansiColor('xterm')
lock(extra: lockResources)

View File

@@ -55,6 +55,7 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
timestamps()
ansiColor('xterm')
lock(extra: lockResources)

View File

@@ -36,6 +36,7 @@ pipeline {
label nodeExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -61,6 +61,7 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -50,6 +50,7 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -52,6 +52,7 @@ def StatusForDb = ""
pipeline {
agent {label pythonExecutor}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -63,6 +63,7 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -63,6 +63,7 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -220,13 +220,21 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
EPC.SourceCodePath=matchReg.group(1)
elif re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE)
if re.match('OAI', matchReg.group(1), re.IGNORECASE) or re.match('ltebox', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-Docker', matchReg.group(1), re.IGNORECASE) or re.match('OC-OAI-CN5G', matchReg.group(1), re.IGNORECASE):
if re.match('OAI', matchReg.group(1), re.IGNORECASE) or re.match('ltebox', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-CUPS', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-Docker', matchReg.group(1), re.IGNORECASE) or re.match('OC-OAI-CN5G', matchReg.group(1), re.IGNORECASE):
EPC.Type=matchReg.group(1)
else:
sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-Docker or OC-OAI-CN5G)')
sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-CUPS or OAI-Rel14-Docker or OC-OAI-CN5G)')
elif re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE)
EPC.ContainerPrefix=matchReg.group(1)
elif re.match('^\-\-ADBIPAddress=(.+)$', myArgv, re.IGNORECASE):
print("ignoring --ADBIPAddress parameter")
elif re.match('^\-\-ADBUserName=(.+)$', myArgv, re.IGNORECASE):
print("ignoring --ADBUserName parameter")
elif re.match('^\-\-ADBType=(.+)$', myArgv, re.IGNORECASE):
print("ignoring --ADBType parameter")
elif re.match('^\-\-ADBPassword=(.+)$', myArgv, re.IGNORECASE):
print("ignoring --ADBPassword parameter")
elif re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.testXMLfiles.append(matchReg.group(1))

View File

@@ -1,280 +0,0 @@
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 2
#define TDD 1
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and
allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
cells: [{
rf_port: 0,
bandwidth: 20,
band: 78,
dl_nr_arfcn:627360,
ssb_nr_arfcn:627360,
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: 1,
rx_to_tx_latency:2,
}],
}],
/* UE capabilities */
/* USIM data */
ue_list: [
{
"ue_id" : 1,
"imsi": "208970000000111",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 2,
"imsi": "208970000000112",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 3,
"imsi": "208970000000113",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 4,
"imsi": "208970000000114",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 5,
"imsi": "208970000000115",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 6,
"imsi": "208970000000116",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 7,
"imsi": "208970000000117",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 8,
"imsi": "208970000000118",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 9,
"imsi": "208970000000119",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 10,
"imsi": "208970000000120",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 11,
"imsi": "208970000000121",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 12,
"imsi": "208970000000122",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 13,
"imsi": "208970000000123",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 14,
"imsi": "208970000000124",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 15,
"imsi": "208970000000125",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 16,
"imsi": "208970000000126",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
],
}

View File

@@ -49,7 +49,7 @@ adb_ue_2:
amarisoft_ue:
Host: amariue
InitScript: /root/NV18-06-2022/lteue-linux-2023-03-17/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-20897-2x2.cfg &
InitScript: /root/NV18-06-2022/lteue-linux-2023-03-17/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-asue.cfg &
TermScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"quit"}'
amarisoft_ue_1:
Host: amariue

View File

@@ -42,8 +42,7 @@ IMAGE_REGISTRY_SERVICE_NAME = "image-registry.openshift-image-registry.svc"
NAMESPACE = "oaicicd-ran"
OCUrl = "https://api.oai.cs.eurecom.fr:6443"
OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/"
CI_OC_RAN_NAMESPACE = "oaicicd-ran"
CI_OC_CORE_NAMESPACE = "oaicicd-core-for-ci-ran"
def OC_login(cmd, ocUserName, ocPassword, ocProjectName):
if ocUserName == '' or ocPassword == '' or ocProjectName == '':
@@ -199,22 +198,23 @@ class Cluster:
HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.imageToPull)
sys.exit('Insufficient eNB Parameters')
lIpAddr = self.eNBIPAddress
self.testCase_id = HTML.testCase_id
cmd = cls_cmd.getConnection(self.eNBIPAddress)
succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
cmd = cls_cmd.getConnection(lIpAddr)
succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, self.OCProjectName)
if not succeeded:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False
ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}')
if ret.returncode != 0:
logging.error(f'\u001B[1m Unable to access OC project {CI_OC_RAN_NAMESPACE}\u001B[0m')
logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m')
OC_logout(cmd)
cmd.close()
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False
for image in self.imageToPull:
imagePrefix = f'{self.OCRegistry}{CI_OC_RAN_NAMESPACE}'
imagePrefix = f'{self.OCRegistry}{self.OCProjectName}'
imageTag = cls_containerize.ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
ret = cmd.run(f'docker pull {imagePrefix}/{imageTag}')
if ret.returncode != 0:
@@ -376,13 +376,6 @@ class Cluster:
self.cmd.run(f'oc logs {gnb_job} &> cmake_targets/log/oai-gnb.log')
self.cmd.run(f'oc logs {gnb_aw2s_job} &> cmake_targets/log/oai-gnb-aw2s.log')
self._recreate_is_tag('oai-nr-cuup', imageTag, 'openshift/oai-nr-cuup-is.yaml')
self._recreate_bc('oai-nr-cuup', imageTag, 'openshift/oai-nr-cuup-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.nr-cuup.rhel8.2')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.nr-cuup.rhel8.2')
nr_cuup_job = self._start_build('oai-nr-cuup')
attemptedImages += ['oai-nr-cuup']
self._recreate_is_tag('oai-lte-ue', imageTag, 'openshift/oai-lte-ue-is.yaml')
self._recreate_bc('oai-lte-ue', imageTag, 'openshift/oai-lte-ue-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.lteUE.rhel8.2')
@@ -397,11 +390,10 @@ class Cluster:
nrue_job = self._start_build('oai-nr-ue')
attemptedImages += ['oai-nr-ue']
wait = nr_cuup_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end([nr_cuup_job, lteue_job, nrue_job], 600)
if not wait: logging.error('error during build of nr-cuup/lteUE/nrUE')
wait = lteue_job is not None and nrue_job is not None and self._wait_build_end([lteue_job, nrue_job], 600)
if not wait: logging.error('error during build of lteUE/nrUE')
status = status and wait
# recover logs
self.cmd.run(f'oc logs {nr_cuup_job} &> cmake_targets/log/oai-nr-cuup.log')
self.cmd.run(f'oc logs {lteue_job} &> cmake_targets/log/oai-lte-ue.log')
self.cmd.run(f'oc logs {nrue_job} &> cmake_targets/log/oai-nr-ue.log')
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)

View File

@@ -31,9 +31,6 @@ import subprocess as sp
import os
import paramiko
import uuid
import sys
SSHTIMEOUT=7
# helper that returns either LocalCmd or RemoteCmd based on passed host name
def getConnection(host, d=None):
@@ -126,21 +123,13 @@ class LocalCmd(Cmd):
class RemoteCmd(Cmd):
def __init__(self, hostname, d=None):
cIdx = 0
logging.getLogger('paramiko').setLevel(logging.ERROR) # prevent spamming through Paramiko
self.client = paramiko.SSHClient()
self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
cfg = RemoteCmd._lookup_ssh_config(hostname)
self.client.connect(**cfg)
self.cwd = d
self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
while cIdx < 3:
try:
self.client.connect(**cfg)
return
except:
logging.error(f'Could not connect to {hostname}, tried for {cIdx} time')
cIdx +=1
raise Exception ("Error: max retries, did not connect to host")
def _lookup_ssh_config(hostname):
ssh_config = paramiko.SSHConfig()
@@ -153,7 +142,7 @@ class RemoteCmd(Cmd):
ucfg = ssh_config.lookup(hostname)
if 'identityfile' not in ucfg or 'user' not in ucfg:
raise KeyError(f'no identityfile or user in SSH config for host {hostname}')
cfg = {'hostname':hostname, 'username':ucfg['user'], 'key_filename':ucfg['identityfile'], 'timeout':SSHTIMEOUT}
cfg = {'hostname':hostname, 'username':ucfg['user'], 'key_filename':ucfg['identityfile']}
if 'hostname' in ucfg:
cfg['hostname'] = ucfg['hostname'] # override user-given hostname with what is in config
if 'port' in ucfg:

View File

@@ -800,7 +800,7 @@ class Containerize():
logging.debug('Removing test images locally')
myCmd = cls_cmd.LocalCmd()
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup', 'oai-gnb-aw2s']
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
for image in imageNames:
imageTag = ImageTagToUse(image, self.ranCommitID, self.ranBranch, self.ranAllowMerge)
cmd = f'docker rmi oai-ci/{imageTag}'
@@ -879,8 +879,8 @@ class Containerize():
cnt += 1
mySSH.command('docker inspect --format="ImageUsed: {{.Config.Image}}" ' + containerName, '\$', 5)
for stdoutLine in mySSH.getBefore().split('\n'):
if stdoutLine.count('ImageUsed: oai-ci'):
usedImage = stdoutLine.replace('ImageUsed: oai-ci', 'oai-ci').strip()
if stdoutLine.count('ImageUsed: porcepix'):
usedImage = stdoutLine.replace('ImageUsed: porcepix', 'porcepix').strip()
logging.debug('Used image is ' + usedImage)
if usedImage != '':
mySSH.command('docker image inspect --format "* Size = {{.Size}} bytes\n* Creation = {{.Created}}\n* Id = {{.Id}}" ' + usedImage, '\$', 5, silent=True)

View File

@@ -81,7 +81,7 @@ class Module_UE:
c = cls_cmd.RemoteCmd(self.host)
response = c.run(cmd, silent=silent)
c.close()
return response
return response.stdout
#-----------------$
#PUBLIC Methods$
@@ -95,11 +95,7 @@ class Module_UE:
if self.cmd_dict["detach"]:
self._command(self.cmd_dict["detach"], silent=True)
self._command(self.cmd_dict["terminate"], silent=True)
ret = self._command(self.cmd_dict["initialize"])
logging.info(f'For command: {ret.args} | return output: {ret.stdout} | Code: {ret.returncode}')
# Here each UE returns differently for the successful initialization, requires check based on UE
return ret.returncode == 0
self._command(self.cmd_dict["initialize"])
def terminate(self):
self._command(self.cmd_dict["terminate"])
@@ -126,9 +122,9 @@ class Module_UE:
self._command(self.cmd_dict["detach"])
time.sleep(5)
if ip:
logging.debug(f'\u001B[1mUE IP Address for UE {self.module_name} is {ip}\u001B[0m')
logging.debug(f'\u001B[1mUE IP Address is {ip}\u001B[0m')
else:
logging.debug(f'\u001B[1;37;41mUE IP Address for UE {self.module_name} Not Found!\u001B[0m')
logging.debug('\u001B[1;37;41mUE IP Address Not Found!\u001B[0m')
return ip
def detach(self):
@@ -137,7 +133,7 @@ class Module_UE:
def check(self):
cmd = self.cmd_dict["check"]
if cmd:
return self._command(cmd).stdout
return self._command(cmd)
else:
logging.warning(f"requested status check of UE {self.getName()}, but operation is not supported")
return f"UE {self.getName()} does not support status checking"
@@ -164,7 +160,7 @@ class Module_UE:
def getIP(self):
output = self._command(self.cmd_dict["getNetwork"], silent=True)
result = re.search('inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
result = re.search('inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output)
if result and result.group('ip'):
ip = result.group('ip')
return ip
@@ -172,12 +168,12 @@ class Module_UE:
def checkMTU(self):
output = self._command(self.cmd_dict["getNetwork"], silent=True)
result = re.search('mtu (?P<mtu>[0-9]+)', output.stdout)
result = re.search('mtu (?P<mtu>[0-9]+)', output)
if result and result.group('mtu') and int(result.group('mtu')) == self.MTU:
logging.debug(f'\u001B[1mUE Module {self.module_name} NIC MTU is {self.MTU} as expected\u001B[0m')
logging.debug('\u001B[1mUE Module NIC MTU is ' + str(self.MTU) + ' as expected\u001B[0m')
return True
else:
logging.debug(f'\u001B[1;37;41m UE module {self.module_name} has incorrect Module NIC MTU or MTU not found! Expected: {self.MTU} \u001B[0m')
logging.debug('\u001B[1;37;41m Incorrect Module NIC MTU or MTU not found! Expected: ' + str(self.MTU) + '\u001B[0m')
return False
def getName(self):

View File

@@ -49,7 +49,6 @@ import concurrent.futures
#import our libs
import helpreadme as HELP
import constants as CONST
import cls_cluster as OC
import sshconnection
import cls_module_ue
@@ -59,6 +58,79 @@ logging.getLogger("matplotlib").setLevel(logging.WARNING)
import matplotlib.pyplot as plt
import numpy as np
#-----------------------------------------------------------
# Utility functions
#-----------------------------------------------------------
def GetPingTimeAnalysis(RAN,ping_log_file,ping_rttavg_threshold):
#ping time values read from file
t_ping=[]
#ping stats (dictionary) to be returned by the function
ping_stat={}
if (os.path.isfile(ping_log_file)):
with open(ping_log_file,"r") as f:
for line in f:
#looking for time=xxx ms field
result=re.match('^.+time=(?P<ping_time>[0-9\.]+)',line)
if result != None:
t_ping.append(float(result.group('ping_time')))
#initial stats
ping_stat['min_0']=min(t_ping)
ping_stat['mean_0']=stat.mean(t_ping)
ping_stat['median_0']=stat.median(t_ping)
ping_stat['max_0']=max(t_ping)
#get index of max value
max_loc=t_ping.index(max(t_ping))
ping_stat['max_loc']=max_loc
#remove it
t_ping_post=t_ping.copy()
t_ping_post.pop(max_loc)
#new stats after removing max value
ping_stat['min_1']=min(t_ping_post)
ping_stat['mean_1']=stat.mean(t_ping_post)
ping_stat['median_1']=stat.median(t_ping_post)
ping_stat['max_1']=max(t_ping_post)
#plot ping over time and save png for artifacts
ticks = np.arange(0, len(t_ping), 1)
figure, axis = plt.subplots(figsize=(10, 10))
axis.plot(ticks,t_ping,marker='o')
axis.set_xlabel('Ping Events')
axis.set_ylabel("Ping RTT (in ms)")
axis.set_title(ping_log_file)
axis.set_xticks(ticks)
axis.set_xticklabels([])
YMAX=20 #base scale
if max(t_ping) > YMAX:
y_max=max(t_ping)+1
else:
y_max=YMAX+1
plt.ylim(0,y_max)
if ping_rttavg_threshold != '':
th_label="AVG Ping Fail Threshold="+ping_rttavg_threshold
plt.axhline(y=float(ping_rttavg_threshold), color='r', linestyle='-',label=th_label)
axis.legend()
plt.savefig(ping_log_file+'.png')
#copy the png file already to enb to move it move it later into the artifacts
try:
mySSH = sshconnection.SSHConnection()
mySSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, ping_log_file+'.png', RAN.eNBSourceCodePath + '/cmake_targets/')
mySSH.copyout(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, ping_log_file, RAN.eNBSourceCodePath + '/cmake_targets/')
except:
logging.debug('\u001B[1;37;41m Ping PNG SCP to eNB FAILED\u001B[0m')
return ping_stat
else:
logging.error("GetPingTimeAnalysis : Ping log file does not exist")
return -1
#-----------------------------------------------------------
# OaiCiTest Class Definition
#-----------------------------------------------------------
@@ -223,15 +295,13 @@ class OaiCiTest():
def InitializeUE(self, HTML):
ues = [cls_module_ue.Module_UE(n.strip()) for n in self.ue_ids]
messages = []
with concurrent.futures.ThreadPoolExecutor() as executor:
futures = [executor.submit(ue.initialize) for ue in ues]
for f, ue in zip(futures, ues):
uename = f'UE {ue.getName()}'
messages.append(f'{uename}: initialized' if f.result() else f'{uename}: ERROR during Initialization')
[f.result() for f in futures]
messages = [f'UE {ue.getName()}: initialized' for ue in ues]
HTML.CreateHtmlTestRowQueue('N/A', 'OK', messages)
def InitializeOAIUE(self,HTML,RAN,EPC,CONTAINERS):
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
HELP.GenericHelp(CONST.Version)
@@ -503,112 +573,298 @@ class OaiCiTest():
statusQueue.put(message)
lock.release()
def Ping_common(self, EPC, ue, RAN):
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
ping_status = 0
ueIP = ue.getIP()
if not ueIP:
return (False, f"UE {ue.getName()} has no IP address")
ping_log_file = f'ping_{self.testCase_id}_{ue.getName()}.log'
ping_time = re.findall("-c *(\d+)",str(self.ping_args))
#target address is different depending on EPC type
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
Target = EPC.MmeIPAddress
elif re.match('OAICN5G', EPC.Type, re.IGNORECASE):
Target = EPC.MmeIPAddress
elif re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE):
Target = "172.21.6.100"
def Ping_common(self, lock, statusQueue,EPC, ue, RAN):
try:
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
# But for OAI-Rel14-CUPS, we launch from python executor
ping_status = 0
launchFromEpc = False
ping_log_file = f'ping_{self.testCase_id}_{ue.getName()}.log'
if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
launchFromEpc = False
ping_time = re.findall("-c *(\d+)",str(self.ping_args))
if launchFromEpc:
SSH = sshconnection.SSHConnection()
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('cd ' + EPC.SourceCodePath, '\$', 5)
SSH.command('cd scripts', '\$', 5)
# In case of a docker-based deployment, we need to ping from the trf-gen container
launchFromTrfContainer = False
if (re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE)) or (re.match('OAICN5G', EPC.Type, re.IGNORECASE)):
launchFromTrfContainer = True
if launchFromTrfContainer:
ping_status = SSH.command(f'docker exec -it prod-trf-gen /bin/bash -c "ping {self.ping_args} {ue.getIP()}" 2>&1 | tee {ping_log_file}', '\$', int(ping_time[0])*1.5)
else:
ping_status = SSH.command(f'stdbuf -o0 ping {self.ping_args} {ue.getIP()} 2>&1 | stdbuf -o0 tee {ping_log_file}', '\$', int(ping_time[0])*1.5)
#copy the ping log file to have it locally for analysis (ping stats)
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/scripts/{ping_log_file}', '.')
SSH.close()
else:
#target address is different depending on EPC type
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
Target = EPC.MmeIPAddress
elif re.match('OAICN5G', EPC.Type, re.IGNORECASE):
Target = EPC.MmeIPAddress
elif re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE):
Target = "172.21.6.100"
else:
Target = EPC.IPAddress
#ping from module NIC rather than IP address to make sure round trip is over the air
interface = f'-I {ue.getIFName()}' if ue.getIFName() else ''
ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} {Target} &> /tmp/{ping_log_file}'
cmd = cls_cmd.getConnection(ue.getHost())
response = cmd.run(ping_cmd, timeout=int(ping_time[0])*1.5)
if response.returncode != 0:
ping_status = -1
else:
#copy the ping log file to have it locally for analysis (ping stats)
cmd.copyin(src=f'/tmp/{ping_log_file}', tgt=ping_log_file)
cmd.close()
# TIMEOUT CASE
if ping_status < 0:
message = 'Ping with UE (' + str(ue.getIP()) + ') crashed due to TIMEOUT!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.ping_iperf_wrong_exit(lock, ue.getIP(), ue.getName(), statusQueue, message)
return
#search is done on cat result
with open(ping_log_file, 'r') as f:
ping_output = "".join(f.readlines())
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', ping_output)
if result is None:
message = 'Packet Loss Not Found!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.ping_iperf_wrong_exit(lock, ue.getIP(), ue.getName(), statusQueue, message)
return
packetloss = result.group('packetloss')
if float(packetloss) == 100:
message = 'Packet Loss is 100%'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.ping_iperf_wrong_exit(lock, ue.getIP(), ue.getName(), statusQueue, message)
return
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', ping_output)
if result is None:
message = 'Ping RTT_Min RTT_Avg RTT_Max Not Found!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.ping_iperf_wrong_exit(lock, ue.getIP(), ue.getName(), statusQueue, message)
return
rtt_min = result.group('rtt_min')
rtt_avg = result.group('rtt_avg')
rtt_max = result.group('rtt_max')
pal_msg = 'Packet Loss : ' + packetloss + '%'
min_msg = 'RTT(Min) : ' + rtt_min + ' ms'
avg_msg = 'RTT(Avg) : ' + rtt_avg + ' ms'
max_msg = 'RTT(Max) : ' + rtt_max + ' ms'
lock.acquire()
logging.debug('\u001B[1;37;44m ping result (' + ue.getIP() + ') \u001B[0m')
logging.debug('\u001B[1;34m ' + pal_msg + '\u001B[0m')
logging.debug('\u001B[1;34m ' + min_msg + '\u001B[0m')
logging.debug('\u001B[1;34m ' + avg_msg + '\u001B[0m')
logging.debug('\u001B[1;34m ' + max_msg + '\u001B[0m')
#adding extra ping stats from local file
#ping_log_file variable is defined above in this function, depending on device/ue
ping_stat_msg=''
logging.debug('Analyzing Ping log file : ' + os.getcwd() + '/' + ping_log_file)
ping_stat=GetPingTimeAnalysis(RAN,ping_log_file,self.ping_rttavg_threshold)
if (ping_stat!=-1) and (len(ping_stat)!=0):
ping_stat_msg+='Ping stats before removing largest value : \n'
ping_stat_msg+='RTT(Min) : ' + str("{:.2f}".format(ping_stat['min_0'])) + 'ms \n'
ping_stat_msg+='RTT(Mean) : ' + str("{:.2f}".format(ping_stat['mean_0'])) + 'ms \n'
ping_stat_msg+='RTT(Median) : ' + str("{:.2f}".format(ping_stat['median_0'])) + 'ms \n'
ping_stat_msg+='RTT(Max) : ' + str("{:.2f}".format(ping_stat['max_0'])) + 'ms \n'
ping_stat_msg+='Max Index : ' + str(ping_stat['max_loc']) + '\n'
ping_stat_msg+='Ping stats after removing largest value : \n'
ping_stat_msg+='RTT(Min) : ' + str("{:.2f}".format(ping_stat['min_1'])) + 'ms \n'
ping_stat_msg+='RTT(Mean) : ' + str("{:.2f}".format(ping_stat['mean_1'])) + 'ms \n'
ping_stat_msg+='RTT(Median) : ' + str("{:.2f}".format(ping_stat['median_1'])) + 'ms \n'
ping_stat_msg+='RTT(Max) : ' + str("{:.2f}".format(ping_stat['max_1'])) + 'ms \n'
#building html message
qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg + '\n' + ping_stat_msg
#checking packet loss compliance
packetLossOK = True
if (packetloss is not None) :
if float(packetloss) > float(self.ping_packetloss_threshold):
qMsg += '\nPacket Loss too high'
logging.debug('\u001B[1;37;41m Packet Loss too high; Target: '+ self.ping_packetloss_threshold + '%\u001B[0m')
packetLossOK = False
elif float(packetloss) > 0:
qMsg += '\nPacket Loss is not 0%'
logging.debug('\u001B[1;30;43m Packet Loss is not 0% \u001B[0m')
#checking RTT avg compliance
rttavgOK = True
if self.ping_rttavg_threshold != '':
if float(rtt_avg)>float(self.ping_rttavg_threshold):
ping_rttavg_error_msg = 'RTT(Avg) too high: ' + rtt_avg + ' ms; Target: '+ self.ping_rttavg_threshold+ ' ms'
qMsg += '\n'+ping_rttavg_error_msg
logging.debug('\u001B[1;37;41m'+ ping_rttavg_error_msg +' \u001B[0m')
rttavgOK = False
if packetLossOK and rttavgOK:
statusQueue.put(0)
else:
statusQueue.put(-1)
statusQueue.put(ue.getName())
statusQueue.put(ue.getIP())
statusQueue.put(qMsg)
lock.release()
except:
logging.debug('exit from Ping_Common except')
os.kill(os.getppid(),signal.SIGUSR1)
def PingNoS1_wrong_exit(self, qMsg,HTML):
message = 'OAI UE ping result\n{qMsg}'
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', [message])
def PingNoS1(self,HTML,RAN,EPC,CONTAINERS):
SSH=sshconnection.SSHConnection()
check_eNB = True
check_OAI_UE = True
ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args))
if ping_from_eNB is not None:
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
else:
Target = EPC.IPAddress
#ping from module NIC rather than IP address to make sure round trip is over the air
interface = f'-I {ue.getIFName()}' if ue.getIFName() else ''
ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} {Target} &> /tmp/{ping_log_file}'
cmd = cls_cmd.getConnection(ue.getHost())
response = cmd.run(ping_cmd, timeout=int(ping_time[0])*1.5)
if response.returncode != 0:
ping_status = -1
else:
#copy the ping log file to have it locally for analysis (ping stats)
cmd.copyin(src=f'/tmp/{ping_log_file}', tgt=ping_log_file)
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
try:
if ping_from_eNB is not None:
SSH.open(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword)
SSH.command('cd ' + RAN.eNBSourceCodePath + '/cmake_targets/', '\$', 5)
else:
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
SSH.command('cd ' + self.UESourceCodePath + '/cmake_targets/', '\$', 5)
ping_time = re.findall("-c (\d+)",str(self.ping_args))
ping_status = SSH.command('stdbuf -o0 ping ' + self.ping_args + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '.log', '\$', int(ping_time[0])*1.5)
# TIMEOUT CASE
if ping_status < 0:
message = 'Ping with OAI UE crashed due to TIMEOUT!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.PingNoS1_wrong_exit(message,HTML)
return
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', SSH.getBefore())
if result is None:
message = 'Packet Loss Not Found!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.PingNoS1_wrong_exit(message,HTML)
return
packetloss = result.group('packetloss')
if float(packetloss) == 100:
message = 'Packet Loss is 100%'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.PingNoS1_wrong_exit(message,HTML)
return
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', SSH.getBefore())
if result is None:
message = 'Ping RTT_Min RTT_Avg RTT_Max Not Found!'
logging.debug('\u001B[1;37;41m ' + message + ' \u001B[0m')
self.PingNoS1_wrong_exit(message,HTML)
return
rtt_min = result.group('rtt_min')
rtt_avg = result.group('rtt_avg')
rtt_max = result.group('rtt_max')
pal_msg = 'Packet Loss : ' + packetloss + '%'
min_msg = 'RTT(Min) : ' + rtt_min + ' ms'
avg_msg = 'RTT(Avg) : ' + rtt_avg + ' ms'
max_msg = 'RTT(Max) : ' + rtt_max + ' ms'
logging.debug('\u001B[1;37;44m OAI UE ping result \u001B[0m')
logging.debug('\u001B[1;34m ' + pal_msg + '\u001B[0m')
logging.debug('\u001B[1;34m ' + min_msg + '\u001B[0m')
logging.debug('\u001B[1;34m ' + avg_msg + '\u001B[0m')
logging.debug('\u001B[1;34m ' + max_msg + '\u001B[0m')
qMsg = pal_msg + '\n' + min_msg + '\n' + avg_msg + '\n' + max_msg
packetLossOK = True
if packetloss is not None:
if float(packetloss) > float(self.ping_packetloss_threshold):
qMsg += '\nPacket Loss too high'
logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m')
packetLossOK = False
elif float(packetloss) > 0:
qMsg += '\nPacket Loss is not 0%'
logging.debug('\u001B[1;30;43m Packet Loss is not 0% \u001B[0m')
SSH.close()
message = f'OAI UE ping result\n{qMsg}'
if packetLossOK:
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', [message])
else:
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', [message])
cmd.close()
# TIMEOUT CASE
ue_header = f'UE {ue.getName()} ({ueIP})'
if ping_status < 0:
message = ue_header + ': ping crashed: TIMEOUT?'
logging.error('\u001B[1;37;41m ' + message + ' \u001B[0m')
return (False, message)
#search is done on cat result
logging.debug('Analyzing Ping log file : ' + os.getcwd() + '/' + ping_log_file)
with open(ping_log_file, 'r') as f:
ping_output = "".join(f.readlines())
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', ping_output)
if result is None:
message = ue_header + ': Packet Loss Not Found!'
logging.error('\u001B[1;37;41m ' + message + ' \u001B[0m')
return (False, message)
packetloss = result.group('packetloss')
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', ping_output)
if result is None:
message = ue_header + ': Ping RTT_Min RTT_Avg RTT_Max Not Found!'
logging.error('\u001B[1;37;41m ' + message + ' \u001B[0m')
return (False, message)
rtt_min = result.group('rtt_min')
rtt_avg = result.group('rtt_avg')
rtt_max = result.group('rtt_max')
pal_msg = f'Packet Loss: {packetloss}%'
min_msg = f'RTT(Min) : {rtt_min} ms'
avg_msg = f'RTT(Avg) : {rtt_avg} ms'
max_msg = f'RTT(Max) : {rtt_max} ms'
logging.info(f'\u001B[1;37;44m ping result for {ue_header} \u001B[0m')
logging.info(f'\u001B[1;34m ' + pal_msg + '\u001B[0m')
logging.info(f'\u001B[1;34m ' + min_msg + '\u001B[0m')
logging.info(f'\u001B[1;34m ' + avg_msg + '\u001B[0m')
logging.info(f'\u001B[1;34m ' + max_msg + '\u001B[0m')
message = f'{ue_header}\n{pal_msg}\n{min_msg}\n{avg_msg}\n{max_msg}'
#checking packet loss compliance
if float(packetloss) > float(self.ping_packetloss_threshold):
message += '\nPacket Loss too high'
logging.error(f'\u001B[1;37;41m Packet Loss too high; Target: {self.ping_packetloss_threshold}%\u001B[0m')
return (False, message)
elif float(packetloss) > 0:
message += '\nPacket Loss is not 0%'
logging.info('\u001B[1;30;43m Packet Loss is not 0% \u001B[0m')
if self.ping_rttavg_threshold != '':
if float(rtt_avg) > float(self.ping_rttavg_threshold):
ping_rttavg_error_msg = f'RTT(Avg) too high: {rtt_avg} ms; Target: {self.ping_rttavg_threshold} ms'
message += '\n' + ping_rttavg_error_msg
logging.error('\u001B[1;37;41m'+ ping_rttavg_error_msg +' \u001B[0m')
return (False, message)
return (True, message)
# copying on the EPC server for logCollection
if ping_from_eNB is not None:
copyin_res = SSH.copyin(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, RAN.eNBSourceCodePath + '/cmake_targets/ping_' + self.testCase_id + '.log', '.')
else:
copyin_res = SSH.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/ping_' + self.testCase_id + '.log', '.')
if (copyin_res == 0):
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'ping_' + self.testCase_id + '.log', EPC.SourceCodePath + '/scripts')
except:
os.kill(os.getppid(),signal.SIGUSR1)
def Ping(self,HTML,RAN,EPC,CONTAINERS):
result = re.search('noS1', str(RAN.Initialize_eNB_args))
if result is not None:
self.PingNoS1(HTML,RAN,EPC,CONTAINERS)
return
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
check_eNB = True
if (len(self.UEDevices) == 1) and (self.UEDevices[0] == 'OAI-UE'):
check_OAI_UE = True
else:
check_OAI_UE = False
if self.ue_ids == []:
raise Exception("no module names in self.ue_ids provided")
ues = [cls_module_ue.Module_UE(n.strip()) for n in self.ue_ids]
ues = []
for ue_id in self.ue_ids:
ue = cls_module_ue.Module_UE(ue_id)
if not ue.getIP():
logging.error("no IP addresses returned")
HTML.CreateHtmlTestRow(self.ping_args, 'KO', len(self.UEDevices), html_queue)
self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS)
ues.append(ue)
logging.debug(ues)
with concurrent.futures.ThreadPoolExecutor() as executor:
futures = [executor.submit(self.Ping_common, EPC, ue, RAN) for ue in ues]
results = [f.result() for f in futures]
# each result in results is a tuple, first member goes to successes, second to messages
successes, messages = map(list, zip(*results))
if len(successes) == len(ues) and all(successes):
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', messages)
else:
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', messages)
multi_jobs = []
i = 0
lock = Lock()
status_queue = SimpleQueue()
for ue in ues:
p = Process(target = self.Ping_common, args = (lock,status_queue,EPC,ue,RAN,))
p.daemon = True
p.start()
multi_jobs.append(p)
i = i + 1
for job in multi_jobs:
job.join()
if (status_queue.empty()):
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.ALL_PROCESSES_OK)
self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS)
else:
ping_status = True
messages = []
while (not status_queue.empty()):
count = status_queue.get()
if (count < 0):
ping_status = False
device_id = status_queue.get()
ip_addr = status_queue.get()
message = status_queue.get()
messages.append(f'UE ({device_id})\nIP Address : {ip_addr}\n{message}')
if (ping_status):
HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', messages)
else:
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', messages)
self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS)
def Iperf_ComputeTime(self):
result = re.search('-t (?P<iperf_time>\d+)', str(self.iperf_args))
@@ -974,9 +1230,7 @@ class OaiCiTest():
cn_target_ip = result.group('trf_ip_addr')
SSH.close()
cn_iperf_prefix = "docker exec prod-trf-gen" # -w /iperf-2.0.13 necessary?
elif (re.match('OC-OAI-CN5G', EPC.Type, re.IGNORECASE)):
cn_target_ip = "172.21.6.102"
else: # lteboix, sabox
else: # ltebox, sabox
cn_target_ip = "192.172.0.1"
cn_iperf_prefix = ""
@@ -1019,7 +1273,7 @@ class OaiCiTest():
logging.debug("Iperf in UL requested")
cmd = cls_cmd.getConnection(EPC.IPAddress)
cmd.run(f'rm {EPC.SourceCodePath}/{server_filename}')
cmd.run(f'{cn_iperf_prefix} iperf -s {udpSwitch} -t {iperf_time * 1.5} {port} &> {EPC.SourceCodePath}/{server_filename} &')
cmd.run(f'{cn_iperf_prefix} iperf -s {udpSwitch} -1 -t {iperf_time * 1.5} {port} &> {EPC.SourceCodePath}/{server_filename} &')
cmd.close()
cmd = cls_cmd.getConnection(ue.getHost())
@@ -1058,20 +1312,6 @@ class OaiCiTest():
self.Iperf_analyzeV2BIDIR(lock, ue.getHost(), ue.getName(), statusQueue, server_filename, client_filename)
elif self.iperf_direction == "IPERF3":
cmd = cls_cmd.getConnection(ue.getHost())
cmd.run(f'rm /tmp/{server_filename}', reportNonZero=False)
port = f'{5002+idx}'
cmd.run(f'{ue.getCmdPrefix()} iperf3 -c {cn_target_ip} -p {port} {iperf_opt} --get-server-output &> /tmp/{server_filename}', timeout=iperf_time*1.5)
cmd.copyin(f'/tmp/{server_filename}', server_filename)
cmd.close()
if udpIperf:
self.Iperf_analyzeV2Server(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, server_filename, 1)
else:
cmd = cls_cmd.getConnection(EPC.IPAddress)
self.Iperf_analyzeV2TCPOutput(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, EPC, cmd, f'/tmp/{server_filename}')
cmd.close()
else :
raise Exception("Incorrect or missing IPERF direction in XML")
@@ -1211,6 +1451,7 @@ class OaiCiTest():
#result = re.search('iperf version 2.0.10', str(iperfStdout.strip()))
#if result is not None:
# dummyIperfVersion = '2.0.10'
multi_jobs = []
ue_num = len(ues)
i = 0

View File

@@ -16,7 +16,7 @@ gNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 0x1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ({ sst =0x1; }) });
plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst =0x1; }) });
nr_cellid = 12345678L
@@ -200,7 +200,7 @@ MACRLCs = (
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 10;
ul_max_mcs = 28;
ul_max_mcs = 15;
}
);
@@ -257,23 +257,6 @@ THREAD_STRUCT = (
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea2", "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "yes";
};
log_config :
{
global_log_level ="info";

View File

@@ -75,6 +75,7 @@ class EPCManagement():
self.OCRegistry = "default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/"
self.OCUserName = ''
self.OCPassword = ''
self.OCProjectName = ''
self.imageToPull = ''
self.eNBSourceCodePath = ''
@@ -239,9 +240,9 @@ class EPCManagement():
HTML.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
def Initialize5GCN(self, HTML):
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.Type == '':
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
HELP.GenericHelp(CONST.Version)
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.Type)
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
sys.exit('Insufficient EPC Parameters')
mySSH = cls_cmd.getConnection(self.IPAddress)
html_cell = ''
@@ -298,8 +299,8 @@ class EPCManagement():
imageNames = ["oai-nrf", "oai-amf", "oai-smf", "oai-spgwu-tiny", "oai-ausf", "oai-udm", "oai-udr", "mysql","oai-traffic-server"]
logging.debug('Deploying OAI CN5G on Openshift Cluster')
lIpAddr = self.IPAddress
lSourcePath = "/opt/oai-cn5g-fed-develop-2023-04-28-20897"
succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, OC.CI_OC_CORE_NAMESPACE)
lSourcePath = self.SourceCodePath
succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, self.OCProjectName)
if not succeeded:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
@@ -598,7 +599,7 @@ class EPCManagement():
mySSH.run(f'rm -Rf {lSourcePath}/logs')
mySSH.run(f'mkdir -p {lSourcePath}/logs')
logging.debug('OC OAI CN5G - Collecting Log files to workspace')
succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, OC.CI_OC_CORE_NAMESPACE)
succeeded = OC.OC_login(mySSH, self.OCUserName, self.OCPassword, self.OCProjectName)
if not succeeded:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
@@ -617,7 +618,7 @@ class EPCManagement():
mySSH.run(f'cd {lSourcePath}/logs && zip -r -qq test_logs_CN.zip *.log')
mySSH.copyin(f'{lSourcePath}/logs/test_logs_CN.zip','test_logs_CN.zip')
ret = mySSH.run(f'oc get pods', silent=True)
res = re.search(f'No resources found in {OC.CI_OC_CORE_NAMESPACE} namespace.', ret.stdout)
res = re.search('No resources found in oaicicd-ran namespace.', ret.stdout)
if res is not None:
logging.debug('OC OAI CN5G components uninstalled')
message = 'OC OAI CN5G components uninstalled'

View File

@@ -68,7 +68,7 @@ def EPCSrvHelp(ipaddr, username, password, sourcepath, epctype):
print(' --EPCUserName=[EPC\'s Login User Name] -- ' + username)
print(' --EPCPassword=[EPC\'s Login Password] -- ' + password)
print(' --EPCSourceCodePath=[EPC\'s Source Code Path] -- ' + sourcepath)
print(' --EPCType=[EPC\'s Type: OAI or ltebox or OC-OAI-CN5G] -- ' + epctype)
print(' --EPCType=[EPC\'s Type: OAI or ltebox or OAI-Rel14-CUPS] -- ' + epctype)
def XmlHelp(filename):
print(' --XMLTestFile=[XML Test File to be run] -- ' + filename)

View File

@@ -263,7 +263,7 @@ class RANManagement():
cmd = cls_cmd.getConnection(self.node)
ret = cmd.run(self.command)
cmd.close()
logging.debug(f"Custum command : {self.command} on node : {self.node} returnCode : {ret.returncode}")
logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode}')
status = 'OK'
message = []
if ret.returncode != 0 and not self.command_fail:

View File

@@ -1,74 +0,0 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-f1-accelleran</htmlTabRef>
<htmlTabName>F1 DU Interop Accelleran CU</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
111111
000020
000021
020021
100021
100022
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000020">
<class>DeployGenObject</class>
<desc>Deploy OAI-DU</desc>
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
<services>oai-du</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000021">
<class>DeployGenObject</class>
<desc>Deploy nrUE</desc>
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>2</nb_healthy>
</testCase>
<testCase id="020021">
<class>PingFromContainer</class>
<desc>Test Connectivity (ping)</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-I oaitun_ue1 -c 20 12.1.1.1</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="100022">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
</testCase>
</testCaseList>

View File

@@ -1,45 +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
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-down-f1-accelleran</htmlTabRef>
<htmlTabName>CleanUp</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100022
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100022">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>

View File

@@ -69,8 +69,8 @@
<class>Custom_Command</class>
<desc>Reset USRP</desc>
<node>nepes</node>
<command>sudo -S /usr/lib/uhd/utils/b2xx_fx3_utils --reset-device</command>
</testCase>
<command>sudo -S b2xx_fx3_utils --reset-device</command>
</testCase>
<testCase id="200000">
<class>Custom_Command</class>
@@ -228,8 +228,8 @@
<yaml_path>ci-scripts/yaml_files/nsa_b200_gnb</yaml_path>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<d_retx_th>10,100,100,100</d_retx_th>
<u_retx_th>10,100,100,100</u_retx_th>
<d_retx_th>1,100,100,100</d_retx_th>
<u_retx_th>1,100,100,100</u_retx_th>
</testCase>
</testCaseList>

View File

@@ -30,14 +30,8 @@
001000
020000
002000
002001
002002
002003
002004
002005
000100
000010
000020
000200
003000
004000
@@ -49,7 +43,6 @@
<testCase id="010000">
<class>Pull_Cluster_Image</class>
<desc>Pull Images from Cluster</desc>
<oc_project>oaicicd-ran</oc_project>
<images_to_pull>oai-gnb-aw2s</images_to_pull>
</testCase>
@@ -67,7 +60,7 @@
<id>amarisoft_ue</id>
</testCase>
<testCase id="002001">
<testCase id="002000">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_1</id>
@@ -79,68 +72,28 @@
<id>amarisoft_ue_2</id>
</testCase>
<testCase id="002003">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_3</id>
</testCase>
<testCase id="002004">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_4</id>
</testCase>
<testCase id="002005">
<class>Attach_UE</class>
<desc>Attach UE</desc>
<id>amarisoft_ue_5</id>
</testCase>
<testCase id="000010">
<class>Iperf</class>
<desc>iperf (DL/20Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 60M -t 30 -i 1 -R</iperf_args>
<direction>IPERF3</direction>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="000020">
<class>Iperf</class>
<desc>iperf (UL/5Mbps/UDP)(30 sec)(multi-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1 </iperf_args>
<direction>IPERF3</direction>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3</id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="000100">
<class>Ping</class>
<desc>Ping: 20pings in 20sec, multi-ue</desc>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5</id>
<desc>Ping: 20pings in 20sec</desc>
<id>amarisoft_ue_1 amarisoft_ue_2</id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>25</ping_rttavg_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="000200">
<class>Ping</class>
<desc>Ping: 100pings in 20sec, multi-ue</desc>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5</id>
<desc>Ping: 100pings in 20sec</desc>
<id>amarisoft_ue_1 amarisoft_ue_2</id>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>30</ping_rttavg_threshold>
<ping_rttavg_threshold>15</ping_rttavg_threshold>
</testCase>
<testCase id="003000">
<class>Detach_UE</class>
<desc>Detach UE</desc>
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5</id>
<id>amarisoft_ue_1 amarisoft_ue_2</id>
</testCase>
<testCase id="004000">
@@ -166,3 +119,4 @@
</testCase>
</testCaseList>

View File

@@ -1,46 +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
-->
<testCaseList>
<htmlTabRef>test-aw2s-cleanup</htmlTabRef>
<htmlTabName>CleanUp AW2S ASUE</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
111111
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
<testCase id="222222">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
<id>amarisoft_ue</id>
</testCase>
</testCaseList>

View File

@@ -179,8 +179,8 @@
<yaml_path>ci-scripts/yaml_files/sa_b200_gnb</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<d_retx_th>10,100,100,100</d_retx_th>
<u_retx_th>10,100,100,100</u_retx_th>
<d_retx_th>1,100,100,100</d_retx_th>
<u_retx_th>1,100,100,100</u_retx_th>
</testCase>
</testCaseList>

View File

@@ -35,7 +35,7 @@
<mode>TesteNB</mode>
<class>Build_eNB</class>
<desc>Build gNB (USRP)</desc>
<Build_eNB_args>--gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda ldpc_t1" --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c</Build_eNB_args>
<Build_eNB_args>--gNB -w USRP --ninja -c -P --build-lib "ldpc_cuda ldpc_t1"</Build_eNB_args>
<forced_workspace_cleanup>True</forced_workspace_cleanup>
</testCase>

View File

@@ -1,38 +0,0 @@
version: '3.8'
services:
oai-du:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du
network_mode: "host"
environment:
RFSIMULATOR: server
USE_VOLUMED_CONF: 'yes'
USE_ADDITIONAL_OPTIONS: --sa --rfsim --MACRLCs.[0].local_n_address 172.21.16.109 --MACRLCs.[0].remote_n_address 172.21.6.22 --log_config.global_log_options level,nocolor,time
volumes:
- ../../conf_files/gnb-du.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/mounted.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
network_mode: "host"
environment:
RFSIMULATOR: 127.0.0.1
FULL_IMSI: '208990100001140'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-du
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5

View File

@@ -78,8 +78,6 @@ Options:
Pass the supplied option verbatim to cmake.
-d | --build-dir
Sets build directory (will be <oai-root>/cmake_targets/<build-dir>/build)
--build-e2
Enable the the E2 Agent
-I | --install-external-packages
Installs required packages such as LibXML, asn1.1 compiler, ...
This option will require root password
@@ -199,10 +197,6 @@ function main() {
-d | --build-dir)
BUILD_DIR=$2
shift 2;;
--build-e2 )
CMAKE_CMD="$CMAKE_CMD -DE2_AGENT=ON"
shift
;;
-I | --install-external-packages)
INSTALL_EXTERNAL=1
echo_info "Will install external packages"

View File

@@ -89,21 +89,3 @@ macro(eval_boolean VARIABLE)
set(${VARIABLE} OFF)
endif()
endmacro()
function(check_option EXEC TEST_OPTION EXEC_HINT)
message(STATUS "Check if ${EXEC} supports ${TEST_OPTION}")
execute_process(COMMAND ${EXEC} ${TEST_OPTION}
RESULT_VARIABLE CHECK_STATUS
OUTPUT_VARIABLE CHECK_OUTPUT
ERROR_VARIABLE CHECK_OUTPUT)
if(NOT ${CHECK_STATUS} EQUAL 1)
get_filename_component(EXEC_FILE ${EXEC} NAME)
message(FATAL_ERROR "Error message: ${CHECK_OUTPUT}\
You might want to re-run ./build_oai -I
Or provide a path to ${EXEC_FILE} using
./build_oai ... --cmake-opt -D${EXEC_HINT}=/path/to/${EXEC_FILE}
or directly with
cmake .. -D${EXEC_HINT}=/path/to/${EXEC_FILE}
")
endif()
endfunction()

View File

@@ -33,7 +33,6 @@ OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "
case "$OS_DISTRO" in
fedora) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
rocky) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
centos) OS_BASEDISTRO="centos"; INSTALLER="yum"; CMAKE="cmake3" ;;
debian) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
@@ -121,20 +120,12 @@ check_supported_distribution() {
"rhel8.5") return 0 ;;
"rhel8.6") return 0 ;;
"rhel8.7") return 0 ;;
"rhel8.8") return 0 ;;
"rhel8.9") return 0 ;;
"rhel9.0") return 0 ;;
"rhel9.1") return 0 ;;
"rhel9.2") return 0 ;;
"rhel9.3") return 0 ;;
"centos7") return 0 ;;
"centos8") return 0 ;;
"rocky8.7") return 0 ;;
"rocky8.8") return 0 ;;
"rocky8.9") return 0 ;;
"rocky9.1") return 0 ;;
"rocky9.2") return 0 ;;
"rocky9.3") return 0 ;;
esac
return 1
}
@@ -309,7 +300,7 @@ install_usrp_uhd_driver_from_source(){
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
$SUDO /usr/local/lib/uhd/utils/uhd_images_downloader.py
fi
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]]; then
$SUDO /usr/local/lib64/uhd/utils/uhd_images_downloader.py
fi
fi
@@ -376,7 +367,7 @@ check_install_usrp_uhd_driver(){
$SUDO $INSTALLER -y install $boost_libs_fedora $CMAKE
$SUDO pip3 install mako requests
fi
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if [ $IS_CONTAINER -eq 0 ]
then
# until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source
@@ -398,13 +389,13 @@ install_usrp_uhd_driver() {
# quick workaround for RHE7.6
local distribution=$(get_distribution_release)
if [ -z $1 ]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]]; then
$SUDO /usr/local/bin/uhd_images_downloader
else
$SUDO uhd_images_downloader
fi
else
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]]; then
$SUDO /usr/local/bin/uhd_images_downloader -i $1
else
$SUDO uhd_images_downloader -i $1
@@ -571,7 +562,7 @@ check_install_additional_tools (){
libforms-bin \
libforms-dev \
xmlstarlet"
elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
PACKAGE_LIST="\
doxygen \
ctags \
@@ -632,7 +623,7 @@ check_install_oai_software() {
xxd
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if rpm -q epel-release > /dev/null; then
echo "EPEL repos already present. Good."
else
@@ -674,18 +665,19 @@ check_install_oai_software() {
}
install_asn1c_from_source(){
mkdir -p $OPENAIR_DIR/cmake_targets/log
asn1_install_log=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log "
(
$SUDO $INSTALLER -y install bison flex
$SUDO rm -rf /tmp/asn1c
# GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
git clone https://github.com/mouse07410/asn1c /tmp/asn1c
git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
cd /tmp/asn1c
git checkout vlm_master
# better to use a given commit than a branch in case the branch
# is updated and requires modifications in the source of OAI
#git checkout velichkov_s1ap_plus_option_group
git checkout f12568d617dbf48497588f8e227d70388fa217c9
autoreconf -iv
./configure --prefix /opt/asn1c/
./configure
make -j`nproc`
$SUDO make install
cd -

View File

@@ -45,7 +45,6 @@
#include "common/config/config_userapi.h"
#include <time.h>
#include <sys/time.h>
#include "common/utils/LOG/log_extern.h"
// main log variables
@@ -67,30 +66,32 @@ char __log_mem_filename[1024]={0};
char * log_mem_filename = &__log_mem_filename[0];
char logmem_filename[1024] = {0};
const mapping log_level_names[] = {{"error", OAILOG_ERR},
{"warn", OAILOG_WARNING},
{"analysis", OAILOG_ANALYSIS},
{"info", OAILOG_INFO},
{"debug", OAILOG_DEBUG},
{"trace", OAILOG_TRACE},
{NULL, -1}};
mapping log_level_names[] = {
{"error", OAILOG_ERR},
{"warn", OAILOG_WARNING},
{"analysis", OAILOG_ANALYSIS},
{"info", OAILOG_INFO},
{"debug", OAILOG_DEBUG},
{"trace", OAILOG_TRACE},
{NULL, -1}
};
const mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
{"level", FLAG_LEVEL},
{"thread", FLAG_THREAD},
{"line_num", FLAG_FILE_LINE},
{"function", FLAG_FUNCT},
{"time", FLAG_TIME},
{"thread_id", FLAG_THREAD_ID},
{"wall_clock", FLAG_REAL_TIME},
{NULL, -1}};
mapping log_options[] = {
{"nocolor", FLAG_NOCOLOR },
{"level", FLAG_LEVEL },
{"thread", FLAG_THREAD },
{"line_num", FLAG_FILE_LINE },
{"function", FLAG_FUNCT},
{"time", FLAG_TIME},
{"thread_id", FLAG_THREAD_ID},
{"wall_clock", FLAG_REAL_TIME},
{NULL,-1}
};
mapping log_maskmap[] = LOG_MASKMAP_INIT;
static const char *log_level_highlight_start[] =
{LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
static const char *log_level_highlight_end[] =
{LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
char *log_level_highlight_start[] = {LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
char *log_level_highlight_end[] = {LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args);
@@ -753,7 +754,8 @@ void close_component_filelog(int comp)
* with string value NULL
*/
/* map a string to an int. Takes a mapping array and a string as arg */
int map_str_to_int(const mapping *map, const char *str)
int map_str_to_int(mapping *map,
const char *str)
{
while (1) {
if (map->name == NULL) {
@@ -769,7 +771,8 @@ int map_str_to_int(const mapping *map, const char *str)
}
/* map an int to a string. Takes a mapping array and a value */
char *map_int_to_str(const mapping *map, const int val)
char *map_int_to_str(mapping *map,
int val)
{
while (1) {
if (map->name == NULL) {

View File

@@ -315,8 +315,8 @@ void set_glog_filelog(int enable);
void set_component_filelog(int comp);
void close_component_filelog(int comp);
void set_component_consolelog(int comp);
int map_str_to_int(const mapping *map, const char *str);
char *map_int_to_str(const mapping *map, const int val);
int map_str_to_int(mapping *map, const char *str);
char *map_int_to_str(mapping *map, int val);
void logClean (void);
int is_newline( char *str, int size);

View File

@@ -23,8 +23,9 @@
extern log_t *g_log;
extern const mapping log_level_names[];
extern const mapping log_options[];
extern mapping log_level_names[];
extern mapping log_options[];
extern mapping log_maskmap[];
extern int log_mem_flag;
extern char * log_mem_filename;

View File

@@ -154,7 +154,8 @@ int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *
lib_idx = loader_data.numshlibs;
++loader_data.numshlibs;
if (loader_data.numshlibs > loader_data.maxshlibs) {
fprintf(stderr, "[LOADER] can not load more than %u shlibs\n", loader_data.maxshlibs);
fprintf(stderr, "[LOADER] can not load more than %d shlibs\n",
loader_data.maxshlibs);
ret = -1;
goto load_module_shlib_exit;
}

View File

@@ -449,7 +449,6 @@ void get_samplerate_and_bw(int mu,
*tx_bw = 50e6;
*rx_bw = 50e6;
}
break;
case 216:
if (threequarter_fs) {
*sample_rate=46.08e6;
@@ -475,7 +474,6 @@ void get_samplerate_and_bw(int mu,
*tx_bw = 20e6;
*rx_bw = 20e6;
}
break;
case 106:
if (threequarter_fs) {
*sample_rate=23.04e6;
@@ -503,7 +501,6 @@ void get_samplerate_and_bw(int mu,
*tx_bw = 10e6;
*rx_bw = 10e6;
}
break;
case 25:
if (threequarter_fs) {
*sample_rate=5.76e6;
@@ -709,27 +706,3 @@ void SLIV2SL(int SLIV,int *S,int *L) {
}
}
int get_ssb_subcarrier_offset(uint32_t absoluteFrequencySSB, uint32_t absoluteFrequencyPointA)
{
uint32_t absolute_diff = (absoluteFrequencySSB - absoluteFrequencyPointA);
const int scaling_5khz = absoluteFrequencyPointA < 600000 ? 3 : 1;
return ((absolute_diff / scaling_5khz) % 24);
}
uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
uint32_t absoluteFrequencyPointA,
int ssbSubcarrierSpacing,
int frequency_range)
{
uint32_t absolute_diff = (absoluteFrequencySSB - absoluteFrequencyPointA);
const int scaling_5khz = absoluteFrequencyPointA < 600000 ? 3 : 1;
int sco = get_ssb_subcarrier_offset(absoluteFrequencySSB, absoluteFrequencyPointA);
const int scs_scaling = frequency_range == FR2 ? 1 << (ssbSubcarrierSpacing - 2) : 1 << ssbSubcarrierSpacing;
const int scaled_abs_diff = absolute_diff / scaling_5khz;
const int ssb_offset_point_a =
(scaled_abs_diff - sco) / 12
- 10 * scs_scaling; // absoluteFrequencySSB is the central frequency of SSB which is made by 20RBs in total
AssertFatal(ssb_offset_point_a % scs_scaling == 0, "PRB offset %d can create frequency offset\n", ssb_offset_point_a);
AssertFatal(sco % scs_scaling == 0, "ssb offset %d can create frequency offset\n", sco);
return ssb_offset_point_a;
}

View File

@@ -101,11 +101,7 @@ void get_samplerate_and_bw(int mu,
unsigned int *samples_per_frame,
double *tx_bw,
double *rx_bw);
uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
uint32_t absoluteFrequencyPointA,
int ssbSubcarrierSpacing,
int frequency_range);
int get_ssb_subcarrier_offset(uint32_t absoluteFrequencySSB, uint32_t absoluteFrequencyPointA);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))

View File

@@ -231,9 +231,7 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
int settingPriority = 1;
ret=pthread_attr_init(&attr);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
LOG_I(UTIL,"Creating thread %s with affinity %d and priority %d\n",name,affinity,priority);
if (checkIfFedoraDistribution())
if (checkIfGenericKernelOnFedora())
if (checkIfInsideContainer())

View File

@@ -12,8 +12,6 @@
</tr>
</table>
[[_TOC_]]
This page is valid on tags starting from **`2019.w09`**.
# Overview
@@ -74,36 +72,32 @@ cd openairinterface5g/cmake_targets/
Note the section on installing UHD further down for more information.
## Installing (new) asn1c from source
## Building PHY Simulators
With tag 2023.w22, we switch from our [own
`asn1c`](https://gitlab.eurecom.fr/oai/asn1c.git) to a [community-maintained
`asn1c`](https://github.com/mouse07410/asn1c). This new version has many
bugfixes, but is incompatible with the previous version. To ease the
transition, both versions can be installed in parallel. Assuming you installed
`asn1c` using `build_oai`, tags before 2023.w22 will use the version under
`/usr/local/`; tag 2023.w22 and newer will use the version under `/opt/asn1c/`
(if present) or any system directory (e.g., also `/usr/local/`), and
additionally check that all command line options of the new `asn1c` are
supported.
The PHY layer simulators (LTE and NR) can be built as follows:
To install the new `asn1c`, either run `build_oai -I`. To not re-install all
packages, you can also just install `asn1c` like this:
```
cd openairinterface5g
sudo ls # open sudo session, required by install_asn1c_from_source
. oaienv # read of default variables
. cmake_targets/tools/build_helper # read in function
install_asn1c_from_source # install under `/opt/asn1c`
```bash
cd openairinterface5g/cmake_targets/
./build_oai --phy_simulators
```
Additionally, you can also point to a specific `asn1c` to use if you chose to
install elsewhere, using one of these two methods:
```
./build_oai --ninja <other-options> --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c
cmake .. -GNinja -DASN1C_EXEC=/opt/asn1c/bin/asn1c
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory.
Detailed information about these simulators can be found [in this dedicated page](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/OpenAirLTEPhySimul)
# Building UEs, eNodeB and gNodeB Executables
After downloading the source files, a single build command can be used to get the binaries supporting all the oai softmodem use cases (UE and [eg]NodeB):
```bash
cd openairinterface5g/cmake_targets/
./build_oai -w USRP --eNB --UE --nrUE --gNB
```
You can build any oai softmodem executable separately, you may not need all of them depending on your oai usage.
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory.
## Installing UHD from source
Previously for Ubuntu distributions, when installing the pre-requisites, most of the packages are installed from PPA.
@@ -136,32 +130,6 @@ See:
* `cmake_targets/tools/uhd-4.x-tdd-patch.diff`
* `cmake_targets/tools/build_helper` --> function `install_usrp_uhd_driver_from_source`
## Building PHY Simulators
The PHY layer simulators (LTE and NR) can be built as follows:
```bash
cd openairinterface5g/cmake_targets/
./build_oai --phy_simulators
```
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory.
Detailed information about these simulators can be found [in this dedicated page](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/OpenAirLTEPhySimul)
## Building UEs, eNodeB and gNodeB Executables
After downloading the source files, a single build command can be used to get the binaries supporting all the oai softmodem use cases (UE and [eg]NodeB):
```bash
cd openairinterface5g/cmake_targets/
./build_oai -w USRP --eNB --UE --nrUE --gNB
```
You can build any oai softmodem executable separately, you may not need all of them depending on your oai usage.
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory.
## Building Optional Binaries
There are a number of optional libraries that can be built in support of the

View File

@@ -1010,10 +1010,12 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_rrc_message_transfer.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_default_values.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_rrc_message_transfer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_decoder.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_encoder.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_itti_messaging.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_itti_messaging.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_ue_context_management.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_decoder.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_paging.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_warning_message_transmission.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_encoder.h \

View File

@@ -11,7 +11,6 @@
</td>
</tr>
</table>
# 1. Introduction
We use OpenAirInterface source code, and it's regular deployment scheme.
@@ -209,46 +208,3 @@ DU rlc north output goes to du_pdcp_data_ind() that push a outgoing packet reque
CU pdcp south output calls cu_rlc_data_ind() that do the same symetric processing.
# High-level F1-C code structure
The F1 interface is used internally between CU (mostly RRC) and DU (mostly MAC)
to exchange information. In DL, the CU sends messages as defined by the
callbacks in `mac_rrc_dl.h`, whose implementation is defined in files
`mac_rrc_dl_direct.c` (monolithic) and `mac_rrc_dl_f1ap.c` (for F1AP). In the
monolithic case, the RRC calls directly into the message handler on the DU side
(`mac_rrc_dl_handler.c`). In the F1 case, an ITTI message is sent to the CU
task, sending an ASN.1-encoded F1AP message. The DU side's DU task decodes the
message, and then calls the corresponding handler in `mac_rrc_dl_handler.c`.
Thus, the message flow is the same in both F1 and monolithic cases, with the
difference that F1AP encodes the messages using ASN.1 and sends over a socket.
In UL, the callbacks defined in `mac_rrc_ul.h` are implemented by
`mac_rrc_ul_direct.c` (monolithic) and `mac_rrc_ul_f1ap.c` (F1). In the direct
case, an ITTI message is directly sent to the RRC task (hence, there is no
dedicated handler). In F1, the DU task receives the ITTI message, encodes using
ASN.1, and sends it over a network socket. The CU task decodes, and sends the
same ITTI message to the RRC task as done directly in the monolithic case.
```
+-------------+
| |
| CU/RRC |
| |
+-------------+
| ^
Callback def: mac_rrc_dl.h | | No handler needed:
F1 impl: mac_rrc_dl_f1ap.c | | RRC has ITTI
Monolithic: mac_rrc_dl_direct.c | |
| |
DL | | UL
| |
| | Callback def: mac_rrc_ul.h
Message handler: | | F1 impl: mac_rrc_ul_f1ap.c
mac_rrc_dl_handler.c | | Monolithic: mac_rrc_ul_direct.c
v |
+-------------+
| |
| DU/MAC |
| |
+-------------+
```

View File

@@ -21,14 +21,14 @@ 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 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.2-desktop-amd64.iso)
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso)
- CPU: 8 cores x86_64 @ 3.5 GHz
- RAM: 32 GB
- Laptop for UE
- Operating System: Microsoft Windows 10 x64
- CPU: 4 cores x86_64
- RAM: 8 GB
- Windows driver for Quectel MUST be equal or higher than version **2.4.6**
- Windows driver for Quectel MUST be equal or higher than version **2.2.4**
- [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/)
- Please identify the network interface(s) on which the USRP is connected and update the gNB configuration file
- Quectel RM500Q

View File

@@ -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 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.2-desktop-amd64.iso)
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso)
- CPU: 8 cores x86_64 @ 3.5 GHz
- RAM: 32 GB
@@ -71,13 +71,13 @@ docker build --target ims --tag asterisk-ims:latest --file ~/oai-cn5g/Dockerfile
## 3.1 Start OAI CN5G
```bash
cd ~/oai-cn5g
docker compose up -d
docker-compose up -d
```
## 3.2 Stop OAI CN5G
```bash
cd ~/oai-cn5g
docker compose down
docker-compose down
```
# 4. Run 5G NR SA end-to-end setup with OAI gNB
@@ -87,4 +87,4 @@ Please check this link:
## 4.2 Testing with OAI nrUE
Please check this link:
[Testing with OAI gNB and OAI nrUE](NR_SA_Tutorial_OAI_nrUE.md)
[Testing with OAI gNB and OAI nrUE](NR_SA_Tutorial_OAI_nrUE.md)

View File

@@ -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 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.2-desktop-amd64.iso)
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso)
- CPU: 8 cores x86_64 @ 3.5 GHz
- RAM: 32 GB
- Laptop for UE
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.2-desktop-amd64.iso)
- Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-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/)
@@ -155,7 +155,7 @@ Run OAI nrUE
cd ~/openairinterface5g
source oaienv
cd cmake_targets/ran_build/build
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ue-fo-compensation --sa -E --uicc0.imsi 001010000000001
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --ue-fo-compensation --sa -E --uicc0.imsi 001010000000001
```
## 5.2 Testing OAI nrUE with RFsimulator
@@ -168,7 +168,7 @@ Run OAI nrUE with RFsimulator
cd ~/openairinterface5g
source oaienv
cd cmake_targets/ran_build/build
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --uicc0.imsi 001010000000001
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --rfsim --sa --uicc0.imsi 001010000000001
```
### 5.2.1 Ping test

View File

@@ -36,6 +36,7 @@ There is some general information in the [OpenAirInterface Gitlab Wiki](https://
* (5G) Using SDAP and custom DRBs
* IF setups and arbitrary frequencies
* MIMO
- [How to run a 5G-SA setup](./TESTING_5GSA_setup.md)
- [How to run a 5G-NSA setup](./TESTING_GNB_W_COTS_UE.md)
- [How to run a 4G setup using L1 simulator](./L1SIM.md) _Note: we recommend the RFsimulator_
- [How to use the L2 simulator](./L2NFAPI.md)
@@ -43,7 +44,6 @@ There is some general information in the [OpenAirInterface Gitlab Wiki](https://
- [How to run OAI-VNF and OAI-PNF](./RUN_NR_NFAPI.md) _Note: does not work currently_
- [How to use the positioning reference signal (PRS)](./RUN_NR_PRS.md)
- [How to use device-to-device communication (D2D, 4G)](./d2d_emulator_setup.txt)
- [How to run with E2 agent](../openair2/E2AP/README.md)
Legacy unmaintained files:
- `L2NFAPI_NOS1.md`, `L2NFAPI_S1.md`: old L2simulator, not valid anymore
@@ -94,7 +94,6 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
## Special-purpose libraries
- OAI has two scopes, one based on Xforms, one on Qt5, described in [this README](../openair1/PHY/TOOLS/readme.md)
- OAI comes with an integrated [telnet server](../common/utils/telnetsrv/DOC/telnethelp.md) to monitor and control
- OAI comes with an integrated [web server](../common/utils/websrv/DOC/websrv.md)

View File

@@ -64,7 +64,7 @@ In our case the output is 0 and hence we use `numactl --cpunodebind=0 --membind=
## FR1 test
Open a terminal on the host machine, and execute below command to launch gNB with **X310 USRPs**
```sudo numactl --cpunodebind=0 --membind=0 ./nr-softmodem -E -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.sa.band78.fr1.106PRB.prs.usrpx310.conf --phy-test```
```sudo numactl --cpunodebind=0 --membind=0 ./nr-softmodem -E -O../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.sa.band78.fr1.106PRB.prs.usrpx310.conf --phy-test```
If **N310 USRPs** are used, then run above command `without -E option` i.e without 3/4 sampling rate.<br><br>
@@ -187,4 +187,4 @@ This script will read the IQ data from extracted PRS dumps(chF_gnbX_Y.raw and ch
<figcaption align = "center"><b>Fig.1 - FR2 100MHz test</b></figcaption>
</td>
</tr>
</table>
</table>

View File

@@ -31,6 +31,7 @@ rx_func_implem[rx_func]
--> handle_nr_ulsch
subgraph gNB_dlsch_ulsch_scheduler
run_pdcp
--> nr_rrc_trigger
--> schedule_xxxx
end
handle_nr_ulsch --> gNB_dlsch_ulsch_scheduler

View File

@@ -55,7 +55,7 @@ Note: The available resources, and their current usage, is indicated here:
### 5G AW2S Testbench
**Purpose**: AW2S tests with Amarisoft UE simulator
**Purpose**: AW2S tests with Amarisoft
![5G AW2S Testbench](testbenches_doc_resources/5g-aw2s-bench.png)
@@ -82,10 +82,7 @@ Webhook
- [RAN-gNB-N300-Timing-Phytest-LDPC](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-gNB-N300-Timing-Phytest-LDPC/)
- caracal + N310
- pure performance test through phy-test scheduler, see command line for more details
- [RAN-Interop-F1](https://jenkins-oai.eurecom.fr/job/RAN-Interop-F1/)
- ofqot (DU, 1x UE)
- F1 interoperability testing: sets up connection to Accelleran CU, UE connection and connectivity test
- [RAN-L2-Sim-Test-4G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-4G/)
- [RAN-L2-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-4G/)
- obelix (eNB, 1x UE, OAI EPC)
- L2simulator: skips physical layer and uses proxy between eNB and UE
- [RAN-L2-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-5G/)
@@ -95,7 +92,7 @@ Webhook
- hutch + B210, nano w/ ltebox + 2x UE
- tests RRC inactivity timers, different bandwidths
- [RAN-LTE-TDD-2x2-Container](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-LTE-TDD-2x2-Container/)
- obelix + N310, porcepix, nrmodule2 + Quectel
- obelix + N310, porcepix, quectel
- TM1 and TM2 test
- [RAN-LTE-TDD-LTEBOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-LTE-TDD-LTEBOX-Container/)
- starsky + B210, nano w/ ltebox + 2x UE
@@ -114,15 +111,14 @@ Webhook
- uses RFsimulator, TDD 40MHz, FDD 40MHz, F1 split
- [RAN-RHEL8-Cluster-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Cluster-Image-Builder/)
- cluster (`Asterix-OC-oaicicd-session` resource): RHEL 8 image build using the OpenShift Cluster
- [RAN-SA-AW2S-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-AW2S-CN5G/)
- 5G-NR SA test setup: avra(RHEL9.1) + AW2S, amariue, OAI CN5G
- uses OpenShift cluster for CN deployment and container images for gNB deployment
- multi UE testing
- [RAN-SA-B200-Module-SABOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-SA-B200-Module-SABOX-Container/)
- ofqot + B200, idefix + Quectel, nepes w/ sabox
- basic SA test (20 MHz TDD), F1, reestablishment, ...
- [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
- [RAN-Ubuntu20-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
- obelix: Ubuntu 20 image build using docker (Note: builds U20 images while pipeline is named U18!)
- [RAN-SA-AW2S-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-AW2S-CN5G/)
- 5G-NR SA test setup: Avra(RHEL9.1)/Manarola(U22PRO) + AW2S, Amarisoft UE x1, OAI CN5G
- uses OpenShift cluster for CN deployment and container images for gNB deployment
### RAN-CI-NSA-Trigger

230
doc/TESTING_5GSA_setup.md Normal file
View File

@@ -0,0 +1,230 @@
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI 5G SA tutorial</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
In the following tutorial we describe how to deploy configure and test the two SA OAI setups:
- SA setup with OAI gNB and COTS UE
- SA setup with OAI gNB and OAI UE
The operating system and hardware requirements to support OAI 5G NR are described [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/5g-nr-development-and-setup).
# 1. SA setup with COTS UE
At the moment of writing this document interoperability with the following COTS UE devices is being tested:
- [Quectel RM500Q-GL](https://www.quectel.com/product/5g-rm500q-gl/)
- [Simcom SIMCOM8200EA](https://www.simcom.com/product/SIM8200EA_M2.html)
- Huawei Mate 30 Pro
- Oneplus 8
- Google Pixel 5
End-to-end control plane signaling to achieve a 5G SA connection, UE registration and PDU session establishment with the CN, as well as some basic user-plane traffic tests have been validated so far using SIMCOM/Quectel modules and Huawei Mate 30 pro. In terms of interoperability with different 5G Core Networks, so far this setup has been tested with:
- [OAI CN](https://openairinterface.org/oai-5g-core-network-project/)
- Nokia SA Box
- [Free CN](https://www.free5gc.org/)
## 1.1 gNB build and configuration
To get the code and build the gNB executable:
### Build gNB
```bash
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
git checkout develop
cd openairinterface5g/
source oaienv
cd cmake_targets/
./build_oai -I -w USRP #For OAI first time installation only to install software dependencies
./build_oai --gNB -w USRP
```
A reference configuration file for the **monolithic** gNB is provided [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf).
In the following, we highlight the fields of the file that have to be configured according to the configuration and interfaces of the Core Network. First, the PLMN section has to be filled with the proper values that match the configuration of the AMF and the UE USIM.
```bash
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }) });
```
Then, the source and destination IP interfaces for the communication with
the Core Network also need to be set as shown below.
```bash
////////// AMF parameters:
amf_ip_address = ( { ipv4 = "192.168.70.132";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24";
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
```
In the first part (*amf_ip_address*) we specify the IP of the AMF and in the second part (*NETWORK_INTERFACES*) we specify the gNB local interface with AMF (N2 interface) and the UPF (N3 interface).
**CAUTION:** the `192.168.70.132` AMF IF address is the OAI-CN5G `AMF` Container IP address. You certainly will need to do some networking manipulations for the `gNB` server to be able to see this AMF container.
Please read [CN5G tutorial for more details](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md).
### gNB configuration in F1 (CU/DU split mode)
For the configuration of the gNB in CU and DU blocks, the following sample configuration files are provided for the [CU](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf) and the [DU](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf) entities respectively. These configuration files have to be updated with the IP addresses of the CU and the DU over the F1 interface. For example, in the following section from the DU configuration file, *local_n_address* corresponds to the DU address and *remote_n_address* corresponds to the CU address:
```bash
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_if_name = "lo";
local_n_address = "127.0.0.3";
remote_n_address = "127.0.0.4";
local_n_portc = 601;
local_n_portd = 2152;
remote_n_portc = 600;
remote_n_portd = 2152;
}
);
```
At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface, as well as some IP traffic tests over *F1-U* have been validated using the OAI gNB/nrUE in RFSIMULATOR mode.
### gNB configuration with F1 and E1
Please refer to [E1-design](E1-design) for more information.
## 1.2 OAI 5G Core Network installation and configuration
The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using `docker-compose` can be found [here](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md).
## 1.3 Execution of SA scenario
After having configured the gNB, we can start the individual components in the following sequence:
- Launch 5G Core Network
- Launch gNB
- Launch COTS UE (disable airplane mode)
The execution command to start the gNB (in monolithic mode) is the following:
```bash
cd cmake_targets/ran_build/build
sudo ./nr-softmodem -E --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
```
# 2. SA Setup with OAI NR UE Softmodem
The SA setup with OAI UE has been validated with **RFSIMULATOR**. Both control plane and user plane for the successful UE registration and PDU Session establishment has been verified with OAI and Nokia SA Box CNs.
In the following, we provide the instructions on how to build, configure and execute this SA setup.
As another option, if you do not want to build anything and instead deploy the OAI RAN (RFSIMULATOR) and Core Network components directly using docker images and docker-compose, please have a look at [this tutorial](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/ci-scripts/yaml_files/5g_rfsimulator/README.md).
### NAS configuration for the OAI UE
The NAS configuration parameters of the OAI UE can be set as input parameters, configuration file or can be hardcoded. More specifically:
- SUCI (*Subscription Concealed Identifier*)
- USIM_API_K and OPc keys
- NSSAI (*Network Slice Assistance Information*)
- DNN (*Data Network Name*)
Below is a sample configuration file that can be parsed through the execution command ([section 2.3](#23-execution-of-sa-scenario)).
```bash
uicc0 = {
imsi = "208990000007487";
key = "fec86ba6eb707ed08905757b1bb44b8f";
opc= "C42449363BBAD02B66D16BC975D77CC1";
dnn= "oai";
nssai_sst=1;
nssai_sd=1;
}
```
For interoperability with OAI or other CNs, it should be ensured that the configuration of the aforementioned parameters match the configuration of the corresponding subscribed user at the core network.
## 2.1 Build and configuration
To build the gNB and OAI UE executables:
```bash
cd cmake_targets
# Note: For OAI first time installation please install software dependencies as described in 1.1.
./build_oai --gNB --nrUE -w SIMU
```
The gNB configuration can be performed according to what is described in [section 1.1](#11--gnb-build-and-configuration), using the same reference configuration file as with the RF scenario.
## 2.2 OAI 5G Core Network installation and configuration
The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using `docker-compose` can be found [here](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md).
## 2.3 Execution of SA scenario
The order of starting the different components should be the same as the one described in [section 1.3](#13--execution-of-sa-scenario).
the gNB can be launched in 2 modes:
- To launch the gNB in `monolithic` mode:
```bash
sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa \
-O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
```
- To launch the gNB in `CU/DU split` mode:
1. Launch the CU component:
```bash
sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa \
-O ../../../ci-scripts/conf_files/gNB_SA_CU.conf
```
2. Launch the DU component:
```bash
sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa \
-O ../../../ci-scripts/conf_files/gNB_SA_DU.conf
```
- To launch the OAI UE (valid in `monolithic` gNB and `CU/DU split` gNB):
```bash
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 \
--rfsim --sa -O <PATH_TO_UE_CONF_FILE>
```
If you get the following error:
```bash
Assertion (k2 >= ((5))) failed!
In get_k2() /home/mir/workspace/openairinterface5g/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c:147
Slot offset K2 (2) cannot be less than DURATION_RX_TO_TX (5). K2 set according to min_rxtxtime in config file.
```
Add the following parameter (i.e., min_rxtxtime) in the gNB configuration file, just after nr_cellid.
```bash
nr_cellid = 12345678L;
min_rxtxtime=6;
```
or --gNBs.[0].min_rxtxtime 6 to the gNB command line
The IP address at the execution command of the OAI UE corresponds to the target IP of the gNB host that the RFSIMULATOR at the UE will connect to. In the above example, we assume that the gNB and UE are running on the same host so the specified address (127.0.0.1) is the one of the loopback interface.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -23,11 +23,9 @@
\node[below right=-0.7cm and 0.35cm of b78o.east] (anto2)
{\includegraphics[width=0.3cm]{antenna}} edge (b78o);
\node[right=3.5cm of aw2s, label=above:amariue] (amariue)
\node[right=4cm of aw2s, label=above:Amarisoft UE] (amariue)
{\includegraphics[width=0.7cm]{amariue}};
\node[right=0.8cm of anto1] (anto3)
{\includegraphics[width=0.3cm]{antenna}} edge (amariue);
\node[right=0.8cm of anto2] (anto4)
\node[right=3cm of aw2s] (anto3)
{\includegraphics[width=0.3cm]{antenna}} edge (amariue);
\end{tikzpicture}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 609 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 453 KiB

View File

@@ -1,58 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM $BASE_IMAGE AS ran-base
ENV TZ=Europe/Paris
ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=4.4.0.0
RUN dnf install 'dnf-command(config-manager)' -y && \
dnf config-manager --set-enabled powertools && \
dnf install epel-release -y && crb enable && \
dnf update -y && \
dnf install -y \
#gcc needed for build_oai
gcc gcc-c++ \
diffutils \
file \
psmisc \
git \
# python3-pip and pyyaml are used for conf template generation
python3-pip && \
pip3 install --ignore-installed pyyaml
#create the WORKDIR
WORKDIR /oai-ran
COPY . .
#run build_oai -I to get the builder image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I --install-optional-packages -w USRP

View File

@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c

View File

@@ -1,38 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
FROM ran-base:latest as ran-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c

View File

@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror

View File

@@ -40,4 +40,4 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
export CC=/usr/bin/clang && \
export CXX=/usr/bin/clang++ && \
./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror

View File

@@ -1,130 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS enb-base
FROM ran-build:latest AS enb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-enb
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
tzdata \
procps-ng \
atlas \
gdb \
python3 \
python3-pip \
net-tools \
iputils \
iproute && \
pip3 install six && \
pip3 install requests && \
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-enb/bin
COPY --from=enb-build \
/oai-ran/cmake_targets/ran_build/build/lte-softmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=enb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_enb.so \
/usr/local/lib/
COPY --from=enb-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=enb-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on lte-softmodem" && ldd /opt/oai-enb/bin/lte-softmodem && \
echo "ldd on liboai_eth_transpro.so" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator.so" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif.so" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding.so" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig.so" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts.so" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on liboai_iqplayer.so" && ldd /usr/local/lib/liboai_iqplayer.so && \
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_enb.so" && ldd /usr/local/lib/libtelnetsrv_enb.so
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-enb/etc
COPY --from=enb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-enb
# 2152 --> S1U, GTP/UDP
# 36412 --> S1C, SCTP/UDP
# 36422 --> X2C, SCTP/UDP
EXPOSE 2152/udp 36412/udp 36422/udp
ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]

View File

@@ -1,105 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
COPY ./libori.so /usr/local/lib
# build AW2S fronthaul lib
WORKDIR /oai-ran
RUN /bin/sh oaienv && \
cd cmake_targets/ran_build/build && \
ninja aw2sori_transpro
#start from scratch for target executable
FROM $BASE_IMAGE as oai-gnb-aw2s
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
libXpm \
libX11 \
atlas \
lksctp-tools \
tzdata \
net-tools \
iputils && \
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-gnb-aw2s/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
./
COPY ./docker/scripts/gnb-aw2s_entrypoint.sh ./entrypoint.sh
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/libaw2sori_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/libori.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/
RUN ln -s /usr/local/lib/libaw2sori_transpro.so /usr/local/lib/libthirdparty_transpro.so && \
ln -s /usr/local/lib/liboai_eth_transpro.so /usr/local/lib/liboai_transpro.so && \
ldconfig && \
echo "ldd on nr-softmodem" && ldd /opt/oai-gnb-aw2s/bin/nr-softmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on libaw2sori_transpro" && ldd /usr/local/lib/libaw2sori_transpro.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
WORKDIR /opt/oai-gnb-aw2s
ENTRYPOINT ["/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]

View File

@@ -1,138 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-gnb
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
libXpm \
libX11 \
atlas \
lksctp-tools \
tzdata \
gdb \
python3 \
python3-pip \
net-tools \
iputils && \
pip3 install six && \
pip3 install requests && \
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-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on nr-softmodem" && ldd /opt/oai-gnb/bin/nr-softmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_ci" && ldd /usr/local/lib/libtelnetsrv_ci.so
# Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?
#EXPOSE 36412/udp # S1C, SCTP/UDP
#EXPOSE 36422/udp # X2C, SCTP/UDP
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]

View File

@@ -1,123 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS lte-ue-base
FROM ran-build:latest AS lte-ue-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \
cp /oai-ran/docker/scripts/lte_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-lte-ue
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
procps-ng \
tzdata \
atlas \
gdb \
python3 \
python3-pip \
iproute \
net-tools \
iputils && \
pip3 install six && \
pip3 install requests && \
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-lte-ue/bin
COPY --from=lte-ue-build \
/oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
/oai-ran/docker/scripts/entrypoint.sh \
/oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
/oai-ran/cmake_targets/nas_sim_tools/build/nvram \
/oai-ran/cmake_targets/nas_sim_tools/build/usim \
./
COPY --from=lte-ue-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
COPY --from=lte-ue-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=lte-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=lte-ue-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on lte-uesoftmodem" && ldd /opt/oai-lte-ue/bin/lte-uesoftmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
# Copy the relevant configuration files for UE
WORKDIR /opt/oai-lte-ue/etc
COPY --from=lte-ue-build /oai-ran/docker/etc .
WORKDIR /opt/oai-lte-ue
CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]

View File

@@ -1,78 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for RHEL 8.2
#
#---------------------------------------------------------------------
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-cuup
ENV TZ=Europe/Paris
RUN yum repolist --disablerepo=* && \
yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
procps-ng \
lksctp-tools \
tzdata \
atlas \
net-tools \
iputils && \
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-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-cuup \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/
RUN ldconfig && \
echo "ldd on nr-cuup" && ldd /opt/oai-gnb/bin/nr-cuup && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
WORKDIR /opt/oai-gnb/etc
WORKDIR /opt/oai-gnb
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"]

View File

@@ -1,78 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-nr-cuup
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
lksctp-tools \
tzdata \
atlas \
net-tools \
iputils && \
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-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-cuup \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/
RUN ldconfig && \
echo "ldd on nr-cuup" && ldd /opt/oai-gnb/bin/nr-cuup && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
WORKDIR /opt/oai-gnb/etc
WORKDIR /opt/oai-gnb
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"]

View File

@@ -50,6 +50,7 @@ COPY --from=gnb-build \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/

View File

@@ -1,138 +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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS nr-ue-base
FROM ran-build:latest AS nr-ue-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/nr_ue_parameters.yaml && \
cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-nr-ue
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
procps-ng \
tzdata \
net-tools \
iputils \
iproute \
atlas \
gdb \
python3 \
python3-pip \
libXpm \
libX11 && \
pip3 install six && \
pip3 install requests && \
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-nr-ue/bin
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build \
/oai-ran/ci-scripts/conf_files/nr-ue-sim.conf \
/oai-ran/docker/etc/nr-ue.nfapi.conf \
./
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
/usr/local/lib/
COPY --from=nr-ue-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libforms.so.2 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=nr-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=nr-ue-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on nr-uesoftmodem" && ldd /opt/oai-nr-ue/bin/nr-uesoftmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_5Gue" && ldd /usr/local/lib/libtelnetsrv_5Gue.so
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]

View File

@@ -38,7 +38,7 @@ RUN yum install -y libasan libubsan
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --phy_simulators --ninja --verbose-ci --sanitize --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
./build_oai --phy_simulators --ninja --verbose-ci --sanitize --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-physim

View File

@@ -77,7 +77,6 @@ The currently-supported OS are:
- `rhel8.2` for Red Hat Entreprise Linux (including images for an OpenShift cluster)
- `ubuntu20` for Ubuntu 20.04 LTS
- `rocky` for Rocky-Linux 8.7
For more details regarding the build on an Openshift Cluster, see [OpenShift README](../openshift/README.md).
@@ -112,8 +111,6 @@ ran-base latest 5c9c02a5b4a8 1 minute ago
...
```
Note that the steps are identical for `rocky-linux`.
## 3.3. Building any target image ##
For example, the eNB:
@@ -139,8 +136,6 @@ Do not forget to remove the temporary image:
docker image prune --force
```
Note that the steps are identical for `rocky-linux`.
# 4. Building using `podman` under Red Hat Entreprise Linux 8.2 #
Analogous to the above steps:

View File

@@ -52,11 +52,6 @@
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#ifdef E2_AGENT
#include "openair2/E2AP/flexric/src/agent/e2_agent_api.h"
#include "openair2/E2AP/RAN_FUNCTION/LTE/init_ran_func.h"
#endif
#include <openair1/PHY/phy_extern_ue.h>
#include "PHY/phy_vars.h"
@@ -524,40 +519,6 @@ int main ( int argc, char **argv )
pdcp_run(&ctxt);
}
#ifdef E2_AGENT
//////////////////////////////////
//////////////////////////////////
//// Init the E2 Agent
sm_io_ag_ran_t io = init_ran_func_ag();
// OAI Wrapper
e2_agent_args_t oai_args = RCconfig_E2agent();
AssertFatal(oai_args.sm_dir != NULL , "Please, specify the directory where the SMs are located in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\");} ");
AssertFatal(oai_args.ip != NULL , "Please, specify the IP address of the nearRT-RIC in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\"");
fr_args_t args = {.ip = oai_args.ip}; // init_fr_args(0, NULL);
memcpy(args.libs_dir, oai_args.sm_dir, 128);
sleep(1);
const eNB_RRC_INST* rrc = RC.rrc[0]; // mod_id = 0
assert(rrc != NULL && "rrc cannot be NULL");
const int mcc = rrc->configuration.mcc[0];
const int mnc = rrc->configuration.mnc[0];
const int mnc_digit_len = rrc->configuration.mnc_digit_length[0];
const ngran_node_t node_type = ngran_eNB;
int nb_id = rrc->configuration.cell_identity;
int cu_du_id = 0;
printf("[E2-AGENT]: mcc = %d mnc = %d mnc_digit = %d nd_id = %d \n", mcc, mnc, mnc_digit_len, nb_id);
bool init_agent = false;
init_agent_api(mcc, mnc, mnc_digit_len, nb_id, cu_du_id, node_type, io, &args);
init_agent = true;
#endif // E2_AGENT
// init UE_PF_PO and mutex lock
pthread_mutex_init(&ue_pf_po_mutex, NULL);
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs);
@@ -681,10 +642,6 @@ int main ( int argc, char **argv )
LOG_I(ENB_APP,"oai_exit=%d\n",oai_exit);
// stop threads
#ifdef E2_AGENT
if (init_agent) stop_agent_api();
#endif
#if 0 //Disable clean up because this tends to crash (and unnecessary)
if (RC.nb_inst == 0) {
if(IS_SOFTMODEM_DOSCOPE)

View File

@@ -746,7 +746,7 @@ void init_bler_table(void)
for (unsigned int i = 0; i < NUM_MCS; i++)
{
char fName[1024];
snprintf(fName, sizeof(fName), "%s/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results/bler_tx1_chan18_nrx1_mcs%u.csv", openair_dir, i);
snprintf(fName, sizeof(fName), "%s/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results/bler_tx1_chan18_nrx1_mcs%d.csv", openair_dir, i);
FILE *pFile = fopen(fName, "r");
if (!pFile)
{

View File

@@ -84,7 +84,7 @@ int nr_rlc_get_available_tx_space(const rnti_t rntiP, const logical_chan_id_t ch
return 0;
}
void rrc_gNB_generate_dedicatedRRCReconfiguration(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP)
void rrc_gNB_generate_dedicatedRRCReconfiguration(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP, NR_CellGroupConfig_t *cell_groupConfig_from_DU)
{
abort();
}
@@ -111,7 +111,7 @@ f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP)
return NULL;
}
void fill_DRB_configList(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP, uint8_t xid)
void fill_DRB_configList(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP)
{
abort();
}

View File

@@ -110,8 +110,7 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
#define L1STATSSTRLEN 16384
void tx_func(void *param)
{
void tx_func(void *param) {
processingData_L1tx_t *info = (processingData_L1tx_t *) param;
int frame_tx = info->frame;
@@ -120,7 +119,6 @@ void tx_func(void *param)
int absslot_tx = info->timestamp_tx/info->gNB->frame_parms.get_samples_per_slot(slot_tx,&info->gNB->frame_parms);
int absslot_rx = absslot_tx-info->gNB->RU_list[0]->sl_ahead;
int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;
start_meas(&info->gNB->phy_proc_tx);
clock_gettime(CLOCK_MONOTONIC,&info->gNB->rt_L1_profiling.start_L1_TX[rt_prof_idx]);
phy_procedures_gNB_TX(info,
@@ -129,47 +127,10 @@ void tx_func(void *param)
1);
clock_gettime(CLOCK_MONOTONIC,&info->gNB->rt_L1_profiling.return_L1_TX[rt_prof_idx]);
if (get_softmodem_params()->reorder_thread_disable) {
PHY_VARS_gNB *gNB = info->gNB;
processingData_RU_t syncMsgRU;
syncMsgRU.frame_tx = frame_tx;
syncMsgRU.slot_tx = slot_tx;
syncMsgRU.ru = gNB->RU_list[0];
syncMsgRU.timestamp_tx = info->timestamp_tx;
LOG_D(PHY,"gNB: %d.%d : calling RU TX function\n",syncMsgRU.frame_tx,syncMsgRU.slot_tx);
ru_tx_func((void*)&syncMsgRU);
}
/* this thread is done with the sched_info, decrease the reference counter */
deref_sched_response(info->sched_response_id);
stop_meas(&info->gNB->phy_proc_tx);
}
void *L1_rx_thread(void *arg)
{
PHY_VARS_gNB *gNB = (PHY_VARS_gNB*)arg;
while (oai_exit == 0) {
notifiedFIFO_elt_t *res = pullNotifiedFIFO(&gNB->resp_L1);
processingData_L1_t *info = (processingData_L1_t *)NotifiedFifoData(res);
rx_func(info);
delNotifiedFIFO_elt(res);
}
return NULL;
}
/* to be added for URLLC, requires MAC scheduling to be split from UL indication
void *L1_tx_thread(void *arg) {
PHY_VARS_gNB *gNB = (PHY_VARS_gNB*)arg;
while (oai_exit == 0) {
notifiedFIFO_elt_t *res = pullNotifiedFIFO(&gNB->L1_tx_out);
processingData_L1tx_t *info = (processingData_L1tx_t *)NotifiedFifoData(res);
tx_func(info);
delNotifiedFIFO_elt(res);
}
return NULL;
}
*/
void rx_func(void *param)
{
processingData_L1_t *info = (processingData_L1_t *) param;
@@ -228,16 +189,13 @@ void rx_func(void *param)
// Do PRACH RU processing
L1_nr_prach_procedures(gNB,frame_rx,slot_rx);
//WA: comment rotation in tx/rx
if((gNB->num_RU == 1) && (gNB->RU_list[0]->if_south != REMOTE_IF4p5)) {
//apply the rx signal rotation here
for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) {
apply_nr_rotation_ul(&gNB->frame_parms,
gNB->common_vars.rxdataF[aa],
slot_rx,
0,
gNB->frame_parms.Ncp==EXTENDED?12:14);
}
//apply the rx signal rotation here
for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) {
apply_nr_rotation_ul(&gNB->frame_parms,
gNB->common_vars.rxdataF[aa],
slot_rx,
0,
gNB->frame_parms.Ncp==EXTENDED?12:14);
}
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
}
@@ -248,37 +206,29 @@ void rx_func(void *param)
// Call the scheduler
start_meas(&gNB->ul_indication_stats);
// pthread_mutex_lock(&gNB->UL_INFO_mutex);
pthread_mutex_lock(&gNB->UL_INFO_mutex);
gNB->UL_INFO.frame = frame_rx;
gNB->UL_INFO.slot = slot_rx;
gNB->UL_INFO.module_id = gNB->Mod_id;
gNB->UL_INFO.CC_id = gNB->CC_id;
gNB->if_inst->NR_UL_indication(&gNB->UL_INFO);
// pthread_mutex_unlock(&gNB->UL_INFO_mutex);
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
stop_meas(&gNB->ul_indication_stats);
int tx_slot_type = nr_slot_select(cfg,frame_tx,slot_tx);
int tx_slot_type = nr_slot_select(cfg,frame_rx,slot_tx);
if ((tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT) && NFAPI_MODE != NFAPI_MODE_PNF) {
notifiedFIFO_elt_t *res;
processingData_L1tx_t *syncMsg;
// Its a FIFO so it maitains the order in which the MAC fills the messages
// so no need for checking for right slot
if (get_softmodem_params()->reorder_thread_disable) {
// call the TX function directly from this thread
syncMsg = gNB->msgDataTx;
syncMsg->gNB = gNB;
syncMsg->timestamp_tx = info->timestamp_tx;
tx_func(syncMsg);
} else {
res = pullTpool(&gNB->L1_tx_filled, &gNB->threadPool);
if (res == NULL)
return; // Tpool has been stopped
syncMsg = (processingData_L1tx_t *)NotifiedFifoData(res);
syncMsg->gNB = gNB;
syncMsg->timestamp_tx = info->timestamp_tx;
res->key = slot_tx;
pushTpool(&gNB->threadPool, res);
}
res = pullTpool(&gNB->L1_tx_filled, &gNB->threadPool);
if (res == NULL)
return; // Tpool has been stopped
syncMsg = (processingData_L1tx_t *)NotifiedFifoData(res);
syncMsg->gNB = gNB;
syncMsg->timestamp_tx = info->timestamp_tx;
res->key = slot_tx;
pushTpool(&gNB->threadPool, res);
} else if (get_softmodem_params()->continuous_tx) {
notifiedFIFO_elt_t *res = pullTpool(&gNB->L1_tx_free, &gNB->threadPool);
if (res == NULL)
@@ -337,11 +287,6 @@ static size_t dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output, size
const char *end = output + outputlen;
output += print_meas_log(&gNB->phy_proc_tx, "L1 Tx processing", NULL, NULL, output, end - output);
output += print_meas_log(&gNB->dlsch_encoding_stats, "DLSCH encoding", NULL, NULL, output, end - output);
output += print_meas_log(&gNB->dlsch_scrambling_stats, "DLSCH scrambling", NULL, NULL, output, end-output);
output += print_meas_log(&gNB->dlsch_modulation_stats, "DLSCH modulation", NULL, NULL, output, end-output);
output += print_meas_log(&gNB->dlsch_layer_mapping_stats, "DLSCH layer mapping", NULL, NULL, output,end-output);
output += print_meas_log(&gNB->dlsch_resource_mapping_stats, "DLSCH resource mapping", NULL, NULL, output,end-output);
output += print_meas_log(&gNB->dlsch_precoding_stats, "DLSCH precoding", NULL, NULL, output,end-output);
output += print_meas_log(&gNB->phy_proc_rx, "L1 Rx processing", NULL, NULL, output, end - output);
output += print_meas_log(&gNB->ul_indication_stats, "UL Indication", NULL, NULL, output, end - output);
output += print_meas_log(&gNB->rx_pusch_stats, "PUSCH inner-receiver", NULL, NULL, output, end - output);
@@ -386,11 +331,7 @@ void *nrL1_stats_thread(void *param) {
reset_meas(&gNB->rx_pusch_stats);
reset_meas(&gNB->ulsch_decoding_stats);
reset_meas(&gNB->schedule_response_stats);
reset_meas(&gNB->dlsch_scrambling_stats);
reset_meas(&gNB->dlsch_modulation_stats);
reset_meas(&gNB->dlsch_layer_mapping_stats);
reset_meas(&gNB->dlsch_resource_mapping_stats);
reset_meas(&gNB->dlsch_precoding_stats);
while (!oai_exit) {
sleep(1);
dump_nr_I0_stats(fd,gNB);
@@ -473,49 +414,31 @@ void init_gNB_Tpool(int inst) {
// L1 RX result FIFO
initNotifiedFIFO(&gNB->resp_L1);
if (!get_softmodem_params()->reorder_thread_disable) {
notifiedFIFO_elt_t *msg = newNotifiedFIFO_elt(sizeof(processingData_L1_t), 0, &gNB->resp_L1, rx_func);
pushNotifiedFIFO(&gNB->resp_L1, msg); // to unblock the process in the beginning
}
notifiedFIFO_elt_t *msg = newNotifiedFIFO_elt(sizeof(processingData_L1_t), 0, &gNB->resp_L1, rx_func);
pushNotifiedFIFO(&gNB->resp_L1, msg); // to unblock the process in the beginning
// L1 TX result FIFO
initNotifiedFIFO(&gNB->L1_tx_free);
initNotifiedFIFO(&gNB->L1_tx_filled);
initNotifiedFIFO(&gNB->L1_tx_out);
if (get_softmodem_params()->reorder_thread_disable) {
// create the RX thread responsible for triggering RX processing and then TX processing if a single thread is used
threadCreate(&gNB->L1_rx_thread, L1_rx_thread, (void *)gNB, "L1_rx_thread",
gNB->L1_rx_thread_core, OAI_PRIORITY_RT_MAX);
// if separate threads are used for RX and TX, create the TX thread
// threadCreate(&gNB->L1_tx_thread, L1_tx_thread, (void *)gNB, "L1_tx_thread",
// gNB->L1_tx_thread_core, OAI_PRIORITY_RT_MAX);
// we create 2 threads for L1 tx processing
for (int i=0; i < 2; i++) {
notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t), 0, &gNB->L1_tx_out, tx_func);
processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx);
memset(msgDataTx, 0, sizeof(processingData_L1tx_t));
init_DLSCH_struct(gNB, msgDataTx);
memset(msgDataTx->ssb, 0, 64*sizeof(NR_gNB_SSB_t));
// this will be removed when the msgDataTx is not necessary anymore
gNB->msgDataTx = msgDataTx;
} else {
// we create 2 threads for L1 tx processing
for (int i=0; i < 2; i++) {
notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t), 0, &gNB->L1_tx_out, tx_func);
processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx);
memset(msgDataTx, 0, sizeof(processingData_L1tx_t));
init_DLSCH_struct(gNB, msgDataTx);
memset(msgDataTx->ssb, 0, 64*sizeof(NR_gNB_SSB_t));
pushNotifiedFIFO(&gNB->L1_tx_free, msgL1Tx); // to unblock the process in the beginning
}
LOG_I(PHY,"Creating thread for TX reordering and dispatching to RU\n");
threadCreate(&proc->pthread_tx_reorder, tx_reorder_thread, (void *)gNB, "thread_tx_reorder",
gNB->RU_list[0] ? gNB->RU_list[0]->tpcores[1] : -1, OAI_PRIORITY_RT_MAX);
pushNotifiedFIFO(&gNB->L1_tx_free, msgL1Tx); // to unblock the process in the beginning
}
if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS_BIT) && (NFAPI_MODE!=NFAPI_MODE_VNF))
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
LOG_I(PHY,"Creating thread for TX reordering and dispatching to RU\n");
threadCreate(&proc->pthread_tx_reorder, tx_reorder_thread, (void *)gNB, "thread_tx_reorder",
gNB->RU_list[0] ? gNB->RU_list[0]->tpcores[1] : -1, OAI_PRIORITY_RT_MAX);
}
@@ -584,7 +507,6 @@ void init_eNB_afterRU(void) {
gNB = RC.gNB[inst];
gNB->ldpc_offload_flag = ldpc_offload_flag;
gNB->reorder_thread_disable = get_softmodem_params()->reorder_thread_disable;
phy_init_nr_gNB(gNB);
@@ -663,7 +585,6 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
gNB->prach_energy_counter = 0;
gNB->chest_time = get_softmodem_params()->chest_time;
gNB->chest_freq = get_softmodem_params()->chest_freq;
}

View File

@@ -60,7 +60,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#endif
/* these variables have to be defined before including ENB_APP/enb_paramdef.h and GNB_APP/gnb_paramdef.h */
static int DEFBANDS[] = {7};
static int DEFENBS[] = {0};
@@ -84,8 +83,6 @@ static int DEFRUTPCORES[] = {-1,-1,-1,-1};
extern int oai_exit;
uint16_t sl_ahead;
extern struct timespec timespec_sub(struct timespec lhs, struct timespec rhs);
extern struct timespec timespec_add(struct timespec lhs, struct timespec rhs);
extern void nr_phy_free_RU(RU_t *);
@@ -1088,7 +1085,7 @@ void *ru_thread( void *param ) {
ru_thread_status = 0;
// set default return value
sprintf(threadname,"ru_thread %u",ru->idx);
LOG_I(PHY,"Starting RU %d (%s,%s) on cpu %d\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing],sched_getcpu());
LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
memcpy((void *)&ru->config,(void *)&RC.gNB[0]->gNB_config,sizeof(ru->config));
if(emulate_rf) {
@@ -1284,13 +1281,9 @@ void *ru_thread( void *param ) {
} // end if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
// At this point, all information for subframe has been received on FH interface
if (!get_softmodem_params()->reorder_thread_disable) {
res = pullTpool(&gNB->resp_L1, &gNB->threadPool);
if (res == NULL)
break; // Tpool has been stopped
} else {
res=newNotifiedFIFO_elt(sizeof(processingData_L1_t),0, &gNB->resp_L1,NULL);
}
res = pullTpool(&gNB->resp_L1, &gNB->threadPool);
if (res == NULL)
break; // Tpool has been stopped
syncMsg = (processingData_L1_t *)NotifiedFifoData(res);
syncMsg->gNB = gNB;
syncMsg->frame_rx = proc->frame_rx;
@@ -1299,10 +1292,7 @@ void *ru_thread( void *param ) {
syncMsg->slot_tx = proc->tti_tx;
syncMsg->timestamp_tx = proc->timestamp_tx;
res->key = proc->tti_rx;
if (!get_softmodem_params()->reorder_thread_disable)
pushTpool(&gNB->threadPool, res);
else
pushNotifiedFIFO(&gNB->resp_L1, res);
pushTpool(&gNB->threadPool, res);
}
printf( "Exiting ru_thread \n");
@@ -1317,8 +1307,7 @@ int start_streaming(RU_t *ru) {
}
int nr_start_if(struct RU_t_s *ru, struct PHY_VARS_gNB_s *gNB) {
if (ru->if_south <= REMOTE_IF5)
for (int i=0;i<ru->nb_rx;i++) ru->openair0_cfg.rxbase[i] = ru->common.rxdata[i];
for (int i=0;i<ru->nb_rx;i++) ru->openair0_cfg.rxbase[i] = ru->common.rxdata[i];
ru->openair0_cfg.rxsize = ru->nr_frame_parms->samples_per_subframe*10;
reset_meas(&ru->ifdevice.tx_fhaul);
return(ru->ifdevice.trx_start_func(&ru->ifdevice));
@@ -1355,7 +1344,7 @@ void init_RU_proc(RU_t *ru) {
pthread_mutex_init( &proc->mutex_emulateRF,NULL);
pthread_cond_init( &proc->cond_emulateRF, NULL);
threadCreate( &proc->pthread_FH, ru_thread, (void *)ru, "ru_thread", ru->ru_thread_core, OAI_PRIORITY_RT_MAX );
threadCreate( &proc->pthread_FH, ru_thread, (void *)ru, "ru_thread", ru->tpcores[0], OAI_PRIORITY_RT_MAX );
if(emulate_rf)
threadCreate( &proc->pthread_emulateRF, emulatedRF_thread, (void *)proc, "emulateRF", -1, OAI_PRIORITY_RT );
@@ -1681,7 +1670,7 @@ void set_function_spec_param(RU_t *ru) {
case REMOTE_IF4p5:
ru->do_prach = 0;
ru->feprx = NULL; // DFTs
ru->feptx_prec = nr_feptx_prec; // Precoding operation
ru->feptx_prec = NULL; // Precoding operation
ru->feptx_ofdm = NULL; // no OFDM mod
ru->fh_south_in = fh_if4p5_south_in; // synchronous IF4p5 reception
ru->fh_south_out = fh_if4p5_south_out; // synchronous IF4p5 transmission
@@ -1793,25 +1782,23 @@ void init_NR_RU(char *rf_config_file) {
set_function_spec_param(ru);
LOG_I(PHY,"Starting ru_thread %d\n",ru_id);
init_RU_proc(ru);
if (ru->if_south != REMOTE_IF4p5) {
int threadCnt = ru->num_tpcores;
if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt);
else LOG_I(PHY,"RU Thread pool size %d\n",threadCnt);
char pool[80];
int s_offset = sprintf(pool,"%d",ru->tpcores[0]);
for (int icpu=1; icpu<threadCnt; icpu++) {
s_offset+=sprintf(pool+s_offset,",%d",ru->tpcores[icpu]);
}
LOG_I(PHY,"RU thread-pool core string %s\n",pool);
ru->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
initTpool(pool, ru->threadPool, cpumeas(CPUMEAS_GETSTATE));
// FEP RX result FIFO
ru->respfeprx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
initNotifiedFIFO(ru->respfeprx);
// FEP TX result FIFO
ru->respfeptx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
initNotifiedFIFO(ru->respfeptx);
int threadCnt = ru->num_tpcores;
if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt);
else LOG_I(PHY,"RU Thread pool size %d\n",threadCnt);
char pool[80];
int s_offset = sprintf(pool,"%d",ru->tpcores[0]);
for (int icpu=1; icpu<threadCnt; icpu++) {
s_offset+=sprintf(pool+s_offset,",%d",ru->tpcores[icpu]);
}
LOG_I(PHY,"RU thread-pool core string %s\n",pool);
ru->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
initTpool(pool, ru->threadPool, cpumeas(CPUMEAS_GETSTATE));
// FEP RX result FIFO
ru->respfeprx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
initNotifiedFIFO(ru->respfeprx);
// FEP TX result FIFO
ru->respfeptx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
initNotifiedFIFO(ru->respfeptx);
} // for ru_id
// sleep(1);
@@ -1829,30 +1816,18 @@ void stop_RU(int nb_ru) {
/* --------------------------------------------------------*/
/* from here function to use configuration module */
static void NRRCconfig_RU(void)
{
static void NRRCconfig_RU(void) {
int i = 0, j = 0;
paramdef_t RUParams[] = RUPARAMS_DESC;
paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0};
config_getlist(&RUParamList, RUParams, sizeof(RUParams)/sizeof(paramdef_t), NULL);
config_getlist( &RUParamList, RUParams, sizeof(RUParams)/sizeof(paramdef_t), NULL);
paramdef_t GNBSParams[] = GNBSPARAMS_DESC;
paramdef_t GNBParams[] = GNBPARAMS_DESC;
paramlist_def_t GNBParamList = {GNB_CONFIG_STRING_GNB_LIST, NULL, 0};
config_get(GNBSParams, sizeof(GNBSParams) / sizeof(paramdef_t), NULL);
int num_gnbs = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt;
AssertFatal(num_gnbs > 0, "Failed to parse config file no gnbs %s \n", GNB_CONFIG_STRING_ACTIVE_GNBS);
config_getlist(&GNBParamList, GNBParams, sizeof(GNBParams) / sizeof(paramdef_t), NULL);
int N1 = *GNBParamList.paramarray[0][GNB_PDSCH_ANTENNAPORTS_N1_IDX].iptr;
int N2 = *GNBParamList.paramarray[0][GNB_PDSCH_ANTENNAPORTS_N2_IDX].iptr;
int XP = *GNBParamList.paramarray[0][GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr;
int num_logical_antennas = N1 * N2 * XP;
if (RUParamList.numelt > 0) {
if ( RUParamList.numelt > 0) {
RC.ru = (RU_t **)malloc(RC.nb_RU*sizeof(RU_t *));
RC.ru_mask = (1 << NB_RU) - 1;
RC.ru_mask=(1<<NB_RU) - 1;
printf("Set RU mask to %lx\n",RC.ru_mask);
for (int j = 0; j < RC.nb_RU; j++) {
for (j = 0; j < RC.nb_RU; j++) {
RC.ru[j] = (RU_t *)malloc(sizeof(RU_t));
memset((void *)RC.ru[j],0,sizeof(RU_t));
RC.ru[j]->idx = j;
@@ -1861,13 +1836,12 @@ static void NRRCconfig_RU(void)
printf("Creating RC.ru[%d]:%p\n", j, RC.ru[j]);
RC.ru[j]->if_timing = synch_to_ext_device;
if (RC.nb_nr_L1_inst > 0)
if (RC.nb_nr_L1_inst >0)
RC.ru[j]->num_gNB = RUParamList.paramarray[j][RU_ENB_LIST_IDX].numelt;
else
RC.ru[j]->num_gNB = 0;
for (int i = 0; i < RC.ru[j]->num_gNB; i++)
RC.ru[j]->gNB_list[i] = RC.gNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]];
for (i=0; i<RC.ru[j]->num_gNB; i++) RC.ru[j]->gNB_list[i] = RC.gNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]];
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_ADDRS)) {
RC.ru[j]->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr));
@@ -1922,7 +1896,7 @@ static void NRRCconfig_RU(void)
RC.ru[j]->openair0_cfg.tune_offset = get_softmodem_params()->tune_offset;
if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) {
if (!(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX))) {
if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) {
RC.ru[j]->if_south = LOCAL_RF;
RC.ru[j]->function = gNodeB_3GPP;
printf("Setting function for RU %d to gNodeB_3GPP\n",j);
@@ -1996,8 +1970,6 @@ static void NRRCconfig_RU(void)
} /* strcmp(local_rf, "yes") != 0 */
RC.ru[j]->nb_tx = *(RUParamList.paramarray[j][RU_NB_TX_IDX].uptr);
AssertFatal(RC.ru[j]->nb_tx >= num_logical_antennas,
"Number of logical antenna ports (set in config file with pdsch_AntennaPorts) cannot be larger than physical antennas (nb_tx)\n");
RC.ru[j]->nb_rx = *(RUParamList.paramarray[j][RU_NB_RX_IDX].uptr);
RC.ru[j]->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr);
RC.ru[j]->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr);
@@ -2006,8 +1978,7 @@ static void NRRCconfig_RU(void)
RC.ru[j]->do_precoding = *(RUParamList.paramarray[j][RU_DO_PRECODING].iptr);
RC.ru[j]->sl_ahead = *(RUParamList.paramarray[j][RU_SL_AHEAD].iptr);
RC.ru[j]->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt;
for (int i = 0; i < RC.ru[j]->num_bands; i++)
RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i];
for (i=0; i<RC.ru[j]->num_bands; i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i];
RC.ru[j]->openair0_cfg.nr_flag = *(RUParamList.paramarray[j][RU_NR_FLAG].iptr);
RC.ru[j]->openair0_cfg.nr_band = RC.ru[j]->band[0];
RC.ru[j]->openair0_cfg.nr_scs_for_raster = *(RUParamList.paramarray[j][RU_NR_SCS_FOR_RASTER].iptr);
@@ -2016,18 +1987,16 @@ static void NRRCconfig_RU(void)
RC.ru[j]->openair0_cfg.txfh_cores[0] = *(RUParamList.paramarray[j][RU_TXFH_CORE_ID].iptr);
RC.ru[j]->num_tpcores = *(RUParamList.paramarray[j][RU_NUM_TP_CORES].iptr);
RC.ru[j]->half_slot_parallelization = *(RUParamList.paramarray[j][RU_HALF_SLOT_PARALLELIZATION].iptr);
RC.ru[j]->ru_thread_core = *(RUParamList.paramarray[j][RU_RU_THREAD_CORE].iptr);
printf("[RU %d] Setting half-slot parallelization to %d\n",j,RC.ru[j]->half_slot_parallelization);
AssertFatal(RC.ru[j]->num_tpcores <= RUParamList.paramarray[j][RU_TP_CORES].numelt, "Number of TP cores should be <=16\n");
for (int i = 0; i < RC.ru[j]->num_tpcores; i++)
RC.ru[j]->tpcores[i] = RUParamList.paramarray[j][RU_TP_CORES].iptr[i];
for (i=0; i<RC.ru[j]->num_tpcores; i++) RC.ru[j]->tpcores[i] = RUParamList.paramarray[j][RU_TP_CORES].iptr[i];
if (config_isparamset(RUParamList.paramarray[j], RU_BF_WEIGHTS_LIST_IDX)) {
RC.ru[j]->nb_bfw = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].numelt;
for (int i = 0; i < RC.ru[j]->num_gNB; i++) {
for (i=0; i<RC.ru[j]->num_gNB; i++) {
RC.ru[j]->bw_list[i] = (int32_t *)malloc16_clear((RC.ru[j]->nb_bfw)*sizeof(int32_t));
for (int b = 0; b < RC.ru[j]->nb_bfw; b++)
RC.ru[j]->bw_list[i][b] = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].iptr[b];
for (int b=0; b<RC.ru[j]->nb_bfw; b++) RC.ru[j]->bw_list[i][b] = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].iptr[b];
}
}
}// j=0..num_rus

View File

@@ -82,12 +82,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "openair2/E1AP/e1ap_common.h"
#include "openair2/E1AP/e1ap_api.h"
#ifdef E2_AGENT
#include "openair2/E2AP/flexric/src/agent/e2_agent_api.h"
#include "openair2/E2AP/RAN_FUNCTION/NR/init_ran_func.h"
#endif
pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
@@ -689,56 +683,6 @@ int main( int argc, char **argv ) {
config_sync_var=0;
#ifdef E2_AGENT
//////////////////////////////////
//////////////////////////////////
//// Init the E2 Agent
sm_io_ag_ran_t io = init_ran_func_ag();
// OAI Wrapper
e2_agent_args_t oai_args = RCconfig_NR_E2agent();
AssertFatal(oai_args.sm_dir != NULL , "Please, specify the directory where the SMs are located in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\");} ");
AssertFatal(oai_args.ip != NULL , "Please, specify the IP address of the nearRT-RIC in the config file, i.e., e2_agent = {near_ric_ip_addr = \"127.0.0.1\"; sm_dir = \"/usr/local/lib/flexric/\"");
fr_args_t args = {.ip = oai_args.ip}; // init_fr_args(0, NULL);
memcpy(args.libs_dir, oai_args.sm_dir, 128);
sleep(1);
const gNB_RRC_INST* rrc = RC.nrrrc[0];
assert(rrc != NULL && "rrc cannot be NULL");
const int mcc = rrc->configuration.mcc[0];
const int mnc = rrc->configuration.mnc[0];
const int mnc_digit_len = rrc->configuration.mnc_digit_length[0];
const ngran_node_t node_type = rrc->node_type;
int nb_id = 0;
int cu_du_id = 0;
if (node_type == ngran_gNB) {
nb_id = rrc->configuration.cell_identity;
} else if (node_type == ngran_gNB_DU) {
nb_id = rrc->configuration.cell_identity;
cu_du_id = rrc->configuration.cell_identity;
} else if (node_type == ngran_gNB_CU) {
nb_id = rrc->configuration.cell_identity;
cu_du_id = rrc->node_id;
} else {
LOG_E(NR_RRC, "not supported ran type detect\n");
}
printf("[E2-AGENT]: mcc = %d mnc = %d mnc_digit = %d nd_id = %d \n", mcc, mnc, mnc_digit_len, nb_id);
bool init_agent = false;
init_agent_api(mcc, mnc, mnc_digit_len, nb_id, cu_du_id, node_type, io, &args);
init_agent = true;
#endif // E2_AGENT
if (NFAPI_MODE==NFAPI_MODE_PNF) {
wait_nfapi_init("main?");
}
@@ -795,10 +739,6 @@ int main( int argc, char **argv ) {
oai_exit=1;
printf("oai_exit=%d\n",oai_exit);
#ifdef E2_AGENT
if (init_agent) stop_agent_api();
#endif
// cleanup
if (RC.nb_nr_L1_inst > 0)
stop_gNB(RC.nb_nr_L1_inst);

View File

@@ -734,6 +734,16 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
}
}
int computeSamplesShift(PHY_VARS_NR_UE *UE) {
int samples_shift = -(UE->rx_offset>>1);
if (samples_shift != 0) {
LOG_I(NR_PHY,"Adjusting frame in time by %i samples\n", samples_shift);
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
UE->max_pos_fil += samples_shift << 15; // reset IIR filter when sample shift is applied
}
return samples_shift;
}
static inline int get_firstSymSamp(uint16_t slot, NR_DL_FRAME_PARMS *fp) {
if (fp->numerology_index == 0)
return fp->nb_prefix_samples0 + fp->ofdm_symbol_size;
@@ -894,13 +904,14 @@ void *UE_thread(void *arg) {
int readBlockSize, writeBlockSize;
readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms);
writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX) % nb_slot_frame, &UE->frame_parms);
if (UE->apply_timing_offset && (slot_nr == nb_slot_frame-1)) {
const int sampShift = -(UE->rx_offset>>1);
readBlockSize -= sampShift;
writeBlockSize -= sampShift;
UE->apply_timing_offset = false;
if (slot_nr<(nb_slot_frame - 1)) {
readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms);
writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX) % nb_slot_frame, &UE->frame_parms);
} else {
UE->rx_offset_diff = computeSamplesShift(UE);
readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms) -
UE->rx_offset_diff;
writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX) % nb_slot_frame, &UE->frame_parms)- UE->rx_offset_diff;
}
AssertFatal(readBlockSize ==

View File

@@ -596,7 +596,7 @@ static void init_bler_table(char *env_string) {
for (unsigned int i = 0; i < NR_NUM_MCS; i++) {
char fName[1024];
snprintf(fName, sizeof(fName), "%s/mcs%u_awgn_5G.csv", awgn_results_dir, i);
snprintf(fName, sizeof(fName), "%s/mcs%d_awgn_5G.csv", awgn_results_dir, i);
FILE *pFile = fopen(fName, "r");
if (!pFile) {
LOG_E(NR_MAC, "%s: open %s: %s\n", __func__, fName, strerror(errno));

View File

@@ -46,7 +46,6 @@ static softmodem_params_t softmodem_params;
char *parallel_config=NULL;
char *worker_config=NULL;
int usrp_tx_thread = 0;
char *nfapi_str=NULL;
int ldpc_offload_flag=0;
uint8_t nfapi_mode=0;

View File

@@ -44,7 +44,6 @@ extern "C"
example: -1,3 launches two working threads one floating, the second set on core 3\n\
default 8 floating threads\n\
use N for no pool (runs in calling thread) recommended with rfsim.\n"
#define CONFIG_HLP_REORDER "Disable reorder thread\n"
#define CONFIG_HLP_ULMAXE "set the eNodeB max ULSCH erros\n"
#define CONFIG_HLP_CALUER "set UE RX calibration\n"
#define CONFIG_HLP_CALUERM ""
@@ -111,7 +110,6 @@ extern "C"
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define RF_CONFIG_FILE softmodem_params.rf_config_file
#define TP_CONFIG softmodem_params.threadPoolConfig
#define CONTINUOUS_TX softmodem_params.continuous_tx
#define PHY_TEST softmodem_params.phy_test
#define DO_RA softmodem_params.do_ra
#define SA softmodem_params.sa
@@ -134,7 +132,7 @@ extern "C"
#define NON_STOP softmodem_params.non_stop
#define EMULATE_L1 softmodem_params.emulate_l1
#define CONTINUOUS_TX softmodem_params.continuous_tx
#define REORDER_THREAD_DISABLE softmodem_params.reorder_thread_disable
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
extern int usrp_tx_thread;
@@ -142,7 +140,6 @@ extern int usrp_tx_thread;
#define CMDLINE_PARAMS_DESC { \
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, .strptr=&RF_CONFIG_FILE, .defstrval=NULL, TYPE_STRING, 0}, \
{"thread-pool", CONFIG_HLP_TPOOL, 0, .strptr=&TP_CONFIG, .defstrval="-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \
{"reorder-thread-disable",CONFIG_HLP_REORDER, PARAMFLAG_BOOL, .iptr=&REORDER_THREAD_DISABLE, .defintval=0, TYPE_INT, 0}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, .iptr=&PHY_TEST, .defintval=0, TYPE_INT, 0}, \
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, .iptr=&DO_RA, .defintval=0, TYPE_INT, 0}, \
{"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, .iptr=&SA, .defintval=0, TYPE_INT, 0}, \
@@ -213,7 +210,6 @@ extern int usrp_tx_thread;
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s3a = { config_checkstr_assign_integer, \
{"MONOLITHIC", "PNF", "VNF","UE_STUB_PNF","UE_STUB_OFFNET","STANDALONE_PNF"}, \
{NFAPI_MONOLITHIC, NFAPI_MODE_PNF, NFAPI_MODE_VNF,NFAPI_UE_STUB_PNF,NFAPI_UE_STUB_OFFNET,NFAPI_MODE_STANDALONE_PNF}, \
@@ -304,7 +300,6 @@ typedef struct {
//THREAD_STRUCT thread_struct;
char *rf_config_file;
char *threadPoolConfig;
int reorder_thread_disable;
int phy_test;
int do_ra;
int sa;

View File

@@ -2149,13 +2149,10 @@ void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_add
pnf.phys[0].udp.tx_port = vnf_p7_port;
strcpy(pnf.phys[0].udp.tx_addr, vnf_ip_addr);
strcpy(pnf.phys[0].local_addr, pnf_ip_addr);
printf("%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%u rx:%u]\n",
__FUNCTION__,
config->vnf_ip_addr,
config->vnf_p5_port,
printf("%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%d rx:%d]\n",
__FUNCTION__,config->vnf_ip_addr, config->vnf_p5_port,
pnf.phys[0].local_addr,
pnf.phys[0].udp.tx_addr,
pnf.phys[0].udp.tx_port,
pnf.phys[0].udp.tx_addr, pnf.phys[0].udp.tx_port,
pnf.phys[0].udp.rx_port);
config->cell_search_req = &cell_search_request;
@@ -2203,13 +2200,11 @@ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr,
pnf.phys[0].udp.tx_port = vnf_p7_port;
strcpy(pnf.phys[0].udp.tx_addr, vnf_ip_addr);
strcpy(pnf.phys[0].local_addr, pnf_ip_addr);
printf("%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%u rx:%u]\n",
printf("%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%d rx:%d]\n",
__FUNCTION__,
config->vnf_ip_addr,
config->vnf_p5_port,
config->vnf_ip_addr, config->vnf_p5_port,
pnf.phys[0].local_addr,
pnf.phys[0].udp.tx_addr,
pnf.phys[0].udp.tx_port,
pnf.phys[0].udp.tx_addr, pnf.phys[0].udp.tx_port,
pnf.phys[0].udp.rx_port);
config->pnf_param_req = &pnf_param_request;
config->pnf_config_req = &pnf_config_request;

View File

@@ -503,7 +503,6 @@ typedef struct {
uint16_t scramb_id; // ScramblingID of the CSI-RS [3GPP TS 38.214, sec 5.2.2.3.1], Value: 0->1023
uint8_t power_control_offset; // Ratio of PDSCH EPRE to NZP CSI-RSEPRE [3GPP TS 38.214, sec 5.2.2.3.1], Value: 0->23 representing -8 to 15 dB in 1dB steps; 255: L1 is configured with ProfileSSS
uint8_t power_control_offset_ss; // Ratio of NZP CSI-RS EPRE to SSB/PBCH block EPRE [3GPP TS 38.214, sec 5.2.2.3.1], Values: 0: -3dB; 1: 0dB; 2: 3dB; 3: 6dB; 255: L1 is configured with ProfileSSS
uint8_t measurement_bitmap; // bit 0 RSRP, bit 1 RI, bit 2 LI, bit 3 PMI, bit 4 CQI, bit 5 i1
} fapi_nr_dl_config_csirs_pdu_rel15_t;

View File

@@ -220,9 +220,9 @@ uint8_t pulls16(uint8_t **in, int16_t *out, uint8_t *end) {
uint8_t pull32(uint8_t **in, uint32_t *out, uint8_t *end) {
uint8_t *pIn = *in;
if((end - pIn) >= 4) {
*out = ((uint32_t)pIn[0] << 24) | (pIn[1] << 16) | (pIn[2] << 8) | pIn[3];
(*in) += 4;
if((end - pIn) >=4 ) {
*out = (pIn[0] << 24) | (pIn[1] << 16) | (pIn[2] << 8) | pIn[3];
(*in)+=4;
return 4;
} else {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s no space in buffer\n", __FUNCTION__);

View File

@@ -1106,7 +1106,7 @@ extern "C"
if(instance->mac->tick == 1000) {
if(instance->mac->byte_count > 0) {
printf("[MAC] Rx rate %u bytes/sec\n", instance->mac->byte_count);
printf("[MAC] Rx rate %d bytes/sec\n", instance->mac->byte_count);
instance->mac->byte_count = 0;
}

View File

@@ -62,7 +62,7 @@ inline uint16_t threegpplte_interleaver(uint16_t f1,
threegpplte_interleaver_output-=K;
*/
#ifdef DEBUG_TURBO_ENCODER
printf("pi(i) %u : 2*f2 * i = %u, f1 %u f2 %u, K %u, pi(i-1) %u \n",threegpplte_interleaver_output,threegpplte_interleaver_tmp,f1,f2,K,threegpplte_interleaver_output);
printf("pi(i) %d : 2*f2 * i = %d, f1 %d f2 %d, K %d, pi(i-1) %d \n",threegpplte_interleaver_output,threegpplte_interleaver_tmp,f1,f2,K,threegpplte_interleaver_output);
#endif
return(threegpplte_interleaver_output);
}

View File

@@ -1009,8 +1009,8 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y,
yp1[(n<<1)+i+8] = *yp_cw2;
yp_cw2++;
#ifdef DEBUG_LOGMAP
fprintf(fdavx2,"Term 1 (%u): %d %d\n",n+i,s[(n<<1)+i],yp1[(n<<1)+i]);
fprintf(fdavx2b,"Term 1 (%u): %d %d\n",n+i,s[(n<<1)+i+8],yp1[(n<<1)+i+8]);
fprintf(fdavx2,"Term 1 (%d): %d %d\n",n+i,s[(n<<1)+i],yp1[(n<<1)+i]);
fprintf(fdavx2b,"Term 1 (%d): %d %d\n",n+i,s[(n<<1)+i+8],yp1[(n<<1)+i+8]);
#endif //DEBUG_LOGMAP
}
@@ -1029,8 +1029,8 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y,
yp2[(n<<1)+i-16+8] = *yp_cw2;
yp_cw2++;
#ifdef DEBUG_LOGMAP
fprintf(fdavx2,"Term 2 (%u): %d %d\n",n+i-3-8,s[(n<<1)+i],yp2[(n<<1)+i-16]);
fprintf(fdavx2b,"Term 2 (%u): %d %d\n",n+i-3-8,s[(n<<1)+i+8],yp2[(n<<1)+i-16+8]);
fprintf(fdavx2,"Term 2 (%d): %d %d\n",n+i-3-8,s[(n<<1)+i],yp2[(n<<1)+i-16]);
fprintf(fdavx2b,"Term 2 (%d): %d %d\n",n+i-3-8,s[(n<<1)+i+8],yp2[(n<<1)+i-16+8]);
#endif //DEBUG_LOGMAP
}
@@ -1144,8 +1144,8 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y,
decoded_bytes2[i]=(uint8_t)(db>>16)&0xff;
#ifdef DEBUG_LOGMAP
print_shorts("tmp",(int16_t*)&tmp);
fprintf(fdavx2,"decoded_bytes[%u] %x (%x)\n",i,decoded_bytes[i],db);
fprintf(fdavx2b,"decoded_bytes[%u] %x (%x)\n",i,decoded_bytes2[i],db);
fprintf(fdavx2,"decoded_bytes[%d] %x (%x)\n",i,decoded_bytes[i],db);
fprintf(fdavx2b,"decoded_bytes[%d] %x (%x)\n",i,decoded_bytes2[i],db);
#endif
}
}

View File

@@ -1075,14 +1075,14 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y,
yp1[j] = _mm_extract_epi16(tmpe,1);
yp2[j] = _mm_extract_epi16(tmpe,2);
#ifdef DEBUG_LOGMAP
fprintf(fdsse4,"init0: j %u, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
fprintf(fdsse4,"init0: j %d, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
#endif
j=pi2_p[1];
s[j] = _mm_extract_epi16(tmpe,3);
yp1[j] = _mm_extract_epi16(tmpe,4);
yp2[j] = _mm_extract_epi16(tmpe,5);
#ifdef DEBUG_LOGMAP
fprintf(fdsse4,"init1: j %u, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
fprintf(fdsse4,"init1: j %d, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
#endif
j=pi2_p[2];
s[j] = _mm_extract_epi16(tmpe,6);
@@ -1090,21 +1090,21 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y,
tmpe = _mm_load_si128(&yp128[1]);
yp2[j] = _mm_extract_epi16(tmpe,0);
#ifdef DEBUG_LOGMAP
fprintf(fdsse4,"init2: j %u, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
fprintf(fdsse4,"init2: j %d, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
#endif
j=pi2_p[3];
s[j] = _mm_extract_epi16(tmpe,1);
yp1[j] = _mm_extract_epi16(tmpe,2);
yp2[j] = _mm_extract_epi16(tmpe,3);
#ifdef DEBUG_LOGMAP
fprintf(fdsse4,"init3: j %u, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
fprintf(fdsse4,"init3: j %d, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
#endif
j=pi2_p[4];
s[j] = _mm_extract_epi16(tmpe,4);
yp1[j] = _mm_extract_epi16(tmpe,5);
yp2[j] = _mm_extract_epi16(tmpe,6);
#ifdef DEBUG_LOGMAP
fprintf(fdsse4,"init4: j %u, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
fprintf(fdsse4,"init4: j %d, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
#endif
j=pi2_p[5];
s[j] = _mm_extract_epi16(tmpe,7);
@@ -1112,21 +1112,21 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y,
yp1[j] = _mm_extract_epi16(tmpe,0);
yp2[j] = _mm_extract_epi16(tmpe,1);
#ifdef DEBUG_LOGMAP
fprintf(fdsse4,"init5: j %u, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
fprintf(fdsse4,"init5: j %d, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
#endif
j=pi2_p[6];
s[j] = _mm_extract_epi16(tmpe,2);
yp1[j] = _mm_extract_epi16(tmpe,3);
yp2[j] = _mm_extract_epi16(tmpe,4);
#ifdef DEBUG_LOGMAP
fprintf(fdsse4,"init6: j %u, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
fprintf(fdsse4,"init6: j %d, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
#endif
j=pi2_p[7];
s[j] = _mm_extract_epi16(tmpe,5);
yp1[j] = _mm_extract_epi16(tmpe,6);
yp2[j] = _mm_extract_epi16(tmpe,7);
#ifdef DEBUG_LOGMAP
fprintf(fdsse4,"init7: j %u, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
fprintf(fdsse4,"init7: j %d, s[j] %d yp1[j] %d yp2[j] %d\n",j,s[j],yp1[j],yp2[j]);
#endif
#elif defined(__arm__) || defined(__aarch64__)
s[j] = vgetq_lane_s16(yp128[0],0);

View File

@@ -298,7 +298,7 @@ int test_ldpc(short max_iterations,
for (int j=0;j<n_segments;j++)
for (int i = 0; i < block_length+(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]);
printf("differ in seg %u pos %u (%u,%u)\n", j, i, channel_input[j][i], channel_input_optim[j][i]);
return (-1);
}
//else{
@@ -317,7 +317,7 @@ int test_ldpc(short max_iterations,
for (int i = 2*Zc; i < (Kb+nrows-no_punctured_columns) * Zc-removed_bit; i++) {
#ifdef DEBUG_CODER
if ((i&0xf)==0)
printf("\ne %d..%d: ",i,i+15);
printf("\ne %u..%u: ",i,i+15);
#endif
if (channel_input_optim[j][i-2*Zc]==0)

View File

@@ -28,10 +28,10 @@
//#define DEBUG_CCODE 1
static const unsigned short glte[] = {0133, 0171, 0165}; // {A,B}
static const unsigned short glte_rev[] = {0155, 0117, 0127}; // {A,B}
static const unsigned short gdab[] = {0133, 0171, 0145}; // {A,B}
static const unsigned short gdab_rev[] = {0155, 0117, 0123}; // {A,B}
unsigned short glte[] = { 0133, 0171, 0165 }; // {A,B}
unsigned short glte_rev[] = { 0155, 0117, 0127 }; // {A,B}
unsigned short gdab[] = { 0133, 0171, 0145 }; // {A,B}
unsigned short gdab_rev[] = { 0155, 0117, 0123 }; // {A,B}
unsigned char ccodelte_table[128]; // for transmitter
unsigned char ccodelte_table_rev[128]; // for receiver
@@ -101,7 +101,7 @@ ccodelte_encode (int32_t numbits,
state |= (1<<shiftbit);
#ifdef DEBUG_CCODE
printf("shiftbit %d, %d -> %u \n",shiftbit,c&(1<<(7-first_bit-shiftbit)),state);
printf("shiftbit %d, %d -> %d \n",shiftbit,c&(1<<(7-first_bit-shiftbit)),state);
dummy+=3;
#endif
}
@@ -119,7 +119,7 @@ ccodelte_encode (int32_t numbits,
state |= 64;
#ifdef DEBUG_CCODE
printf("shiftbit %d, %u: %u -> %u \n",shiftbit,state>>6,dummy,state);
printf("shiftbit %d, %d: %d -> %d \n",shiftbit,state>>6,dummy,state);
dummy+=3;
#endif
}
@@ -128,7 +128,7 @@ ccodelte_encode (int32_t numbits,
state = state & 0x3f; // true initial state of Tail-biting CCode
state<<=1; // because of loop structure in CCode
#ifdef DEBUG_CCODE
printf("Initial state %u\n",state);
printf("Initial state %d\n",state);
dummy = 0;
#endif //DEBUG_CCODE
/* Do not increment inPtr until we read the next octet */
@@ -152,7 +152,7 @@ ccodelte_encode (int32_t numbits,
*outPtr++ = (out>>1)&1;
*outPtr++ = (out>>2)&1;
#ifdef DEBUG_CCODE
printf("numbits %d, input %u, outbit %u: %u -> %d (%d%d%d)\n",numbits,state>>6,dummy,state,out,out&1,(out>>1)&1,(out>>2)&1);
printf("numbits %d, input %d, outbit %d: %d -> %d (%d%d%d)\n",numbits,state>>6,dummy,state,out,out&1,(out>>1)&1,(out>>2)&1);
dummy+=3;
#endif //DEBUG_CCODE
}
@@ -175,7 +175,7 @@ ccodelte_encode (int32_t numbits,
*outPtr++ = (out>>1)&1;
*outPtr++ = (out>>2)&1;
#ifdef DEBUG_CCODE
printf("crc bit %d input %u, outbit %u: %u -> %d (%u)\n",shiftbit,state>>6,dummy,state,out,ccodelte_table[state]);
printf("crc bit %d input %d, outbit %d: %d -> %d (%u)\n",shiftbit,state>>6,dummy,state,out,ccodelte_table[state]);
dummy+=3;
#endif //DEBUG_CCODE
}
@@ -198,7 +198,7 @@ ccodelte_encode (int32_t numbits,
*outPtr++ = (out>>1)&1;
*outPtr++ = (out>>2)&1;
#ifdef DEBUG_CCODE
printf("crc bit %d input %u, outbit %u: %u -> %d (%u)\n",shiftbit,state>>6,dummy,state,out,ccodelte_table[state]);
printf("crc bit %d input %d, outbit %d: %d -> %d (%u)\n",shiftbit,state>>6,dummy,state,out,ccodelte_table[state]);
dummy+=3;
#endif //DEBUG_CCODE
}

View File

@@ -44,20 +44,18 @@
/*ref 36-212 v8.6.0 , pp 8-9 */
/* the highest degree is set by default */
uint32_t poly24a = 0x864cfb00; // 1000 0110 0100 1100 1111 1011
// D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1
uint32_t poly24b = 0x80006300; // 1000 0000 0000 0000 0110 0011
// D^24 + D^23 + D^6 + D^5 + D + 1
uint32_t poly24c = 0xb2b11700; // 1011 0010 1011 0001 0001 0111
// D^24+D^23+D^21+D^20+D^17+D^15+D^13+D^12+D^8+D^4+D^2+D+1
static const uint32_t poly24a =
0x864cfb00; // 1000 0110 0100 1100 1111 1011
// D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1
static const uint32_t poly24b = 0x80006300; // 1000 0000 0000 0000 0110 0011
// D^24 + D^23 + D^6 + D^5 + D + 1
static const uint32_t poly24c = 0xb2b11700; // 1011 0010 1011 0001 0001 0111
// D^24+D^23+D^21+D^20+D^17+D^15+D^13+D^12+D^8+D^4+D^2+D+1
static const uint32_t poly16 = 0x10210000; // 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1
static const uint32_t poly12 = 0x80F00000; // 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1
static const uint32_t poly8 = 0x9B000000; // 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1
static const uint32_t poly6 = 0x84000000; // 10000100000... -> D^6+D^5+1
static const uint32_t poly11 = 0xc4200000; // 11000100001000... -> D^11+D^10+D^9+D^5+1
uint32_t poly16 = 0x10210000; // 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1
uint32_t poly12 = 0x80F00000; // 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1
uint32_t poly8 = 0x9B000000; // 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1
uint32_t poly6 = 0x84000000; // 10000100000... -> D^6+D^5+1
uint32_t poly11 = 0xc4200000; //11000100001000... -> D^11+D^10+D^9+D^5+1
/*********************************************************
@@ -102,20 +100,24 @@ static uint32_t crc8Table[256];
static uint32_t crc6Table[256];
#if USE_INTEL_CRC
static const struct crc_pclmulqdq_ctx lte_crc24a_pclmulqdq __attribute__((aligned(16))) = {
0x64e4d700, /**< k1 */
0x2c8c9d00, /**< k2 */
0xd9fe8c00, /**< k3 */
0xf845fe24, /**< q */
0x864cfb00, /**< p */
0ULL /**< res */
static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24a_pclmulqdq, 16) = {
0x64e4d700, /**< k1 */
0x2c8c9d00, /**< k2 */
0xd9fe8c00, /**< k3 */
0xf845fe24, /**< q */
0x864cfb00, /**< p */
0ULL /**< res */
};
__m128i crc_xmm_be_le_swap128;
const uint8_t crc_xmm_shift_tab[48]
__attribute__((aligned(16))) = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
DECLARE_ALIGNED(const uint8_t crc_xmm_shift_tab[48], 16) = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
#endif
@@ -174,13 +176,13 @@ uint32_t crc24a(unsigned char* inptr, int bitlen)
}
#if USE_INTEL_CRC
static const struct crc_pclmulqdq_ctx lte_crc24b_pclmulqdq __attribute__((aligned(16))) = {
0x80140500, /**< k1 */
0x42000100, /**< k2 */
0x90042100, /**< k3 */
0xffff83ff, /**< q */
0x80006300, /**< p */
0ULL /**< res */
static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24b_pclmulqdq, 16) = {
0x80140500, /**< k1 */
0x42000100, /**< k2 */
0x90042100, /**< k3 */
0xffff83ff, /**< q */
0x80006300, /**< p */
0ULL /**< res */
};
#endif
uint32_t crc24b(unsigned char* inptr, int bitlen)

View File

@@ -33,12 +33,9 @@
//#define cmin(a,b) ((a)<(b) ? (a) : (b))
static const uint32_t bitrev[32] = {0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30,
1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23, 15, 31};
static const uint32_t bitrev_x3[32] = {0, 48, 24, 72, 12, 60, 36, 84, 6, 54, 30, 78, 18, 66, 42, 90,
3, 51, 27, 75, 15, 63, 39, 87, 9, 57, 33, 81, 21, 69, 45, 93};
static const uint32_t bitrev_cc[32] = {1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23, 15, 31,
0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30};
static uint32_t bitrev[32] = {0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31};
static uint32_t bitrev_x3[32] = {0,48,24,72,12,60,36,84,6,54,30,78,18,66,42,90,3,51,27,75,15,63,39,87,9,57,33,81,21,69,45,93};
static uint32_t bitrev_cc[32] = {1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31,0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30};
//#define RM_DEBUG_TX 1
//#define RM_DEBUG 1
@@ -61,8 +58,8 @@ uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w) {
// Kpi3 = Kpi*3;
ND = Kpi - D;
#ifdef RM_DEBUG
printf("sub_block_interleaving_turbo : D = %u (%u)\n",D,D*3);
printf("RTC = %u, Kpi=%u, ND=%u\n",RTC,Kpi,ND);
printf("sub_block_interleaving_turbo : D = %d (%d)\n",D,D*3);
printf("RTC = %d, Kpi=%d, ND=%d\n",RTC,Kpi,ND);
#endif
ND3 = ND*3;
// copy d02 to dD2 (for mod Kpi operation from clause (4), p.16 of 36.212
@@ -75,7 +72,7 @@ uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w) {
for (col=0; col<32; col++) {
#ifdef RM_DEBUG
printf("Col %u\n",col);
printf("Col %d\n",col);
#endif
index3 = bitrev_x3[col];//3*index;
@@ -84,7 +81,7 @@ uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w) {
w[Kpi+k2] = d2[index3];//d[index3-ND3+1];
w[Kpi+1+k2] = d3[index3];//d[index3-ND3+5];
#ifdef RM_DEBUG
printf("row %u, index %d, index-Nd %d index-Nd+1 %d (k,Kpi+2k,Kpi+2k+1) (%u,%u,%u) w(%d,%d,%d)\n",row,index,index-ND,((index+1)%Kpi)-ND,k,Kpi+(k<<1),Kpi+(k<<1)+1,w[k],w[Kpi+(k<<1)],w[Kpi+1+(k<<1)]);
printf("row %d, index %d, index-Nd %d index-Nd+1 %d (k,Kpi+2k,Kpi+2k+1) (%d,%d,%d) w(%d,%d,%d)\n",row,index,index-ND,((index+1)%Kpi)-ND,k,Kpi+(k<<1),Kpi+(k<<1)+1,w[k],w[Kpi+(k<<1)],w[Kpi+1+(k<<1)]);
if (w[k]== LTE_NULL)
nulled++;
@@ -108,11 +105,11 @@ uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w) {
#ifdef RM_DEBUG
if (ND>0) {
printf("RM_TX: Nulled last component in pos %u\n",Kpi-1+k2);
printf("RM_TX: Nulled last component in pos %d\n",Kpi-1+k2);
nulled++;
}
printf("RM_TX: Nulled %u\n",nulled);
printf("RM_TX: Nulled %d\n",nulled);
#endif
return(RTC);
}
@@ -133,15 +130,15 @@ uint32_t sub_block_interleaving_cc(uint32_t D, uint8_t *d,uint8_t *w) {
// Kpi3 = Kpi*3;
ND = Kpi - D;
#ifdef RM_DEBUG_CC
printf("sub_block_interleaving_cc : D = %u (%u), d %p, w %p\n",D,D*3,d,w);
printf("RCC = %u, Kpi=%u, ND=%u\n",RCC,Kpi,ND);
printf("sub_block_interleaving_cc : D = %d (%d), d %p, w %p\n",D,D*3,d,w);
printf("RCC = %d, Kpi=%d, ND=%d\n",RCC,Kpi,ND);
#endif
ND3 = ND*3;
k=0;
for (col=0; col<32; col++) {
#ifdef RM_DEBUG_CC
printf("Col %u\n",col);
printf("Col %d\n",col);
#endif
index = bitrev_cc[col];
index3 = 3*index;
@@ -151,7 +148,7 @@ uint32_t sub_block_interleaving_cc(uint32_t D, uint8_t *d,uint8_t *w) {
w[Kpi+k] = d[(int32_t)index3-(int32_t)ND3+1];
w[(Kpi<<1)+k] = d[(int32_t)index3-(int32_t)ND3+2];
#ifdef RM_DEBUG_CC
printf("row %u, index %u k %u w(%u,%d,%d)\n",row,index,k,w[k],w[Kpi+k],w[(Kpi<<1)+k]);
printf("row %d, index %d k %d w(%d,%d,%d)\n",row,index,k,w[k],w[Kpi+k],w[(Kpi<<1)+k]);
if (w[k]== LTE_NULL)
nulled++;
@@ -170,7 +167,7 @@ uint32_t sub_block_interleaving_cc(uint32_t D, uint8_t *d,uint8_t *w) {
}
#ifdef RM_DEBUG_CC
printf("RM_TX: Nulled %u\n",nulled);
printf("RM_TX: Nulled %d\n",nulled);
#endif
return(RCC);
}
@@ -188,8 +185,8 @@ void sub_block_deinterleaving_turbo(uint32_t D,int16_t *d,int16_t *w) {
// Kpi3 = Kpi*3;
ND = Kpi - D;
#ifdef RM_DEBUG2
printf("sub_block_interleaving_turbo : D = %u (%u)\n",D,D*3);
printf("RTC = %u, Kpi=%u, ND=%u\n",RTC,Kpi,ND);
printf("sub_block_interleaving_turbo : D = %d (%d)\n",D,D*3);
printf("RTC = %d, Kpi=%d, ND=%d\n",RTC,Kpi,ND);
#endif
ND3 = ND*3;
// copy d02 to dD2 (for mod Kpi operation from clause (4), p.16 of 36.212
@@ -201,7 +198,7 @@ void sub_block_deinterleaving_turbo(uint32_t D,int16_t *d,int16_t *w) {
for (col=0; col<32; col++) {
#ifdef RM_DEBUG2
printf("Col %u\n",col);
printf("Col %d\n",col);
#endif
index3 = bitrev_x3[col];//3*index;
@@ -236,15 +233,15 @@ void sub_block_deinterleaving_cc(uint32_t D,int8_t *d,int8_t *w) {
// Kpi3 = Kpi*3;
ND = Kpi - D;
#ifdef RM_DEBUG2
printf("sub_block_interleaving_cc : D = %u (%u), d %p, w %p\n",D,D*3,d,w);
printf("RCC = %u, Kpi=%u, ND=%ld\n",RCC,Kpi,(long)ND);
printf("sub_block_interleaving_cc : D = %d (%d), d %p, w %p\n",D,D*3,d,w);
printf("RCC = %d, Kpi=%d, ND=%ld\n",RCC,Kpi,(long)ND);
#endif
ND3 = ND*3;
k=0;
for (col=0; col<32; col++) {
#ifdef RM_DEBUG2
printf("Col %u\n",col);
printf("Col %d\n",col);
#endif
index = bitrev_cc[col];
index3 = 3*index;
@@ -254,7 +251,7 @@ void sub_block_deinterleaving_cc(uint32_t D,int8_t *d,int8_t *w) {
d[index3-ND3+1] = w[Kpi+k];
d[index3-ND3+2] = w[(Kpi<<1)+k];
#ifdef RM_DEBUG2
printf("row %u, index %u k %u index3-ND3 %ld w(%d,%d,%d)\n",
printf("row %d, index %d k %d index3-ND3 %ld w(%d,%d,%d)\n",
row,index,k,(long)(index3-ND3),w[k],w[Kpi+k],w[(Kpi<<1)+k]);
#endif
index3+=96;
@@ -280,8 +277,8 @@ uint32_t generate_dummy_w(uint32_t D, uint8_t *w,uint8_t F) {
// Kpi3 = Kpi*3;
ND = Kpi - D;
#ifdef RM_DEBUG
printf("dummy sub_block_interleaving_turbo : D = %u (%u)\n",D,D*3);
printf("RTC = %u, Kpi=%u, ND=%u, F=%d (Nulled %u)\n",RTC,Kpi,ND,F,(2*F + 3*ND));
printf("dummy sub_block_interleaving_turbo : D = %d (%d)\n",D,D*3);
printf("RTC = %d, Kpi=%d, ND=%d, F=%d (Nulled %d)\n",RTC,Kpi,ND,F,(2*F + 3*ND));
#endif
k=0;
k2=0;
@@ -292,7 +289,7 @@ uint32_t generate_dummy_w(uint32_t D, uint8_t *w,uint8_t F) {
for (col=0; col<32; col++) {
#ifdef RM_DEBUG
printf("Col %u\n",col);
printf("Col %d\n",col);
#endif
index = bitrev[col];
@@ -329,7 +326,7 @@ uint32_t generate_dummy_w(uint32_t D, uint8_t *w,uint8_t F) {
}
#ifdef RM_DEBUG
printf("k %d w (%d,%d,%d) w+1 (%d,%d,%d), index %u index-ND-F %u index+32-ND-F %u\n",k,w[k],w[Kpi+(k<<1)],w[Kpi+1+(k<<1)],w[k+1],w[2+Kpi+(k<<1)],w[2+Kpi+1+(k<<1)],index,index-ND-F,index+32-ND-F);
printf("k %d w (%d,%d,%d) w+1 (%d,%d,%d), index %d index-ND-F %d index+32-ND-F %d\n",k,w[k],w[Kpi+(k<<1)],w[Kpi+1+(k<<1)],w[k+1],w[2+Kpi+(k<<1)],w[2+Kpi+1+(k<<1)],index,index-ND-F,index+32-ND-F);
#endif
k+=RTC;
k2=k<<1;
@@ -346,7 +343,7 @@ uint32_t generate_dummy_w(uint32_t D, uint8_t *w,uint8_t F) {
printf("dummy_w: Nulled final position %d\n",(3*Kpi)-1);
}
printf("Nulled = %u\n",nulled);
printf("Nulled = %d\n",nulled);
#endif
return(RTC);
}
@@ -366,8 +363,8 @@ uint32_t generate_dummy_w_cc(uint32_t D, uint8_t *w) {
// Kpi3 = Kpi*3;
ND = Kpi - D;
#ifdef RM_DEBUG_CC
printf("dummy sub_block_interleaving_cc : D = %u (%u)\n",D,D*3);
printf("RCC = %u, Kpi=%u, ND=%u, (Nulled %u)\n",RCC,Kpi,ND,3*ND);
printf("dummy sub_block_interleaving_cc : D = %d (%d)\n",D,D*3);
printf("RCC = %d, Kpi=%d, ND=%d, (Nulled %d)\n",RCC,Kpi,ND,3*ND);
#endif
// ND3 = ND*3;
// copy d02 to dD2 (for mod Kpi operation from clause (4), p.16 of 36.212
@@ -375,7 +372,7 @@ uint32_t generate_dummy_w_cc(uint32_t D, uint8_t *w) {
for (col=0; col<32; col++) {
#ifdef RM_DEBUG_CC
printf("Col %u\n",col);
printf("Col %d\n",col);
#endif
index = bitrev_cc[col];
@@ -416,13 +413,13 @@ uint32_t generate_dummy_w_cc(uint32_t D, uint8_t *w) {
}
*/
#ifdef RM_DEBUG_CC
printf("k %d w (%d,%d,%d), index-ND %u index+32-ND %u\n",k,w[k],w[Kpi+k],w[(Kpi<<1)+k],index-ND,index+32-ND);
printf("k %d w (%d,%d,%d), index-ND %d index+32-ND %d\n",k,w[k],w[Kpi+k],w[(Kpi<<1)+k],index-ND,index+32-ND);
#endif
k+=RCC;
}
#ifdef RM_DEBUG_CC
printf("Nulled = %u\n",nulled);
printf("Nulled = %d\n",nulled);
#endif
return(RCC);
}
@@ -503,7 +500,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
Ncbmod = Ncb%(RTC<<3);
ind = RTC * (2+(rvidx*(((Ncbmod==0)?0:1) + (Ncb/(RTC<<3)))*2));
#ifdef RM_DEBUG_TX
printf("lte_rate_matching_turbo: E %u, k0 %u, Ncbmod %u, Ncb/(RTC<<3) %u\n",E,ind,Ncbmod,Ncb/(RTC<<3));
printf("lte_rate_matching_turbo: E %d, k0 %d, Ncbmod %d, Ncb/(RTC<<3) %d\n",E,ind,Ncbmod,Ncb/(RTC<<3));
#endif
//e2=e+(r*E);
e2 = e;
@@ -512,7 +509,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
for (; (ind<Ncb)&&(k<E); ind++) {
// e2[k]=w[ind];
#ifdef RM_DEBUG_TX
printf("RM_TX k%u Ind: %u (%d)\n",k,ind,w[ind]);
printf("RM_TX k%d Ind: %d (%d)\n",k,ind,w[ind]);
#endif
if (w[ind] != LTE_NULL) e2[k++]=w[ind];
@@ -522,7 +519,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
for (ind=0; (ind<Ncb)&&(k<E); ind++) {
// e2[k] = w[ind];
#ifdef RM_DEBUG_TX
printf("RM_TX k%u Ind: %u (%d)\n",k,ind,w[ind]);
printf("RM_TX k%d Ind: %d (%d)\n",k,ind,w[ind]);
#endif
if (w[ind] != LTE_NULL) e2[k++]=w[ind];
@@ -613,7 +610,7 @@ uint32_t lte_rate_matching_cc(uint32_t RCC,
while(w[ind] == LTE_NULL) {
#ifdef RM_DEBUG_CC
nulled++;
printf("RM_TX_CC : ind %u, NULL\n",ind);
printf("RM_TX_CC : ind %d, NULL\n",ind);
#endif
ind++;
@@ -624,7 +621,7 @@ uint32_t lte_rate_matching_cc(uint32_t RCC,
e[k] = w[ind];
#ifdef RM_DEBUG_CC
// printf("k %d ind %d, w %c(%d)\n",k,ind,w[ind],w[ind]);
printf("RM_TX_CC %u Ind: %u (%d)\n",k,ind,e[k]);
printf("RM_TX_CC %d Ind: %d (%d)\n",k,ind,e[k]);
#endif
ind++;
@@ -633,7 +630,7 @@ uint32_t lte_rate_matching_cc(uint32_t RCC,
}
#ifdef RM_DEBUG_CC
printf("nulled %u\n",nulled);
printf("nulled %d\n",nulled);
#endif
return(E);
}
@@ -688,7 +685,7 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
Ncbmod = Ncb%(RTC<<3);
ind = RTC * (2+(rvidx*(((Ncbmod==0)?0:1) + (Ncb/(RTC<<3)))*2));
#ifdef RM_DEBUG
printf("lte_rate_matching_turbo_rx: Clear %d, E %u, Ncb %u, Kw %u, rvidx %d, G %u, Qm %d, Nl%d, r %d\n",clear,E,Ncb,3*(RTC<<5),rvidx, G, Qm,Nl,r);
printf("lte_rate_matching_turbo_rx: Clear %d, E %d, Ncb %d, Kw %d, rvidx %d, G %d, Qm %d, Nl%d, r %d\n",clear,E,Ncb,3*(RTC<<5),rvidx, G, Qm,Nl,r);
#endif
if (clear==1)
@@ -705,13 +702,13 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
printf("ind %d: w %d => soft_in %d\n",ind,w[ind],soft_input2[k]);*/
w[ind] += soft_input2[k++];
#ifdef RM_DEBUG
printf("RM_RX k%u Ind: %u (%d)\n",k-1,ind,w[ind]);
printf("RM_RX k%d Ind: %d (%d)\n",k-1,ind,w[ind]);
#endif
}
#ifdef RM_DEBUG
else {
printf("RM_RX Ind: %u NULL %d\n",ind,nulled);
printf("RM_RX Ind: %d NULL %d\n",ind,nulled);
nulled++;
}
@@ -723,13 +720,13 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
if (dummy_w[ind] != LTE_NULL) {
w[ind] += soft_input2[k++];
#ifdef RM_DEBUG
printf("RM_RX k%u Ind: %u (%d)(soft in %d)\n",k-1,ind,w[ind],soft_input2[k-1]);
printf("RM_RX k%d Ind: %d (%d)(soft in %d)\n",k-1,ind,w[ind],soft_input2[k-1]);
#endif
}
#ifdef RM_DEBUG
else {
printf("RM_RX Ind: %u NULL %d\n",ind,nulled);
printf("RM_RX Ind: %d NULL %d\n",ind,nulled);
nulled++;
}
@@ -797,7 +794,7 @@ void lte_rate_matching_cc_rx(uint32_t RCC,
int16_t w16[Kw];
#ifdef RM_DEBUG_CC
uint32_t nulled=0;
printf("lte_rate_matching_cc_rx: Kw %u, E %d, w %p, soft_input %p\n",3*(RCC<<5),E,w,soft_input);
printf("lte_rate_matching_cc_rx: Kw %d, E %d, w %p, soft_input %p\n",3*(RCC<<5),E,w,soft_input);
#endif
memset(w,0,Kw);
memset(w16,0,Kw*sizeof(int16_t));
@@ -806,7 +803,7 @@ void lte_rate_matching_cc_rx(uint32_t RCC,
while(dummy_w[ind] == LTE_NULL) {
#ifdef RM_DEBUG_CC
nulled++;
printf("RM_RX : ind %u, NULL\n",ind);
printf("RM_RX : ind %d, NULL\n",ind);
#endif
ind++;
@@ -820,7 +817,7 @@ void lte_rate_matching_cc_rx(uint32_t RCC,
*/
// Maximum-ratio combining of repeated bits and retransmissions
#ifdef RM_DEBUG_CC
printf("RM_RX_CC k %u (%d) ind: %u (%d)\n",k,soft_input[k],ind,w16[ind]);
printf("RM_RX_CC k %d (%d) ind: %d (%d)\n",k,soft_input[k],ind,w16[ind]);
#endif
w16[ind] += soft_input[k];
ind++;
@@ -843,7 +840,7 @@ void lte_rate_matching_cc_rx(uint32_t RCC,
}
#ifdef RM_DEBUG_CC
printf("Nulled %u\n",nulled);
printf("Nulled %d\n",nulled);
#endif
}

View File

@@ -173,7 +173,7 @@ main() {
for (Bbytes=5; Bbytes<2*768; Bbytes++) {
lte_segmentation(0,0,Bbytes<<3,&C,&Cplus,&Cminus,&Kplus,&Kminus,&F);
printf("Bbytes %u : C %u, Cplus %u, Cminus %u, Kplus %u, Kminus %u, F %u\n",
printf("Bbytes %d : C %d, Cplus %d, Cminus %d, Kplus %d, Kminus %d, F %d\n",
Bbytes, C, Cplus, Cminus, Kplus, Kminus, F);
}
}

View File

@@ -311,7 +311,7 @@ create_mempools(struct active_device *ad, int socket_id,
mp = rte_bbdev_op_pool_create(pool_name, op_type,
ops_pool_size, OPS_CACHE_SIZE, socket_id);
TEST_ASSERT_NOT_NULL(mp,
"ERROR Failed to create %u items ops pool for dev %u on socket %d.",
"ERROR Failed to create %u items ops pool for dev %u on socket %u.",
ops_pool_size,
ad->dev_id,
socket_id);
@@ -328,7 +328,7 @@ create_mempools(struct active_device *ad, int socket_id,
mp = create_mbuf_pool(p_offloadParams->E, ad->dev_id, socket_id,
mbuf_pool_size, "in");
TEST_ASSERT_NOT_NULL(mp,
"ERROR Failed to create %u items input pktmbuf pool for dev %u on socket %d.",
"ERROR Failed to create %u items input pktmbuf pool for dev %u on socket %u.",
mbuf_pool_size,
ad->dev_id,
socket_id);
@@ -342,7 +342,7 @@ create_mempools(struct active_device *ad, int socket_id,
mbuf_pool_size,
"hard_out");
TEST_ASSERT_NOT_NULL(mp,
"ERROR Failed to create %u items hard output pktmbuf pool for dev %u on socket %d.",
"ERROR Failed to create %u items hard output pktmbuf pool for dev %u on socket %u.",
mbuf_pool_size,
ad->dev_id,
socket_id);
@@ -634,7 +634,7 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs,
* Special case when DPDK mbuf cannot handle
* the required input size
*/
printf("Warning: Larger input size than DPDK mbuf %u\n",
printf("Warning: Larger input size than DPDK mbuf %d\n",
data_len);
large_input = true;
}
@@ -684,7 +684,7 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs,
struct rte_mbuf *m_tail =
rte_pktmbuf_alloc(mbuf_pool);
TEST_ASSERT_NOT_NULL(m_tail,
"Not enough mbufs in %d data type mbuf pool (needed %d, available %u)",
"Not enough mbufs in %d data type mbuf pool (needed %u, available %u)",
op_type,
n * nb_segments,
mbuf_pool->size);
@@ -1554,7 +1554,7 @@ int32_t nrLDPC_decod_offload(t_nrLDPC_dec_params* p_decParams, uint8_t harq_pid,
m_head[type] = rte_pktmbuf_alloc(mbuf_pools[type]);
TEST_ASSERT_NOT_NULL(m_head[type],
"Not enough mbufs in %d data type mbuf pool (needed %d, available %u)",
"Not enough mbufs in %d data type mbuf pool (needed %u, available %u)",
op_type, 1,
mbuf_pools[type]->size);

View File

@@ -160,7 +160,7 @@ fprintf(fd, "// Process group with 2 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[1]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -173,10 +173,10 @@ fprintf(fd, "// Process group with 2 CNs \n");
// Loop over CNs
for (k=1; k<2; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -218,7 +218,7 @@ fprintf(fd, "// Process group with 3 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[2]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -230,10 +230,10 @@ fprintf(fd, "// Process group with 3 CNs \n");
// Loop over CNs
for (k=1; k<3; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -274,7 +274,7 @@ fprintf(fd, "// Process group with 4 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[3]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -287,10 +287,10 @@ fprintf(fd, "// Process group with 4 CNs \n");
// Loop over CNs
for (k=1; k<4; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -331,7 +331,7 @@ fprintf(fd, "// Process group with 5 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[4]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -343,10 +343,10 @@ fprintf(fd, "// Process group with 5 CNs \n");
// Loop over CNs
for (k=1; k<5; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -388,7 +388,7 @@ fprintf(fd, "// Process group with 6 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[5]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -400,10 +400,10 @@ fprintf(fd, "// Process group with 6 CNs \n");
// Loop over CNs
for (k=1; k<6; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -444,7 +444,7 @@ fprintf(fd, "// Process group with 7 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[6]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -456,10 +456,10 @@ fprintf(fd, "// Process group with 7 CNs \n");
// Loop over CNs
for (k=1; k<7; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -501,7 +501,7 @@ fprintf(fd, "// Process group with 8 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[7]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -513,10 +513,10 @@ fprintf(fd, "// Process group with 8 CNs \n");
// Loop over CNs
for (k=1; k<8; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -558,7 +558,7 @@ fprintf(fd, "// Process group with 9 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[8]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -570,10 +570,10 @@ fprintf(fd, "// Process group with 9 CNs \n");
// Loop over CNs
for (k=1; k<9; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -615,7 +615,7 @@ fprintf(fd, "// Process group with 10 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[9]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -627,10 +627,10 @@ fprintf(fd, "// Process group with 10 CNs \n");
// Loop over CNs
for (k=1; k<10; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -673,7 +673,7 @@ fprintf(fd, "// Process group with 11 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[10]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -685,10 +685,10 @@ fprintf(fd, "// Process group with 11 CNs \n");
// Loop over CNs
for (k=1; k<11; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -728,7 +728,7 @@ fprintf(fd, "// Process group with 12 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[11]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -740,10 +740,10 @@ fprintf(fd, "// Process group with 12 CNs \n");
// Loop over CNs
for (k=1; k<12; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -784,7 +784,7 @@ fprintf(fd, "// Process group with 13 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[12]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -796,10 +796,10 @@ fprintf(fd, "// Process group with 13 CNs \n");
// Loop over CNs
for (k=1; k<13; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -841,7 +841,7 @@ fprintf(fd, "// Process group with 14 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[13]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -853,10 +853,10 @@ fprintf(fd, "// Process group with 14 CNs \n");
// Loop over CNs
for (k=1; k<14; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -897,7 +897,7 @@ fprintf(fd, "// Process group with 15 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[14]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -909,10 +909,10 @@ fprintf(fd, "// Process group with 15 CNs \n");
// Loop over CNs
for (k=1; k<15; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -954,7 +954,7 @@ fprintf(fd, "// Process group with 16 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[15]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -966,10 +966,10 @@ fprintf(fd, "// Process group with 16 CNs \n");
// Loop over CNs
for (k=1; k<16; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1010,7 +1010,7 @@ fprintf(fd, "// Process group with 17 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[16]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1022,10 +1022,10 @@ fprintf(fd, "// Process group with 17 CNs \n");
// Loop over CNs
for (k=1; k<17; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1066,7 +1066,7 @@ fprintf(fd, "// Process group with 18 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[17]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1078,10 +1078,10 @@ fprintf(fd, "// Process group with 18 CNs \n");
// Loop over CNs
for (k=1; k<18; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1121,7 +1121,7 @@ fprintf(fd, "// Process group with 19 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[18]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1133,10 +1133,10 @@ fprintf(fd, "// Process group with 19 CNs \n");
// Loop over CNs
for (k=1; k<19; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1177,7 +1177,7 @@ fprintf(fd, "// Process group with 20 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[19]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1189,10 +1189,10 @@ fprintf(fd, "// Process group with 20 CNs \n");
// Loop over CNs
for (k=1; k<20; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1237,7 +1237,7 @@ fprintf(fd, "// Process group with 21 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[20]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1249,10 +1249,10 @@ fprintf(fd, "// Process group with 21 CNs \n");
// Loop over CNs
for (k=1; k<21; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1292,7 +1292,7 @@ fprintf(fd, "// Process group with 22 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[21]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1304,10 +1304,10 @@ fprintf(fd, "// Process group with 22 CNs \n");
// Loop over CNs
for (k=1; k<22; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1348,7 +1348,7 @@ fprintf(fd, "// Process group with <23 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[22]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1360,10 +1360,10 @@ fprintf(fd, "// Process group with <23 CNs \n");
// Loop over CNs
for (k=1; k<23; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1405,7 +1405,7 @@ fprintf(fd, "// Process group with 24 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[23]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1417,10 +1417,10 @@ fprintf(fd, "// Process group with 24 CNs \n");
// Loop over CNs
for (k=1; k<24; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1461,7 +1461,7 @@ fprintf(fd, "// Process group with 25 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[24]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1473,10 +1473,10 @@ fprintf(fd, "// Process group with 25 CNs \n");
// Loop over CNs
for (k=1; k<25; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1518,7 +1518,7 @@ fprintf(fd, "// Process group with 26 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[25]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1530,10 +1530,10 @@ fprintf(fd, "// Process group with 26 CNs \n");
// Loop over CNs
for (k=1; k<26; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1574,7 +1574,7 @@ fprintf(fd, "// Process group with 27 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[26]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1586,10 +1586,10 @@ fprintf(fd, "// Process group with 27 CNs \n");
// Loop over CNs
for (k=1; k<27; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1630,7 +1630,7 @@ fprintf(fd, "// Process group with 28 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[27]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1642,10 +1642,10 @@ fprintf(fd, "// Process group with 28 CNs \n");
// Loop over CNs
for (k=1; k<28; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1685,7 +1685,7 @@ fprintf(fd, "// Process group with 29 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[28]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1697,10 +1697,10 @@ fprintf(fd, "// Process group with 29 CNs \n");
// Loop over CNs
for (k=1; k<29; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1741,7 +1741,7 @@ fprintf(fd, "// Process group with 30 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[29]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1753,10 +1753,10 @@ fprintf(fd, "// Process group with 30 CNs \n");
// Loop over CNs
for (k=1; k<30; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}

View File

@@ -159,7 +159,7 @@ fprintf(fd, "// Process group with 2 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[1]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -172,10 +172,10 @@ fprintf(fd, "// Process group with 2 CNs \n");
// Loop over CNs
for (k=1; k<2; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -217,7 +217,7 @@ fprintf(fd, "// Process group with 3 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[2]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -229,10 +229,10 @@ fprintf(fd, "// Process group with 3 CNs \n");
// Loop over CNs
for (k=1; k<3; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -273,7 +273,7 @@ fprintf(fd, "// Process group with 4 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[3]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -286,10 +286,10 @@ fprintf(fd, "// Process group with 4 CNs \n");
// Loop over CNs
for (k=1; k<4; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -330,7 +330,7 @@ fprintf(fd, "// Process group with 5 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[4]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -342,10 +342,10 @@ fprintf(fd, "// Process group with 5 CNs \n");
// Loop over CNs
for (k=1; k<5; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -387,7 +387,7 @@ fprintf(fd, "// Process group with 6 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[5]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -399,10 +399,10 @@ fprintf(fd, "// Process group with 6 CNs \n");
// Loop over CNs
for (k=1; k<6; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -443,7 +443,7 @@ fprintf(fd, "// Process group with 7 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[6]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -455,10 +455,10 @@ fprintf(fd, "// Process group with 7 CNs \n");
// Loop over CNs
for (k=1; k<7; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -500,7 +500,7 @@ fprintf(fd, "// Process group with 8 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[7]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -512,10 +512,10 @@ fprintf(fd, "// Process group with 8 CNs \n");
// Loop over CNs
for (k=1; k<8; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -557,7 +557,7 @@ fprintf(fd, "// Process group with 9 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[8]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -569,10 +569,10 @@ fprintf(fd, "// Process group with 9 CNs \n");
// Loop over CNs
for (k=1; k<9; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -614,7 +614,7 @@ fprintf(fd, "// Process group with 10 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[9]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -626,10 +626,10 @@ fprintf(fd, "// Process group with 10 CNs \n");
// Loop over CNs
for (k=1; k<10; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -672,7 +672,7 @@ fprintf(fd, "// Process group with 11 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[10]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -684,10 +684,10 @@ fprintf(fd, "// Process group with 11 CNs \n");
// Loop over CNs
for (k=1; k<11; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -727,7 +727,7 @@ fprintf(fd, "// Process group with 12 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[11]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -739,10 +739,10 @@ fprintf(fd, "// Process group with 12 CNs \n");
// Loop over CNs
for (k=1; k<12; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -783,7 +783,7 @@ fprintf(fd, "// Process group with 13 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[12]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -795,10 +795,10 @@ fprintf(fd, "// Process group with 13 CNs \n");
// Loop over CNs
for (k=1; k<13; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -840,7 +840,7 @@ fprintf(fd, "// Process group with 14 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[13]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -852,10 +852,10 @@ fprintf(fd, "// Process group with 14 CNs \n");
// Loop over CNs
for (k=1; k<14; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -896,9 +896,9 @@ fprintf(fd, "// Process group with 15 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[14]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%u];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
fprintf(fd," for (int i=0,j=0;i<M;i++,j+=2) {\n");
// First 16 LLRs of first CN
@@ -908,10 +908,10 @@ fprintf(fd, "// Process group with 15 CNs \n");
// Loop over CNs
for (k=1; k<15; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -953,7 +953,7 @@ fprintf(fd, "// Process group with 16 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[15]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -965,10 +965,10 @@ fprintf(fd, "// Process group with 16 CNs \n");
// Loop over CNs
for (k=1; k<16; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1009,7 +1009,7 @@ fprintf(fd, "// Process group with 17 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[16]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1021,10 +1021,10 @@ fprintf(fd, "// Process group with 17 CNs \n");
// Loop over CNs
for (k=1; k<17; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1065,7 +1065,7 @@ fprintf(fd, "// Process group with 18 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[17]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1077,10 +1077,10 @@ fprintf(fd, "// Process group with 18 CNs \n");
// Loop over CNs
for (k=1; k<18; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1120,7 +1120,7 @@ fprintf(fd, "// Process group with 19 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[18]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1132,10 +1132,10 @@ fprintf(fd, "// Process group with 19 CNs \n");
// Loop over CNs
for (k=1; k<19; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1176,7 +1176,7 @@ fprintf(fd, "// Process group with 20 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[19]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1188,10 +1188,10 @@ fprintf(fd, "// Process group with 20 CNs \n");
// Loop over CNs
for (k=1; k<20; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1236,7 +1236,7 @@ fprintf(fd, "// Process group with 21 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[20]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1248,10 +1248,10 @@ fprintf(fd, "// Process group with 21 CNs \n");
// Loop over CNs
for (k=1; k<21; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1291,7 +1291,7 @@ fprintf(fd, "// Process group with 22 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[21]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1303,10 +1303,10 @@ fprintf(fd, "// Process group with 22 CNs \n");
// Loop over CNs
for (k=1; k<22; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1347,7 +1347,7 @@ fprintf(fd, "// Process group with <23 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[22]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1359,10 +1359,10 @@ fprintf(fd, "// Process group with <23 CNs \n");
// Loop over CNs
for (k=1; k<23; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1404,7 +1404,7 @@ fprintf(fd, "// Process group with 24 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[23]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1416,10 +1416,10 @@ fprintf(fd, "// Process group with 24 CNs \n");
// Loop over CNs
for (k=1; k<24; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1460,7 +1460,7 @@ fprintf(fd, "// Process group with 25 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[24]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1472,10 +1472,10 @@ fprintf(fd, "// Process group with 25 CNs \n");
// Loop over CNs
for (k=1; k<25; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1517,7 +1517,7 @@ fprintf(fd, "// Process group with 26 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[25]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1529,10 +1529,10 @@ fprintf(fd, "// Process group with 26 CNs \n");
// Loop over CNs
for (k=1; k<26; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1573,7 +1573,7 @@ fprintf(fd, "// Process group with 27 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[26]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1585,10 +1585,10 @@ fprintf(fd, "// Process group with 27 CNs \n");
// Loop over CNs
for (k=1; k<27; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1629,7 +1629,7 @@ fprintf(fd, "// Process group with 28 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[27]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1641,10 +1641,10 @@ fprintf(fd, "// Process group with 28 CNs \n");
// Loop over CNs
for (k=1; k<28; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1684,7 +1684,7 @@ fprintf(fd, "// Process group with 29 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[28]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1696,10 +1696,10 @@ fprintf(fd, "// Process group with 29 CNs \n");
// Loop over CNs
for (k=1; k<29; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}
@@ -1740,7 +1740,7 @@ fprintf(fd, "// Process group with 30 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[29]*NR_LDPC_ZMAX)>>4;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m128i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m128i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m256i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1752,10 +1752,10 @@ fprintf(fd, "// Process group with 30 CNs \n");
// Loop over CNs
for (k=1; k<30; k++)
{
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm0 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," ymmRes0 = simde_mm256_adds_epi16(ymmRes0, ymm0);\n");
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," ymm1 = simde_mm256_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " ymmRes1 = simde_mm256_adds_epi16(ymmRes1, ymm1); \n");
}

View File

@@ -106,7 +106,7 @@ fprintf(fd, "// Process group with 1 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[0]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -119,10 +119,10 @@ fprintf(fd, "// Process group with 1 CNs \n");
// Loop over CNs
for (k=1; k<1; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -163,7 +163,7 @@ fprintf(fd, "// Process group with 2 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[1]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -176,10 +176,10 @@ fprintf(fd, "// Process group with 2 CNs \n");
// Loop over CNs
for (k=1; k<2; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -221,7 +221,7 @@ fprintf(fd, "// Process group with 3 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[2]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -233,10 +233,10 @@ fprintf(fd, "// Process group with 3 CNs \n");
// Loop over CNs
for (k=1; k<3; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -277,7 +277,7 @@ fprintf(fd, "// Process group with 4 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[3]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -290,10 +290,10 @@ fprintf(fd, "// Process group with 4 CNs \n");
// Loop over CNs
for (k=1; k<4; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -334,7 +334,7 @@ fprintf(fd, "// Process group with 5 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[4]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -346,10 +346,10 @@ fprintf(fd, "// Process group with 5 CNs \n");
// Loop over CNs
for (k=1; k<5; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -391,7 +391,7 @@ fprintf(fd, "// Process group with 6 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[5]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -403,10 +403,10 @@ fprintf(fd, "// Process group with 6 CNs \n");
// Loop over CNs
for (k=1; k<6; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -447,7 +447,7 @@ fprintf(fd, "// Process group with 7 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[6]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -459,10 +459,10 @@ fprintf(fd, "// Process group with 7 CNs \n");
// Loop over CNs
for (k=1; k<7; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -504,7 +504,7 @@ fprintf(fd, "// Process group with 8 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[7]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -516,10 +516,10 @@ fprintf(fd, "// Process group with 8 CNs \n");
// Loop over CNs
for (k=1; k<8; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -561,7 +561,7 @@ fprintf(fd, "// Process group with 9 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[8]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -573,10 +573,10 @@ fprintf(fd, "// Process group with 9 CNs \n");
// Loop over CNs
for (k=1; k<9; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -618,7 +618,7 @@ fprintf(fd, "// Process group with 10 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[9]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -630,10 +630,10 @@ fprintf(fd, "// Process group with 10 CNs \n");
// Loop over CNs
for (k=1; k<10; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -676,7 +676,7 @@ fprintf(fd, "// Process group with 11 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[10]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -688,10 +688,10 @@ fprintf(fd, "// Process group with 11 CNs \n");
// Loop over CNs
for (k=1; k<11; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -731,7 +731,7 @@ fprintf(fd, "// Process group with 12 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[11]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -743,10 +743,10 @@ fprintf(fd, "// Process group with 12 CNs \n");
// Loop over CNs
for (k=1; k<12; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -787,7 +787,7 @@ fprintf(fd, "// Process group with 13 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[12]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -799,10 +799,10 @@ fprintf(fd, "// Process group with 13 CNs \n");
// Loop over CNs
for (k=1; k<13; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -844,7 +844,7 @@ fprintf(fd, "// Process group with 14 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[13]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -856,10 +856,10 @@ fprintf(fd, "// Process group with 14 CNs \n");
// Loop over CNs
for (k=1; k<14; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -900,7 +900,7 @@ fprintf(fd, "// Process group with 15 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[14]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -912,10 +912,10 @@ fprintf(fd, "// Process group with 15 CNs \n");
// Loop over CNs
for (k=1; k<15; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -957,7 +957,7 @@ fprintf(fd, "// Process group with 16 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[15]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -969,10 +969,10 @@ fprintf(fd, "// Process group with 16 CNs \n");
// Loop over CNs
for (k=1; k<16; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1013,7 +1013,7 @@ fprintf(fd, "// Process group with 17 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[16]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1025,10 +1025,10 @@ fprintf(fd, "// Process group with 17 CNs \n");
// Loop over CNs
for (k=1; k<17; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1069,7 +1069,7 @@ fprintf(fd, "// Process group with 18 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[17]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1081,10 +1081,10 @@ fprintf(fd, "// Process group with 18 CNs \n");
// Loop over CNs
for (k=1; k<18; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1124,7 +1124,7 @@ fprintf(fd, "// Process group with 19 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[18]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1136,10 +1136,10 @@ fprintf(fd, "// Process group with 19 CNs \n");
// Loop over CNs
for (k=1; k<19; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1180,7 +1180,7 @@ fprintf(fd, "// Process group with 20 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[19]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1192,10 +1192,10 @@ fprintf(fd, "// Process group with 20 CNs \n");
// Loop over CNs
for (k=1; k<20; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1240,7 +1240,7 @@ fprintf(fd, "// Process group with 21 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[20]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1252,10 +1252,10 @@ fprintf(fd, "// Process group with 21 CNs \n");
// Loop over CNs
for (k=1; k<21; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1295,7 +1295,7 @@ fprintf(fd, "// Process group with 22 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[21]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1307,10 +1307,10 @@ fprintf(fd, "// Process group with 22 CNs \n");
// Loop over CNs
for (k=1; k<22; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1351,7 +1351,7 @@ fprintf(fd, "// Process group with <23 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[22]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1363,10 +1363,10 @@ fprintf(fd, "// Process group with <23 CNs \n");
// Loop over CNs
for (k=1; k<23; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1408,7 +1408,7 @@ fprintf(fd, "// Process group with 24 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[23]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1420,10 +1420,10 @@ fprintf(fd, "// Process group with 24 CNs \n");
// Loop over CNs
for (k=1; k<24; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1464,7 +1464,7 @@ fprintf(fd, "// Process group with 25 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[24]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1476,10 +1476,10 @@ fprintf(fd, "// Process group with 25 CNs \n");
// Loop over CNs
for (k=1; k<25; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1521,7 +1521,7 @@ fprintf(fd, "// Process group with 26 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[25]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1533,10 +1533,10 @@ fprintf(fd, "// Process group with 26 CNs \n");
// Loop over CNs
for (k=1; k<26; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1577,7 +1577,7 @@ fprintf(fd, "// Process group with 27 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[26]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1589,10 +1589,10 @@ fprintf(fd, "// Process group with 27 CNs \n");
// Loop over CNs
for (k=1; k<27; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1633,7 +1633,7 @@ fprintf(fd, "// Process group with 28 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[27]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1645,10 +1645,10 @@ fprintf(fd, "// Process group with 28 CNs \n");
// Loop over CNs
for (k=1; k<28; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1688,7 +1688,7 @@ fprintf(fd, "// Process group with 29 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[28]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1700,10 +1700,10 @@ fprintf(fd, "// Process group with 29 CNs \n");
// Loop over CNs
for (k=1; k<29; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}
@@ -1744,7 +1744,7 @@ fprintf(fd, "// Process group with 30 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[29]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1756,10 +1756,10 @@ fprintf(fd, "// Process group with 30 CNs \n");
// Loop over CNs
for (k=1; k<30; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0, zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1, zmm1); \n");
}

View File

@@ -105,7 +105,7 @@ fprintf(fd, "// Process group with 1 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[0]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -162,7 +162,7 @@ fprintf(fd, "// Process group with 2 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[1]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -175,10 +175,10 @@ fprintf(fd, "// Process group with 2 CNs \n");
// Loop over CNs
for (k=1; k<2; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -220,7 +220,7 @@ fprintf(fd, "// Process group with 3 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[2]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -232,10 +232,10 @@ fprintf(fd, "// Process group with 3 CNs \n");
// Loop over CNs
for (k=1; k<3; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -276,7 +276,7 @@ fprintf(fd, "// Process group with 4 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[3]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
@@ -289,10 +289,10 @@ fprintf(fd, "// Process group with 4 CNs \n");
// Loop over CNs
for (k=1; k<4; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -333,7 +333,7 @@ fprintf(fd, "// Process group with 5 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[4]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -345,10 +345,10 @@ fprintf(fd, "// Process group with 5 CNs \n");
// Loop over CNs
for (k=1; k<5; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -390,7 +390,7 @@ fprintf(fd, "// Process group with 6 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[5]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -402,10 +402,10 @@ fprintf(fd, "// Process group with 6 CNs \n");
// Loop over CNs
for (k=1; k<6; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -446,7 +446,7 @@ fprintf(fd, "// Process group with 7 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[6]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -458,10 +458,10 @@ fprintf(fd, "// Process group with 7 CNs \n");
// Loop over CNs
for (k=1; k<7; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -503,7 +503,7 @@ fprintf(fd, "// Process group with 8 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[7]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -515,10 +515,10 @@ fprintf(fd, "// Process group with 8 CNs \n");
// Loop over CNs
for (k=1; k<8; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -560,7 +560,7 @@ fprintf(fd, "// Process group with 9 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[8]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -572,10 +572,10 @@ fprintf(fd, "// Process group with 9 CNs \n");
// Loop over CNs
for (k=1; k<9; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -617,7 +617,7 @@ fprintf(fd, "// Process group with 10 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[9]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -629,10 +629,10 @@ fprintf(fd, "// Process group with 10 CNs \n");
// Loop over CNs
for (k=1; k<10; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -675,7 +675,7 @@ fprintf(fd, "// Process group with 11 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[10]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -687,10 +687,10 @@ fprintf(fd, "// Process group with 11 CNs \n");
// Loop over CNs
for (k=1; k<11; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -730,7 +730,7 @@ fprintf(fd, "// Process group with 12 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[11]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -742,10 +742,10 @@ fprintf(fd, "// Process group with 12 CNs \n");
// Loop over CNs
for (k=1; k<12; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -786,7 +786,7 @@ fprintf(fd, "// Process group with 13 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[12]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -798,10 +798,10 @@ fprintf(fd, "// Process group with 13 CNs \n");
// Loop over CNs
for (k=1; k<13; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -843,7 +843,7 @@ fprintf(fd, "// Process group with 14 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[13]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -855,10 +855,10 @@ fprintf(fd, "// Process group with 14 CNs \n");
// Loop over CNs
for (k=1; k<14; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -899,7 +899,7 @@ fprintf(fd, "// Process group with 15 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[14]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -911,10 +911,10 @@ fprintf(fd, "// Process group with 15 CNs \n");
// Loop over CNs
for (k=1; k<15; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -956,7 +956,7 @@ fprintf(fd, "// Process group with 16 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[15]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -968,10 +968,10 @@ fprintf(fd, "// Process group with 16 CNs \n");
// Loop over CNs
for (k=1; k<16; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1012,7 +1012,7 @@ fprintf(fd, "// Process group with 17 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[16]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1024,10 +1024,10 @@ fprintf(fd, "// Process group with 17 CNs \n");
// Loop over CNs
for (k=1; k<17; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1068,7 +1068,7 @@ fprintf(fd, "// Process group with 18 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[17]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1080,10 +1080,10 @@ fprintf(fd, "// Process group with 18 CNs \n");
// Loop over CNs
for (k=1; k<18; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1123,7 +1123,7 @@ fprintf(fd, "// Process group with 19 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[18]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1135,10 +1135,10 @@ fprintf(fd, "// Process group with 19 CNs \n");
// Loop over CNs
for (k=1; k<19; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1179,7 +1179,7 @@ fprintf(fd, "// Process group with 20 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[19]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1191,10 +1191,10 @@ fprintf(fd, "// Process group with 20 CNs \n");
// Loop over CNs
for (k=1; k<20; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1239,7 +1239,7 @@ fprintf(fd, "// Process group with 21 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[20]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1251,10 +1251,10 @@ fprintf(fd, "// Process group with 21 CNs \n");
// Loop over CNs
for (k=1; k<21; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1294,7 +1294,7 @@ fprintf(fd, "// Process group with 22 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[21]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1306,10 +1306,10 @@ fprintf(fd, "// Process group with 22 CNs \n");
// Loop over CNs
for (k=1; k<22; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1350,7 +1350,7 @@ fprintf(fd, "// Process group with <23 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[22]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1362,10 +1362,10 @@ fprintf(fd, "// Process group with <23 CNs \n");
// Loop over CNs
for (k=1; k<23; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1407,7 +1407,7 @@ fprintf(fd, "// Process group with 24 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[23]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1419,10 +1419,10 @@ fprintf(fd, "// Process group with 24 CNs \n");
// Loop over CNs
for (k=1; k<24; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1463,7 +1463,7 @@ fprintf(fd, "// Process group with 25 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[24]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1475,10 +1475,10 @@ fprintf(fd, "// Process group with 25 CNs \n");
// Loop over CNs
for (k=1; k<25; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1520,7 +1520,7 @@ fprintf(fd, "// Process group with 26 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[25]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1532,10 +1532,10 @@ fprintf(fd, "// Process group with 26 CNs \n");
// Loop over CNs
for (k=1; k<26; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1576,7 +1576,7 @@ fprintf(fd, "// Process group with 27 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[26]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1588,10 +1588,10 @@ fprintf(fd, "// Process group with 27 CNs \n");
// Loop over CNs
for (k=1; k<27; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1632,7 +1632,7 @@ fprintf(fd, "// Process group with 28 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[27]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1644,10 +1644,10 @@ fprintf(fd, "// Process group with 28 CNs \n");
// Loop over CNs
for (k=1; k<28; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1687,7 +1687,7 @@ fprintf(fd, "// Process group with 29 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[28]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1699,10 +1699,10 @@ fprintf(fd, "// Process group with 29 CNs \n");
// Loop over CNs
for (k=1; k<29; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}
@@ -1743,7 +1743,7 @@ fprintf(fd, "// Process group with 30 CNs \n");
cnOffsetInGroup = (lut_numBnInBnGroups[29]*NR_LDPC_ZMAX)>>5;
// Set pointers to start of group 2
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%u];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_bnProcBuf = (__m256i*) &bnProcBuf [%d];\n",lut_startAddrBnGroups[idxBnGroup]);
fprintf(fd," p_llrProcBuf = (__m256i*) &llrProcBuf [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
fprintf(fd," p_llrRes = (__m512i*) &llrRes [%d];\n",lut_startAddrBnGroupsLlr[idxBnGroup]);
// Loop over BNs
@@ -1755,10 +1755,10 @@ fprintf(fd, "// Process group with 30 CNs \n");
// Loop over CNs
for (k=1; k<30; k++)
{
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm0 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j]);\n", k*cnOffsetInGroup);
fprintf(fd," zmmRes0 = _mm512_adds_epi16(zmmRes0,zmm0);\n");
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%u + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd," zmm1 = _mm512_cvtepi8_epi16(p_bnProcBuf[%d + j +1]);\n", k*cnOffsetInGroup);
fprintf(fd, " zmmRes1 = _mm512_adds_epi16(zmmRes1,zmm1); \n");
}

Some files were not shown because too many files have changed in this diff Show More