mirror of https://github.com/pvnis/srsRAN_4G.git
sched,nr: implement methods to fill nzp csi-rs in scheduler
parent
a8f58f503c
commit
d927b779dc
@ -0,0 +1,36 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* \section COPYRIGHT
|
||||||
|
*
|
||||||
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||||||
|
*
|
||||||
|
* By using this file, you agree to the terms and conditions set
|
||||||
|
* forth in the LICENSE file which can be found at the top level of
|
||||||
|
* the distribution.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRSRAN_SCHED_NR_SIGNALLING_H
|
||||||
|
#define SRSRAN_SCHED_NR_SIGNALLING_H
|
||||||
|
|
||||||
|
#include "sched_nr_cfg.h"
|
||||||
|
#include "sched_nr_interface.h"
|
||||||
|
|
||||||
|
namespace srsenb {
|
||||||
|
namespace sched_nr_impl {
|
||||||
|
|
||||||
|
/// Schedule NZP-CSI-RS resources for given slot
|
||||||
|
void sched_nzp_csi_rs(srsran::const_span<srsran_csi_rs_nzp_set_t> nzp_csi_rs_sets,
|
||||||
|
const srsran_slot_cfg_t& slot_cfg,
|
||||||
|
nzp_csi_rs_list& csi_rs_list);
|
||||||
|
|
||||||
|
/// For a given BWP and slot, schedule SSB, NZP CSI RS and SIBs
|
||||||
|
void sched_dl_signalling(const bwp_params& bwp_params,
|
||||||
|
slot_point sl_pdcch,
|
||||||
|
ssb_list& ssb_list,
|
||||||
|
nzp_csi_rs_list& nzp_csi_rs);
|
||||||
|
|
||||||
|
} // namespace sched_nr_impl
|
||||||
|
} // namespace srsenb
|
||||||
|
|
||||||
|
#endif // SRSRAN_SCHED_NR_SIGNALLING_H
|
@ -0,0 +1,55 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* \section COPYRIGHT
|
||||||
|
*
|
||||||
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||||||
|
*
|
||||||
|
* By using this file, you agree to the terms and conditions set
|
||||||
|
* forth in the LICENSE file which can be found at the top level of
|
||||||
|
* the distribution.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "srsenb/hdr/stack/mac/nr/sched_nr_signalling.h"
|
||||||
|
|
||||||
|
namespace srsenb {
|
||||||
|
namespace sched_nr_impl {
|
||||||
|
|
||||||
|
void sched_nzp_csi_rs(srsran::const_span<srsran_csi_rs_nzp_set_t> nzp_csi_rs_sets_cfg,
|
||||||
|
const srsran_slot_cfg_t& slot_cfg,
|
||||||
|
nzp_csi_rs_list& csi_rs_list)
|
||||||
|
{
|
||||||
|
for (const srsran_csi_rs_nzp_set_t& set : nzp_csi_rs_sets_cfg) {
|
||||||
|
// 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)) {
|
||||||
|
csi_rs_list.push_back(nzp_csi_resource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sched_dl_signalling(const bwp_params& bwp_params,
|
||||||
|
slot_point sl_pdcch,
|
||||||
|
ssb_list& ssb_list,
|
||||||
|
nzp_csi_rs_list& nzp_csi_rs)
|
||||||
|
{
|
||||||
|
srsran_slot_cfg_t cfg;
|
||||||
|
cfg.idx = sl_pdcch.to_uint();
|
||||||
|
|
||||||
|
// Schedule SSB
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Schedule NZP-CSI-RS
|
||||||
|
sched_nzp_csi_rs(bwp_params.cfg.pdsch.nzp_csi_rs_sets, cfg, nzp_csi_rs);
|
||||||
|
|
||||||
|
// Schedule SIBs
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace sched_nr_impl
|
||||||
|
} // namespace srsenb
|
Loading…
Reference in New Issue