input simplification in nr_pdsch_channel_estimation
This commit is contained in:
@@ -1253,30 +1253,24 @@ void NFAPI_NR_DMRS_TYPE2_average_prb(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||||
const UE_nr_rxtx_proc_t *proc,
|
const UE_nr_rxtx_proc_t *proc,
|
||||||
int nl,
|
const fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch,
|
||||||
unsigned short p,
|
int nl,
|
||||||
unsigned char symbol,
|
unsigned short p,
|
||||||
unsigned char nscid,
|
unsigned char symbol,
|
||||||
unsigned short scrambling_id,
|
uint32_t pdsch_est_size,
|
||||||
unsigned short BWPStart,
|
int32_t dl_ch_estimates[][pdsch_est_size],
|
||||||
uint8_t config_type,
|
int rxdataFsize,
|
||||||
int n_dmrs_cdm_groups,
|
c16_t rxdataF[][rxdataFsize],
|
||||||
uint16_t rb_offset,
|
uint32_t *nvar)
|
||||||
unsigned short bwp_start_subcarrier,
|
|
||||||
unsigned short nb_rb_pdsch,
|
|
||||||
uint32_t pdsch_est_size,
|
|
||||||
int32_t dl_ch_estimates[][pdsch_est_size],
|
|
||||||
int rxdataFsize,
|
|
||||||
c16_t rxdataF[][rxdataFsize],
|
|
||||||
uint32_t *nvar)
|
|
||||||
{
|
{
|
||||||
// int gNB_id = proc->gNB_id;
|
// int gNB_id = proc->gNB_id;
|
||||||
int slot = proc->nr_slot_rx;
|
int slot = proc->nr_slot_rx;
|
||||||
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||||
const int ch_offset = fp->ofdm_symbol_size * symbol;
|
const int ch_offset = fp->ofdm_symbol_size * symbol;
|
||||||
const int symbol_offset = fp->ofdm_symbol_size * symbol;
|
const int symbol_offset = fp->ofdm_symbol_size * symbol;
|
||||||
|
int bwp_start_subcarrier = ue->frame_parms.first_carrier_offset + (dlsch->BWPStart + dlsch->start_rb) * 12;
|
||||||
|
|
||||||
#ifdef DEBUG_PDSCH
|
#ifdef DEBUG_PDSCH
|
||||||
printf(
|
printf(
|
||||||
@@ -1292,13 +1286,15 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// generate pilot for gNB port number 1000+p
|
// generate pilot for gNB port number 1000+p
|
||||||
|
int config_type = dlsch->dmrsConfigType;
|
||||||
|
int rb_offset = dlsch->rb_offset;
|
||||||
|
int nb_rb_pdsch = dlsch->number_rbs;
|
||||||
int8_t delta = get_delta(p, config_type);
|
int8_t delta = get_delta(p, config_type);
|
||||||
|
|
||||||
c16_t pilot[3280] __attribute__((aligned(16)));
|
c16_t pilot[3280] __attribute__((aligned(16)));
|
||||||
// Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS
|
// Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS
|
||||||
float beta_dmrs_pdsch = get_beta_dmrs(n_dmrs_cdm_groups, config_type == NFAPI_NR_DMRS_TYPE2);
|
float beta_dmrs_pdsch = get_beta_dmrs(dlsch->n_dmrs_cdm_groups, config_type == NFAPI_NR_DMRS_TYPE2);
|
||||||
int16_t dmrs_scaling = (int16_t)((1 / beta_dmrs_pdsch) * (1 << 14));
|
int16_t dmrs_scaling = (int16_t)((1 / beta_dmrs_pdsch) * (1 << 14));
|
||||||
const uint32_t *gold = nr_gold_pdsch(fp->N_RB_DL, fp->symbols_per_slot, scrambling_id, nscid, slot, symbol);
|
const uint32_t *gold = nr_gold_pdsch(fp->N_RB_DL, fp->symbols_per_slot, dlsch->dlDmrsScramblingId, dlsch->nscid, slot, symbol);
|
||||||
nr_pdsch_dmrs_rx(ue, slot, gold, pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type, dmrs_scaling);
|
nr_pdsch_dmrs_rx(ue, slot, gold, pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type, dmrs_scaling);
|
||||||
|
|
||||||
delay_t delay = {0};
|
delay_t delay = {0};
|
||||||
@@ -1351,7 +1347,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
|||||||
@@ -78,24 +78,17 @@ int nr_pbch_channel_estimation(const NR_DL_FRAME_PARMS *fp,
|
|||||||
bool sidelink,
|
bool sidelink,
|
||||||
uint Nid);
|
uint Nid);
|
||||||
|
|
||||||
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||||
const UE_nr_rxtx_proc_t *proc,
|
const UE_nr_rxtx_proc_t *proc,
|
||||||
int nl,
|
const fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch,
|
||||||
unsigned short p,
|
int nl,
|
||||||
unsigned char symbol,
|
unsigned short p,
|
||||||
unsigned char nscid,
|
unsigned char symbol,
|
||||||
unsigned short scrambling_id,
|
uint32_t pdsch_est_size,
|
||||||
unsigned short BWPStart,
|
int32_t dl_ch_estimates[][pdsch_est_size],
|
||||||
uint8_t config_type,
|
int rxdataFsize,
|
||||||
int n_dmrs_cdm_groups,
|
c16_t rxdataF[][rxdataFsize],
|
||||||
uint16_t rb_offset,
|
uint32_t *nvar);
|
||||||
unsigned short bwp_start_subcarrier,
|
|
||||||
unsigned short nb_rb_pdsch,
|
|
||||||
uint32_t pdsch_est_size,
|
|
||||||
int32_t dl_ch_estimates[][pdsch_est_size],
|
|
||||||
int rxdataFsize,
|
|
||||||
c16_t rxdataF[][rxdataFsize],
|
|
||||||
uint32_t *nvar);
|
|
||||||
|
|
||||||
int nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
int nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
||||||
PHY_VARS_NR_UE *ue,
|
PHY_VARS_NR_UE *ue,
|
||||||
|
|||||||
@@ -641,17 +641,10 @@ static int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
|
|||||||
uint32_t nvar_tmp = 0;
|
uint32_t nvar_tmp = 0;
|
||||||
nr_pdsch_channel_estimation(ue,
|
nr_pdsch_channel_estimation(ue,
|
||||||
proc,
|
proc,
|
||||||
|
dlschCfg,
|
||||||
nl,
|
nl,
|
||||||
get_dmrs_port(nl, dlschCfg->dmrs_ports),
|
get_dmrs_port(nl, dlschCfg->dmrs_ports),
|
||||||
m,
|
m,
|
||||||
dlschCfg->nscid,
|
|
||||||
dlschCfg->dlDmrsScramblingId,
|
|
||||||
dlschCfg->BWPStart,
|
|
||||||
dlschCfg->dmrsConfigType,
|
|
||||||
dlschCfg->n_dmrs_cdm_groups,
|
|
||||||
dlschCfg->rb_offset,
|
|
||||||
ue->frame_parms.first_carrier_offset + (dlschCfg->BWPStart + dlschCfg->start_rb) * 12,
|
|
||||||
dlschCfg->number_rbs,
|
|
||||||
pdsch_est_size,
|
pdsch_est_size,
|
||||||
pdsch_dl_ch_estimates,
|
pdsch_dl_ch_estimates,
|
||||||
ue->frame_parms.samples_per_slot_wCP,
|
ue->frame_parms.samples_per_slot_wCP,
|
||||||
|
|||||||
Reference in New Issue
Block a user