Agora  1.2.0
Agora project
PhyUe Class Reference

#include <phy-ue.h>

Collaboration diagram for PhyUe:

Classes

struct  UeTxVars
 

Public Types

enum  FrameTasksFlags : std::uint8_t {
  FrameTasksFlags::kNoWorkComplete = 0x00, FrameTasksFlags::kDownlinkComplete = 0x01, FrameTasksFlags::kUplinkTxComplete = 0x02, FrameTasksFlags::kMacTxComplete = 0x04,
  FrameTasksFlags::kFrameComplete = (kDownlinkComplete | kMacTxComplete | kUplinkTxComplete)
}
 

Public Member Functions

 PhyUe (Config *config)
 
 ~PhyUe ()
 
void Start ()
 
void Stop ()
 
void GetEqualData (float **ptr, int *size, int)
 
void GetDemulData (long long **ptr, int *size)
 

Private Member Functions

void PrintPerTaskDone (PrintType print_type, size_t frame_id, size_t symbol_id, size_t ant)
 
void PrintPerSymbolDone (PrintType print_type, size_t frame_id, size_t symbol_id)
 
void PrintPerFrameDone (PrintType print_type, size_t frame_id)
 
void ReceiveDownlinkSymbol (Packet *rx_packet, size_t tag)
 
void ScheduleDefferedDownlinkSymbols (size_t frame_id)
 
void ClearCsi (size_t frame_id)
 
void InitializeDownlinkBuffers ()
 
void InitializeUplinkBuffers ()
 
void ScheduleTask (EventData do_task, moodycamel::ConcurrentQueue< EventData > *in_queue, moodycamel::ProducerToken const &ptok)
 
void ScheduleWork (EventData do_task)
 
void InitializeVarsFromCfg ()
 
void FrameInit (size_t frame)
 
bool FrameComplete (size_t frame, FrameTasksFlags complete)
 
void FreeUplinkBuffers ()
 
void FreeDownlinkBuffers ()
 

Private Attributes

std::vector< std::queue< EventData > > rx_downlink_deferral_
 
std::unique_ptr< Statsstats_
 
std::unique_ptr< PhyStatsphy_stats_
 
RxCounters rx_counters_
 
std::unique_ptr< moodycamel::ProducerTokenwork_producer_token_
 
Configconfig_
 
size_t dl_pilot_symbol_perframe_
 
size_t ul_data_symbol_perframe_
 
size_t dl_data_symbol_perframe_
 
size_t ul_symbol_perframe_
 
size_t dl_symbol_perframe_
 
size_t rx_thread_num_
 
std::array< std::uint8_t, kFrameWndframe_tasks_
 
std::unique_ptr< MacThreadClientmac_thread_
 
std::thread mac_std_thread_
 
size_t expected_frame_id_from_mac_ = 0
 
size_t current_frame_user_num_ = 0
 
std::array< size_t, kMaxUEsnext_frame_processed_ = {}
 
char * tx_buffer_
 
size_t tx_buffer_size_
 
Table< complex_floatifft_buffer_
 
Table< int8_t > ul_bits_buffer_
 
Table< int8_t > ul_bits_buffer_status_
 
size_t ul_bits_buffer_size_
 
Table< int8_t > ul_syms_buffer_
 
size_t ul_syms_buffer_size_
 
Table< complex_floatmodul_buffer_
 
std::unique_ptr< PacketTxRxru_
 
Table< char > rx_buffer_
 
size_t rx_buffer_size_
 
Table< complex_floatfft_buffer_
 
Table< complex_floatcsi_buffer_
 
std::vector< SimdAlignCxFltVectorequal_buffer_
 
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > demod_buffer_
 
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > decoded_buffer_
 
std::vector< size_t > non_null_sc_ind_
 
std::vector< std::vector< std::complex< float > > > ue_pilot_vec_
 
moodycamel::ConcurrentQueue< EventDatacomplete_queue_
 
moodycamel::ConcurrentQueue< EventDatawork_queue_
 
moodycamel::ConcurrentQueue< EventDatatx_queue_
 
moodycamel::ConcurrentQueue< EventDatato_mac_queue_
 
std::vector< std::unique_ptr< UeWorker > > workers_
 
moodycamel::ProducerTokenrx_ptoks_ptr_ [kMaxThreads]
 
moodycamel::ProducerTokentx_ptoks_ptr_ [kMaxThreads]
 
moodycamel::ProducerTokenmac_rx_ptoks_ptr_ [kMaxThreads]
 
moodycamel::ProducerTokenmac_tx_ptoks_ptr_ [kMaxThreads]
 
FrameCounters tx_counters_
 
FrameCounters decode_counters_
 
FrameCounters demul_counters_
 
FrameCounters fft_dldata_counters_
 
FrameCounters fft_dlpilot_counters_
 
FrameCounters encode_counter_
 
FrameCounters modulation_counters_
 
std::vector< UeTxVarsue_tracker_
 
FrameCounters tomac_counters_
 
size_t max_equaled_frame_ = 0
 
