Added NR PDSCH and PUSCH resource allocating flattening

master
Xavier Arteaga 4 years ago committed by Andre Puschmann
parent 892aea8219
commit 86ad0446e1

@ -45,6 +45,8 @@ struct pusch_time_domain_res_alloc_s;
struct pucch_format_cfg_s; struct pucch_format_cfg_s;
struct pucch_res_s; struct pucch_res_s;
struct sched_request_res_cfg_s; struct sched_request_res_cfg_s;
struct pusch_cfg_s;
struct pdsch_cfg_s;
struct dmrs_ul_cfg_s; struct dmrs_ul_cfg_s;
struct beta_offsets_s; struct beta_offsets_s;
struct uci_on_pusch_s; struct uci_on_pusch_s;
@ -87,14 +89,20 @@ bool make_phy_res_config(const asn1::rrc_nr::pucch_res_s& pucch_res,
srsran_pucch_nr_resource_t* srsran_pucch_nr_resource); srsran_pucch_nr_resource_t* srsran_pucch_nr_resource);
bool make_phy_sr_resource(const asn1::rrc_nr::sched_request_res_cfg_s& sched_request_res_cfg, bool make_phy_sr_resource(const asn1::rrc_nr::sched_request_res_cfg_s& sched_request_res_cfg,
srsran_pucch_nr_sr_resource_t* srsran_pucch_nr_sr_resource); srsran_pucch_nr_sr_resource_t* srsran_pucch_nr_sr_resource);
bool make_phy_pusch_alloc_type(const asn1::rrc_nr::pusch_cfg_s& pusch_cfg,
srsran_resource_alloc_t* in_srsran_resource_alloc);
bool make_phy_pdsch_alloc_type(const asn1::rrc_nr::pdsch_cfg_s& pdsch_cfg,
srsran_resource_alloc_t* in_srsran_resource_alloc);
bool make_phy_dmrs_additional_pos(const asn1::rrc_nr::dmrs_ul_cfg_s& dmrs_ul_cfg, bool make_phy_dmrs_additional_pos(const asn1::rrc_nr::dmrs_ul_cfg_s& dmrs_ul_cfg,
srsran_dmrs_sch_add_pos_t* srsran_dmrs_sch_add_pos); srsran_dmrs_sch_add_pos_t* srsran_dmrs_sch_add_pos);
bool make_phy_beta_offsets(const asn1::rrc_nr::beta_offsets_s& beta_offsets, bool make_phy_beta_offsets(const asn1::rrc_nr::beta_offsets_s& beta_offsets,
srsran_beta_offsets_t* srsran_beta_offsets); srsran_beta_offsets_t* srsran_beta_offsets);
bool make_phy_pusch_scaling(const asn1::rrc_nr::uci_on_pusch_s& uci_on_pusch, float* scaling); bool make_phy_pusch_scaling(const asn1::rrc_nr::uci_on_pusch_s& uci_on_pusch, float* scaling);
bool make_phy_zp_csi_rs_resource(const asn1::rrc_nr::zp_csi_rs_res_s & zp_csi_rs_res, srsran_csi_rs_zp_resource_t* zp_csi_rs_resource); bool make_phy_zp_csi_rs_resource(const asn1::rrc_nr::zp_csi_rs_res_s& zp_csi_rs_res,
bool make_phy_nzp_csi_rs_resource(const asn1::rrc_nr::nzp_csi_rs_res_s & nzp_csi_rs_res, srsran_csi_rs_nzp_resource_t* csi_rs_nzp_resource); srsran_csi_rs_zp_resource_t* zp_csi_rs_resource);
bool make_phy_carrier_cfg(const asn1::rrc_nr::freq_info_dl_s &freq_info_dl, srsran_carrier_nr_t* carrier_nr); bool make_phy_nzp_csi_rs_resource(const asn1::rrc_nr::nzp_csi_rs_res_s& nzp_csi_rs_res,
srsran_csi_rs_nzp_resource_t* csi_rs_nzp_resource);
bool make_phy_carrier_cfg(const asn1::rrc_nr::freq_info_dl_s& freq_info_dl, srsran_carrier_nr_t* carrier_nr);
/*************************** /***************************
* MAC Config * MAC Config
**************************/ **************************/

