Agora
1.2.0
Agora project
|
Go to the documentation of this file.
15 #include "common_typedef_sdk.h"
156 std::unique_ptr<PacketTxRx>
ru_;
236 std::vector<std::unique_ptr<Agora_recorder::RecorderThread>>
recorders_;
size_t num_rx_pkts_per_frame_
Definition: message.h:329
size_t UeWorkerThreadNum() const
Definition: config.h:184
size_t GetBeaconSymbolLast() const
Definition: framestats.h:61
Definition: phy_stats.h:15
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > decoded_buffer_
Definition: phy-ue.h:195
PhyUe(Config *config)
Definition: phy-ue.cc:47
Table< std::complex< int16_t > > & UeSpecificPilotT()
Definition: config.h:374
size_t GetDLSymbolIdx(size_t symbol_number) const
Definition: framestats.cc:152
Table< complex_float > ifft_buffer_
Definition: phy-ue.h:135
Definition: concurrentqueue.h:630
FrameCounters fft_dldata_counters_
Definition: phy-ue.h:220
void Running(bool value)
Definition: config.h:33
uint32_t frame_id_
Definition: message.h:168
size_t UeAntNum() const
Definition: config.h:41
void Calloc(size_t dim1, size_t dim2, Agora_memory::Alignment_t alignment)
Definition: memory_manage.h:45
std::vector< UeTxVars > ue_tracker_
Definition: phy-ue.h:231
size_t ul_bits_buffer_size_
Definition: phy-ue.h:144
Definition: test_transpose.cc:22
void FreeUplinkBuffers()
Definition: phy-ue.cc:941
char * tx_buffer_
Definition: phy-ue.h:126
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
Table< int8_t > ul_bits_buffer_
Definition: phy-ue.h:142
~PhyUe()
Definition: phy-ue.cc:193
size_t UeSocketThreadNum() const
Definition: config.h:187
size_t SampsPerSymbol() const
Definition: config.h:234
PrintType
Definition: symbols.h:96
end IFFT Reshape the symbol vector into two different spatial streams size
Definition: generate_data.m:73
void ScheduleWork(EventData do_task)
Definition: phy-ue.cc:234
size_t offset_
Definition: message.h:306
static constexpr bool kDownlinkHardDemod
Definition: symbols.h:187
std::vector< SimdAlignCxFltVector > equal_buffer_
Definition: phy-ue.h:188
static void FreeBuffer1d(T **buffer)
Definition: memory_manage.h:116
Common definations for PacketTxRxClientRadio. Including datapath functions for communicating with use...
std::unique_ptr< moodycamel::ProducerToken > work_producer_token_
Definition: phy-ue.h:82
Definition: message.h:315
size_t NumBeaconSyms() const
Definition: framestats.cc:87
size_t max_equaled_frame_
Definition: phy-ue.h:235
size_t GetPilotSymbol(size_t location) const
Definition: framestats.cc:122
static void ConvertShortToFloat(const short *in_buf, float *out_buf, size_t n_elems)
Produces outputs -1->+0.999.
Definition: datatype_conversion.h:41
FrameCounters tx_counters_
Definition: phy-ue.h:216
size_t OfdmTxZeroPrefix() const
Definition: config.h:211
moodycamel::ConcurrentQueue< EventData > work_queue_
Definition: phy-ue.h:202
size_t tid_
Definition: message.h:305
size_t try_dequeue_bulk(It itemFirst, size_t max)
Definition: concurrentqueue.h:1210
Direction
Definition: symbols.h:39
size_t OfdmTxZeroPostfix() const
Definition: config.h:212
uint16_t symbol_id_
Definition: message.h:33
Table< int8_t > ul_bits_buffer_status_
Definition: phy-ue.h:143
Table< int8_t > ul_syms_buffer_
Definition: phy-ue.h:146
FrameCounters demul_counters_
Definition: phy-ue.h:219
EXPORT void PhyUeGetEqualData(PhyUe *usr, float **ptr, int *size, int ue)
Definition: phy-ue.cc:1276
static constexpr size_t kFrameWnd
Definition: symbols.h:18
FrameCounters encode_counter_
Definition: phy-ue.h:223
size_t GetOFDMDataNum() const
Definition: config.h:554
static constexpr size_t kRecordFrameInterval
Definition: phy-ue.cc:30
bool CompleteTask(size_t frame_id, size_t symbol_id)
Increments the task count for input frame and symbol.
Definition: message.h:383
static bool GotExitSignal()
Definition: signal_handler.cc:23
static constexpr T Roundup(T x)
Definition: utils.h:95
size_t dl_pilot_symbol_perframe_
Definition: phy-ue.h:94
uint32_t ant_id_
Definition: message.h:171
size_t dl_data_symbol_perframe_
Definition: phy-ue.h:96
Common definations for PacketTxRx. Including datapath functions for communicating with simulators.
std::vector< size_t > non_null_sc_ind_
Definition: phy-ue.h:197
Table< complex_float > csi_buffer_
Definition: phy-ue.h:181
moodycamel::ProducerToken * tx_ptoks_ptr_[kMaxThreads]
Definition: phy-ue.h:211
FrameCounters fft_dlpilot_counters_
Definition: phy-ue.h:221
bool IsLastSymbol(size_t frame_id) const
Check whether the symbol is the last symbol for a given frame.
Definition: message.h:399
std::unique_ptr< MacThreadClient > mac_thread_
Definition: phy-ue.h:104
FrameCounters modulation_counters_
Definition: phy-ue.h:224
const FrameStats & Frame() const
Definition: config.h:340
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
Definition: message.h:227
void Use()
Definition: message.h:215
uint16_t ue_id_
Definition: message.h:37
size_t ul_syms_buffer_size_
Definition: phy-ue.h:147
void Stop()
Definition: phy-ue.cc:308
size_t dl_symbol_perframe_
Definition: phy-ue.h:98
static void AllocBuffer1d(T **buffer, U dim, Agora_memory::Alignment_t alignment, int init_zero)
Definition: memory_manage.h:105
static gen_tag_t FrmSymUe(size_t frame_id, size_t symbol_id, size_t ue_id)
Definition: message.h:84
void InitializeDownlinkBuffers()
Definition: phy-ue.cc:951
std::list< size_t > tx_ready_frames_
Definition: phy-ue.h:228
size_t tx_pending_frame_
Definition: phy-ue.h:229
std::thread mac_std_thread_
Definition: phy-ue.h:106
size_t UeNum() const
Definition: config.h:40
void Start()
Definition: phy-ue.cc:315
std::array< size_t, kFrameWnd > num_pilot_pkts_
Definition: message.h:322
static constexpr size_t kDequeueBulkSizeTXRX
Definition: symbols.h:131
size_t OfdmDataNum() const
Definition: config.h:47
This class stores the counters corresponding to a frame. Specifically, it contains a) the number of s...
Definition: message.h:349
size_t GetTaskCount(size_t frame_id) const
Definition: message.h:458
EXPORT void PhyUeGetDemulData(PhyUe *usr, long long **ptr, int *size)
Definition: phy-ue.cc:1279
moodycamel::ConcurrentQueue< EventData > to_mac_queue_
Definition: phy-ue.h:205
Declaration file for the Stats class. Includes definations for DurationStat and FrameSummery types.
moodycamel::ProducerToken * mac_tx_ptoks_ptr_[kMaxThreads]
Definition: phy-ue.h:213
FrameCounters ifft_counters_
Definition: phy-ue.h:227
void ReceiveDownlinkSymbol(Packet *rx_packet, size_t tag)
Definition: phy-ue.cc:245
Definition: message.h:142
static constexpr bool kPrintPhyStats
Definition: symbols.h:191
auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
Definition: core.h:2258
static constexpr bool kEnableMac
Definition: symbols.h:150
size_t Dim1()
Definition: memory_manage.h:100
Aligned types for SIMD compatibility.
uint16_t ant_id_
Definition: message.h:38
FrameCounters decode_counters_
Definition: phy-ue.h:218
auto ptr(T p) -> const void *
Definition: format.h:2680
size_t DlPacketLength() const
Definition: config.h:242
EXPORT void PhyUeStart(PhyUe *usr)
Definition: phy-ue.cc:1271
std::array< std::uint8_t, kFrameWnd > frame_tasks_
Definition: phy-ue.h:101
std::unique_ptr< PhyStats > phy_stats_
Definition: phy-ue.h:63
Self defined functions for message storage and passing.
std::vector< std::queue< EventData > > rx_downlink_deferral_
Definition: phy-ue.h:61
void Free()
Definition: memory_manage.h:84
size_t num_pilot_pkts_per_frame_
Definition: message.h:332
void RunEventLoop()
Definition: mac_thread_client.cc:523
size_t ClientUlPilotSymbols() const
Definition: framestats.h:73
void Init(size_t max_symbol_count, size_t max_task_count=0)
Definition: message.h:353
Scramble Class and helper functions.
for i
Definition: generate_data.m:107
size_t OfdmCaNum() const
Definition: config.h:45
size_t NumDlDataSyms() const
Definition: framestats.h:83
bool enqueue(T const &item)
Definition: concurrentqueue.h:974
std::unique_ptr< Stats > stats_
Definition: phy-ue.h:62
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
Common definations for PacketTxRxClient. Including datapath functions for communicating with the clie...
Communications Library: a) Generate pilot/preamble sequences b) OFDM modulation.
FrameTasksFlags
Definition: phy-ue.h:33
Definition: message.h:164
size_t tx_buffer_size_
Definition: phy-ue.h:127
static constexpr bool kUseArgos
Definition: symbols.h:156
uint32_t symbol_id_
Definition: message.h:169
std::vector< std::vector< std::complex< float > > > ue_pilot_vec_
Definition: phy-ue.h:198
size_t tag_
Definition: message.h:43
std::array< size_t, kFrameWnd > num_pkts_
Definition: message.h:318
size_t FramesToTest() const
Definition: config.h:309
std::unique_ptr< T > make_unique(Args &&... args)
Definition: common.h:334
void FreeDownlinkBuffers()
Definition: phy-ue.cc:988
std::vector< std::unique_ptr< UeWorker > > workers_
Definition: phy-ue.h:208
moodycamel::ProducerToken * mac_rx_ptoks_ptr_[kMaxThreads]
Definition: phy-ue.h:212
moodycamel::ProducerToken * rx_ptoks_ptr_[kMaxThreads]
Definition: phy-ue.h:210
size_t MacPacketLength(Direction dir) const
Definition: config.h:268
size_t OfdmDataStart() const
Definition: config.h:48
static const std::vector< Agora_recorder::RecorderWorker::RecorderWorkerTypes > kRecorderTypes
Definition: phy-ue.cc:43
bool FrameComplete(size_t frame, FrameTasksFlags complete)
Definition: phy-ue.cc:1258
size_t UeCoreOffset() const
Definition: config.h:183
size_t rx_thread_num_
Definition: phy-ue.h:99
static constexpr bool kDebugPrintPerFrameStart
Definition: symbols.h:197
size_t ClientDlPilotSymbols() const
Definition: framestats.h:76
std::array< size_t, kMaxUEs > next_frame_processed_
Definition: phy-ue.h:115
Packet * RawPacket()
Definition: message.h:213
FrameCounters tomac_counters_
Definition: phy-ue.h:233
size_t NumDLSyms() const
Definition: framestats.cc:83
size_t expected_frame_id_from_mac_
Definition: phy-ue.h:110
static constexpr size_t kMaxModType
Definition: symbols.h:297
moodycamel::ConcurrentQueue< EventData > complete_queue_
Definition: phy-ue.h:201
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > demod_buffer_
Definition: phy-ue.h:192
SymbolType GetSymbolType(size_t symbol_id) const
Return the symbol type of this symbol in this frame.
Definition: config.cc:1557
size_t ul_data_symbol_perframe_
Definition: phy-ue.h:95
void Reset(size_t frame_id)
Definition: message.h:362
void GetDemulData(long long **ptr, int *size)
Definition: phy-ue.cc:1231
static void SetExitSignal(bool _bExitSignal)
Definition: signal_handler.cc:28
ue
Definition: user_gui.py:117
size_t NumULSyms() const
Definition: framestats.cc:85
void InitializeVarsFromCfg()
Definition: phy-ue.cc:881
size_t MacBytesNumPerframe(Direction dir) const
Definition: config.h:263
static constexpr size_t kMaxThreads
Definition: symbols.h:309
size_t NumUeChannels() const
Definition: config.h:99
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
void InitializeUplinkBuffers()
Definition: phy-ue.cc:904
EXPORT PhyUe * PhyUeNew(Config *cfg)
Definition: phy-ue.cc:1267
Definition: json.hpp:5213
Declaration file for the phy ue class.
void GetEqualData(float **ptr, int *size, int)
Definition: phy-ue.cc:1237
size_t Dim2()
Definition: memory_manage.h:101
void Malloc(size_t dim1, size_t dim2, Agora_memory::Alignment_t alignment)
Definition: memory_manage.h:37
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
static constexpr bool kDebugPrintPerSymbolDone
Definition: symbols.h:198
static constexpr size_t kNumRecSc
Definition: phy-ue.cc:27
Table< complex_float > modul_buffer_
Definition: phy-ue.h:153
Declaration file for the phy ue class.
size_t rx_buffer_size_
Definition: phy-ue.h:166
std::string to_string() const
Definition: eth_common.h:64
static constexpr bool kDebugPrintPacketsToMac
Definition: phy-ue.cc:23
bool UeHwFramer() const
Definition: config.h:54
size_t GetSymbolCount(size_t frame_id) const
Definition: message.h:454
Definition: message.h:186
bool IsDlPilot(size_t, size_t) const
Definition: config.cc:1509
void PrintPerTaskDone(PrintType print_type, size_t frame_id, size_t symbol_id, size_t ant)
Definition: phy-ue.cc:994
Declaration file for the configuration class which importants json configuration values into class va...
SymbolType
Definition: symbols.h:261
static constexpr bool kRecordDownlinkFrame
Definition: phy-ue.cc:39
Definition: message.h:274
void ScheduleTask(EventData do_task, moodycamel::ConcurrentQueue< EventData > *in_queue, moodycamel::ProducerToken const &ptok)
Definition: phy-ue.cc:222
Definition: concurrentqueue.h:695
static constexpr bool kDebugPrintPacketsFromMac
Definition: phy-ue.cc:22
bool try_enqueue(T const &item)
Definition: concurrentqueue.h:1039
moodycamel::ConcurrentQueue< EventData > tx_queue_
Definition: phy-ue.h:204
void FrameInit(size_t frame)
Definition: phy-ue.cc:1244
size_t ul_symbol_perframe_
Definition: phy-ue.h:97
RxCounters rx_counters_
Definition: phy-ue.h:64
Table< complex_float > fft_buffer_
Definition: phy-ue.h:174
Declaration file for the PhyStats class.
size_t PacketLength() const
Definition: config.h:238
void ScheduleDefferedDownlinkSymbols(size_t frame_id)
Definition: phy-ue.cc:264
void ClearCsi(size_t frame_id)
Definition: phy-ue.cc:288
uint32_t frame_id_
Definition: message.h:32
bool CompleteSymbol(size_t frame_id)
Increments and checks the symbol count for input frame.
Definition: message.h:372
void PrintPerFrameDone(PrintType print_type, size_t frame_id)
Definition: phy-ue.cc:1138
EXPORT void PhyUeDestroy(PhyUe *usr)
Definition: phy-ue.cc:1275
Definition: message.h:303
std::unique_ptr< PacketTxRx > ru_
Definition: phy-ue.h:156
size_t GetULSymbol(size_t location) const
Definition: framestats.cc:114
void PrintPerSymbolDone(PrintType print_type, size_t frame_id, size_t symbol_id)
Definition: phy-ue.cc:1057
static constexpr bool kDebugPrintPerFrameDone
Definition: symbols.h:196
size_t current_frame_user_num_
Definition: phy-ue.h:111
Table< char > rx_buffer_
Definition: phy-ue.h:165
void Free()
Definition: message.h:216
#define EXPORT
Definition: symbols.h:11
std::vector< std::unique_ptr< Agora_recorder::RecorderThread > > recorders_
Definition: phy-ue.h:236
size_t NumTotalSyms() const
Definition: framestats.cc:93
static constexpr size_t kDefaultQueueSize
Definition: phy-ue.cc:24
RxPacket * rx_packet_
Definition: message.h:228
Config * config_
Definition: phy-ue.h:93
EXPORT void PhyUeStop()
Definition: phy-ue.cc:1272
static constexpr bool kDebugPrintPerTaskDone
Definition: symbols.h:199