|
|
@ -20,6 +20,11 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#define GNB_UL_NR_FFT_WINDOW_OFFSET 0.5f
|
|
|
|
#define GNB_UL_NR_FFT_WINDOW_OFFSET 0.5f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @brief Minimum PUSCH DMRS measured SINR default value
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define GNB_UL_PUSCH_MIN_SNR_DEFAULT -10.0f
|
|
|
|
|
|
|
|
|
|
|
|
static int gnb_ul_alloc_prb(srsran_gnb_ul_t* q, uint32_t new_nof_prb)
|
|
|
|
static int gnb_ul_alloc_prb(srsran_gnb_ul_t* q, uint32_t new_nof_prb)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (q->max_prb < new_nof_prb) {
|
|
|
|
if (q->max_prb < new_nof_prb) {
|
|
|
@ -83,6 +88,12 @@ int srsran_gnb_ul_init(srsran_gnb_ul_t* q, cf_t* input, const srsran_gnb_ul_args
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set PUSCH minimum SNR, use default value if the given is NAN, INF or zero
|
|
|
|
|
|
|
|
q->pusch_min_snr_dB = GNB_UL_PUSCH_MIN_SNR_DEFAULT;
|
|
|
|
|
|
|
|
if (isnormal(args->pusch_min_snr_dB)) {
|
|
|
|
|
|
|
|
q->pusch_min_snr_dB = args->pusch_min_snr_dB;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return SRSRAN_SUCCESS;
|
|
|
|
return SRSRAN_SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -169,6 +180,15 @@ int srsran_gnb_ul_get_pusch(srsran_gnb_ul_t* q,
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check PUSCH DMRS minimum SNR and abort PUSCH decoding if it is below the threshold
|
|
|
|
|
|
|
|
if (q->dmrs.csi.snr_dB < q->pusch_min_snr_dB) {
|
|
|
|
|
|
|
|
// Set PUSCH data as not decoded
|
|
|
|
|
|
|
|
data->tb[0].crc = false;
|
|
|
|
|
|
|
|
data->tb[0].avg_iter = NAN;
|
|
|
|
|
|
|
|
data->uci.valid = false;
|
|
|
|
|
|
|
|
return SRSRAN_SUCCESS;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (srsran_pusch_nr_decode(&q->pusch, cfg, grant, &q->chest_pusch, q->sf_symbols, data) < SRSRAN_SUCCESS) {
|
|
|
|
if (srsran_pusch_nr_decode(&q->pusch, cfg, grant, &q->chest_pusch, q->sf_symbols, data) < SRSRAN_SUCCESS) {
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|