Agora
1.2.0
Agora project
|
Go to the documentation of this file.
70 size_t FetchEvent(std::vector<EventData>& events_list,
71 bool is_turn_to_dequeue_from_io);
184 std::unique_ptr<Agora_recorder::RecorderThread>
recorder_;
size_t num_rx_pkts_per_frame_
Definition: message.h:329
const size_t base_worker_core_offset_
Definition: agora.h:110
Definition: phy_stats.h:15
void ScheduleUsers(EventType event_type, size_t frame_id, size_t symbol_id)
Definition: agora.cc:286
static constexpr bool kRecordUplinkFrame
Definition: agora.cc:42
size_t num_reciprocity_pkts_per_frame_
Definition: message.h:335
std::vector< size_t > encode_cur_frame_for_symbol_
Definition: agora.h:158
size_t ifft_next_symbol_
Definition: agora.h:145
void Start()
Definition: agora.cc:340
size_t FetchEvent(std::vector< EventData > &events_list, bool is_turn_to_dequeue_from_io)
Definition: agora.cc:299
size_t SocketThreadNum() const
Definition: config.h:182
static constexpr size_t kRecordFrameInterval
Definition: agora.cc:32
static const std::string kProjectDirectory
Definition: agora.cc:24
FrameCounters tx_counters_
Definition: agora.h:138
Definition: concurrentqueue.h:630
void Running(bool value)
Definition: config.h:33
uint32_t frame_id_
Definition: message.h:168
size_t UeAntNum() const
Definition: config.h:41
@ kDownlinkComplete
Definition: symbols.h:119
bool IsRecCalEnabled() const
Definition: framestats.cc:97
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
Defination file for the AgoraBuffer class.
end IFFT Reshape the symbol vector into two different spatial streams size
Definition: generate_data.m:73
static constexpr size_t kScheduleQueues
Definition: symbols.h:129
size_t offset_
Definition: message.h:306
Definition: message.h:315
size_t CoreOffset() const
Definition: config.h:180
size_t fft_created_count_
Definition: agora.h:113
size_t try_dequeue_bulk_from_producer(producer_token_t const &producer, It itemFirst, size_t max)
Definition: concurrentqueue.h:1292
size_t tid_
Definition: message.h:305
size_t try_dequeue_bulk(It itemFirst, size_t max)
Definition: concurrentqueue.h:1210
size_t GetTotalDataSymbolIdxUl(size_t frame_id, size_t symbol_idx_ul) const
Definition: config.h:421
Direction
Definition: symbols.h:39
size_t size_approx() const
Definition: concurrentqueue.h:1304
void SaveTxDataToFile(int frame_id)
Definition: agora.cc:1176
uint16_t symbol_id_
Definition: message.h:33
size_t RecipCalFrameCnt() const
Definition: config.h:171
size_t frame_id_
modulation type (number of bits)
Definition: ran_config.h:18
static constexpr size_t kFrameWnd
Definition: symbols.h:18
#define unused(x)
Definition: utils.h:14
static gen_tag_t FrmSymSc(size_t frame_id, size_t symbol_id, size_t sc_id)
Definition: message.h:95
size_t beam_last_frame_
Definition: agora.h:143
FrameCounters ifft_counters_
Definition: agora.h:137
static const std::string kDecodeDataFilename
Definition: agora.cc:28
EventType
Definition: symbols.h:42
EXPORT void AgoraDestroy(Agora *agora)
Definition: agora.cc:1312
short data_[]
Definition: message.h:173
static constexpr size_t kDefaultQueueSize
Definition: agora.cc:33
static double GetTimeUs()
Definition: gettime.h:14
void SendSnrReport(EventType event_type, size_t frame_id, size_t symbol_id)
Definition: agora.cc:108
The struct that contains the RAN configuration that Agora must apply for a particular frame.
Definition: ran_config.h:14
void FreeQueues()
Definition: agora.cc:1014
size_t GetULSymbolIdx(size_t symbol_number) const
Definition: framestats.cc:156
rx_tag_t fft_req_tag_t
Definition: message.h:241
Implementation of PacketTxRxDpdk datapath functions for communicating with DPDK.
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
void ScheduleCodeblocks(EventType event_type, Direction dir, size_t frame_id, size_t symbol_idx)
Schedule LDPC decoding or encoding over code blocks.
Definition: agora.cc:259
@ kNone
Definition: symbols.h:117
static const bool kDebugPrintPacketsFromMac
Definition: agora.cc:21
~Agora()
Definition: agora.cc:85
size_t BsAntNum() const
Definition: config.h:35
Common definations for PacketTxRx. Including datapath functions for communicating with simulators.
bool IsLastSymbol(size_t frame_id) const
Check whether the symbol is the last symbol for a given frame.
Definition: message.h:399
static constexpr bool kPrintBeamStats
Definition: symbols.h:193
std::unique_ptr< Agora_recorder::RecorderThread > recorder_
Definition: agora.h:184
FrameCounters demul_counters_
Definition: agora.h:133
std::array< size_t, kMaxTags > tags_
Definition: message.h:146
#define AGORA_LOG_ERROR(...)
Definition: logger.h:39
std::unique_ptr< AgoraBuffer > agora_memory_
Definition: agora.h:127
#define TOSTRING(x)
Definition: symbols.h:14
std::unique_ptr< MessageInfo > message_
Definition: agora.h:153
std::vector< size_t > ifft_cur_frame_for_symbol_
Definition: agora.h:160
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
size_t ModifyRecCalIndex(size_t previous_index, int mod_value=0) const
Definition: config.h:133
EventType event_type_
Definition: message.h:144
bool enable_save_tx_data_to_file_
Definition: agora.h:46
static gen_tag_t FrmSymUe(size_t frame_id, size_t symbol_id, size_t ue_id)
Definition: message.h:84
std::unique_ptr< PacketTxRx > packet_tx_rx_
Definition: agora.h:115
Config *const config_
Definition: agora.h:112
snr
Definition: inspect_agora_results.m:118
size_t MaxSymbolCount() const
Definition: message.h:466
const nlohmann::json & MCSParams(Direction dir) const
Definition: config.h:288
std::array< size_t, kFrameWnd > num_pilot_pkts_
Definition: message.h:322
static constexpr size_t kDequeueBulkSizeTXRX
Definition: symbols.h:131
static void TryEnqueueFallback(moodycamel::ConcurrentQueue< EventData > *mc_queue, moodycamel::ProducerToken *producer_token, const EventData &event)
Definition: concurrent_queue_wrapper.h:18
void GetEqualData(float **ptr, int *size)
Definition: agora.cc:1207
This class stores the counters corresponding to a frame. Specifically, it contains a) the number of s...
Definition: message.h:349
bool IsPilot(size_t, size_t) const
Definition: config.cc:1495
size_t GetTaskCount(size_t frame_id) const
Definition: message.h:458
uint8_t schedule_process_flags_
Definition: agora.h:181
std::array< std::queue< fft_req_tag_t >, kFrameWnd > fft_queue_arr_
Definition: agora.h:167
Declaration file for the Stats class. Includes definations for DurationStat and FrameSummery types.
Definition: message.h:142
void ScheduleAntennasTX(size_t frame_id, size_t symbol_id)
Definition: agora.cc:168
EXPORT void AgoraGetEqualData(Agora *agora, float **ptr, int *size)
Definition: agora.cc:1313
static constexpr bool kPrintPhyStats
Definition: symbols.h:191
static const std::string kOutputFilepath
Definition: agora.cc:25
static constexpr bool kEnableMac
Definition: symbols.h:150
uint16_t ant_id_
Definition: message.h:38
auto ptr(T p) -> const void *
Definition: format.h:2680
uint32_t num_tags_
Definition: message.h:145
Self defined functions for message storage and passing.
size_t num_pilot_pkts_per_frame_
Definition: message.h:332
static gen_tag_t FrmSymAnt(size_t frame_id, size_t symbol_id, size_t ant_id)
Definition: message.h:106
size_t FftBlockSize() const
Definition: config.h:205
void Init(size_t max_symbol_count, size_t max_task_count=0)
Definition: message.h:353
FrameCounters mac_to_phy_counters_
Definition: agora.h:140
for i
Definition: generate_data.m:107
void RunEventLoop()
Definition: mac_thread_basestation.cc:526
size_t NumDlDataSyms() const
Definition: framestats.h:83
FrameInfo frame_tracking_
Definition: agora.h:152
FrameCounters uplink_fft_counters_
Definition: agora.h:131
void HandleEventFft(size_t tag)
Definition: agora.cc:849
moodycamel::ConcurrentQueue< EventData > message_queue_
Definition: agora.h:170
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
bool IsCalUlPilot(size_t, size_t) const
Definition: config.cc:1530
Definition: agora_buffer.h:172
void InitializeThreads()
Definition: agora.cc:1091
static const std::string kTxDataFilename
Definition: agora.cc:27
size_t BeamBatchSize() const
Definition: config.h:201
@ kProcessingComplete
Definition: symbols.h:120
@ kNone
Definition: agora.h:51
void InitializeQueues()
Definition: agora.cc:997
static constexpr bool kUseUHD
Definition: symbols.h:162
Definition: message.h:164
size_t NumBytesPerCb(Direction dir) const
Definition: config.h:251
FrameCounters precode_counters_
Definition: agora.h:136
size_t n_antennas_
Definition: ran_config.h:16
ScheduleProcessingFlags
Definition: agora.h:50
static constexpr bool kUseArgos
Definition: symbols.h:156
uint32_t symbol_id_
Definition: message.h:169
static constexpr size_t kDefaultMessageQueueSize
Definition: symbols.h:125
size_t tag_
Definition: message.h:43
std::array< size_t, kFrameWnd > num_pkts_
Definition: message.h:318
@ kProcessingComplete
Definition: agora.h:54
RxCounters rx_counters_
Definition: agora.h:142
size_t FramesToTest() const
Definition: config.h:309
size_t GetDLSymbol(size_t location) const
Definition: framestats.cc:106
std::unique_ptr< Stats > stats_
Definition: agora.h:122
void UpdateRanConfig(RanConfig rc)
Update Agora's RAN config parameters.
Definition: agora.cc:932
std::unique_ptr< T > make_unique(Args &&... args)
Definition: common.h:334
FrameCounters pilot_fft_counters_
Definition: agora.h:130
a class to store JSON values
Definition: json.hpp:3367
@ kUplinkComplete
Definition: agora.h:52
size_t DemulEventsPerSymbol() const
Definition: config.h:197
std::unique_ptr< AgoraWorker > worker_set_
Definition: agora.h:124
moodycamel::ProducerToken * rx_ptoks_ptr_[kMaxThreads]
Definition: agora.h:178
Common definations for PacketTxRxRadio. Including datapath functions for communicating with hardware.
size_t MacPacketLength(Direction dir) const
Definition: config.h:268
bool CheckFrameComplete(size_t frame_id)
Definition: agora.cc:1234
void SaveDecodeDataToFile(int frame_id)
Definition: agora.cc:1147
size_t RecipCalIndex(size_t frame_id) const
Definition: config.h:138
void Stop()
The main Agora event loop.
Definition: agora.cc:101
static constexpr bool kDebugPrintPerFrameStart
Definition: symbols.h:197
static constexpr bool kUplinkHardDemod
Definition: symbols.h:188
const LDPCconfig & LdpcConfig(Direction dir) const
Definition: config.h:280
size_t ClientDlPilotSymbols() const
Definition: framestats.h:76
double FreqGhz() const
Definition: config.h:56
Packet * RawPacket()
Definition: message.h:213
static std::string MapModToStr(size_t mod_order)
Definition: modulation.h:39
size_t NumDLSyms() const
Definition: framestats.cc:83
size_t WorkerThreadNum() const
Definition: config.h:181
static constexpr bool kUseDPDK
Definition: symbols.h:144
SymbolType GetSymbolType(size_t symbol_id) const
Return the symbol type of this symbol in this frame.
Definition: config.cc:1557
EXPORT void AgoraStop()
Definition: agora.cc:1309
static constexpr size_t kDequeueBulkSizeWorker
Definition: symbols.h:132
void Reset(size_t frame_id)
Definition: message.h:362
static void SetExitSignal(bool _bExitSignal)
Definition: signal_handler.cc:28
size_t BeamEventsPerSymbol() const
Definition: config.h:202
size_t NumULSyms() const
Definition: framestats.cc:85
std::thread mac_std_thread_
Definition: agora.h:120
size_t MacBytesNumPerframe(Direction dir) const
Definition: config.h:263
Agora(Config *cfg)
Create an Agora object and start the worker threads.
Definition: agora.cc:49
void ScheduleAntennas(EventType event_type, size_t frame_id, size_t symbol_id)
Definition: agora.cc:141
@ kDownlinkComplete
Definition: agora.h:53
std::array< size_t, kFrameWnd > num_reciprocity_pkts_
Definition: message.h:326
static constexpr size_t kMaxThreads
Definition: symbols.h:309
static gen_tag_t FrmSymCb(size_t frame_id, size_t symbol_id, size_t cb_id)
Definition: message.h:73
Common definations for PacketTxRxSim. Including datapath functions for communicating with the base st...
void UpdateUlMCS(const nlohmann::json &mcs)
Definition: config.cc:747
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
std::vector< size_t > precode_cur_frame_for_symbol_
Definition: agora.h:163
static const std::vector< Agora_recorder::RecorderWorker::RecorderWorkerTypes > kRecorderTypes
Definition: agora.cc:45
bool IsCalDlPilot(size_t, size_t) const
Definition: config.cc:1523
Definition: json.hpp:5213
size_t NumDataSyms() const
Definition: framestats.cc:101
fwrite(fileID, pilot_f, 'float')
void CheckIncrementScheduleFrame(size_t frame_id, ScheduleProcessingFlags completed)
Definition: agora.cc:1214
moodycamel::ConcurrentQueue< EventData > mac_response_queue_
Definition: agora.h:176
FrameCounters decode_counters_
Definition: agora.h:134
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
end Generate data if GENERATE_DATA tx_data
Definition: generate_data.m:38
FrameCounters rc_counters_
Definition: agora.h:141
static void TryEnqueueBulkFallback(moodycamel::ConcurrentQueue< EventData > *mc_queue, moodycamel::ProducerToken *producer_token, const EventData *event_list, size_t num_events)
Definition: concurrent_queue_wrapper.h:40
#define AGORA_LOG_WARN(...)
Definition: logger.h:53
static const bool kDebugDeferral
Definition: agora.cc:22
std::unique_ptr< MacThreadBaseStation > mac_thread_
Definition: agora.h:118
std::string to_string() const
Definition: eth_common.h:64
void ScheduleDownlinkProcessing(size_t frame_id)
Definition: agora.cc:123
void InitializeCounters()
Definition: agora.cc:1026
moodycamel::ProducerToken * tx_ptoks_ptr_[kMaxThreads]
Definition: agora.h:179
size_t GetSymbolCount(size_t frame_id) const
Definition: message.h:454
Definition: agora_buffer.h:20
Definition: message.h:186
size_t BeamBlockSize() const
Definition: config.h:200
SymbolType
Definition: symbols.h:261
std::unique_ptr< PhyStats > phy_stats_
Definition: agora.h:123
Definition: message.h:274
ScheduleProcessingFlags
Definition: symbols.h:116
uint16_t sc_id_
Definition: message.h:39
size_t cur_sche_frame_id_
Definition: agora_buffer.h:173
Declaration file for the main Agora worker class.
bool enable_save_decode_data_to_file_
Definition: agora.h:43
EXPORT void AgoraStart(Agora *agora)
Definition: agora.cc:1308
size_t max_equaled_frame_
Definition: agora.h:114
EXPORT Agora * AgoraNew(Config *cfg)
Definition: agora.cc:1302
std::vector< size_t > fft_cur_frame_for_symbol_
Definition: agora.h:156
static constexpr size_t kDefaultWorkerQueueSize
Definition: symbols.h:126
Declaration file for the PhyStats class.
size_t PacketLength() const
Definition: config.h:238
Declaration file for the main agora class.
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
size_t EncodeBlockSize() const
Definition: config.h:207
Definition: message.h:303
moodycamel::ConcurrentQueue< EventData > mac_request_queue_
Definition: agora.h:173
FrameCounters encode_counters_
Definition: agora.h:135
static constexpr bool kEnableCoreReuse
Definition: symbols.h:138
void NumBlocksInSymbol(size_t num_blocks)
Definition: ldpc_config.h:41
size_t mod_order_bits_
Number of active antennas at the base station.
Definition: ran_config.h:17
size_t cur_proc_frame_id_
Definition: agora_buffer.h:174
FrameCounters beam_counters_
Definition: agora.h:132
size_t DemulBlockSize() const
Definition: config.h:195
@ kUplinkComplete
Definition: symbols.h:118
#define EXPORT
Definition: symbols.h:11
FrameCounters tomac_counters_
Definition: agora.h:139
size_t rc_last_frame_
Definition: agora.h:144
void ScheduleSubcarriers(EventType event_type, size_t frame_id, size_t symbol_id)
Definition: agora.cc:206
size_t NumTotalSyms() const
Definition: framestats.cc:93
std::queue< size_t > encode_deferral_
Definition: agora.h:182
RxPacket * rx_packet_
Definition: message.h:228
void UpdateRxCounters(size_t frame_id, size_t symbol_id)
Definition: agora.cc:938