Skip to content

Commit

Permalink
Merge pull request #397 from Agora-wireless/develop
Browse files Browse the repository at this point in the history
Merge for release 1.2.1

Former-commit-id: fb37415
  • Loading branch information
asedlmayr authored Feb 10, 2023
2 parents 9f1a421 + 24a57b5 commit 76e9ab0
Show file tree
Hide file tree
Showing 159 changed files with 8,757 additions and 5,494 deletions.
2 changes: 1 addition & 1 deletion Agora_doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Agora"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.2.0
PROJECT_NUMBER = 1.2.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
81 changes: 71 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(CheckCSourceRuns)
cmake_policy(SET CMP0054 NEW)
#Allow project version
cmake_policy(SET CMP0048 NEW)
project(Agora VERSION 1.2.0)
project(Agora VERSION 1.2.1)

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
#Flags is enabled by default for c++17
Expand All @@ -26,6 +26,7 @@ endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")

set(CMAKE_CXX_STANDARD 17)

if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
message(STATUS "Using GNU compiler, compiler ID ${CMAKE_C_COMPILER_ID}")
set(CMAKE_C_FLAGS "-std=gnu11 -Wall -g -march=native -m64")
Expand All @@ -43,6 +44,9 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}"
message(STATUS "Using Clang compiler, compiler ID ${CMAKE_C_COMPILER_ID}")
endif()

#Set to ON For clang tidy
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)

option(DEBUG "Enable debugging" OFF)

if(CMAKE_BUILD_TYPE MATCHES Debug)
Expand Down Expand Up @@ -96,7 +100,7 @@ endif()
#Settable values
message(STATUS "\n-- ----- Configuration values -----")
message(STATUS "DEBUG: ${DEBUG}")
set(RADIO_TYPE SIMULATION CACHE STRING "RADIO_TYPE defaulting to 'SIMULATION', valid types are SIMULATION / SOAPY_IRIS / SOAPY_UHD")
set(RADIO_TYPE SIMULATION CACHE STRING "RADIO_TYPE defaulting to 'SIMULATION', valid types are SIMULATION / SOAPY_IRIS / SOAPY_UHD / PURE_UHD")
message(STATUS "RADIO_TYPE: ${RADIO_TYPE}")
set(LOG_LEVEL "info" CACHE STRING "Console logging level (none/error/warn/info/frame/subframe/trace)")
message(STATUS "LOG_LEVEL: ${LOG_LEVEL}")
Expand All @@ -122,6 +126,9 @@ if(RADIO_TYPE STREQUAL SOAPY_IRIS)
elseif(RADIO_TYPE STREQUAL SOAPY_UHD)
message(STATUS "Enabled SOAPY UHD radio type")
add_definitions(-DUSE_UHD)
elseif(RADIO_TYPE STREQUAL PURE_UHD)
message(STATUS "Enabled Pure UHD radio type")
add_definitions(-DUSE_PURE_UHD)
else()
message(STATUS "Enabled SIMULATION radio type")
endif()
Expand Down Expand Up @@ -298,6 +305,48 @@ set(GTEST_LIBRARIES ${GTEST_LIBRARIES} -lpthread)
include_directories(third_party third_party/spdlog/include third_party/nlohmann/single_include)

add_definitions(-DTHREADED_INIT)

if(RADIO_TYPE STREQUAL PURE_UHD)
message(STATUS "Enabled PURE_UHD radio")
add_definitions(-DUSE_UHD)
# Adding dependency of UHD and boost external libraries
find_package(UHD "3.15.0" REQUIRED)
message(STATUS "Using UHD Version: ${UHD_VERSION}")

########################################################################
# PURE UHD dependencies
########################################################################
# Adding dependency of Boost to souder
set(BOOST_REQUIRED_COMPONENTS
program_options
system
thread)