@ -783,6 +783,52 @@ bool make_phy_sr_resource(const sched_request_res_cfg_s& sched_request_res_cfg,
return true; return true;
} }
bool make_phy_pusch_alloc_type(const asn1::rrc_nr::pusch_cfg_s& pusch_cfg,
srsran_resource_alloc_t* in_srsran_resource_alloc)
{
srsran_resource_alloc_t srsran_resource_alloc = {};
switch (pusch_cfg.res_alloc) {
case asn1::rrc_nr::pusch_cfg_s::res_alloc_e_::res_alloc_type0:
srsran_resource_alloc = srsran_resource_alloc_type0;
break;
case asn1::rrc_nr::pusch_cfg_s::res_alloc_e_::res_alloc_type1:
srsran_resource_alloc = srsran_resource_alloc_type1;
break;
case asn1::rrc_nr::pusch_cfg_s::res_alloc_e_::dynamic_switch:
srsran_resource_alloc = srsran_resource_alloc_dynamic;
break;
default:
asn1::log_warning("Invalid option for pusch::resource_alloc %s", pusch_cfg.res_alloc.to_string());
return false;
}
*in_srsran_resource_alloc = srsran_resource_alloc;
return true;
}
bool make_phy_pdsch_alloc_type(const asn1::rrc_nr::pdsch_cfg_s& pdsch_cfg,
srsran_resource_alloc_t* in_srsran_resource_alloc)
{
srsran_resource_alloc_t srsran_resource_alloc = {};
switch (pdsch_cfg.res_alloc) {
case asn1::rrc_nr::pdsch_cfg_s::res_alloc_e_::res_alloc_type0:
srsran_resource_alloc = srsran_resource_alloc_type0;
break;
case asn1::rrc_nr::pdsch_cfg_s::res_alloc_e_::res_alloc_type1:
srsran_resource_alloc = srsran_resource_alloc_type1;
break;
case asn1::rrc_nr::pdsch_cfg_s::res_alloc_e_::dynamic_switch:
srsran_resource_alloc = srsran_resource_alloc_dynamic;
break;
default:
asn1::log_warning("Invalid option for pusch::resource_alloc %s", pdsch_cfg.res_alloc.to_string());
return false;
}
*in_srsran_resource_alloc = srsran_resource_alloc;
return true;
}
bool make_phy_dmrs_additional_pos(const dmrs_ul_cfg_s& dmrs_ul_cfg, bool make_phy_dmrs_additional_pos(const dmrs_ul_cfg_s& dmrs_ul_cfg,
srsran_dmrs_sch_add_pos_t* in_srsran_dmrs_sch_add_pos) srsran_dmrs_sch_add_pos_t* in_srsran_dmrs_sch_add_pos)
{ {

@ -606,6 +606,11 @@ bool rrc_nr::apply_sp_cell_init_dl_pdcch(const asn1::rrc_nr::pdcch_cfg_s& pdcch_
bool rrc_nr::apply_sp_cell_init_dl_pdsch(const asn1::rrc_nr::pdsch_cfg_s& pdsch_cfg) bool rrc_nr::apply_sp_cell_init_dl_pdsch(const asn1::rrc_nr::pdsch_cfg_s& pdsch_cfg)
{ {
srsran_resource_alloc_t resource_alloc;
if (make_phy_pdsch_alloc_type(pdsch_cfg, &resource_alloc) == true) {
phy_cfg.pdsch.alloc = resource_alloc;
}
if (pdsch_cfg.zp_csi_rs_res_to_add_mod_list_present) { if (pdsch_cfg.zp_csi_rs_res_to_add_mod_list_present) {
for (uint32_t i = 0; i < pdsch_cfg.zp_csi_rs_res_to_add_mod_list.size(); i++) { for (uint32_t i = 0; i < pdsch_cfg.zp_csi_rs_res_to_add_mod_list.size(); i++) {
srsran_csi_rs_zp_resource_t zp_csi_rs_resource; srsran_csi_rs_zp_resource_t zp_csi_rs_resource;
@ -991,6 +996,11 @@ bool rrc_nr::apply_sp_cell_ded_ul_pucch(const asn1::rrc_nr::pucch_cfg_s& pucch_c
bool rrc_nr::apply_sp_cell_ded_ul_pusch(const asn1::rrc_nr::pusch_cfg_s& pusch_cfg) bool rrc_nr::apply_sp_cell_ded_ul_pusch(const asn1::rrc_nr::pusch_cfg_s& pusch_cfg)
{ {
srsran_resource_alloc_t resource_alloc;
if (make_phy_pusch_alloc_type(pusch_cfg, &resource_alloc) == true) {
phy_cfg.pusch.alloc = resource_alloc;
}
if (pusch_cfg.dmrs_ul_for_pusch_map_type_a_present) { if (pusch_cfg.dmrs_ul_for_pusch_map_type_a_present) {
if (pusch_cfg.dmrs_ul_for_pusch_map_type_a.type() == setup_release_c<dmrs_ul_cfg_s>::types_opts::setup) { if (pusch_cfg.dmrs_ul_for_pusch_map_type_a.type() == setup_release_c<dmrs_ul_cfg_s>::types_opts::setup) {
srsran_dmrs_sch_add_pos_t srsran_dmrs_sch_add_pos; srsran_dmrs_sch_add_pos_t srsran_dmrs_sch_add_pos;

Loading…
Cancel
Save