Merge remote-tracking branch 'origin/fix-seed-physim-script' into integration_2022_wk51
This commit is contained in:
+27
-37
@@ -1763,6 +1763,7 @@ add_library (GTPV1U
|
|||||||
${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
|
${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(GTPV1U PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(GTPV1U PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
|
target_link_libraries(GTPV1U PRIVATE SIMU)
|
||||||
include_directories(${OPENAIR3_DIR}/ocp-gtp)
|
include_directories(${OPENAIR3_DIR}/ocp-gtp)
|
||||||
|
|
||||||
set (MME_APP_SRC
|
set (MME_APP_SRC
|
||||||
@@ -2109,13 +2110,6 @@ add_library(LIB_5GNAS_GNB
|
|||||||
target_link_libraries(LIB_5GNAS_GNB PRIVATE SECU_CN ${CRYPTO_LIBRARIES})
|
target_link_libraries(LIB_5GNAS_GNB PRIVATE SECU_CN ${CRYPTO_LIBRARIES})
|
||||||
target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
|
|
||||||
add_library(SIMU_COMMON
|
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
|
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
|
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/phase_noise.c
|
|
||||||
)
|
|
||||||
target_link_libraries(SIMU_COMMON PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
|
||||||
|
|
||||||
# Simulation library
|
# Simulation library
|
||||||
##########################
|
##########################
|
||||||
set (SIMUSRC
|
set (SIMUSRC
|
||||||
@@ -2124,15 +2118,15 @@ set (SIMUSRC
|
|||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
|
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
|
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/channel_sim.c
|
${OPENAIR1_DIR}/SIMULATION/TOOLS/channel_sim.c
|
||||||
|
${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
|
||||||
|
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
|
||||||
|
${OPENAIR1_DIR}/SIMULATION/TOOLS/phase_noise.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/RF/rf.c
|
${OPENAIR1_DIR}/SIMULATION/RF/rf.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/RF/dac.c
|
${OPENAIR1_DIR}/SIMULATION/RF/dac.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/RF/adc.c
|
${OPENAIR1_DIR}/SIMULATION/RF/adc.c
|
||||||
#${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
)
|
||||||
)
|
add_library(SIMU STATIC ${SIMUSRC} )
|
||||||
|
target_include_directories(SIMU PUBLIC ${OPENAIR1_DIR}/SIMULATION/TOOLS ${OPENAIR1_DIR}/SIMULATION/RF)
|
||||||
# Simulation library
|
|
||||||
##########################
|
|
||||||
add_library(SIMU SHARED ${SIMUSRC} )
|
|
||||||
target_link_libraries(SIMU PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(SIMU PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
|
|
||||||
add_library(SIMU_ETH
|
add_library(SIMU_ETH
|
||||||
@@ -2190,7 +2184,7 @@ add_library(rfsimulator MODULE
|
|||||||
${OPENAIR_DIR}/radio/rfsimulator/apply_channelmod.c
|
${OPENAIR_DIR}/radio/rfsimulator/apply_channelmod.c
|
||||||
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
|
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
|
||||||
)
|
)
|
||||||
target_link_libraries(rfsimulator PRIVATE SIMU_COMMON ${ATLAS_LIBRARIES})
|
target_link_libraries(rfsimulator PRIVATE SIMU ${ATLAS_LIBRARIES})
|
||||||
target_link_libraries(rfsimulator PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(rfsimulator PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
|
|
||||||
add_library(oai_iqplayer MODULE
|
add_library(oai_iqplayer MODULE
|
||||||
@@ -2279,7 +2273,6 @@ add_executable(lte-softmodem
|
|||||||
${OPENAIR_DIR}/executables/lte-softmodem.c
|
${OPENAIR_DIR}/executables/lte-softmodem.c
|
||||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
|
||||||
${OPENAIR_DIR}/executables/create_tasks.c
|
${OPENAIR_DIR}/executables/create_tasks.c
|
||||||
${OPENAIR_DIR}/executables/create_tasks_mbms.c
|
${OPENAIR_DIR}/executables/create_tasks_mbms.c
|
||||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||||
@@ -2304,7 +2297,7 @@ target_link_libraries(lte-softmodem PRIVATE
|
|||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U f1ap SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
|
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U f1ap 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
|
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
|
||||||
${RAL_LIB} ${NAS_UE_LIB} ITTI
|
${RAL_LIB} ${NAS_UE_LIB} ITTI SIMU
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
target_link_libraries(lte-softmodem PRIVATE ${LIBXML2_LIBRARIES})
|
target_link_libraries(lte-softmodem PRIVATE ${LIBXML2_LIBRARIES})
|
||||||
@@ -2320,7 +2313,6 @@ add_executable(ocp-enb
|
|||||||
${OPENAIR_DIR}/executables/main-fs6.c
|
${OPENAIR_DIR}/executables/main-fs6.c
|
||||||
${OPENAIR_DIR}/executables/transport_split.c
|
${OPENAIR_DIR}/executables/transport_split.c
|
||||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
|
||||||
${OPENAIR_DIR}/executables/create_tasks.c
|
${OPENAIR_DIR}/executables/create_tasks.c
|
||||||
${OPENAIR_DIR}/executables/create_tasks_mbms.c
|
${OPENAIR_DIR}/executables/create_tasks_mbms.c
|
||||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||||
@@ -2343,7 +2335,7 @@ add_dependencies(ocp-enb oai_iqplayer coding params_libconfig rfsimulator)
|
|||||||
target_link_libraries (ocp-enb
|
target_link_libraries (ocp-enb
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
lte_rrc nr_rrc s1ap f1ap m2ap x2ap m3ap GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
|
lte_rrc nr_rrc s1ap f1ap 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 MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU_COMMON
|
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU
|
||||||
${RAL_LIB} ${NAS_UE_LIB} ITTI
|
${RAL_LIB} ${NAS_UE_LIB} ITTI
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${CMAKE_DL_LIBS} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${CMAKE_DL_LIBS} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
||||||
@@ -2404,7 +2396,7 @@ target_link_libraries(lte-uesoftmodem PRIVATE
|
|||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
|
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
|
||||||
SECU_CN SECU_OSA 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_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
|
PHY_UE PHY_RU L2_UE L2_LTE SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
|
||||||
${RAL_LIB} ${NAS_UE_LIB} ITTI ${ATLAS_LIBRARIES}
|
${RAL_LIB} ${NAS_UE_LIB} ITTI ${ATLAS_LIBRARIES}
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
@@ -2430,7 +2422,6 @@ add_executable(nr-softmodem
|
|||||||
${OPENAIR_DIR}/executables/nr-ru.c
|
${OPENAIR_DIR}/executables/nr-ru.c
|
||||||
${OPENAIR_DIR}/executables/nr-softmodem.c
|
${OPENAIR_DIR}/executables/nr-softmodem.c
|
||||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
|
||||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||||
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
||||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||||
@@ -2449,12 +2440,12 @@ target_link_libraries(nr-softmodem PRIVATE
|
|||||||
-Wl,--start-group
|
-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 SECU_CN SECU_OSA
|
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 ${RAL_LIB} ${NAS_UE_LIB} lte_rrc nr_rrc
|
ITTI ${RAL_LIB} ${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
|
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
|
||||||
x2ap f1ap m2ap m3ap
|
x2ap f1ap m2ap m3ap
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
target_link_libraries(nr-softmodem PRIVATE ${LIBXML2_LIBRARIES})
|
target_link_libraries(nr-softmodem PRIVATE ${LIBXML2_LIBRARIES})
|
||||||
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${CMAKE_DL_LIBS} ${ATLAS_LIBRARIES})
|
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${CMAKE_DL_LIBS} ${ATLAS_LIBRARIES})
|
||||||
target_link_libraries(nr-softmodem PRIVATE ${LIB_LMS_LIBRARIES})
|
target_link_libraries(nr-softmodem PRIVATE ${LIB_LMS_LIBRARIES})
|
||||||
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
|
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
|
||||||
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2479,7 +2470,6 @@ add_executable(nr-uesoftmodem
|
|||||||
${OPENAIR_DIR}/executables/nr-uesoftmodem.c
|
${OPENAIR_DIR}/executables/nr-uesoftmodem.c
|
||||||
${OPENAIR_DIR}/executables/nr-ue.c
|
${OPENAIR_DIR}/executables/nr-ue.c
|
||||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
|
||||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||||
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
||||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||||
@@ -2498,7 +2488,7 @@ target_link_libraries(nr-uesoftmodem PRIVATE
|
|||||||
nr_rrc SECU_CN SECU_OSA 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
|
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
|
NFAPI_USER_LIB MISC_NFAPI_NR_LIB
|
||||||
${RAL_LIB} ITTI ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB}
|
${RAL_LIB} ITTI ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
target_link_libraries(nr-uesoftmodem PRIVATE ${LIBXML2_LIBRARIES})
|
target_link_libraries(nr-uesoftmodem PRIVATE ${LIBXML2_LIBRARIES})
|
||||||
@@ -2532,7 +2522,7 @@ add_executable(dlsim_tm4
|
|||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
)
|
)
|
||||||
target_link_libraries (dlsim_tm4
|
target_link_libraries (dlsim_tm4
|
||||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY ITTI -Wl,--end-group
|
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY ITTI -Wl,--end-group
|
||||||
pthread m rt CONFIG_LIB ${ATLAS_LIBRARIES} ${T_LIB}
|
pthread m rt CONFIG_LIB ${ATLAS_LIBRARIES} ${T_LIB}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2552,7 +2542,7 @@ add_executable(polartest
|
|||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
target_link_libraries(polartest PRIVATE
|
target_link_libraries(polartest PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} dl
|
||||||
)
|
)
|
||||||
target_link_libraries(polartest PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(polartest PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2565,7 +2555,7 @@ add_executable(smallblocktest
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(smallblocktest PRIVATE
|
target_link_libraries(smallblocktest PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} dl
|
||||||
)
|
)
|
||||||
target_link_libraries(smallblocktest PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(smallblocktest PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2583,7 +2573,7 @@ if (CUDA_FOUND)
|
|||||||
add_dependencies( ldpctest ldpc_cuda)
|
add_dependencies( ldpctest ldpc_cuda)
|
||||||
endif (CUDA_FOUND)
|
endif (CUDA_FOUND)
|
||||||
target_link_libraries(ldpctest PRIVATE
|
target_link_libraries(ldpctest PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} dl
|
||||||
)
|
)
|
||||||
target_link_libraries(ldpctest PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(ldpctest PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2596,7 +2586,7 @@ add_executable(nr_dlschsim
|
|||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_dlschsim PRIVATE
|
target_link_libraries(nr_dlschsim PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2608,7 +2598,7 @@ add_executable(nr_pbchsim
|
|||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_pbchsim PRIVATE
|
target_link_libraries(nr_pbchsim PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2623,7 +2613,7 @@ add_executable(nr_pucchsim
|
|||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_pucchsim PRIVATE
|
target_link_libraries(nr_pucchsim PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2641,7 +2631,7 @@ add_executable(nr_dlsim
|
|||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_dlsim PRIVATE
|
target_link_libraries(nr_dlsim PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU 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 lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
-Wl,--start-group UTIL SIMU 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 lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2659,7 +2649,7 @@ add_executable(nr_prachsim
|
|||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${SHLIB_LOADER_SOURCES})
|
${SHLIB_LOADER_SOURCES})
|
||||||
target_link_libraries(nr_prachsim PRIVATE
|
target_link_libraries(nr_prachsim PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl)
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl)
|
||||||
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
|
|
||||||
@@ -2672,7 +2662,7 @@ add_executable(nr_ulschsim
|
|||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_ulschsim PRIVATE
|
target_link_libraries(nr_ulschsim PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2695,7 +2685,7 @@ add_dependencies( nr_ulsim ldpc_offload)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(nr_ulsim PRIVATE
|
target_link_libraries(nr_ulsim PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU 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 lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
-Wl,--start-group UTIL SIMU 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 lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
||||||
)
|
)
|
||||||
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
|
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||||
@@ -2714,7 +2704,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
|
|||||||
${NFAPI_USER_DIR}/nfapi.c
|
${NFAPI_USER_DIR}/nfapi.c
|
||||||
)
|
)
|
||||||
target_link_libraries (${myExe} PRIVATE
|
target_link_libraries (${myExe} PRIVATE
|
||||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU ITTI -Wl,--end-group
|
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU ITTI -Wl,--end-group
|
||||||
pthread m rt CONFIG_LIB ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
pthread m rt CONFIG_LIB ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
||||||
)
|
)
|
||||||
target_link_libraries(${myExe} PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
target_link_libraries(${myExe} PRIVATE asn1_nr_rrc asn1_lte_rrc)
|
||||||
@@ -2762,7 +2752,7 @@ if (${T_TRACER})
|
|||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
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
|
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
|
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
|
||||||
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
|
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU SIMU_ETH OPENAIR0_LIB
|
||||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc dfts)
|
ldpc_orig ldpc_optim ldpc_optim8seg ldpc dfts)
|
||||||
if (TARGET ${i})
|
if (TARGET ${i})
|
||||||
add_dependencies(${i} generate_T)
|
add_dependencies(${i} generate_T)
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ function test_run() {
|
|||||||
|
|
||||||
for (( run_index=1; run_index <= $nruns; run_index++ ))
|
for (( run_index=1; run_index <= $nruns; run_index++ ))
|
||||||
do
|
do
|
||||||
|
temp_exec_log="$log_dir/test.$test_case_name.${tags_array[$tags_array_index]}.run_$run_index"
|
||||||
echo "</EXECUTION LOG Test Case = $test_case_name.${tags_array[$tags_array_index]}, Run = $run_index >" >> $temp_exec_log 2>&1
|
echo "</EXECUTION LOG Test Case = $test_case_name.${tags_array[$tags_array_index]}, Run = $run_index >" >> $temp_exec_log 2>&1
|
||||||
cat "$temp_exec_log" >> "$log_file" 2>&1
|
cat "$temp_exec_log" >> "$log_file" 2>&1
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ COPY --from=lte-ue-build \
|
|||||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.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/libcoding.so \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libSIMU.so \
|
|
||||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||||
/usr/local/lib/
|
/usr/local/lib/
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ COPY --from=lte-ue-build \
|
|||||||
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.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/libcoding.so \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libSIMU.so \
|
|
||||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||||
/usr/local/lib/
|
/usr/local/lib/
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ COPY --from=phy-sim-build \
|
|||||||
/lib64/libxslt.so.1 \
|
/lib64/libxslt.so.1 \
|
||||||
/usr/lib64/libasan.so.5 \
|
/usr/lib64/libasan.so.5 \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libSIMU.so \
|
|
||||||
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
|
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
|
||||||
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
|
||||||
/usr/local/lib/
|
/usr/local/lib/
|
||||||
|
|||||||
@@ -26,21 +26,7 @@
|
|||||||
//#include "PHY/defs.h"
|
//#include "PHY/defs.h"
|
||||||
#include "SIMULATION/TOOLS/sim.h"
|
#include "SIMULATION/TOOLS/sim.h"
|
||||||
#include "rf.h"
|
#include "rf.h"
|
||||||
/*
|
|
||||||
extern void randominit(void);
|
|
||||||
extern double gaussdouble(double,double);
|
|
||||||
//free(input_data);
|
|
||||||
|
|
||||||
//extern int LOG_M(const char *,const char *,void *,int,int,char);
|
|
||||||
//flag change
|
|
||||||
extern int LOG_M(const char *,const char *,void *,int,int,char);
|
|
||||||
*/
|
|
||||||
|
|
||||||
//double pn[1024];
|
|
||||||
|
|
||||||
//#define DEBUG_RF 1
|
|
||||||
|
|
||||||
//free(input_data);
|
|
||||||
void rf_rx(double **r_re,
|
void rf_rx(double **r_re,
|
||||||
double **r_im,
|
double **r_im,
|
||||||
double **r_re_i1,
|
double **r_re_i1,
|
||||||
|
|||||||
@@ -26,57 +26,67 @@
|
|||||||
|
|
||||||
#include "sim.h"
|
#include "sim.h"
|
||||||
|
|
||||||
static unsigned int seed, iy, ir[98];
|
static unsigned int urseed, iy, ir[98]; /// uniformrandom
|
||||||
|
static bool tableNordDone = false; /// gaussZiggurat
|
||||||
|
|
||||||
|
/*!\brief Generate a random number form `/dev/urandom`. */
|
||||||
|
void fill_random(void *buf, size_t sz)
|
||||||
|
{
|
||||||
|
const char* fn = "/dev/urandom";
|
||||||
|
FILE* f = fopen(fn, "rb");
|
||||||
|
if (f == NULL) {
|
||||||
|
fprintf(stderr, "could not open %s for seed generation: %d %s\n", fn, errno, strerror(errno));
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
int rc = fread(buf, sz, 1, f);
|
||||||
|
if (rc < 0) {
|
||||||
|
fprintf(stderr, "could not read %s for seed generation: %d %s\n", fn, errno, strerror(errno));
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const unsigned int a = 1664525lu;
|
||||||
|
|
||||||
|
/*!\brief Initialization routine for Uniform/Gaussian random number generators. */
|
||||||
|
void randominit(unsigned long seed_init)
|
||||||
|
{
|
||||||
|
unsigned long seed = seed_init;
|
||||||
|
if (seed_init == 0)
|
||||||
|
fill_random(&seed, sizeof(seed));
|
||||||
|
printf("Initializing random number generator, seed %ld\n", seed);
|
||||||
|
|
||||||
|
// initialize uniformrandom RNG
|
||||||
|
urseed = (unsigned int) seed;
|
||||||
|
if (urseed % 2 == 0)
|
||||||
|
urseed += 1; /* urseed and mod are relative prime */
|
||||||
|
for (int i = 1; i <= 97; i++) {
|
||||||
|
urseed = a * urseed; /* mod 2**32 */
|
||||||
|
ir[i] = urseed; /* initialize the shuffle table */
|
||||||
|
}
|
||||||
|
iy = 1;
|
||||||
|
|
||||||
|
// initialize gaussZiggurat RNG
|
||||||
|
tableNor(seed);
|
||||||
|
tableNordDone = true;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@defgroup _uniformdouble
|
@defgroup _uniformdouble
|
||||||
@ingroup numerical Uniform linear congruential random number generator.
|
@ingroup numerical Uniform linear congruential random number generator.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!\brief Initialization routine for Uniform/Gaussian random number generators. */
|
|
||||||
|
|
||||||
#define a 1664525lu
|
|
||||||
#define mod 4294967296.0 /* is 2**32 */
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
void randominit(unsigned seed_init)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
// this need to be integrated with the existing rng, like taus: navid
|
|
||||||
|
|
||||||
if (seed_init == 0) {
|
|
||||||
srand((unsigned)time(NULL));
|
|
||||||
|
|
||||||
seed = (unsigned int) rand();
|
|
||||||
} else {
|
|
||||||
seed = seed_init;
|
|
||||||
}
|
|
||||||
printf("Initializing random number generator, seed %x\n",seed);
|
|
||||||
|
|
||||||
if (seed % 2 == 0) seed += 1; /* seed and mod are relative prime */
|
|
||||||
|
|
||||||
for (i=1; i<=97; i++) {
|
|
||||||
seed = a*seed; /* mod 2**32 */
|
|
||||||
ir[i]= seed; /* initialize the shuffle table */
|
|
||||||
}
|
|
||||||
|
|
||||||
iy=1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!\brief Uniform linear congruential random number generator on \f$[0,1)\f$. Returns a double-precision floating-point number.*/
|
/*!\brief Uniform linear congruential random number generator on \f$[0,1)\f$. Returns a double-precision floating-point number.*/
|
||||||
|
|
||||||
double uniformrandom(void)
|
double uniformrandom(void)
|
||||||
{
|
{
|
||||||
#define a 1664525lu
|
const double mod = 4294967296.0; /* is 2**32 */
|
||||||
#define mod 4294967296.0 /* is 2**32 */
|
int j = 1 + 97.0 * iy / mod;
|
||||||
|
iy = ir[j];
|
||||||
int j;
|
urseed = a * urseed; /* mod 2**32 */
|
||||||
|
ir[j] = urseed;
|
||||||
j=1 + 97.0*iy/mod;
|
return (double)iy / mod;
|
||||||
iy=ir[j];
|
|
||||||
seed = a*seed; /* mod 2**32 */
|
|
||||||
ir[j] = seed;
|
|
||||||
return( (double) iy/mod );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -109,8 +119,12 @@ double __attribute__ ((no_sanitize_address)) gaussdouble(double mean, double var
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
@defgroup _gaussZiggurat
|
||||||
|
@ingroup numerical ziggurat random number generator for exponentially distributed numbers
|
||||||
|
*/
|
||||||
// Ziggurat
|
// Ziggurat
|
||||||
static bool tableNordDone=false;
|
|
||||||
static double wn[128], fn[128];
|
static double wn[128], fn[128];
|
||||||
static uint32_t iz, jz, jsr = 123456789, kn[128];
|
static uint32_t iz, jz, jsr = 123456789, kn[128];
|
||||||
static int32_t hz;
|
static int32_t hz;
|
||||||
@@ -180,9 +194,9 @@ double __attribute__ ((no_sanitize_address)) gaussZiggurat(double mean, double v
|
|||||||
{
|
{
|
||||||
if (!tableNordDone) {
|
if (!tableNordDone) {
|
||||||
// let's make reasonnable constant tables
|
// let's make reasonnable constant tables
|
||||||
struct timespec t;
|
unsigned long seed;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
fill_random(&seed, sizeof(seed));
|
||||||
tableNor((long)(t.tv_nsec%INT_MAX));
|
tableNor(seed);
|
||||||
}
|
}
|
||||||
hz = SHR3;
|
hz = SHR3;
|
||||||
iz = hz & 127;
|
iz = hz & 127;
|
||||||
|
|||||||
@@ -523,8 +523,9 @@ the value \f$\mathrm{sgn}(u)i\f$. The search requires at most \f$Nbits-1\f$ com
|
|||||||
*/
|
*/
|
||||||
int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
|
int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
|
||||||
|
|
||||||
|
void fill_random(void *buf, size_t sz);
|
||||||
double gaussdouble(double,double);
|
double gaussdouble(double,double);
|
||||||
void randominit(unsigned int seed_init);
|
void randominit(unsigned long seed_init);
|
||||||
double uniformrandom(void);
|
double uniformrandom(void);
|
||||||
double gaussZiggurat(double mean, double variance);
|
double gaussZiggurat(double mean, double variance);
|
||||||
void tableNor(unsigned long seed);
|
void tableNor(unsigned long seed);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
//#include "SIMULATION/TOOLS/sim.h"
|
#include "sim.h"
|
||||||
|
|
||||||
|
|
||||||
static unsigned int s0, s1, s2;
|
static unsigned int s0, s1, s2;
|
||||||
@@ -52,20 +52,9 @@ void set_taus_seed(unsigned int seed_init)
|
|||||||
unsigned long result = 0;
|
unsigned long result = 0;
|
||||||
|
|
||||||
if (seed_init == 0) {
|
if (seed_init == 0) {
|
||||||
unsigned int data[3];
|
fill_random(&s0, sizeof(s0));
|
||||||
int fd = open("/dev/urandom", O_RDONLY);
|
fill_random(&s1, sizeof(s1));
|
||||||
if (fd == -1)
|
fill_random(&s2, sizeof(s2));
|
||||||
{
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
if (read(fd, data, sizeof(data)) != sizeof(data))
|
|
||||||
{
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
close(fd);
|
|
||||||
s0 = data[0];
|
|
||||||
s1 = data[1];
|
|
||||||
s2 = data[2];
|
|
||||||
} else {
|
} else {
|
||||||
/* Use reentrant version of rand48 to ensure that no conflicts with other generators occur */
|
/* Use reentrant version of rand48 to ensure that no conflicts with other generators occur */
|
||||||
srand48_r((long int)seed_init, &buffer);
|
srand48_r((long int)seed_init, &buffer);
|
||||||
|
|||||||
@@ -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
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
random.c
|
|
||||||
-------------------
|
|
||||||
AUTHOR : Lionel GAUTHIER
|
|
||||||
COMPANY : EURECOM
|
|
||||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
|
||||||
***************************************************************************/
|
|
||||||
#include "rtos_header.h"
|
|
||||||
#include "platform_types.h"
|
|
||||||
|
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
|
|
||||||
/* Random generators */
|
|
||||||
#define FACTOR 16807
|
|
||||||
#define LASTXN 127773
|
|
||||||
#define UPTOMOD -2836
|
|
||||||
|
|
||||||
static int seed;
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
init_uniform (void)
|
|
||||||
{
|
|
||||||
struct timeval tv;
|
|
||||||
struct timezone tz;
|
|
||||||
|
|
||||||
gettimeofday (&tv, &tz);
|
|
||||||
seed = (int) tv.tv_usec;
|
|
||||||
#ifdef NODE_MT
|
|
||||||
#warning TO DO seed = mobileId
|
|
||||||
//seed += mobileId;
|
|
||||||
#endif
|
|
||||||
#ifdef NODE_RG
|
|
||||||
#warning TO DO seed = rgId
|
|
||||||
//seed += rgId;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
uniform (void)
|
|
||||||
{
|
|
||||||
static int times, rest, prod1, prod2;
|
|
||||||
|
|
||||||
times = seed / LASTXN;
|
|
||||||
rest = seed - times * LASTXN;
|
|
||||||
prod1 = times * UPTOMOD;
|
|
||||||
prod2 = rest * FACTOR;
|
|
||||||
seed = prod1 + prod2;
|
|
||||||
|
|
||||||
return seed;
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,7 @@ extern "C" {
|
|||||||
#include <openair2/LAYER2/PDCP_v10.1.0/pdcp.h>
|
#include <openair2/LAYER2/PDCP_v10.1.0/pdcp.h>
|
||||||
#include <openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h>
|
#include <openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h>
|
||||||
#include "openair2/SDAP/nr_sdap/nr_sdap.h"
|
#include "openair2/SDAP/nr_sdap/nr_sdap.h"
|
||||||
//#include <openair1/PHY/phy_extern.h>
|
#include "sim.h"
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
@@ -143,6 +143,12 @@ class gtpEndPoints {
|
|||||||
// the instance id will be the Linux socket handler, as this is uniq
|
// the instance id will be the Linux socket handler, as this is uniq
|
||||||
map<uint64_t, gtpEndPoint> instances;
|
map<uint64_t, gtpEndPoint> instances;
|
||||||
|
|
||||||
|
gtpEndPoints() {
|
||||||
|
unsigned int seed;
|
||||||
|
fill_random(&seed, sizeof(seed));
|
||||||
|
srandom(seed);
|
||||||
|
}
|
||||||
|
|
||||||
~gtpEndPoints() {
|
~gtpEndPoints() {
|
||||||
// automatically close all sockets on quit
|
// automatically close all sockets on quit
|
||||||
for (const auto &p : instances)
|
for (const auto &p : instances)
|
||||||
|
|||||||
Reference in New Issue
Block a user