Agora
1.2.0
Agora project
|
Go to the documentation of this file.
35 std::vector<SimdAlignCxFltVector>& equal_buffer,
39 std::vector<std::vector<std::complex<float>>>& ue_pilot_vec);
42 void Start(
size_t core_offset);
122 std::unique_ptr<moodycamel::ProducerToken>
ptok_;
155 #endif // UE_WORKER_H_
Definition: phy_stats.h:15
void TaskThread(size_t core_offset)
Definition: ue_worker.cc:95
static MKL_LONG IFFT(std::vector< std::complex< float >> &in_out, int fft_size, bool normalize=true)
Definition: comms-lib.cc:410
static constexpr bool kPrintEqualizedSymbols
Definition: ue_worker.cc:29
void DemodQpskHardLoop(const float *vec_in, uint8_t *vec_out, int num)
Definition: modulation.cc:264
size_t GetDLSymbolIdx(size_t symbol_number) const
Definition: framestats.cc:152
PhyStats & phy_stats_
Definition: ue_worker.h:134
EventData Launch(size_t tag) override
Definition: dodecode_client.cc:35
Definition: doifft_client.h:16
Definition: concurrentqueue.h:630
size_t tid_
Definition: ue_worker.h:119
void Running(bool value)
Definition: config.h:33
uint32_t frame_id_
Definition: message.h:168
size_t UeAntNum() const
Definition: config.h:41
Definition: test_transpose.cc:22
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
float Scale() const
Definition: config.h:240
void DoIfft(size_t tag)
Definition: ue_worker.cc:631
EventData Launch(size_t tag) override
Definition: doifft_client.cc:52
void IncrementDecodedBlocks(size_t ue_id, size_t offset, size_t frame_slot)
Definition: phy_stats.cc:570
size_t SampsPerSymbol() const
Definition: config.h:234
std::thread thread_
Definition: ue_worker.h:123
static void PrintVec(const arma::cx_fvec &c, const std::string &ss)
Definition: utils.cc:488
static constexpr bool kDownlinkHardDemod
Definition: symbols.h:187
static void FreeBuffer1d(T **buffer)
Definition: memory_manage.h:116
Table< int8_t > & UlBits()
Definition: config.h:385
size_t OfdmTxZeroPrefix() const
Definition: config.h:211
void UpdateBlockErrors(size_t ue_id, size_t offset, size_t frame_slot, size_t block_error_count)
Definition: phy_stats.cc:563
static std::vector< float > Abs2Avx(std::vector< std::complex< float >> const &f)
Definition: comms-lib-avx.cc:364
size_t GetTotalDataSymbolIdxUl(size_t frame_id, size_t symbol_idx_ul) const
Definition: config.h:421
void Demod64qamHardAvx2(float *vec_in, uint8_t *vec_out, int num)
Definition: modulation.cc:921
Config & config_
Definition: ue_worker.h:132
Definition: dodecode_client.h:18
uint16_t symbol_id_
Definition: message.h:33
std::vector< size_t > & non_null_sc_ind_
Definition: ue_worker.h:148
size_t CpLen() const
Definition: config.h:46
static constexpr size_t kFrameWnd
Definition: symbols.h:18
void UpdateDlPilotSnr(size_t frame_id, size_t symbol_id, size_t ant_id, complex_float *fft_data)
Definition: phy_stats.cc:477
std::complex< float > * rx_samps_tmp_
Definition: ue_worker.h:124
Definition: doencode.h:20
size_t GetOFDMDataNum() const
Definition: config.h:554
@ kQpsk
Definition: comms-lib.h:42
short data_[]
Definition: message.h:173
Table< char > & rx_buffer_
Definition: ue_worker.h:145
for p
Definition: process_rx_frame.m:36
size_t GetULSymbolIdx(size_t symbol_number) const
Definition: framestats.cc:156
rx_tag_t fft_req_tag_t
Definition: message.h:241
std::vector< SimdAlignCxFltVector > & equal_buffer_
Definition: ue_worker.h:147
Declaration file for the CsvLogger class which records runtime physical-layer performance into csv fi...
std::unique_ptr< moodycamel::ProducerToken > ptok_
Definition: ue_worker.h:122
uint32_t ant_id_
Definition: message.h:171
std::array< size_t, kMaxTags > tags_
Definition: message.h:146
size_t GetOFDMPilotNum() const
Definition: config.h:550
void DoFftPilot(size_t tag)
Definition: ue_worker.cc:150
const FrameStats & Frame() const
Definition: config.h:340
Table< int8_t > & DlModBits()
Definition: config.h:386
uint16_t ue_id_
Definition: message.h:37
void UpdateBitErrors(size_t ue_id, size_t offset, size_t frame_slot, uint8_t tx_byte, uint8_t rx_byte)
Definition: phy_stats.cc:542
EventType event_type_
Definition: message.h:144
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
@ kQaM64
Definition: comms-lib.h:44
Table< int8_t > & ul_bits_buffer_
Definition: ue_worker.h:138
void DoModul(size_t tag)
Definition: ue_worker.cc:547
size_t OfdmDataNum() const
Definition: config.h:47
static constexpr bool kDebugPrintInTask
Definition: symbols.h:201
void Demod64qamSoftAvx2(float *vec_in, int8_t *llr, int num)
Definition: modulation.cc:1103
void DoIfftUe(DoIFFTClient *iffter, size_t tag)
Definition: ue_worker.cc:598
static void SimdConvertShortToFloat(const short *in_buf, float *out_buf, size_t n_elems)
Definition: datatype_conversion.h:126
Declaration file for the Stats class. Includes definations for DurationStat and FrameSummery types.
static constexpr bool kDebugDownlink
Definition: symbols.h:180
void Demod256qamHardAvx2(float *vec_in, uint8_t *vec_out, int num)
Definition: modulation.cc:1569
void UpdateDecodedBits(size_t ue_id, size_t offset, size_t frame_slot, size_t new_bits_num)
Definition: phy_stats.cc:557
Definition: message.h:142
@ kQaM16
Definition: comms-lib.h:43
static constexpr bool kPrintPhyStats
Definition: symbols.h:191
static constexpr bool kEnableMac
Definition: symbols.h:150
Aligned types for SIMD compatibility.
uint16_t ant_id_
Definition: message.h:38
Self defined functions for message storage and passing.
static constexpr bool kDebugPrintFft
Definition: ue_worker.cc:22
static gen_tag_t FrmSymAnt(size_t frame_id, size_t symbol_id, size_t ant_id)
Definition: message.h:106
static constexpr bool kEnableCsvLog
Definition: symbols.h:168
static std::vector< std::complex< float > > FFTShift(const std::vector< std::complex< float >> &in)
Definition: comms-lib.cc:581
size_t ClientUlPilotSymbols() const
Definition: framestats.h:73
bool try_dequeue_from_producer(producer_token_t const &producer, U &item)
Definition: concurrentqueue.h:1279
Declaration file for the Docoding class. Includes the DoEncode and DoDecode classes.
Scramble Class and helper functions.
for i
Definition: generate_data.m:107
Table< complex_float > & csi_buffer_
Definition: ue_worker.h:146
size_t OfdmCaNum() const
Definition: config.h:45
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > & demod_buffer_
Definition: ue_worker.h:150
size_t NumDlDataSyms() const
Definition: framestats.h:83
j template void())
Definition: json.hpp:4744
bool enqueue(T const &item)
Definition: concurrentqueue.h:974
void Demod16qamHardAvx2(float *vec_in, uint8_t *vec_out, int num)
Definition: modulation.cc:472
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
static size_t Rdtsc()
Return the TSC.
Definition: gettime.h:25
Communications Library: a) Generate pilot/preamble sequences b) OFDM modulation.
Table< complex_float > & fft_buffer_
Definition: ue_worker.h:149
Table< complex_float > & ModTable(Direction dir)
Definition: config.h:284
char *const tx_buffer_
Definition: ue_worker.h:142
Definition: message.h:164
void Demod16qamSoftAvx2(float *vec_in, int8_t *llr, int num)
Definition: modulation.cc:601
static void Ifft2tx(const complex_float *in, std::complex< short > *out, size_t N, size_t prefix, size_t cp, float scale)
Definition: comms-lib.cc:656
uint32_t symbol_id_
Definition: message.h:169
size_t tag_
Definition: message.h:43
evm
Definition: inspect_agora_results.m:117
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
Definition: core.h:1887
Table< complex_float > & DlIqF()
Definition: config.h:389
complex_float ModSingleUint8(uint8_t x, Table< complex_float > &mod_table)
Definition: modulation.cc:213
bool IsDataSubcarrier(size_t sc_id) const
Definition: config.h:562
Definition: ldpc_config.h:14
size_t OfdmRxZeroPrefixClient() const
Definition: config.h:231
size_t OfdmDataStart() const
Definition: config.h:48
const LDPCconfig & LdpcConfig(Direction dir) const
Definition: config.h:280
size_t ClientDlPilotSymbols() const
Definition: framestats.h:76
Packet * RawPacket()
Definition: message.h:213
size_t NumDLSyms() const
Definition: framestats.cc:83
static constexpr bool kDebugTxData
Definition: symbols.h:365
moodycamel::ConcurrentQueue< EventData > & notify_queue_
Definition: ue_worker.h:127
static double MeasureRdtscFreq()
Definition: gettime.h:51
@ kQaM256
Definition: comms-lib.h:45
void DemodQpskSoftSse(float *x, int8_t *z, int len)
Definition: modulation_srslte.cc:245
void UpdateEvm(size_t frame_id, size_t data_symbol_id, size_t sc_id, const arma::cx_fvec &eq_vec)
Definition: phy_stats.cc:526
Table< complex_float > & UeSpecificPilot()
Definition: config.h:371
size_t NumULSyms() const
Definition: framestats.cc:85
static double CyclesToMs(size_t cycles, double freq_ghz)
Definition: gettime.h:91
static gen_tag_t FrmSymCb(size_t frame_id, size_t symbol_id, size_t cb_id)
Definition: message.h:73
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
Table< int8_t > & encoded_buffer_
Definition: ue_worker.h:139
static constexpr bool kDebugTxMemory
Definition: ue_worker.cc:30
UeWorker(size_t tid, Config &config, Stats &shared_stats, PhyStats &shared_phy_stats, moodycamel::ConcurrentQueue< EventData > ¬ify_queue, moodycamel::ConcurrentQueue< EventData > &work_queue, moodycamel::ProducerToken &work_producer, Table< int8_t > &ul_bits_buffer, Table< int8_t > &encoded_buffer, Table< complex_float > &modul_buffer, Table< complex_float > &ifft_buffer, char *const tx_buffer, Table< char > &rx_buffer, Table< complex_float > &csi_buffer, std::vector< SimdAlignCxFltVector > &equal_buffer, std::vector< size_t > &non_null_sc_ind, Table< complex_float > &fft_buffer, PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > &demod_buffer, PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > &decoded_buffer, std::vector< std::vector< std::complex< float >>> &ue_pilot_vec)
Definition: ue_worker.cc:32
static constexpr bool kDebugPrintDecode
Definition: ue_worker.cc:25
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
Declaration file for the DoDecode class.
void Demod256qamSoftAvx2(const float *vec_in, int8_t *llr, int num)
Definition: modulation.cc:2365
Declaration file for the phy ue class.
static constexpr bool kCollectPhyStats
Definition: symbols.h:192
std::string to_string() const
Definition: eth_common.h:64
Table< complex_float > & UlIqF()
Definition: config.h:388
std::string Modulation(Direction dir) const
Definition: config.h:243
Declaration file for the configuration class which importants json configuration values into class va...
Declaration file for the DoIFFTClient class.
static constexpr bool kDebugPrintDemul
Definition: ue_worker.cc:23
int8_t * GetModBitsBuf(Table< int8_t > &mod_bits_buffer, Direction dir, size_t frame_id, size_t symbol_id, size_t ue_id, size_t sc_id) const
Get encoded_buffer for this frame, symbol, user and code block ID.
Definition: config.h:531
moodycamel::ProducerToken & work_producer_token_
Definition: ue_worker.h:129
void DoEncodeUe(DoEncode *encoder, size_t tag)
Definition: ue_worker.cc:524
void DoDemul(size_t tag)
Definition: ue_worker.cc:387
Declaration file for the PhyStats class.
size_t PacketLength() const
Definition: config.h:238
Table< complex_float > & modul_buffer_
Definition: ue_worker.h:140
Stats & stats_
Definition: ue_worker.h:133
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > & decoded_buffer_
Definition: ue_worker.h:151
static constexpr bool kDebugPrintModul
Definition: ue_worker.cc:24
uint32_t frame_id_
Definition: message.h:32
~UeWorker()
Definition: ue_worker.cc:75
void Stop()
Definition: ue_worker.cc:90
void DoFftData(size_t tag)
Definition: ue_worker.cc:253
Definition: ue_worker.h:24
size_t ModOrderBits(Direction dir) const
Definition: config.h:247
std::vector< std::vector< std::complex< float > > > & ue_pilot_vec_
Definition: ue_worker.h:153
void NumBlocksInSymbol(size_t num_blocks)
Definition: ldpc_config.h:41
EventData Launch(size_t tag) override
Definition: doencode.cc:54
DFTI_DESCRIPTOR_HANDLE mkl_handle_
Definition: ue_worker.h:121
Table< complex_float > & ifft_buffer_
Definition: ue_worker.h:141
void Free()
Definition: message.h:216
static std::vector< std::complex< float > > CorrelateAvx(std::vector< std::complex< float >> const &f, std::vector< std::complex< float >> const &g)
Definition: comms-lib-avx.cc:463
size_t GetOFDMDataIndex(size_t sc_id) const
Definition: config.h:558
size_t OfdmDataStop() const
Definition: config.h:50
moodycamel::ConcurrentQueue< EventData > & work_queue_
Definition: ue_worker.h:128
static constexpr bool kPrintDownlinkPilotStats
Definition: ue_worker.cc:28
void Start(size_t core_offset)
Definition: ue_worker.cc:81
void DoDecodeUe(DoDecodeClient *decoder, size_t tag)
Definition: ue_worker.cc:493
RxPacket * rx_packet_
Definition: message.h:228
static constexpr bool kPrintLLRData
Definition: ue_worker.cc:27
static constexpr bool kDebugPrintPerTaskDone
Definition: symbols.h:199