phy_config_enabled is general to all the carriers of the ue

master
Francisco Paisana 5 years ago
parent cab9327b1a
commit 01847c5f5d

@ -119,7 +119,7 @@ public:
bool ue_exists(uint16_t rnti) final; bool ue_exists(uint16_t rnti) final;
void ue_needs_ta_cmd(uint16_t rnti, uint32_t nof_ta_cmd); void ue_needs_ta_cmd(uint16_t rnti, uint32_t nof_ta_cmd);
void phy_config_enabled(uint16_t rnti, uint32_t cc_idx, bool enabled); void phy_config_enabled(uint16_t rnti, bool enabled);
int bearer_ue_cfg(uint16_t rnti, uint32_t lc_id, ue_bearer_cfg_t* cfg) final; int bearer_ue_cfg(uint16_t rnti, uint32_t lc_id, ue_bearer_cfg_t* cfg) final;
int bearer_ue_rem(uint16_t rnti, uint32_t lc_id) final; int bearer_ue_rem(uint16_t rnti, uint32_t lc_id) final;

@ -107,7 +107,7 @@ public:
************************************************************/ ************************************************************/
sched_ue(); sched_ue();
void reset(); void reset();
void phy_config_enabled(uint32_t tti, uint32_t cc_idx, bool enabled); void phy_config_enabled(uint32_t tti, bool enabled);
void set_cfg(uint16_t rnti, const sched_params_t& sched_params_, sched_interface::ue_cfg_t* cfg); void set_cfg(uint16_t rnti, const sched_params_t& sched_params_, sched_interface::ue_cfg_t* cfg);
void set_bearer_cfg(uint32_t lc_id, srsenb::sched_interface::ue_bearer_cfg_t* cfg); void set_bearer_cfg(uint32_t lc_id, srsenb::sched_interface::ue_bearer_cfg_t* cfg);
@ -243,12 +243,11 @@ private:
const rbgmask_t& user_mask); const rbgmask_t& user_mask);
bool is_first_dl_tx(); bool is_first_dl_tx();
bool is_first_dl_tx(uint32_t cc_idx);
sched_interface::ue_cfg_t cfg = {}; sched_interface::ue_cfg_t cfg = {};
srslte_cell_t cell = {}; srslte_cell_t cell = {};
srslte::log* log_h = nullptr; srslte::log* log_h = nullptr;
const sched_params_t* sched_params; const sched_params_t* sched_params = nullptr;
std::mutex mutex; std::mutex mutex;

@ -203,9 +203,7 @@ int mac::bearer_ue_rem(uint16_t rnti, uint32_t lc_id)
void mac::phy_config_enabled(uint16_t rnti, bool enabled) void mac::phy_config_enabled(uint16_t rnti, bool enabled)
{ {
// FIXME: "cc_idx must be specified" scheduler.phy_config_enabled(rnti, enabled);
uint32_t cc_idx = 0;
scheduler.phy_config_enabled(rnti, cc_idx, enabled);
} }
// Update UE configuration // Update UE configuration

@ -251,10 +251,10 @@ void sched::ue_needs_ta_cmd(uint16_t rnti, uint32_t nof_ta_cmd)
pthread_rwlock_unlock(&rwlock); pthread_rwlock_unlock(&rwlock);
} }
void sched::phy_config_enabled(uint16_t rnti, uint32_t cc_idx, bool enabled) void sched::phy_config_enabled(uint16_t rnti, bool enabled)
{ {
// FIXME: Check if correct use of current_tti // FIXME: Check if correct use of current_tti
ue_db_access(rnti, [this, cc_idx, enabled](sched_ue& ue) { ue.phy_config_enabled(current_tti, cc_idx, enabled); }); ue_db_access(rnti, [this, enabled](sched_ue& ue) { ue.phy_config_enabled(current_tti, enabled); });
} }
int sched::bearer_ue_cfg(uint16_t rnti, uint32_t lc_id, sched_interface::ue_bearer_cfg_t* cfg_) int sched::bearer_ue_cfg(uint16_t rnti, uint32_t lc_id, sched_interface::ue_bearer_cfg_t* cfg_)

@ -171,10 +171,11 @@ void sched_ue::rem_bearer(uint32_t lc_id)
} }
} }
void sched_ue::phy_config_enabled(uint32_t tti, uint32_t cc_idx, bool enabled) void sched_ue::phy_config_enabled(uint32_t tti, bool enabled)
{ {
carriers[cc_idx].dl_cqi_tti = tti; for (sched_ue_carrier& c : carriers) {
// FIXME: "why do we need this?" c.dl_cqi_tti = tti;
}
phy_config_dedicated_enabled = enabled; phy_config_dedicated_enabled = enabled;
} }
@ -400,7 +401,7 @@ int sched_ue::generate_format1(dl_harq_proc* h,
// If this is the first transmission for this UE, make room for MAC Contention Resolution ID // If this is the first transmission for this UE, make room for MAC Contention Resolution ID
bool need_conres_ce = false; bool need_conres_ce = false;
if (is_first_dl_tx(cc_idx)) { if (is_first_dl_tx()) {
need_conres_ce = true; need_conres_ce = true;
} }
if (h->is_empty(0)) { if (h->is_empty(0)) {
@ -727,21 +728,13 @@ uint32_t sched_ue::get_max_retx()
bool sched_ue::is_first_dl_tx() bool sched_ue::is_first_dl_tx()
{ {
for (uint32_t i = 0; i < carriers.size(); ++i) { for (const sched_ue_carrier& c : carriers) {
if (not is_first_dl_tx(i)) { for (auto& h : c.dl_harq) {
return false;
}
}
return true;
}
bool sched_ue::is_first_dl_tx(uint32_t cc_idx)
{
for (auto& h : carriers[cc_idx].dl_harq) {
if (h.nof_tx(0) > 0) { if (h.nof_tx(0) > 0) {
return false; return false;
} }
} }
}
return true; return true;
} }
@ -892,7 +885,7 @@ uint32_t sched_ue::get_required_prb_dl(uint32_t cc_idx, uint32_t req_bytes, uint
uint32_t nbytes = 0; uint32_t nbytes = 0;
uint32_t n; uint32_t n;
int mcs0 = (is_first_dl_tx(cc_idx) and cell.nof_prb == 6) ? MCS_FIRST_DL : carriers[cc_idx].fixed_mcs_dl; int mcs0 = (is_first_dl_tx() and cell.nof_prb == 6) ? MCS_FIRST_DL : carriers[cc_idx].fixed_mcs_dl;
for (n = 0; n < cell.nof_prb && nbytes < req_bytes; ++n) { for (n = 0; n < cell.nof_prb && nbytes < req_bytes; ++n) {
nof_re = srslte_ra_dl_approx_nof_re(&cell, n + 1, nof_ctrl_symbols); nof_re = srslte_ra_dl_approx_nof_re(&cell, n + 1, nof_ctrl_symbols);
if (mcs0 < 0) { if (mcs0 < 0) {

Loading…
Cancel
Save