Add traces on gNB PHY UL and related requirement: FD PUSH IQ, FD DMRS, and UL Channel estimates wi/wo interpolation
- The required memories have been created and initialized in: openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c - Those memories: memory for DMRS signals, memory for channel estimates based on DMRS positions, memory to store slot grid with channel coefficients based on DMRS positions after interpolation, and memory to store extracted data including PUSCH + DMRS. - The input parameters to nr_pusch_channel_estimation() has been updated to get the pointer to the added memories of pusch_dmrs_slot_mem and pusch_ch_est_dmrs_pos_slot_mem (openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h) - The DMRS grid of NR slot and the estimated channel coefficients at DMRS locations are logged to created memories in: openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c - The function inner_rx in openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c is updated to log the extracted ULSCH PRBs and the interpolated channel coefficients. - The T-macro() has been called in (openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c) to trace added traces: T_GNB_PHY_UL_FD_DMRS, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_POS, T_GNB_PHY_UL_FD_PUSCH_IQ, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL
This commit is contained in:
committed by
Bartosz Podrygajlo
parent
a942e7e5ab
commit
8caf326134
@@ -64,6 +64,8 @@ typedef struct puschAntennaProc_s {
|
||||
c16_t ***rxdataF;
|
||||
task_ans_t *ans;
|
||||
scopeData_t *scope;
|
||||
c16_t *pusch_ch_est_dmrs_pos_slot_mem;
|
||||
int dmrs_symbol_start_idx;
|
||||
} puschAntennaProc_t;
|
||||
|
||||
__attribute__((always_inline)) inline c16_t c32x16cumulVectVectWithSteps(c16_t *in1,
|
||||
@@ -149,6 +151,9 @@ static void nr_pusch_antenna_processing(void *arg)
|
||||
int re_offset = k0;
|
||||
LOG_D(PHY, "PUSCH estimation DMRS type 1, Freq-domain interpolation");
|
||||
int pilot_cnt = 0;
|
||||
#if T_TRACER
|
||||
int ch_est_cnt = 0; // To trace channel coefficients
|
||||
#endif
|
||||
|
||||
for (int n = 0; n < 3 * nb_rb_pusch; n++) {
|
||||
// LS estimation
|
||||
@@ -165,6 +170,17 @@ static void nr_pusch_antenna_processing(void *arg)
|
||||
for (int k = pilot_cnt << 1; k < (pilot_cnt << 1) + 4; k++) {
|
||||
ul_ls_est[k] = ch16;
|
||||
}
|
||||
//------------------Write channel parameters to Memory for data recording ------------------//
|
||||
#if T_TRACER
|
||||
if (T_ACTIVE(T_GNB_PHY_UL_FD_CHAN_EST_DMRS_POS)) {
|
||||
// Trace channel coefficients
|
||||
c16_t *pusch_ch_est_dmrs_pos_slot_mem = rdata->pusch_ch_est_dmrs_pos_slot_mem;
|
||||
int dmrs_symbol_start_idx = rdata->dmrs_symbol_start_idx;
|
||||
pusch_ch_est_dmrs_pos_slot_mem[dmrs_symbol_start_idx + delta + ch_est_cnt] = ch16; // 0, 2, 4, 6, 8, location of REs
|
||||
pusch_ch_est_dmrs_pos_slot_mem[dmrs_symbol_start_idx + delta + ch_est_cnt + 2] = ch16; // 0, 2, 4, 6, 8, location of REs
|
||||
}
|
||||
ch_est_cnt += 4;
|
||||
#endif
|
||||
pilot_cnt += 2;
|
||||
}
|
||||
c16_t ch_estimates_time[frame_parms->ofdm_symbol_size] __attribute__((aligned(32)));
|
||||
@@ -459,7 +475,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
unsigned short bwp_start_subcarrier,
|
||||
nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
int *max_ch,
|
||||
uint32_t *nvar)
|
||||
uint32_t *nvar,
|
||||
c16_t *pusch_dmrs_slot_mem,
|
||||
c16_t *pusch_ch_est_dmrs_pos_slot_mem)
|
||||
{
|
||||
c16_t pilot[3280] __attribute__((aligned(32)));
|
||||
|
||||
@@ -519,6 +537,20 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
LOG_I(PHY, "In %s: %d + j*(%d)\n", __FUNCTION__, pilot[i].r, pilot[i].i);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//------------------Write DMRS to Memory for Data Recording ------------------//
|
||||
int dmrs_symbol_start_idx = symbol * pusch_pdu->nrOfLayers * nb_rb_pusch * NR_NB_SC_PER_RB + nl * nb_rb_pusch * NR_NB_SC_PER_RB;
|
||||
#if T_TRACER
|
||||
if (T_ACTIVE(T_GNB_PHY_UL_FD_DMRS)) {
|
||||
// used by T-Tracer to trace DMRS slot grid
|
||||
int dmrs_delta = 0; // intialize it to zero currently, derive it later from above functions
|
||||
for (int i = 0; i < (6 * nb_rb_pusch); i++) {
|
||||
// the generated DMRs is a complex conjugate of mod table, so flip the sign of imag. part
|
||||
pusch_dmrs_slot_mem[dmrs_symbol_start_idx + dmrs_delta + i * 2].r = pilot[i].r; // 0, 2, 4, 6, 8, location of REs
|
||||
pusch_dmrs_slot_mem[dmrs_symbol_start_idx + dmrs_delta + i * 2].i = -pilot[i].i; // 0, 2, 4, 6, 8, location of REs
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int nest_count = 0;
|
||||
@@ -573,6 +605,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
rdata->rxdataF = gNB->common_vars.rxdataF;
|
||||
rdata->scope = gNB->scopeData;
|
||||
rdata->ans = &ans;
|
||||
rdata->pusch_ch_est_dmrs_pos_slot_mem = pusch_ch_est_dmrs_pos_slot_mem;
|
||||
rdata->dmrs_symbol_start_idx = dmrs_symbol_start_idx;
|
||||
// Call the nr_pusch_antenna_processing function
|
||||
if (job_id == num_jobs - 1) {
|
||||
// Run the last job inline
|
||||
|
||||
@@ -51,7 +51,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
unsigned short bwp_start_subcarrier,
|
||||
nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
int *max_ch,
|
||||
uint32_t *nvar);
|
||||
uint32_t *nvar,
|
||||
c16_t *pusch_dmrs_slot_mem,
|
||||
c16_t *pusch_ch_est_dmrs_pos_slot_mem);
|
||||
|
||||
void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user