Added NZP-CSI-RS signals in gNb

master
Xavier Arteaga 3 years ago committed by Andre Puschmann
parent ca6ea55cb6
commit 8b2514ded3

@ -13,6 +13,7 @@
#ifndef SRSRAN_GNB_DL_H #ifndef SRSRAN_GNB_DL_H
#define SRSRAN_GNB_DL_H #define SRSRAN_GNB_DL_H
#include "srsran/phy/ch_estimation/csi_rs.h"
#include "srsran/phy/common/phy_common_nr.h" #include "srsran/phy/common/phy_common_nr.h"
#include "srsran/phy/dft/ofdm.h" #include "srsran/phy/dft/ofdm.h"
#include "srsran/phy/phch/pdcch_cfg_nr.h" #include "srsran/phy/phch/pdcch_cfg_nr.h"
@ -78,4 +79,8 @@ srsran_gnb_dl_pdcch_dl_info(const srsran_gnb_dl_t* q, const srsran_dci_dl_nr_t*
SRSRAN_API int SRSRAN_API int
srsran_gnb_dl_pdcch_ul_info(const srsran_gnb_dl_t* q, const srsran_dci_ul_nr_t* dci, char* str, uint32_t str_len); srsran_gnb_dl_pdcch_ul_info(const srsran_gnb_dl_t* q, const srsran_dci_ul_nr_t* dci, char* str, uint32_t str_len);
SRSRAN_API int srsran_gnb_dl_nzp_csi_rs_put(srsran_gnb_dl_t* q,
const srsran_slot_cfg_t* slot_cfg,
const srsran_csi_rs_nzp_resource_t* resource);
#endif // SRSRAN_GNB_DL_H #endif // SRSRAN_GNB_DL_H

@ -309,3 +309,19 @@ int srsran_gnb_dl_pdcch_ul_info(const srsran_gnb_dl_t* q, const srsran_dci_ul_nr
return len; return len;
} }
int srsran_gnb_dl_nzp_csi_rs_put(srsran_gnb_dl_t* q,
const srsran_slot_cfg_t* slot_cfg,
const srsran_csi_rs_nzp_resource_t* resource)
{
if (q == NULL) {
return SRSRAN_ERROR_INVALID_INPUTS;
}
if (srsran_csi_rs_nzp_put_resource(&q->carrier, slot_cfg, resource, q->sf_symbols[0]) < SRSRAN_SUCCESS) {
ERROR("Error putting NZP-CSI-RS resource");
return SRSRAN_ERROR;
}
return SRSRAN_SUCCESS;
}

@ -330,8 +330,11 @@ bool slot_worker::work_dl()
} }
// Put NZP-CSI-RS // Put NZP-CSI-RS
for (srsran_csi_rs_nzp_resource_t& pdsch : dl_sched.nzp_csi_rs) { for (srsran_csi_rs_nzp_resource_t& nzp_csi_rs : dl_sched.nzp_csi_rs) {
// ... if (srsran_gnb_dl_nzp_csi_rs_put(&gnb_dl, &dl_slot_cfg, &nzp_csi_rs) < SRSRAN_SUCCESS) {
logger.error("NZP-CSI-RS: Error putting signal");
return false;
}
} }
// Generate baseband signal // Generate baseband signal

@ -484,6 +484,20 @@ public:
return SRSRAN_ERROR; return SRSRAN_ERROR;
} }
// Schedule NZP-CSI-RS, iterate all NZP-CSI-RS sets
for (const srsran_csi_rs_nzp_set_t& set : phy_cfg.pdsch.nzp_csi_rs_sets) {
// For each NZP-CSI-RS resource available in the set
for (uint32_t i = 0; i < set.count; i++) {
// Select resource
const srsran_csi_rs_nzp_resource_t& nzp_csi_resource = set.data[i];
// Check if the resource is scheduled for this slot
if (srsran_csi_rs_send(&nzp_csi_resource.periodicity, &slot_cfg)) {
dl_sched.nzp_csi_rs.push_back(nzp_csi_resource);
}
}
}
return SRSRAN_SUCCESS; return SRSRAN_SUCCESS;
} }

Loading…
Cancel
Save