Agora  1.2.0
Agora project
phy-ue.h
Go to the documentation of this file.
1 
6 #ifndef PHY_UE_H_
7 #define PHY_UE_H_
8 
9 #include <array>
10 #include <list>
11 #include <queue>
12 #include <thread>
13 #include <vector>
14 
15 #include "common_typedef_sdk.h"
16 #include "comms-lib.h"
18 #include "concurrentqueue.h"
19 #include "config.h"
20 #include "datatype_conversion.h"
21 #include "mac_thread_client.h"
22 #include "message.h"
23 #include "modulation.h"
24 #include "packet_txrx.h"
25 #include "phy_stats.h"
26 #include "recorder_thread.h"
27 #include "simd_types.h"
28 #include "stats.h"
29 #include "ue_worker.h"
30 
31 class PhyUe {
32  public:
33  enum class FrameTasksFlags : std::uint8_t {
34  kNoWorkComplete = 0x00,
35  kDownlinkComplete = 0x01,
36  kUplinkTxComplete = 0x02,
37  kMacTxComplete = 0x04,
39  };
40 
41  explicit PhyUe(Config* config);
42  ~PhyUe();
43 
44  void Start();
45  void Stop();
46 
47  void GetEqualData(float** ptr, int* size, int /*ue_id*/);
48  void GetDemulData(long long** ptr, int* size);
49 
50  private:
51  void PrintPerTaskDone(PrintType print_type, size_t frame_id, size_t symbol_id,
52  size_t ant);
53  void PrintPerSymbolDone(PrintType print_type, size_t frame_id,
54  size_t symbol_id);
55  void PrintPerFrameDone(PrintType print_type, size_t frame_id);
56 
57  void ReceiveDownlinkSymbol(Packet* rx_packet, size_t tag);
58  void ScheduleDefferedDownlinkSymbols(size_t frame_id);
59  void ClearCsi(size_t frame_id);
60 
61  std::vector<std::queue<EventData>> rx_downlink_deferral_;
62  std::unique_ptr<Stats> stats_;
63  std::unique_ptr<PhyStats> phy_stats_;
65 
66  /*****************************************************
67  * Downlink
68  *****************************************************/
70 
71  /*****************************************************
72  * Uplink
73  *****************************************************/
75 
76  /* Add tasks into task queue based on event type */
77  void ScheduleTask(EventData do_task,
79  moodycamel::ProducerToken const& ptok);
80  void ScheduleWork(EventData do_task);
81 
82  std::unique_ptr<moodycamel::ProducerToken> work_producer_token_;
83 
84  void InitializeVarsFromCfg();
85 
86  void FrameInit(size_t frame);
87  // Tracks the tasks completed for the frame
88  bool FrameComplete(size_t frame, FrameTasksFlags complete);
89 
90  void FreeUplinkBuffers();
91  void FreeDownlinkBuffers();
92 
100 
101  std::array<std::uint8_t, kFrameWnd> frame_tasks_;
102 
103  // The thread running MAC layer functions
104  std::unique_ptr<MacThreadClient> mac_thread_;
105  // Handle for the MAC thread
106  std::thread mac_std_thread_;
107 
108  // The frame ID of the next MAC packet we expect to receive from the MAC
109  // thread
112 
113  // next_processed_frame_[i] is the next frame index on the uplink
114  // to be processed and transmitted by the PHY for UE #i
115  std::array<size_t, kMaxUEs> next_frame_processed_ = {};
116 
117  /*****************************************************
118  * Uplink
119  *****************************************************/
126  char* tx_buffer_;
128 
136 
145 
154 
155  // Remote unit
156  std::unique_ptr<PacketTxRx> ru_;
157 
167 
175 
182 
188  std::vector<SimdAlignCxFltVector> equal_buffer_;
189 
190  // Data after demodulation. Each buffer has kMaxModType * number of OFDM
191  // data subcarriers
193 
194  // Data after LDPC decoding. Each buffer [decoded bytes per UE] bytes.
196 
197  std::vector<size_t> non_null_sc_ind_;
198  std::vector<std::vector<std::complex<float>>> ue_pilot_vec_;
199 
200  // Communication queues
203 
206 
207  // std::vector<std::thread> worker_threads_;
208  std::vector<std::unique_ptr<UeWorker>> workers_;
209 
214 
215  // all checkers
217  // Downlink (Rx)
222  // Uplink (Tx)
225 
226  struct UeTxVars {
228  std::list<size_t> tx_ready_frames_;
230  };
231  std::vector<UeTxVars> ue_tracker_;
232 
234 
235  size_t max_equaled_frame_ = 0;
236  std::vector<std::unique_ptr<Agora_recorder::RecorderThread>> recorders_;
237 };
238 #endif // PHY_UE_H_
RxCounters::num_rx_pkts_per_frame_
size_t num_rx_pkts_per_frame_
Definition: message.h:329
Config::UeWorkerThreadNum
size_t UeWorkerThreadNum() const
Definition: config.h:184
FrameStats::GetBeaconSymbolLast
size_t GetBeaconSymbolLast() const
Definition: framestats.h:61
PhyStats
Definition: phy_stats.h:15
TsType::kFFTDone
@ kFFTDone
PhyUe::FrameTasksFlags::kMacTxComplete
@ kMacTxComplete
PhyUe::decoded_buffer_
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > decoded_buffer_
Definition: phy-ue.h:195
PhyUe::PhyUe
PhyUe(Config *config)
Definition: phy-ue.cc:47
PhyUe::FrameTasksFlags::kUplinkTxComplete
@ kUplinkTxComplete
Config::UeSpecificPilotT
Table< std::complex< int16_t > > & UeSpecificPilotT()
Definition: config.h:374
FrameStats::GetDLSymbolIdx
size_t GetDLSymbolIdx(size_t symbol_number) const
Definition: framestats.cc:152
PhyUe::ifft_buffer_
Table< complex_float > ifft_buffer_
Definition: phy-ue.h:135
moodycamel::ProducerToken
Definition: concurrentqueue.h:630
PhyUe::fft_dldata_counters_
FrameCounters fft_dldata_counters_
Definition: phy-ue.h:220
Config::Running
void Running(bool value)
Definition: config.h:33
Packet::frame_id_
uint32_t frame_id_
Definition: message.h:168
Config::UeAntNum
size_t UeAntNum() const
Definition: config.h:41
Table::Calloc
void Calloc(size_t dim1, size_t dim2, Agora_memory::Alignment_t alignment)
Definition: memory_manage.h:45
PhyUe::ue_tracker_
std::vector< UeTxVars > ue_tracker_
Definition: phy-ue.h:231
PhyUe::ul_bits_buffer_size_
size_t ul_bits_buffer_size_
Definition: phy-ue.h:144
complex_float
Definition: test_transpose.cc:22
PhyUe::FreeUplinkBuffers
void FreeUplinkBuffers()
Definition: phy-ue.cc:941
PhyUe::tx_buffer_
char * tx_buffer_
Definition: phy-ue.h:126
PinToCoreWithOffset
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
PhyUe::ul_bits_buffer_
Table< int8_t > ul_bits_buffer_
Definition: phy-ue.h:142
PhyUe::~PhyUe
~PhyUe()
Definition: phy-ue.cc:193
Config::UeSocketThreadNum
size_t UeSocketThreadNum() const
Definition: config.h:187
Config::SampsPerSymbol
size_t SampsPerSymbol() const
Definition: config.h:234
PrintType
PrintType
Definition: symbols.h:96
size
end IFFT Reshape the symbol vector into two different spatial streams size
Definition: generate_data.m:73
PhyUe::ScheduleWork
void ScheduleWork(EventData do_task)
Definition: phy-ue.cc:234
datatype_conversion.h
rx_mac_tag_t::offset_
size_t offset_
Definition: message.h:306
kDownlinkHardDemod
static constexpr bool kDownlinkHardDemod
Definition: symbols.h:187
PhyUe::equal_buffer_
std::vector< SimdAlignCxFltVector > equal_buffer_
Definition: phy-ue.h:188
FreeBuffer1d
static void FreeBuffer1d(T **buffer)
Definition: memory_manage.h:116
packet_txrx_client_radio.h
Common definations for PacketTxRxClientRadio. Including datapath functions for communicating with use...
EventType::kDecode
@ kDecode
PhyUe::work_producer_token_
std::unique_ptr< moodycamel::ProducerToken > work_producer_token_
Definition: phy-ue.h:82
RxCounters
Definition: message.h:315
FrameStats::NumBeaconSyms
size_t NumBeaconSyms() const
Definition: framestats.cc:87
PhyUe::max_equaled_frame_
size_t max_equaled_frame_
Definition: phy-ue.h:235
FrameStats::GetPilotSymbol
size_t GetPilotSymbol(size_t location) const
Definition: framestats.cc:122
ConvertShortToFloat
static void ConvertShortToFloat(const short *in_buf, float *out_buf, size_t n_elems)
Produces outputs -1->+0.999.
Definition: datatype_conversion.h:41
PhyUe::tx_counters_
FrameCounters tx_counters_
Definition: phy-ue.h:216
Config::OfdmTxZeroPrefix
size_t OfdmTxZeroPrefix() const
Definition: config.h:211
PhyUe::work_queue_
moodycamel::ConcurrentQueue< EventData > work_queue_
Definition: phy-ue.h:202
PhyUe::FrameTasksFlags::kDownlinkComplete
@ kDownlinkComplete
rx_mac_tag_t::tid_
size_t tid_
Definition: message.h:305
moodycamel::ConcurrentQueue::try_dequeue_bulk
size_t try_dequeue_bulk(It itemFirst, size_t max)
Definition: concurrentqueue.h:1210
Direction
Direction
Definition: symbols.h:39
Config::OfdmTxZeroPostfix
size_t OfdmTxZeroPostfix() const
Definition: config.h:212
Stats
Definition: stats.h:63
gen_tag_t::symbol_id_
uint16_t symbol_id_
Definition: message.h:33
PrintType::kPacketTX
@ kPacketTX
TsType::kRXDone
@ kRXDone
PhyUe::ul_bits_buffer_status_
Table< int8_t > ul_bits_buffer_status_
Definition: phy-ue.h:143
concurrent_queue_wrapper.h
PhyUe::ul_syms_buffer_
Table< int8_t > ul_syms_buffer_
Definition: phy-ue.h:146
PhyUe::demul_counters_
FrameCounters demul_counters_
Definition: phy-ue.h:219
PhyUeGetEqualData
EXPORT void PhyUeGetEqualData(PhyUe *usr, float **ptr, int *size, int ue)
Definition: phy-ue.cc:1276
kFrameWnd
static constexpr size_t kFrameWnd
Definition: symbols.h:18
EventType::kPacketFromMac
@ kPacketFromMac
modulation.h
PhyUe::encode_counter_
FrameCounters encode_counter_
Definition: phy-ue.h:223
Config::GetOFDMDataNum
size_t GetOFDMDataNum() const
Definition: config.h:554
kRecordFrameInterval
static constexpr size_t kRecordFrameInterval
Definition: phy-ue.cc:30
EventType::kPacketPilotTX
@ kPacketPilotTX
FrameCounters::CompleteTask
bool CompleteTask(size_t frame_id, size_t symbol_id)
Increments the task count for input frame and symbol.
Definition: message.h:383
SignalHandler::GotExitSignal
static bool GotExitSignal()
Definition: signal_handler.cc:23
Roundup
static constexpr T Roundup(T x)
Definition: utils.h:95
PhyUe::dl_pilot_symbol_perframe_
size_t dl_pilot_symbol_perframe_
Definition: phy-ue.h:94
PrintType::kEncode
@ kEncode
Packet::ant_id_
uint32_t ant_id_
Definition: message.h:171
PhyUe::dl_data_symbol_perframe_
size_t dl_data_symbol_perframe_
Definition: phy-ue.h:96
packet_txrx.h
Common definations for PacketTxRx. Including datapath functions for communicating with simulators.
PhyUe::non_null_sc_ind_
std::vector< size_t > non_null_sc_ind_
Definition: phy-ue.h:197
EventType::kPacketTX
@ kPacketTX
PhyUe::csi_buffer_
Table< complex_float > csi_buffer_
Definition: phy-ue.h:181
PhyUe::tx_ptoks_ptr_
moodycamel::ProducerToken * tx_ptoks_ptr_[kMaxThreads]
Definition: phy-ue.h:211
PhyUe::fft_dlpilot_counters_
FrameCounters fft_dlpilot_counters_
Definition: phy-ue.h:221
FrameCounters::IsLastSymbol
bool IsLastSymbol(size_t frame_id) const
Check whether the symbol is the last symbol for a given frame.
Definition: message.h:399
PrintType::kPacketRXPilots
@ kPacketRXPilots
PhyUe::mac_thread_
std::unique_ptr< MacThreadClient > mac_thread_
Definition: phy-ue.h:104
PhyUe::FrameTasksFlags::kNoWorkComplete
@ kNoWorkComplete
PhyUe::modulation_counters_
FrameCounters modulation_counters_
Definition: phy-ue.h:224
signal_handler.h
Direction::kUplink
@ kUplink
Config::Frame
const FrameStats & Frame() const
Definition: config.h:340
PrintType::kFFTPilots
@ kFFTPilots
TsType::kFFTPilotsDone
@ kFFTPilotsDone
AGORA_LOG_TRACE
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
rx_tag_t
Definition: message.h:227
RxPacket::Use
void Use()
Definition: message.h:215
gen_tag_t::ue_id_
uint16_t ue_id_
Definition: message.h:37
PhyUe::ul_syms_buffer_size_
size_t ul_syms_buffer_size_
Definition: phy-ue.h:147
PhyUe::Stop
void Stop()
Definition: phy-ue.cc:308
PhyUe::dl_symbol_perframe_
size_t dl_symbol_perframe_
Definition: phy-ue.h:98
TsType::kModulDone
@ kModulDone
AllocBuffer1d
static void AllocBuffer1d(T **buffer, U dim, Agora_memory::Alignment_t alignment, int init_zero)
Definition: memory_manage.h:105
gen_tag_t::FrmSymUe
static gen_tag_t FrmSymUe(size_t frame_id, size_t symbol_id, size_t ue_id)
Definition: message.h:84
EventType::kModul
@ kModul
PhyUe::InitializeDownlinkBuffers
void InitializeDownlinkBuffers()
Definition: phy-ue.cc:951
Table< complex_float >
PhyUe::UeTxVars::tx_ready_frames_
std::list< size_t > tx_ready_frames_
Definition: phy-ue.h:228
PhyUe::UeTxVars::tx_pending_frame_
size_t tx_pending_frame_
Definition: phy-ue.h:229
EventType::kFFTPilot
@ kFFTPilot
PhyUe::mac_std_thread_
std::thread mac_std_thread_
Definition: phy-ue.h:106
gen_tag_t
Definition: message.h:22
Config::UeNum
size_t UeNum() const
Definition: config.h:40
PhyUe::Start
void Start()
Definition: phy-ue.cc:315
RxCounters::num_pilot_pkts_
std::array< size_t, kFrameWnd > num_pilot_pkts_
Definition: message.h:322
kDequeueBulkSizeTXRX
static constexpr size_t kDequeueBulkSizeTXRX
Definition: symbols.h:131
Config::OfdmDataNum
size_t OfdmDataNum() const
Definition: config.h:47
EventType::kPacketToMac
@ kPacketToMac
FrameCounters
This class stores the counters corresponding to a frame. Specifically, it contains a) the number of s...
Definition: message.h:349
FrameCounters::GetTaskCount
size_t GetTaskCount(size_t frame_id) const
Definition: message.h:458
PhyUeGetDemulData
EXPORT void PhyUeGetDemulData(PhyUe *usr, long long **ptr, int *size)
Definition: phy-ue.cc:1279
PhyUe::to_mac_queue_
moodycamel::ConcurrentQueue< EventData > to_mac_queue_
Definition: phy-ue.h:205
stats.h
Declaration file for the Stats class. Includes definations for DurationStat and FrameSummery types.
PhyUe::mac_tx_ptoks_ptr_
moodycamel::ProducerToken * mac_tx_ptoks_ptr_[kMaxThreads]
Definition: phy-ue.h:213
PhyUe::UeTxVars::ifft_counters_
FrameCounters ifft_counters_
Definition: phy-ue.h:227
PhyUe::ReceiveDownlinkSymbol
void ReceiveDownlinkSymbol(Packet *rx_packet, size_t tag)
Definition: phy-ue.cc:245
EventData
Definition: message.h:142
kPrintPhyStats
static constexpr bool kPrintPhyStats
Definition: symbols.h:191
fmt::v8::detail::find
auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
Definition: core.h:2258
kEnableMac
static constexpr bool kEnableMac
Definition: symbols.h:150
Table::Dim1
size_t Dim1()
Definition: memory_manage.h:100
simd_types.h
Aligned types for SIMD compatibility.
gen_tag_t::ant_id_
uint16_t ant_id_
Definition: message.h:38
PhyUe::decode_counters_
FrameCounters decode_counters_
Definition: phy-ue.h:218
fmt::v8::ptr
auto ptr(T p) -> const void *
Definition: format.h:2680
Config::DlPacketLength
size_t DlPacketLength() const
Definition: config.h:242
PhyUeStart
EXPORT void PhyUeStart(PhyUe *usr)
Definition: phy-ue.cc:1271
PhyUe::frame_tasks_
std::array< std::uint8_t, kFrameWnd > frame_tasks_
Definition: phy-ue.h:101
PhyUe::phy_stats_
std::unique_ptr< PhyStats > phy_stats_
Definition: phy-ue.h:63
EventType::kFFT
@ kFFT
message.h
Self defined functions for message storage and passing.
PhyUe::rx_downlink_deferral_
std::vector< std::queue< EventData > > rx_downlink_deferral_
Definition: phy-ue.h:61
Table::Free
void Free()
Definition: memory_manage.h:84
RxCounters::num_pilot_pkts_per_frame_
size_t num_pilot_pkts_per_frame_
Definition: message.h:332
MacThreadClient::RunEventLoop
void RunEventLoop()
Definition: mac_thread_client.cc:523
FrameStats::ClientUlPilotSymbols
size_t ClientUlPilotSymbols() const
Definition: framestats.h:73
FrameCounters::Init
void Init(size_t max_symbol_count, size_t max_task_count=0)
Definition: message.h:353
scrambler.h
Scramble Class and helper functions.
PrintType::kIFFT
@ kIFFT
i
for i
Definition: generate_data.m:107
Config::OfdmCaNum
size_t OfdmCaNum() const
Definition: config.h:45
FrameStats::NumDlDataSyms
size_t NumDlDataSyms() const
Definition: framestats.h:83
TsType::kDecodeDone
@ kDecodeDone
moodycamel::ConcurrentQueue::enqueue
bool enqueue(T const &item)
Definition: concurrentqueue.h:974
PhyUe::stats_
std::unique_ptr< Stats > stats_
Definition: phy-ue.h:62
u
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
packet_txrx_client_sim.h
Common definations for PacketTxRxClient. Including datapath functions for communicating with the clie...
comms-lib.h
Communications Library: a) Generate pilot/preamble sequences b) OFDM modulation.
Agora_memory::Alignment_t::kAlign64
@ kAlign64
PhyUe::FrameTasksFlags
FrameTasksFlags
Definition: phy-ue.h:33
Packet
Definition: message.h:164
PrintType::kPacketToMac
@ kPacketToMac
TsType::kDemulDone
@ kDemulDone
PhyUe::tx_buffer_size_
size_t tx_buffer_size_
Definition: phy-ue.h:127
Direction::kDownlink
@ kDownlink
EventType::kDemul
@ kDemul
EventType::kPacketRX
@ kPacketRX
kUseArgos
static constexpr bool kUseArgos
Definition: symbols.h:156
Packet::symbol_id_
uint32_t symbol_id_
Definition: message.h:169
PhyUe::ue_pilot_vec_
std::vector< std::vector< std::complex< float > > > ue_pilot_vec_
Definition: phy-ue.h:198
gen_tag_t::tag_
size_t tag_
Definition: message.h:43
RxCounters::num_pkts_
std::array< size_t, kFrameWnd > num_pkts_
Definition: message.h:318
Config::FramesToTest
size_t FramesToTest() const
Definition: config.h:309
spdlog::details::make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: common.h:334
PhyUe::FreeDownlinkBuffers
void FreeDownlinkBuffers()
Definition: phy-ue.cc:988
PhyUe::workers_
std::vector< std::unique_ptr< UeWorker > > workers_
Definition: phy-ue.h:208
PhyUe::mac_rx_ptoks_ptr_
moodycamel::ProducerToken * mac_rx_ptoks_ptr_[kMaxThreads]
Definition: phy-ue.h:212
TsType::kPilotAllRX
@ kPilotAllRX
PhyUe::rx_ptoks_ptr_
moodycamel::ProducerToken * rx_ptoks_ptr_[kMaxThreads]
Definition: phy-ue.h:210
Config::MacPacketLength
size_t MacPacketLength(Direction dir) const
Definition: config.h:268
Config::OfdmDataStart
size_t OfdmDataStart() const
Definition: config.h:48
kRecorderTypes
static const std::vector< Agora_recorder::RecorderWorker::RecorderWorkerTypes > kRecorderTypes
Definition: phy-ue.cc:43
PhyUe::FrameComplete
bool FrameComplete(size_t frame, FrameTasksFlags complete)
Definition: phy-ue.cc:1258
Config::UeCoreOffset
size_t UeCoreOffset() const
Definition: config.h:183
PhyUe::rx_thread_num_
size_t rx_thread_num_
Definition: phy-ue.h:99
kDebugPrintPerFrameStart
static constexpr bool kDebugPrintPerFrameStart
Definition: symbols.h:197
PhyUe
Definition: phy-ue.h:31
TsType::kFirstSymbolRX
@ kFirstSymbolRX
PrintType::kPacketRX
@ kPacketRX
FrameStats::ClientDlPilotSymbols
size_t ClientDlPilotSymbols() const
Definition: framestats.h:76
PhyUe::next_frame_processed_
std::array< size_t, kMaxUEs > next_frame_processed_
Definition: phy-ue.h:115
RxPacket::RawPacket
Packet * RawPacket()
Definition: message.h:213
PhyUe::tomac_counters_
FrameCounters tomac_counters_
Definition: phy-ue.h:233
FrameStats::NumDLSyms
size_t NumDLSyms() const
Definition: framestats.cc:83
PhyUe::UeTxVars
Definition: phy-ue.h:226
PhyUe::expected_frame_id_from_mac_
size_t expected_frame_id_from_mac_
Definition: phy-ue.h:110
moodycamel::ConcurrentQueue< EventData >
kMaxModType
static constexpr size_t kMaxModType
Definition: symbols.h:297
PhyUe::complete_queue_
moodycamel::ConcurrentQueue< EventData > complete_queue_
Definition: phy-ue.h:201
PhyUe::demod_buffer_
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > demod_buffer_
Definition: phy-ue.h:192
Config::GetSymbolType
SymbolType GetSymbolType(size_t symbol_id) const
Return the symbol type of this symbol in this frame.
Definition: config.cc:1557
PhyUe::ul_data_symbol_perframe_
size_t ul_data_symbol_perframe_
Definition: phy-ue.h:95
PrintType::kModul
@ kModul
FrameCounters::Reset
void Reset(size_t frame_id)
Definition: message.h:362
PhyUe::GetDemulData
void GetDemulData(long long **ptr, int *size)
Definition: phy-ue.cc:1231
SignalHandler::SetExitSignal
static void SetExitSignal(bool _bExitSignal)
Definition: signal_handler.cc:28
user_gui.ue
ue
Definition: user_gui.py:117
FrameStats::NumULSyms
size_t NumULSyms() const
Definition: framestats.cc:85
PhyUe::InitializeVarsFromCfg
void InitializeVarsFromCfg()
Definition: phy-ue.cc:881
Config::MacBytesNumPerframe
size_t MacBytesNumPerframe(Direction dir) const
Definition: config.h:263
kMaxThreads
static constexpr size_t kMaxThreads
Definition: symbols.h:309
EventType::kEncode
@ kEncode
Config::NumUeChannels
size_t NumUeChannels() const
Definition: config.h:99
Config
Definition: config.h:26
AGORA_LOG_INFO
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
PhyUe::InitializeUplinkBuffers
void InitializeUplinkBuffers()
Definition: phy-ue.cc:904
PhyUeNew
EXPORT PhyUe * PhyUeNew(Config *cfg)
Definition: phy-ue.cc:1267
std
Definition: json.hpp:5213
phy-ue.h
Declaration file for the phy ue class.
PhyUe::GetEqualData
void GetEqualData(float **ptr, int *size, int)
Definition: phy-ue.cc:1237
recorder_thread.h
Table::Dim2
size_t Dim2()
Definition: memory_manage.h:101
Table::Malloc
void Malloc(size_t dim1, size_t dim2, Agora_memory::Alignment_t alignment)
Definition: memory_manage.h:37
RtAssert
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
kDebugPrintPerSymbolDone
static constexpr bool kDebugPrintPerSymbolDone
Definition: symbols.h:198
kNumRecSc
static constexpr size_t kNumRecSc
Definition: phy-ue.cc:27
TsType::kEncodeDone
@ kEncodeDone
PhyUe::modul_buffer_
Table< complex_float > modul_buffer_
Definition: phy-ue.h:153
ue_worker.h
Declaration file for the phy ue class.
PhyUe::rx_buffer_size_
size_t rx_buffer_size_
Definition: phy-ue.h:166
to_string
std::string to_string() const
Definition: eth_common.h:64
kDebugPrintPacketsToMac
static constexpr bool kDebugPrintPacketsToMac
Definition: phy-ue.cc:23
Config::UeHwFramer
bool UeHwFramer() const
Definition: config.h:54
ThreadType::kMaster
@ kMaster
FrameCounters::GetSymbolCount
size_t GetSymbolCount(size_t frame_id) const
Definition: message.h:454
RxPacket
Definition: message.h:186
Config::IsDlPilot
bool IsDlPilot(size_t, size_t) const
Definition: config.cc:1509
PhyUe::PrintPerTaskDone
void PrintPerTaskDone(PrintType print_type, size_t frame_id, size_t symbol_id, size_t ant)
Definition: phy-ue.cc:994
config.h
Declaration file for the configuration class which importants json configuration values into class va...
SymbolType
SymbolType
Definition: symbols.h:261
kRecordDownlinkFrame
static constexpr bool kRecordDownlinkFrame
Definition: phy-ue.cc:39
EventType::kIFFT
@ kIFFT
MacPacketPacked
Definition: message.h:274
PhyUe::ScheduleTask
void ScheduleTask(EventData do_task, moodycamel::ConcurrentQueue< EventData > *in_queue, moodycamel::ProducerToken const &ptok)
Definition: phy-ue.cc:222
moodycamel::ConsumerToken
Definition: concurrentqueue.h:695
kDebugPrintPacketsFromMac
static constexpr bool kDebugPrintPacketsFromMac
Definition: phy-ue.cc:22
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t >
moodycamel::ConcurrentQueue::try_enqueue
bool try_enqueue(T const &item)
Definition: concurrentqueue.h:1039
PhyUe::tx_queue_
moodycamel::ConcurrentQueue< EventData > tx_queue_
Definition: phy-ue.h:204
PrintType::kFFTData
@ kFFTData
PhyUe::FrameInit
void FrameInit(size_t frame)
Definition: phy-ue.cc:1244
PhyUe::ul_symbol_perframe_
size_t ul_symbol_perframe_
Definition: phy-ue.h:97
PhyUe::rx_counters_
RxCounters rx_counters_
Definition: phy-ue.h:64
PhyUe::fft_buffer_
Table< complex_float > fft_buffer_
Definition: phy-ue.h:174
phy_stats.h
Declaration file for the PhyStats class.
Config::PacketLength
size_t PacketLength() const
Definition: config.h:238
PhyUe::FrameTasksFlags::kFrameComplete
@ kFrameComplete
PhyUe::ScheduleDefferedDownlinkSymbols
void ScheduleDefferedDownlinkSymbols(size_t frame_id)
Definition: phy-ue.cc:264
PhyUe::ClearCsi
void ClearCsi(size_t frame_id)
Definition: phy-ue.cc:288
gen_tag_t::frame_id_
uint32_t frame_id_
Definition: message.h:32
FrameCounters::CompleteSymbol
bool CompleteSymbol(size_t frame_id)
Increments and checks the symbol count for input frame.
Definition: message.h:372
PhyUe::PrintPerFrameDone
void PrintPerFrameDone(PrintType print_type, size_t frame_id)
Definition: phy-ue.cc:1138
PhyUeDestroy
EXPORT void PhyUeDestroy(PhyUe *usr)
Definition: phy-ue.cc:1275
rx_mac_tag_t
Definition: message.h:303
PhyUe::ru_
std::unique_ptr< PacketTxRx > ru_
Definition: phy-ue.h:156
FrameStats::GetULSymbol
size_t GetULSymbol(size_t location) const
Definition: framestats.cc:114
PhyUe::PrintPerSymbolDone
void PrintPerSymbolDone(PrintType print_type, size_t frame_id, size_t symbol_id)
Definition: phy-ue.cc:1057
kDebugPrintPerFrameDone
static constexpr bool kDebugPrintPerFrameDone
Definition: symbols.h:196
PhyUe::current_frame_user_num_
size_t current_frame_user_num_
Definition: phy-ue.h:111
mac_thread_client.h
PrintType::kDecode
@ kDecode
PhyUe::rx_buffer_
Table< char > rx_buffer_
Definition: phy-ue.h:165
RxPacket::Free
void Free()
Definition: message.h:216
EXPORT
#define EXPORT
Definition: symbols.h:11
concurrentqueue.h
TsType::kTXDone
@ kTXDone
TsType::kIFFTDone
@ kIFFTDone
PhyUe::recorders_
std::vector< std::unique_ptr< Agora_recorder::RecorderThread > > recorders_
Definition: phy-ue.h:236
FrameStats::NumTotalSyms
size_t NumTotalSyms() const
Definition: framestats.cc:93
kDefaultQueueSize
static constexpr size_t kDefaultQueueSize
Definition: phy-ue.cc:24
SymbolType::kDL
@ kDL
utils_ldpc.h
rx_tag_t::rx_packet_
RxPacket * rx_packet_
Definition: message.h:228
PhyUe::config_
Config * config_
Definition: phy-ue.h:93
PhyUeStop
EXPORT void PhyUeStop()
Definition: phy-ue.cc:1272
PrintType::kDemul
@ kDemul
kDebugPrintPerTaskDone
static constexpr bool kDebugPrintPerTaskDone
Definition: symbols.h:199