diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h index 6bea8f55cc..dc52f1de2a 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h @@ -476,9 +476,7 @@ typedef struct { uint16_t start_rb; uint16_t number_symbols; uint16_t start_symbol; - // TODO this is a workaround to make it work - // implementation is also a bunch of workarounds - uint16_t rb_offset; + uint8_t refPoint; uint16_t dlDmrsSymbPos; uint8_t dmrsConfigType; uint8_t prb_bundling_size_ind; diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 515e0f5ff5..4c59da3cb0 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -1287,7 +1287,7 @@ void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, // generate pilot for gNB port number 1000+p int config_type = dlsch->dmrsConfigType; - int rb_offset = dlsch->rb_offset; + int rb_offset = dlsch->start_rb + (dlsch->refPoint ? 0 : dlsch->BWPStart); int nb_rb_pdsch = dlsch->number_rbs; int8_t delta = get_delta(p, config_type); c16_t pilot[3280] __attribute__((aligned(16))); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 3d9d5fba43..7f8db35d9f 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -818,10 +818,7 @@ static int nr_ue_process_dci_dl_10(NR_UE_MAC_INST_t *mac, return -1; } - dlsch_pdu->rb_offset = dlsch_pdu->start_rb + dlsch_pdu->BWPStart; - - if (mac->get_sib1) - dlsch_pdu->rb_offset -= dlsch_pdu->BWPStart; + dlsch_pdu->refPoint = mac->get_sib1 ? 1 : 0; /* TIME_DOM_RESOURCE_ASSIGNMENT */ int dmrs_typeA_pos = mac->dmrs_TypeA_Position; @@ -1163,7 +1160,7 @@ static int nr_ue_process_dci_dl_11(NR_UE_MAC_INST_t *mac, LOG_W(MAC, "[%d.%d] Invalid frequency_domain_assignment. Possibly due to false DCI. Ignoring DCI!\n", frame, slot); return -1; } - dlsch_pdu->rb_offset = dlsch_pdu->start_rb + dlsch_pdu->BWPStart; + dlsch_pdu->refPoint = 0; /* TIME_DOM_RESOURCE_ASSIGNMENT */ int dmrs_typeA_pos = mac->dmrs_TypeA_Position; int mux_pattern = 1;