Agora
1.2.0
Agora project
|
Go to the documentation of this file.
7 #ifndef TXRX_WORKER_HW_H_
8 #define TXRX_WORKER_HW_H_
32 TxRxWorkerHw(
size_t core_offset,
size_t tid,
size_t interface_count,
33 size_t interface_offset,
Config*
const config,
34 size_t* rx_frame_start,
39 std::vector<RxPacket>& rx_memory,
std::byte*
const tx_memory,
40 std::mutex& sync_mutex, std::condition_variable& sync_cond,
41 std::atomic<bool>& can_proceed,
RadioConfig& radio_config);
47 size_t DoTx(
long long time0);
48 std::vector<RxPacket*>
DoRx(
size_t interface_id,
size_t& global_frame_id,
49 size_t& global_symbol_id);
52 void TxDownlinkZeros(
size_t frame_id,
size_t radio_id,
long long time0);
57 void TxBeaconHw(
size_t frame_id,
size_t interface_id,
long long time0);
62 bool IsRxSymbol(
size_t interface,
size_t symbol_id);
72 size_t current_frame,
size_t current_symbol,
80 std::vector<std::complex<int16_t>>
zeros_;
86 #endif // TXRX_WORKER_SIM_H_
Radio::TxFlags GetTxFlags(size_t radio_id, size_t tx_symbol_id)
Definition: txrx_worker_hw.cc:600
bool IsRxSymbol(size_t interface, size_t symbol_id)
Definition: txrx_worker_hw.cc:641
int RadioRx(size_t radio_id, std::vector< std::vector< std::complex< int16_t >>> &rx_data, size_t rx_size, Radio::RxFlags &out_flags, long long &rx_time_ns)
Definition: radio_lib.cc:326
byte
Definition: core.h:388
size_t GetDLSymbolIdx(size_t symbol_number) const
Definition: framestats.cc:152
size_t DoTx(long long time0)
Definition: txrx_worker_hw.cc:451
size_t NumDLCalSyms() const
Definition: framestats.cc:79
Definition: concurrentqueue.h:630
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
size_t SampsPerSymbol() const
Definition: config.h:234
auto printf(const S &fmt, const T &... args) -> int
Definition: printf.h:631
size_t GetULCalSymbol(size_t location) const
Definition: framestats.cc:118
size_t NumChannels() const
Definition: config.h:98
size_t *const rx_frame_start_
Definition: txrx_worker.h:59
uint16_t symbol_id_
Definition: message.h:33
std::vector< RxPacket * > DoRx(size_t interface_id, size_t &global_frame_id, size_t &global_symbol_id)
Definition: txrx_worker_hw.cc:181
Implementation of PacketTxRx datapath functions for communicating with real iris / faros hardware.
std::vector< TxRxWorkerRx::RxStatusTracker > rx_status_
Definition: txrx_worker_hw.h:83
size_t start_ticks_
Definition: txrx_worker_hw.h:25
Packet * GetTxPacket(size_t frame, size_t symbol, size_t ant)
Definition: txrx_worker.cc:160
std::vector< std::complex< int16_t > > zeros_
Definition: txrx_worker_hw.h:80
bool Running() const
Definition: txrx_worker.h:42
void InitRxStatus()
Definition: txrx_worker_hw.cc:904
#define AGORA_LOG_ERROR(...)
Definition: logger.h:39
size_t RefRadio(size_t id) const
Definition: config.h:101
const FrameStats & Frame() const
Definition: config.h:340
static double CyclesToUs(size_t cycles, double freq_ghz)
Definition: gettime.h:97
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
Definition: message.h:227
std::vector< std::complex< int16_t > > & BeaconCi16()
Definition: config.h:380
void WaitSync()
Using a latch might be better but adds c++20 requirement.
Definition: txrx_worker.cc:64
void TxReciprocityCalibPilots(size_t frame_id, size_t radio_id, long long time0)
Definition: txrx_worker_hw.cc:338
void ReturnRxPacket(RxPacket &unused_packet)
Definition: txrx_worker.cc:129
static constexpr bool kSymbolTimingEnabled
Definition: txrx_worker_hw.cc:16
Declaration file for the RadioConfig class.
void TxDownlinkZeros(size_t frame_id, size_t radio_id, long long time0)
Definition: txrx_worker_hw.cc:860
RadioConfig & radio_config_
Definition: txrx_worker_hw.h:76
static constexpr bool kDebugPrintInTask
Definition: symbols.h:201
bool IsPilot(size_t, size_t) const
Definition: config.cc:1495
static constexpr bool kDebugDownlink
Definition: symbols.h:180
std::vector< EventData > GetPendingTxEvents(size_t max_events=0)
Definition: txrx_worker.cc:85
TxFlags
Definition: radio.h:20
Definition: message.h:142
Definition: radio_lib.h:21
void ResetRxStatus(size_t interface, bool reuse_memory)
Definition: txrx_worker_hw.cc:919
uint16_t ant_id_
Definition: message.h:38
Self defined functions for message storage and passing.
TxRxWorkerRx::RxParameters UpdateRxInterface(const TxRxWorkerRx::RxParameters &last_rx)
Returns the next symbol and interface.
Definition: txrx_worker_hw.cc:612
size_t GetDLCalSymbol(size_t location) const
Definition: framestats.cc:110
for i
Definition: generate_data.m:107
bool IsTxSymbolNext(size_t radio_id, size_t current_symbol)
Definition: txrx_worker_hw.cc:577
Definition: rx_status_tracker.h:17
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
static size_t Rdtsc()
Return the TSC.
Definition: gettime.h:25
bool IsCalUlPilot(size_t, size_t) const
Definition: config.cc:1530
Communications Library: a) Generate pilot/preamble sequences b) OFDM modulation.
static int Hadamard2(int i, int j)
Definition: comms-lib.h:95
Definition: txrx_worker_hw.h:24
Definition: message.h:164
Config * Configuration()
Definition: txrx_worker.h:46
void PrintRxSymbolTiming(std::vector< TxRxWorkerRx::RxTimeTracker > &rx_times, size_t current_frame, size_t current_symbol, size_t next_symbol)
Definition: txrx_worker_hw.cc:663
size_t GetDLSymbol(size_t location) const
Definition: framestats.cc:106
std::vector< bool > first_symbol_
Definition: txrx_worker_hw.h:84
static constexpr size_t kNumStatsFrames
Definition: symbols.h:300
bool NotifyComplete(const EventData &complete_event)
Definition: txrx_worker.cc:75
int RadioTx(size_t radio_id, const void *const *buffs, Radio::TxFlags flags, long long &tx_time)
Definition: radio_lib.cc:306
RxFlags
Definition: radio.h:19
Definition: txrx_worker.h:18
size_t NumULCalSyms() const
Definition: framestats.cc:81
void DoTxRx() final
Definition: txrx_worker_hw.cc:44
static constexpr bool kIsWorkerTimingEnabled
Definition: symbols.h:303
RxPacket & GetRxPacket()
Definition: txrx_worker.cc:104
const size_t channels_per_interface_
Definition: txrx_worker.h:58
void TxBeaconHw(size_t frame_id, size_t interface_id, long long time0)
Definition: txrx_worker_hw.cc:299
size_t NumDLSyms() const
Definition: framestats.cc:83
const std::vector< size_t > & CellId() const
Definition: config.h:368
SymbolType GetSymbolType(size_t symbol_id) const
Return the symbol type of this symbol in this frame.
Definition: config.cc:1557
static double MeasureRdtscFreq()
Definition: gettime.h:51
Definition: txrx_worker_hw.h:19
#define AGORA_LOG_SYMBOL(...)
Definition: logger.h:82
const size_t tid_
Definition: txrx_worker.h:54
bool HwFramer() const
Definition: config.h:53
void ScheduleTxInit(size_t frames_to_schedule, long long time0)
Definition: txrx_worker_hw.cc:839
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
bool IsUplink(size_t, size_t) const
Definition: config.cc:1537
size_t RefAnt(size_t id) const
Definition: config.h:100
bool IsCalDlPilot(size_t, size_t) const
Definition: config.cc:1523
Definition: json.hpp:5213
const double freq_ghz_
Definition: txrx_worker_hw.h:78
#define AGORA_LOG_FRAME(...)
Definition: logger.h:72
long long int GetHwTime()
Definition: txrx_worker_hw.cc:733
Definition: rx_status_tracker.h:15
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
N_SC, NUM_UE, NUM_UE zeros()
Implementation of RxStatusTracker helper class.
#define AGORA_LOG_WARN(...)
Definition: logger.h:53
Definition: txrx_worker_hw.h:30
static constexpr bool kBeamsweepData
Definition: txrx_worker_hw.cc:17
size_t RecipCalDlAnt(size_t frame_id, size_t dl_cal_symbol) const
Definition: config.h:119
size_t program_start_ticks_
Definition: txrx_worker_hw.h:77
const size_t interface_offset_
Definition: txrx_worker.h:57
size_t end_ticks_
Definition: txrx_worker_hw.h:26
const size_t num_interfaces_
Definition: txrx_worker.h:56
uint32_t frame_id_
Definition: message.h:32
size_t GetBeaconSymbol(size_t location) const
Definition: framestats.cc:126
txrx worker thread definition. This is the parent / interface
size_t interface_
Definition: txrx_worker_hw.h:21
const size_t core_offset_
Definition: txrx_worker.h:55
size_t BeaconAnt() const
Definition: config.h:102
size_t symbol_
Definition: txrx_worker_hw.h:20
bool running_
Definition: txrx_worker.h:60
std::vector< std::complex< int16_t > > & PilotCi16()
Definition: config.h:377
#define TX_FRAME_DELTA
Definition: symbols.h:20
size_t NumTotalSyms() const
Definition: framestats.cc:93
size_t BfAntNum() const
Definition: config.h:39