Agora
1.2.0
Agora project
|
Simualtor for many-antenna MU-MIMO channel to work with Agora BS and UE applications. It generates channel matrice(s) and applies it to incoming baseband samples from BS and sends them to the UE application. Similarly, applies the same channel (TDD) to uplink baseband samples from UE and sends them to BS. More...
#include <channel_sim.h>
Public Member Functions | |
ChannelSim (const Config *const config, size_t bs_thread_num, size_t user_thread_num, size_t worker_thread_num, size_t in_core_offset=30, std::string in_chan_type=std::string("RAYLEIGH"), double in_chan_snr=20) | |
~ChannelSim () | |
void | Run () |
void * | UeRxLoop (size_t tid) |
void * | BsRxLoop (size_t tid) |
void | ScheduleTask (EventData do_task, moodycamel::ConcurrentQueue< EventData > *in_queue, moodycamel::ProducerToken const &ptok) |
void * | TaskThread (size_t tid) |
void | DoTxBs (ChSimWorkerStorage *local, size_t tag) |
void | DoTxUser (ChSimWorkerStorage *local, size_t tag) |
Static Public Member Functions | |
static void * | RxLoop (ChSimRxStorage *rx_storage) |
Private Member Functions | |
void | DoTx (size_t frame_id, size_t symbol_id, size_t max_ant, size_t ant_per_socket, const arma::cx_float *source_data, SimdAlignByteVector *udp_pkt_buf, std::vector< std::unique_ptr< UDPComm >> &udp_senders) |
Warning: Threads are sharing these sender sockets. More... | |
std::vector< std::pair< std::thread, std::unique_ptr< ChSimRxStorage > > > | CreateRxThreads () |
size_t | AddRxThreads (size_t desired_threads, size_t total_interfaces, std::vector< std::unique_ptr< UDPComm >> &comm, ChSimRxBuffer *rx_buffer, std::vector< std::pair< std::thread, std::unique_ptr< ChSimRxStorage >>> &rx_threads_out) |
Private Attributes | |
std::vector< std::unique_ptr< UDPComm > > | bs_comm_ |
std::vector< std::unique_ptr< UDPComm > > | ue_comm_ |
const Config *const | cfg_ |
std::unique_ptr< Channel > | channel_ |
std::unique_ptr< ChSimRxBuffer > | rx_buffer_bs_ |
std::unique_ptr< ChSimRxBuffer > | rx_buffer_ue_ |
moodycamel::ConcurrentQueue< EventData > | task_queue_bs_ |
moodycamel::ConcurrentQueue< EventData > | task_queue_user_ |
moodycamel::ConcurrentQueue< EventData > | message_queue_ |
std::array< std::unique_ptr< moodycamel::ProducerToken >, kMaxThreads > | task_ptok_ |
std::vector< std::thread > | task_threads_ |
size_t | ul_data_plus_pilot_symbols_ |
size_t | dl_data_plus_beacon_symbols_ |
size_t | payload_length_ |
size_t | bs_thread_num_ |
size_t | user_thread_num_ |
size_t | bs_socket_num_ |
size_t | user_socket_num_ |
size_t | worker_thread_num_ |
size_t | core_offset_ |
std::string | channel_type_ |
double | channel_snr_ |
TimeFrameCounters | ue_rx_ |
TimeFrameCounters | ue_tx_ |
TimeFrameCounters | bs_rx_ |
TimeFrameCounters | bs_tx_ |
Simualtor for many-antenna MU-MIMO channel to work with Agora BS and UE applications. It generates channel matrice(s) and applies it to incoming baseband samples from BS and sends them to the UE application. Similarly, applies the same channel (TDD) to uplink baseband samples from UE and sends them to BS.
ChannelSim::ChannelSim | ( | const Config *const | config, |
size_t | bs_thread_num, | ||
size_t | user_thread_num, | ||
size_t | worker_thread_num, | ||
size_t | in_core_offset = 30 , |
||
std::string | in_chan_type = std::string("RAYLEIGH") , |
||
double | in_chan_snr = 20 |
||
) |
ChannelSim::~ChannelSim | ( | ) |
|
private |
void* ChannelSim::BsRxLoop | ( | size_t | tid | ) |
|
private |
|
private |
Warning: Threads are sharing these sender sockets.
void ChannelSim::DoTxBs | ( | ChSimWorkerStorage * | local, |
size_t | tag | ||
) |
void ChannelSim::DoTxUser | ( | ChSimWorkerStorage * | local, |
size_t | tag | ||
) |
void ChannelSim::Run | ( | ) |
|
static |
void ChannelSim::ScheduleTask | ( | EventData | do_task, |
moodycamel::ConcurrentQueue< EventData > * | in_queue, | ||
moodycamel::ProducerToken const & | ptok | ||
) |
void * ChannelSim::TaskThread | ( | size_t | tid | ) |
void* ChannelSim::UeRxLoop | ( | size_t | tid | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |