Send SRS measurements (still empty) from PHY to MAC
This commit is contained in:
@@ -829,6 +829,19 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
|||||||
T(T_GNB_PHY_UL_TIME_CHANNEL_ESTIMATE, T_INT(0), T_INT(srs_pdu->rnti), T_INT(frame_rx), T_INT(0), T_INT(0),
|
T(T_GNB_PHY_UL_TIME_CHANNEL_ESTIMATE, T_INT(0), T_INT(srs_pdu->rnti), T_INT(frame_rx), T_INT(0), T_INT(0),
|
||||||
T_BUFFER(gNB->nr_srs_info[i]->srs_estimated_channel_time_shifted[0], gNB->frame_parms.ofdm_symbol_size*sizeof(int32_t)));
|
T_BUFFER(gNB->nr_srs_info[i]->srs_estimated_channel_time_shifted[0], gNB->frame_parms.ofdm_symbol_size*sizeof(int32_t)));
|
||||||
|
|
||||||
|
uint16_t num_srs = gNB->UL_INFO.srs_ind.number_of_pdus;
|
||||||
|
gNB->UL_INFO.srs_ind.pdu_list = &gNB->srs_pdu_list[0];
|
||||||
|
gNB->UL_INFO.srs_ind.sfn = frame_rx;
|
||||||
|
gNB->UL_INFO.srs_ind.slot = slot_rx;
|
||||||
|
//gNB->srs_pdu_list[num_srs].handle;
|
||||||
|
gNB->srs_pdu_list[num_srs].rnti = srs_pdu->rnti;
|
||||||
|
//gNB->srs_pdu_list[num_srs].timing_advance;
|
||||||
|
gNB->srs_pdu_list[num_srs].num_symbols = 1<<srs_pdu->num_symbols;
|
||||||
|
//gNB->srs_pdu_list[num_srs].wide_band_snr;
|
||||||
|
//gNB->srs_pdu_list[num_srs].num_reported_symbols;
|
||||||
|
//gNB->srs_pdu_list[num_srs].reported_symbol_list;
|
||||||
|
gNB->UL_INFO.srs_ind.number_of_pdus += 1;
|
||||||
|
|
||||||
srs->active = 0;
|
srs->active = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -879,6 +879,18 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void handle_nr_srs_measurements(const module_id_t module_id,
|
||||||
|
const frame_t frame,
|
||||||
|
const sub_frame_t slot,
|
||||||
|
const rnti_t rnti,
|
||||||
|
const uint16_t timing_advance,
|
||||||
|
const uint8_t num_symbols,
|
||||||
|
const uint8_t wide_band_snr,
|
||||||
|
const uint8_t num_reported_symbols,
|
||||||
|
nfapi_nr_srs_indication_reported_symbol_t* reported_symbol_list) {
|
||||||
|
LOG_I(NR_MAC, "(%d.%d) Received SRS indication for rnti: 0x%04x\n", frame, slot, rnti);
|
||||||
|
}
|
||||||
|
|
||||||
long get_K2(NR_ServingCellConfigCommon_t *scc,
|
long get_K2(NR_ServingCellConfigCommon_t *scc,
|
||||||
NR_ServingCellConfigCommonSIB_t *scc_sib1,
|
NR_ServingCellConfigCommonSIB_t *scc_sib1,
|
||||||
NR_BWP_Uplink_t *ubwp,
|
NR_BWP_Uplink_t *ubwp,
|
||||||
|
|||||||
@@ -482,9 +482,19 @@ void handle_nr_ul_harq(const int CC_idP,
|
|||||||
sub_frame_t slot,
|
sub_frame_t slot,
|
||||||
const nfapi_nr_crc_t *crc_pdu);
|
const nfapi_nr_crc_t *crc_pdu);
|
||||||
|
|
||||||
|
void handle_nr_srs_measurements(const module_id_t module_id,
|
||||||
|
const frame_t frame,
|
||||||
|
const sub_frame_t slot,
|
||||||
|
const rnti_t rnti,
|
||||||
|
const uint16_t timing_advance,
|
||||||
|
const uint8_t num_symbols,
|
||||||
|
const uint8_t wide_band_snr,
|
||||||
|
const uint8_t num_reported_symbols,
|
||||||
|
nfapi_nr_srs_indication_reported_symbol_t* reported_symbol_list);
|
||||||
|
|
||||||
int16_t ssb_index_from_prach(module_id_t module_idP,
|
int16_t ssb_index_from_prach(module_id_t module_idP,
|
||||||
frame_t frameP,
|
frame_t frameP,
|
||||||
sub_frame_t slotP,
|
sub_frame_t slotP,
|
||||||
uint16_t preamble_index,
|
uint16_t preamble_index,
|
||||||
uint8_t freq_index,
|
uint8_t freq_index,
|
||||||
uint8_t symbol);
|
uint8_t symbol);
|
||||||
|
|||||||
@@ -217,6 +217,41 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
|
|||||||
UL_info->crc_ind.number_crcs = 0;
|
UL_info->crc_ind.number_crcs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void handle_nr_srs(NR_UL_IND_t *UL_info) {
|
||||||
|
|
||||||
|
if(NFAPI_MODE == NFAPI_MODE_PNF) {
|
||||||
|
if (UL_info->srs_ind.number_of_pdus > 0) {
|
||||||
|
LOG_D(PHY,"PNF Sending UL_info->srs_ind.number_of_pdus: %d, SFN/SF:%d.%d \n",
|
||||||
|
UL_info->srs_ind.number_of_pdus, UL_info->frame, UL_info->slot);
|
||||||
|
oai_nfapi_nr_srs_indication(&UL_info->srs_ind);
|
||||||
|
UL_info->srs_ind.number_of_pdus = 0;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const module_id_t module_id = UL_info->module_id;
|
||||||
|
const frame_t frame = UL_info->srs_ind.sfn;
|
||||||
|
const sub_frame_t slot = UL_info->srs_ind.slot;
|
||||||
|
int num_srs = UL_info->srs_ind.number_of_pdus;
|
||||||
|
nfapi_nr_srs_indication_pdu_t *srs_list = UL_info->srs_ind.pdu_list;
|
||||||
|
|
||||||
|
for (int i = 0; i < num_srs; i++) {
|
||||||
|
const nfapi_nr_srs_indication_pdu_t *srs_ind = &srs_list[i];
|
||||||
|
LOG_D(NR_PHY, "(%d.%d) UL_info->srs_ind.pdu_list[%d].rnti: 0x%04x\n", frame, slot, i, srs_ind->rnti);
|
||||||
|
handle_nr_srs_measurements(module_id,
|
||||||
|
frame,
|
||||||
|
slot,
|
||||||
|
srs_ind->rnti,
|
||||||
|
srs_ind->timing_advance,
|
||||||
|
srs_ind->num_symbols,
|
||||||
|
srs_ind->wide_band_snr,
|
||||||
|
srs_ind->num_reported_symbols,
|
||||||
|
srs_ind->reported_symbol_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
UL_info->srs_ind.number_of_pdus = 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void free_unqueued_nfapi_indications(nfapi_nr_rach_indication_t *rach_ind,
|
static void free_unqueued_nfapi_indications(nfapi_nr_rach_indication_t *rach_ind,
|
||||||
nfapi_nr_uci_indication_t *uci_ind,
|
nfapi_nr_uci_indication_t *uci_ind,
|
||||||
nfapi_nr_rx_data_indication_t *rx_ind,
|
nfapi_nr_rx_data_indication_t *rx_ind,
|
||||||
@@ -436,6 +471,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
|
|||||||
// clear UL DCI prior to handling ULSCH
|
// clear UL DCI prior to handling ULSCH
|
||||||
mac->UL_dci_req[CC_id].numPdus = 0;
|
mac->UL_dci_req[CC_id].numPdus = 0;
|
||||||
handle_nr_ulsch(UL_info);
|
handle_nr_ulsch(UL_info);
|
||||||
|
handle_nr_srs(UL_info);
|
||||||
|
|
||||||
if (get_softmodem_params()->emulate_l1) {
|
if (get_softmodem_params()->emulate_l1) {
|
||||||
free_unqueued_nfapi_indications(rach_ind, uci_ind, rx_ind, crc_ind);
|
free_unqueued_nfapi_indications(rach_ind, uci_ind, rx_ind, crc_ind);
|
||||||
|
|||||||
Reference in New Issue
Block a user