if(MSVC)
set(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking")
if(BOOST_ALL_DYN_LINK)
add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
else(BOOST_ALL_DYN_LINK)
set(BOOST_REQUIRED_COMPONENTS) #empty components list for static link
endif(BOOST_ALL_DYN_LINK)
endif(MSVC)
find_package(Boost "1.65" REQUIRED ${BOOST_REQUIRED_COMPONENTS})
message(STATUS "Using Boost Version: ${Boost_VERSION}")

set(PUREUHD_SOURCES
src/agora/radio/radio_set/radio_set_uhd.cc
src/agora/radio/radio_uhdsdr.cc
)
set(PUREUHD_SOURCES_AGORA
src/agora/txrx/workers/txrx_worker_usrp.cc
)

set(PUREUHD_SOURCES_CLIENT
src/client/txrx/workers/txrx_worker_client_uhd.cc
)
message(STATUS "pure_uhd_lib library initialized")
endif()

# MAC
if(${ENABLE_MAC})
add_definitions(-DENABLE_MAC)
Expand All @@ -309,6 +358,7 @@ set(MAC_CLIENT_SOURCES
src/mac/video_receiver.cc
src/mac/file_receiver.cc
src/mac/mac_client.cc)

set(MAC_BS_SOURCES
src/mac/mac_sender.cc
src/mac/mac_receiver.cc
Expand All @@ -324,6 +374,7 @@ include_directories(
src/mac/
src/agora/
src/agora/radio
src/agora/radio/radio_set
src/agora/txrx
src/agora/txrx/workers
src/client
Expand All @@ -345,6 +396,7 @@ endif()
add_library(recorder_sources_lib OBJECT ${RECORDER_SOURCES})

set(COMMON_SOURCES
${PUREUHD_SOURCES}
src/agora/stats.cc
src/common/phy_stats.cc
src/common/framestats.cc
Expand All @@ -366,6 +418,7 @@ set(COMMON_SOURCES
src/agora/radio/radio_socket.cc
src/agora/radio/radio_data_plane_soapy.cc
src/agora/radio/radio_data_plane_socket.cc
src/agora/radio/radio_set/radio_set.cc
src/common/ipc/udp_comm.cc
src/common/ipc/network_utils.cc
src/common/loggers/csv_logger.cc
Expand All @@ -389,6 +442,7 @@ if(${USE_DPDK})
endif()

set(AGORA_SOURCES ${AGORA_SOURCES}
${PUREUHD_SOURCES_AGORA}
src/agora/agora.cc
src/agora/agora_buffer.cc
src/agora/agora_worker.cc
Expand All @@ -398,22 +452,20 @@ set(AGORA_SOURCES ${AGORA_SOURCES}
src/agora/dodemul.cc
src/agora/doprecode.cc
src/agora/dodecode.cc
src/agora/radio/radio_lib.cc
src/agora/radio/radio_calibrate_digital.cc
src/agora/radio/radio_calibrate_analog.cc
src/agora/radio/radio_set/radio_set_bs.cc
src/mac/mac_thread_basestation.cc
src/agora/txrx/packet_txrx_sim.cc
src/agora/txrx/packet_txrx_radio.cc
src/agora/txrx/workers/txrx_worker_sim.cc
src/agora/txrx/workers/txrx_worker_hw.cc
src/agora/txrx/workers/txrx_worker_usrp.cc)
src/agora/txrx/workers/txrx_worker_hw.cc)

add_library(agora_sources_lib OBJECT ${AGORA_SOURCES})

set(CLIENT_SOURCES
${PUREUHD_SOURCES_CLIENT}
src/client/doifft_client.cc
src/client/dodecode_client.cc
src/client/client_radio.cc
src/client/radio_set_ue.cc
src/client/ue_worker.cc
src/client/phy-ue.cc
src/client/txrx/packet_txrx_client_sim.cc
Expand All @@ -424,7 +476,7 @@ set(CLIENT_SOURCES
add_library(client_sources_lib OBJECT ${CLIENT_SOURCES})

set(COMMON_LIBS -Wl,--start-group ${MKL_LIBS} ${BLAS_LIBRARIES} -Wl,--end-group ${NUMA_LIBRARIES} ${FLEXRAN_LDPC_LIBS} ${HDF5_LIBRARIES} ${DPDK_LIBRARIES} ${ARMADILLO_LIBRARIES} ${SOAPY_LIB}
${PYTHON_LIB} ${GFLAGS_LIBRARIES} ${COMMON_LIBS})
${PYTHON_LIB} ${Boost_LIBRARIES} ${GFLAGS_LIBRARIES} ${UHD_LIBRARIES} ${COMMON_LIBS})
message(VERBOSE "Common libs: ${COMMON_LIBS}")

# TODO: The main agora executable is performance-critical, so we need to
Expand All @@ -438,6 +490,15 @@ add_executable(agora
$<TARGET_OBJECTS:common_sources_lib>)
target_link_libraries(agora ${COMMON_LIBS})

add_executable(calibrate
${CMAKE_CURRENT_SOURCE_DIR}/src/agora/radio/radio_set/calibrate_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/agora/radio/radio_set/radio_set_calibrate.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/agora/radio/radio_set/radio_calibrate_digital.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/agora/radio/radio_set/radio_calibrate_analog.cc
$<TARGET_OBJECTS:common_sources_lib>)
target_link_libraries(calibrate ${COMMON_LIBS})
target_compile_definitions(calibrate PRIVATE CALIBRATE)

add_executable(data_generator
${CMAKE_CURRENT_SOURCE_DIR}/src/data_generator/data_generator_main.cc
${CMAKE_CURRENT_SOURCE_DIR}/src/data_generator/data_generator.cc
Expand Down Expand Up @@ -535,4 +596,4 @@ foreach(test_name IN LISTS UNIT_TESTS)
set_target_properties(${test_name} PROPERTIES CMAKE_CXX_FLAGS "-fsanitize=address")
target_link_libraries(${test_name} ${COMMON_LIBS} ${GTEST_LIBRARIES})
add_test(NAME ${test_name} COMMAND ${test_name})
endforeach()
endforeach()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://falcon.ecg.rice.edu:443/buildStatus/icon?job=github_public_agora%2Fdevelop)](https://falcon.ecg.rice.edu:443/job/github_public_agora/job/develop/)
[![Build Status](https://falcon.ecg.rice.edu:443/buildStatus/icon?job=github_public_agora%2Fmaster)](https://falcon.ecg.rice.edu:443/job/github_public_agora/job/master/)

Agora is a complete software realization of real-time massive MIMO baseband processing.

Expand Down
70 changes: 70 additions & 0 deletions files/config/examples/dl-mww-1ue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"serial_file": "files/topology/topology-mww-1ue.json",
"cells": 1,
"channel": "A",
"frequency": 3.545e9,
"single_gain": true,
"rx_gain_a": 75,
"tx_gain_a": 81,
"rx_gain_b": 75,
"tx_gain_b": 81,
"sample_rate": 7.68e6,
"ofdm_tx_zero_prefix": 160,
/* 192 / 160 */
"ofdm_tx_zero_postfix": 192,
"ofdm_rx_zero_prefix_bs": 160,
"ofdm_rx_zero_prefix_client": 160,
/* 288 / 324 */
"ofdm_rx_zero_prefix_cal_dl": 324,
/* 168 / 136 */
"ofdm_rx_zero_prefix_cal_ul": 136,
"cp_size": 32,
"fft_size": 512,
"ofdm_data_num": 304,
"demul_block_size": 48,
"ue_demul_block_size": 48,
"dl_mcs": {
"modulation": "16QAM",
"code_rate": 0.333
},
"beamsweep": true,
"beacon_antenna": 0,
"frame_schedule": [
"BGCLGGPGGGDDDGGG"
],
"client_dl_pilot_syms": 1,
/* UE configuration */
"ue_channel": "A",
"ue_rx_gain_a": [
78
],
"ue_tx_gain_a": [
81
],
"ue_rx_gain_b": [
78
],
"ue_tx_gain_b": [
81
],
"tx_advance": [
140
],
"corr_scale": [
10
],
"ue_hw_framer": false,
"hw_framer": true,
/* Compute configuration */
"exclude_cores": [],
"ue_core_offset": 48,
"ue_worker_thread_num": 4,
"ue_socket_thread_num": 1,
"core_offset": 16,
"worker_thread_num": 4,
/* 18 bs radios + 1 ref*/
"socket_thread_num": 4,
"max_frame": 1000,
"calibrate_digital": true,
"freq_orthogonal_pilot": true
}
76 changes: 76 additions & 0 deletions files/config/examples/dl-mww-2ue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"serial_file": "files/topology/topology-mww-2ue.json",
"cells": 1,
"channel": "A",
"frequency": 3.545e9,
"single_gain": true,
"rx_gain_a": 75,
"tx_gain_a": 81,
"rx_gain_b": 75,
"tx_gain_b": 81,
"sample_rate": 7.68e6,
"ofdm_tx_zero_prefix": 160,
/* 192 / 160 */
"ofdm_tx_zero_postfix": 192,
"ofdm_rx_zero_prefix_bs": 160,
"ofdm_rx_zero_prefix_client": 160,
/* 288 / 324 */
"ofdm_rx_zero_prefix_cal_dl": 324,
/* 168 / 136 */
"ofdm_rx_zero_prefix_cal_ul": 136,
"cp_size": 32,
"fft_size": 512,
"ofdm_data_num": 304,
"demul_block_size": 48,
"ue_demul_block_size": 48,
"dl_mcs": {
"modulation": "16QAM",
"code_rate": 0.333
},
"beamsweep": true,
"beacon_antenna": 0,
"frame_schedule": [
"BGCLGGPGGGDDDGGG"
],
"client_dl_pilot_syms": 1,
/* UE configuration */
"ue_channel": "A",
"ue_rx_gain_a": [
78,
78
],
"ue_tx_gain_a": [
81,
81
],
"ue_rx_gain_b": [
78,
78
],
"ue_tx_gain_b": [
81,
81
],
"tx_advance": [
140,
140
],
"corr_scale": [
10,
10
],
"ue_hw_framer": false,
"hw_framer": true,
/* Compute configuration */
"exclude_cores": [],
"ue_core_offset": 48,
"ue_worker_thread_num": 4,
"ue_socket_thread_num": 2,
"core_offset": 16,
"worker_thread_num": 10,
/* 18 bs radios + 1 ref*/
"socket_thread_num": 4,
"max_frame": 1000,
"calibrate_digital": true,
"freq_orthogonal_pilot": true
}
36 changes: 36 additions & 0 deletions files/config/examples/dl-mww-sim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"fft_size": 512,
"ofdm_data_num": 304,
"demul_block_size": 48,
"ul_mcs" : {
"code_rate": 0.333
},
"dl_mcs" : {
"code_rate": 0.333
},
/* set sample rate to 1Ms
to make sure tests pass*/
"sample_rate" : 1e6,
"ue_radio_num": 4,
"bs_radio_num": 32,
"symbol_num_perframe": 24,
"client_ul_pilot_syms": 0,
"ul_data_symbol_start": 0,
"ul_symbol_num_perframe": 0,
"client_dl_pilot_syms": 2,
"dl_data_symbol_start": 21,
"dl_symbol_num_perframe": 3,
"beacon_position": 0,
"bs_server_port": 8100,
"bs_rru_port": 8200,
"exclude_cores": [],
"core_offset": 0,
"worker_thread_num": 4,
"socket_thread_num": 1,
"ue_core_offset": 7,
"ue_worker_thread_num": 2,
"ue_socket_thread_num": 1,
"max_frame": 1000,
"freq_orthogonal_pilot": true,
"log_listener_addr": "127.0.0.1"
}
Loading

0 comments on commit 76e9ab0

Please sign in to comment.