std::vector< std::unique_ptr< Agora_recorder::RecorderThread > > recorders_
 

Member Enumeration Documentation

◆ FrameTasksFlags

enum PhyUe::FrameTasksFlags : std::uint8_t
strong
Enumerator
kNoWorkComplete 
kDownlinkComplete 
kUplinkTxComplete 
kMacTxComplete 
kFrameComplete 

Constructor & Destructor Documentation

◆ PhyUe()

PhyUe::PhyUe ( Config config)
explicit
Here is the call graph for this function:

◆ ~PhyUe()

PhyUe::~PhyUe ( )
Here is the call graph for this function:

Member Function Documentation

◆ ClearCsi()

void PhyUe::ClearCsi ( size_t  frame_id)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FrameComplete()

bool PhyUe::FrameComplete ( size_t  frame,
FrameTasksFlags  complete 
)
private
Here is the caller graph for this function:

◆ FrameInit()

void PhyUe::FrameInit ( size_t  frame)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeDownlinkBuffers()

void PhyUe::FreeDownlinkBuffers ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeUplinkBuffers()

void PhyUe::FreeUplinkBuffers ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDemulData()

void PhyUe::GetDemulData ( long long **  ptr,
int *  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEqualData()

void PhyUe::GetEqualData ( float **  ptr,
int *  size,
int  ue_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeDownlinkBuffers()

void PhyUe::InitializeDownlinkBuffers ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeUplinkBuffers()

void PhyUe::InitializeUplinkBuffers ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeVarsFromCfg()

void PhyUe::InitializeVarsFromCfg ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintPerFrameDone()

void PhyUe::PrintPerFrameDone ( PrintType  print_type,
size_t  frame_id 
)
private
Here is the caller graph for this function:

◆ PrintPerSymbolDone()

void PhyUe::PrintPerSymbolDone ( PrintType  print_type,
size_t  frame_id,
size_t  symbol_id 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintPerTaskDone()

void PhyUe::PrintPerTaskDone ( PrintType  print_type,
size_t  frame_id,
size_t  symbol_id,
size_t  ant 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReceiveDownlinkSymbol()

void PhyUe::ReceiveDownlinkSymbol ( Packet rx_packet,
size_t  tag 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleDefferedDownlinkSymbols()

void PhyUe::ScheduleDefferedDownlinkSymbols ( size_t  frame_id)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleTask()

void PhyUe::ScheduleTask ( EventData  do_task,
moodycamel::ConcurrentQueue< EventData > *  in_queue,
moodycamel::ProducerToken const &  ptok 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleWork()

void PhyUe::ScheduleWork ( EventData  do_task)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Start()

void PhyUe::Start ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stop()

void PhyUe::Stop ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ complete_queue_

moodycamel::ConcurrentQueue<EventData> PhyUe::complete_queue_
private

◆ config_

Config* PhyUe::config_
private

◆ csi_buffer_

Table<complex_float> PhyUe::csi_buffer_
private

Estimated CSI data First dimension: OFDM_CA_NUM * kFrameWnd Second dimension: BS_ANT_NUM * UE_NUM

◆ current_frame_user_num_

size_t PhyUe::current_frame_user_num_ = 0
private

◆ decode_counters_

FrameCounters PhyUe::decode_counters_
private

◆ decoded_buffer_

PtrCube<kFrameWnd, kMaxSymbols, kMaxUEs, int8_t> PhyUe::decoded_buffer_
private

◆ demod_buffer_

PtrCube<kFrameWnd, kMaxSymbols, kMaxUEs, int8_t> PhyUe::demod_buffer_
private

◆ demul_counters_

FrameCounters PhyUe::demul_counters_
private

◆ dl_data_symbol_perframe_

size_t PhyUe::dl_data_symbol_perframe_
private

◆ dl_pilot_symbol_perframe_

size_t PhyUe::dl_pilot_symbol_perframe_
private

◆ dl_symbol_perframe_

size_t PhyUe::dl_symbol_perframe_
private

◆ encode_counter_

FrameCounters PhyUe::encode_counter_
private

◆ equal_buffer_

std::vector<SimdAlignCxFltVector> PhyUe::equal_buffer_
private

Data after equalization First dimension: data_symbol_num_perframe * kFrameWnd Second dimension: OFDM_CA_NUM * UE_NUM

◆ expected_frame_id_from_mac_

size_t PhyUe::expected_frame_id_from_mac_ = 0
private

◆ fft_buffer_

Table<complex_float> PhyUe::fft_buffer_
private

Data for FFT, after time sync (prefix removed) First dimension: FFT_buffer_block_num = BS_ANT_NUM * symbol_num_perframe * kFrameWnd Second dimension: OFDM_CA_NUM

◆ fft_dldata_counters_

FrameCounters PhyUe::fft_dldata_counters_
private

◆ fft_dlpilot_counters_

FrameCounters PhyUe::fft_dlpilot_counters_
private

◆ frame_tasks_

std::array<std::uint8_t, kFrameWnd> PhyUe::frame_tasks_
private

◆ ifft_buffer_

Table<complex_float> PhyUe::ifft_buffer_
private

Data for IFFT, (prefix added) First dimension: IFFT_buffer_block_num = BS_ANT_NUM * dl_data_symbol_perframe * kFrameWnd Second dimension: OFDM_CA_NUM

◆ mac_rx_ptoks_ptr_

moodycamel::ProducerToken* PhyUe::mac_rx_ptoks_ptr_[kMaxThreads]
private

◆ mac_std_thread_

std::thread PhyUe::mac_std_thread_
private

◆ mac_thread_

std::unique_ptr<MacThreadClient> PhyUe::mac_thread_
private

◆ mac_tx_ptoks_ptr_

moodycamel::ProducerToken* PhyUe::mac_tx_ptoks_ptr_[kMaxThreads]
private

◆ max_equaled_frame_

size_t PhyUe::max_equaled_frame_ = 0
private

◆ modul_buffer_

Table<complex_float> PhyUe::modul_buffer_
private

Data after modulation First dimension: data_symbol_num_perframe * kFrameWnd Second dimension: OFDM_CA_NUM * UE_NUM

◆ modulation_counters_

FrameCounters PhyUe::modulation_counters_
private

◆ next_frame_processed_

std::array<size_t, kMaxUEs> PhyUe::next_frame_processed_ = {}
private

◆ non_null_sc_ind_

std::vector<size_t> PhyUe::non_null_sc_ind_
private

◆ phy_stats_

std::unique_ptr<PhyStats> PhyUe::phy_stats_
private

◆ recorders_

std::vector<std::unique_ptr<Agora_recorder::RecorderThread> > PhyUe::recorders_
private

◆ ru_

std::unique_ptr<PacketTxRx> PhyUe::ru_
private

◆ rx_buffer_

Table<char> PhyUe::rx_buffer_
private

Received data

Number of RX buffers (size = packet_length) and buffer status entries: RX_THREAD_NUM * RX_BUFFER_FRAME_NUM * BS_ANT_NUM * symbol_num_perframe

◆ rx_buffer_size_

size_t PhyUe::rx_buffer_size_
private

◆ rx_counters_

RxCounters PhyUe::rx_counters_
private

◆ rx_downlink_deferral_

std::vector<std::queue<EventData> > PhyUe::rx_downlink_deferral_
private

◆ rx_ptoks_ptr_

moodycamel::ProducerToken* PhyUe::rx_ptoks_ptr_[kMaxThreads]
private

◆ rx_thread_num_

size_t PhyUe::rx_thread_num_
private

◆ stats_

std::unique_ptr<Stats> PhyUe::stats_
private

◆ to_mac_queue_

moodycamel::ConcurrentQueue<EventData> PhyUe::to_mac_queue_
private

◆ tomac_counters_

FrameCounters PhyUe::tomac_counters_
private

◆ tx_buffer_

char* PhyUe::tx_buffer_
private

Transmit data

Number of transmit buffers (size = packet_length) and buffer status entries: TX_THREAD_NUM * TX_BUFFER_FRAME_NUM * UE_NUM * DL_SYM_PER_FRAME

◆ tx_buffer_size_

size_t PhyUe::tx_buffer_size_
private

◆ tx_counters_

FrameCounters PhyUe::tx_counters_
private

◆ tx_ptoks_ptr_

moodycamel::ProducerToken* PhyUe::tx_ptoks_ptr_[kMaxThreads]
private

◆ tx_queue_

moodycamel::ConcurrentQueue<EventData> PhyUe::tx_queue_
private

◆ ue_pilot_vec_

std::vector<std::vector<std::complex<float> > > PhyUe::ue_pilot_vec_
private

◆ ue_tracker_

std::vector<UeTxVars> PhyUe::ue_tracker_
private

◆ ul_bits_buffer_

Table<int8_t> PhyUe::ul_bits_buffer_
private

Data before modulation First dimension: data_symbol_num_perframe * kFrameWnd Second dimension: OFDM_CA_NUM * UE_NUM

◆ ul_bits_buffer_size_

size_t PhyUe::ul_bits_buffer_size_
private

◆ ul_bits_buffer_status_

Table<int8_t> PhyUe::ul_bits_buffer_status_
private

◆ ul_data_symbol_perframe_

size_t PhyUe::ul_data_symbol_perframe_
private

◆ ul_symbol_perframe_

size_t PhyUe::ul_symbol_perframe_
private

◆ ul_syms_buffer_

Table<int8_t> PhyUe::ul_syms_buffer_
private

◆ ul_syms_buffer_size_

size_t PhyUe::ul_syms_buffer_size_
private

◆ work_producer_token_

std::unique_ptr<moodycamel::ProducerToken> PhyUe::work_producer_token_
private

◆ work_queue_

moodycamel::ConcurrentQueue<EventData> PhyUe::work_queue_
private

◆ workers_

std::vector<std::unique_ptr<UeWorker> > PhyUe::workers_
private

The documentation for this class was generated from the following files: