Definition of L1 and implementation of L3 measurements for serving cell
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "SCHED_NR_UE/defs.h"
|
||||
|
||||
#define K1 ((long long int) 512)
|
||||
#define K2 ((long long int) (1024-K1))
|
||||
@@ -254,6 +255,24 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue,
|
||||
ue->measurements.ssb_rsrp_dBm[ssb_index],
|
||||
rsrp_db_per_re,
|
||||
ue->measurements.ssb_sinr_dB[ssb_index]);
|
||||
|
||||
// Send SS measurements to MAC
|
||||
if (!ue->if_inst || !ue->if_inst->dl_indication)
|
||||
return;
|
||||
|
||||
fapi_nr_l1_measurements_t l1_measurements = {
|
||||
.gNB_index = proc->gNB_id,
|
||||
.meas_type = NFAPI_NR_SS_MEAS,
|
||||
.Nid_cell = ue->frame_parms.Nid_cell,
|
||||
.is_neighboring_cell = false,
|
||||
};
|
||||
int ssb_rsrp_dBm = ue->measurements.ssb_rsrp_dBm[ssb_index];
|
||||
l1_measurements.rsrp_dBm = BOUNDED_EVAL(16, ssb_rsrp_dBm + 157, 113); // TS 38.133 - Table 10.1.6.1-1
|
||||
nr_downlink_indication_t dl_indication = {0};
|
||||
fapi_nr_rx_indication_t rx_ind = {0};
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, NULL);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_MEAS_IND, ue, NULL, NULL, 1, proc, &l1_measurements, NULL);
|
||||
ue->if_inst->dl_indication(&dl_indication);
|
||||
}
|
||||
|
||||
// This function computes the received noise power
|
||||
|
||||
@@ -979,18 +979,24 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
// Send CSI measurements to MAC
|
||||
fapi_nr_csirs_measurements_t csirs_measurements;
|
||||
csirs_measurements.rsrp = rsrp;
|
||||
csirs_measurements.rsrp_dBm = rsrp_dBm;
|
||||
csirs_measurements.rank_indicator = rank_indicator;
|
||||
csirs_measurements.i1 = *i1;
|
||||
csirs_measurements.i2 = *i2;
|
||||
csirs_measurements.cqi = cqi;
|
||||
csirs_measurements.radiolink_monitoring = RLM_no_monitoring; // TODO do be activated in case of RLM based on CSI-RS
|
||||
if (!ue->if_inst || !ue->if_inst->dl_indication)
|
||||
return;
|
||||
|
||||
fapi_nr_l1_measurements_t l1_measurements = {
|
||||
.gNB_index = proc->gNB_id,
|
||||
.meas_type = NFAPI_NR_CSI_MEAS,
|
||||
.Nid_cell = frame_parms->Nid_cell,
|
||||
.is_neighboring_cell = false,
|
||||
.rsrp_dBm = BOUNDED_EVAL(16, rsrp_dBm + 157, 113), // TS 38.133 - Table 10.1.6.1-1
|
||||
.rank_indicator = rank_indicator,
|
||||
.i1 = *i1,
|
||||
.i2 = *i2,
|
||||
.cqi = cqi,
|
||||
.radiolink_monitoring = RLM_no_monitoring, // TODO do be activated in case of RLM based on CSI-RS
|
||||
};
|
||||
nr_downlink_indication_t dl_indication;
|
||||
fapi_nr_rx_indication_t rx_ind = {0};
|
||||
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, NULL);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_CSIRS_IND, ue, NULL, NULL, 1, proc, (void *)&csirs_measurements, NULL);
|
||||
if (ue->if_inst && ue->if_inst->dl_indication)
|
||||
ue->if_inst->dl_indication(&dl_indication);
|
||||
nr_fill_rx_indication(&rx_ind, FAPI_NR_MEAS_IND, ue, NULL, NULL, 1, proc, (void *)&l1_measurements, NULL);
|
||||
ue->if_inst->dl_indication(&dl_indication);
|
||||
}
|
||||
|
||||
@@ -186,8 +186,8 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
||||
rx->ssb_pdu.decoded_pdu = false;
|
||||
}
|
||||
} break;
|
||||
case FAPI_NR_CSIRS_IND:
|
||||
memcpy(&rx->csirs_measurements, typeSpecific, sizeof(fapi_nr_csirs_measurements_t));
|
||||
case FAPI_NR_MEAS_IND:
|
||||
memcpy(&rx->l1_measurements, typeSpecific, sizeof(fapi_nr_l1_measurements_t));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -178,3 +178,12 @@ void *rrc_nrue(void *notUsed)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void nr_mac_rrc_meas_ind_ue(module_id_t module_id,
|
||||
uint32_t gNB_index,
|
||||
uint16_t Nid_cell,
|
||||
bool csi_meas,
|
||||
bool is_neighboring_cell,
|
||||
uint8_t rsrp_dBm)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user