Merge remote-tracking branch 'origin/rf_emulator_and_timers_fix' into integration_2025_w34 (!3589)
RF emulator and improvements of the timers RF emulator: Add an RF library emulating a real device without the need of a real device. This is thought to enable using phy-test without requiring a radio device or channel simulation. The library synchronizes on the real time clock, drops TX and generate noise on RX. Noise generation can be disabled and the noise level configured. Timers improvements: - Fix standard deviation for merged timers - Add display of ULSCH decoding timers - Add decoding timer in AAL
This commit is contained in:
@@ -815,6 +815,10 @@ static int pmd_lcore_ldpc_dec(void *arg)
|
||||
AssertFatal(ret == 0, "Allocation failed for %d ops", num_segments);
|
||||
set_ldpc_dec_op(ops_enq, bufs->inputs, bufs->hard_outputs, bufs->harq_outputs, nrLDPC_slot_decoding_parameters);
|
||||
|
||||
// Start timer
|
||||
// We report timing only once in (0,0) since the timers are merged at the end
|
||||
start_meas(&nrLDPC_slot_decoding_parameters->TBs[0].segments[0].ts_ldpc_decode);
|
||||
|
||||
uint16_t enq = 0, deq = 0;
|
||||
while (enq < num_segments) {
|
||||
uint16_t num_to_enq = num_segments - enq;
|
||||
@@ -828,6 +832,10 @@ static int pmd_lcore_ldpc_dec(void *arg)
|
||||
DevAssert(time_out <= TIME_OUT_POLL);
|
||||
}
|
||||
|
||||
// Stop timer
|
||||
// We report timing only once in (0,0) since the timers are merged at the end
|
||||
stop_meas(&nrLDPC_slot_decoding_parameters->TBs[0].segments[0].ts_ldpc_decode);
|
||||
|
||||
if (deq == enq) {
|
||||
ret = retrieve_ldpc_dec_op(ops_deq, nrLDPC_slot_decoding_parameters);
|
||||
AssertFatal(ret == 0, "LDPC offload decoder failed!");
|
||||
|
||||
@@ -305,6 +305,10 @@ int nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
LOG_D(PHY, "ULSCH %d in error\n", ULSCH_id);
|
||||
}
|
||||
offset += ((harq_process->K >> 3) - (harq_process->F >> 3) - ((harq_process->C > 1) ? 3 : 0));
|
||||
|
||||
merge_meas(&phy_vars_gNB->ts_deinterleave, &nrLDPC_segment_decoding_parameters.ts_deinterleave);
|
||||
merge_meas(&phy_vars_gNB->ts_rate_unmatch, &nrLDPC_segment_decoding_parameters.ts_rate_unmatch);
|
||||
merge_meas(&phy_vars_gNB->ts_ldpc_decode, &nrLDPC_segment_decoding_parameters.ts_ldpc_decode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +255,6 @@ typedef struct RU_proc_t_s {
|
||||
int instance_cnt_feptx;
|
||||
/// \internal This variable is protected by \ref mutex_ru_thread
|
||||
int instance_cnt_ru;
|
||||
int instance_cnt_emulateRF;
|
||||
/// pthread structure for RU FH processing thread
|
||||
pthread_t pthread_FH;
|
||||
pthread_t pthread_FH1;
|
||||
@@ -271,8 +270,6 @@ typedef struct RU_proc_t_s {
|
||||
pthread_t pthread_fep[8];
|
||||
/// pthread struct for RU TX FEP worker thread
|
||||
pthread_t pthread_feptx;
|
||||
/// pthread struct for emulated RF
|
||||
pthread_t pthread_emulateRF;
|
||||
/// pthread structure for asychronous RX/TX processing thread
|
||||
pthread_t pthread_asynch_rxtx;
|
||||
/// flag to indicate first RX acquisition
|
||||
@@ -296,8 +293,6 @@ typedef struct RU_proc_t_s {
|
||||
pthread_attr_t attr_fep;
|
||||
/// pthread attributes for worker feptx thread
|
||||
pthread_attr_t attr_feptx;
|
||||
/// pthread attributes for emulated RF
|
||||
pthread_attr_t attr_emulateRF;
|
||||
/// scheduling parameters for RU FH thread
|
||||
struct sched_param sched_param_FH;
|
||||
struct sched_param sched_param_FH1;
|
||||
@@ -324,8 +319,6 @@ typedef struct RU_proc_t_s {
|
||||
pthread_cond_t cond_fep[8];
|
||||
/// condition varible for RU TX FEP thread
|
||||
pthread_cond_t cond_feptx;
|
||||
/// condition varible for emulated RF
|
||||
pthread_cond_t cond_emulateRF;
|
||||
/// condition variable for eNB signal
|
||||
pthread_cond_t cond_eNBs;
|
||||
/// condition variable for gNB signal
|
||||
@@ -353,8 +346,6 @@ typedef struct RU_proc_t_s {
|
||||
pthread_mutex_t mutex_feptx;
|
||||
/// mutex for ru_thread
|
||||
pthread_mutex_t mutex_ru;
|
||||
/// mutex for emulated RF thread
|
||||
pthread_mutex_t mutex_emulateRF;
|
||||
/// symbol mask for IF4p5 reception per subframe
|
||||
uint32_t symbol_mask[10];
|
||||
/// time measurements for each subframe
|
||||
@@ -394,7 +385,6 @@ typedef struct RU_proc_t_s {
|
||||
/// pipeline ready state
|
||||
int ru_rx_ready;
|
||||
int ru_tx_ready;
|
||||
int emulate_rf_busy;
|
||||
|
||||
/// structure for precoding thread
|
||||
RU_prec_t prec[16];
|
||||
@@ -407,7 +397,6 @@ typedef enum {
|
||||
REMOTE_IF4p5 =3,
|
||||
REMOTE_IF1pp =4,
|
||||
MAX_RU_IF_TYPES =5
|
||||
//EMULATE_RF =6
|
||||
} RU_if_south_t;
|
||||
|
||||
|
||||
@@ -453,8 +442,6 @@ typedef struct RU_t_s {
|
||||
node_function_t function;
|
||||
/// Ethernet parameters for fronthaul interface
|
||||
eth_params_t eth_params;
|
||||
/// flag to indicate RF emulation mode
|
||||
int emulate_rf;
|
||||
/// numerology index
|
||||
int numerology;
|
||||
/// flag to indicate the RU is in sync with a master reference
|
||||
|
||||
@@ -255,11 +255,6 @@ typedef struct {
|
||||
tpool_t *threadPool;
|
||||
int nbDecode;
|
||||
notifiedFIFO_t *respDecode;
|
||||
pthread_mutex_t mutex_emulateRF;
|
||||
int instance_cnt_emulateRF;
|
||||
pthread_t pthread_emulateRF;
|
||||
pthread_attr_t attr_emulateRF;
|
||||
pthread_cond_t cond_emulateRF;
|
||||
int first_rx;
|
||||
} L1_rxtx_proc_t;
|
||||
|
||||
|
||||
@@ -521,6 +521,9 @@ typedef struct PHY_VARS_gNB_s {
|
||||
time_stats_t slot_indication_stats;
|
||||
time_stats_t schedule_response_stats;
|
||||
time_stats_t ulsch_decoding_stats;
|
||||
time_stats_t ts_deinterleave;
|
||||
time_stats_t ts_rate_unmatch;
|
||||
time_stats_t ts_ldpc_decode;
|
||||
time_stats_t ulsch_deinterleaving_stats;
|
||||
time_stats_t ulsch_channel_estimation_stats;
|
||||
time_stats_t pusch_channel_estimation_antenna_processing_stats;
|
||||
|
||||
@@ -90,7 +90,6 @@ static int cmpdouble(const void *p1, const void *p2) {
|
||||
}
|
||||
RAN_CONTEXT_t RC;
|
||||
|
||||
int emulate_rf = 0;
|
||||
void handler(int sig) {
|
||||
void *array[10];
|
||||
size_t size;
|
||||
|
||||
@@ -89,8 +89,6 @@ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
|
||||
|
||||
THREAD_STRUCT thread_struct;
|
||||
|
||||
int emulate_rf = 0;
|
||||
|
||||
void handler(int sig) {
|
||||
void *array[10];
|
||||
size_t size;
|
||||
|
||||
@@ -1341,7 +1341,7 @@ printf("%d\n", slot);
|
||||
printStatIndent3(&gNB->tprep,"DLSCH LDPC input preparation time");
|
||||
printStatIndent3(&gNB->tparity,"DLSCH LDPC parity generation time");
|
||||
printStatIndent3(&gNB->toutput,"DLSCH LDPC output generation time");
|
||||
printStatIndent3(&gNB->dlsch_rate_matching_stats,"DLSCH Rate Mataching time");
|
||||
printStatIndent3(&gNB->dlsch_rate_matching_stats,"DLSCH Rate Matching time");
|
||||
printStatIndent3(&gNB->dlsch_interleaving_stats, "DLSCH Interleaving time");
|
||||
printStatIndent2(&gNB->dlsch_modulation_stats,"DLSCH modulation time");
|
||||
printStatIndent2(&gNB->dlsch_scrambling_stats, "DLSCH scrambling time");
|
||||
|
||||
@@ -1028,6 +1028,9 @@ int main(int argc, char *argv[])
|
||||
reset_meas(&gNB->rx_pusch_init_stats);
|
||||
reset_meas(&gNB->rx_pusch_symbol_processing_stats);
|
||||
reset_meas(&gNB->ulsch_decoding_stats);
|
||||
reset_meas(&gNB->ts_deinterleave);
|
||||
reset_meas(&gNB->ts_rate_unmatch);
|
||||
reset_meas(&gNB->ts_ldpc_decode);
|
||||
reset_meas(&gNB->ulsch_channel_estimation_stats);
|
||||
reset_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
|
||||
reset_meas(&gNB->rx_srs_stats);
|
||||
@@ -1589,6 +1592,9 @@ int main(int argc, char *argv[])
|
||||
printStatIndent2(&gNB->rx_pusch_init_stats, "RX PUSCH Initialization time");
|
||||
printStatIndent2(&gNB->rx_pusch_symbol_processing_stats, "RX PUSCH Symbol Processing time");
|
||||
printStatIndent(&gNB->ulsch_decoding_stats,"ULSCH total decoding time");
|
||||
printStatIndent2(&gNB->ts_deinterleave, "ULSCH segment deinterleaving time");
|
||||
printStatIndent2(&gNB->ts_rate_unmatch, "ULSCH segment rate recovery time");
|
||||
printStatIndent2(&gNB->ts_ldpc_decode, "ULSCH segments decoding time");
|
||||
|
||||
printf("\nUE TX\n");
|
||||
for (int i = PHY_PROC_TX; i <= OFDM_MOD_STATS; i++) {
|
||||
|
||||
Reference in New Issue
Block a user