|
|
@ -26,7 +26,7 @@ ue_carrier::ue_carrier(uint16_t rnti_, const ue_cfg_t& uecfg_, const cell_params
|
|
|
|
cc(cell_params_.cc),
|
|
|
|
cc(cell_params_.cc),
|
|
|
|
bwp_cfg(rnti_, cell_params_.bwps[0], uecfg_),
|
|
|
|
bwp_cfg(rnti_, cell_params_.bwps[0], uecfg_),
|
|
|
|
cell_params(cell_params_),
|
|
|
|
cell_params(cell_params_),
|
|
|
|
harq_ent(cell_params_.nof_prb())
|
|
|
|
harq_ent(rnti_, cell_params_.nof_prb(), SCHED_NR_MAX_HARQ, cell_params_.bwps[0].logger)
|
|
|
|
{}
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
void ue_carrier::set_cfg(const ue_cfg_t& ue_cfg)
|
|
|
|
void ue_carrier::set_cfg(const ue_cfg_t& ue_cfg)
|
|
|
@ -34,6 +34,11 @@ void ue_carrier::set_cfg(const ue_cfg_t& ue_cfg)
|
|
|
|
bwp_cfg = bwp_ue_cfg(rnti, cell_params.bwps[0], ue_cfg);
|
|
|
|
bwp_cfg = bwp_ue_cfg(rnti, cell_params.bwps[0], ue_cfg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ue_carrier::new_slot(slot_point slot_tx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
harq_ent.new_slot(slot_tx - TX_ENB_DELAY);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
slot_ue ue_carrier::try_reserve(slot_point pdcch_slot, uint32_t dl_pending_bytes, uint32_t ul_pending_bytes)
|
|
|
|
slot_ue ue_carrier::try_reserve(slot_point pdcch_slot, uint32_t dl_pending_bytes, uint32_t ul_pending_bytes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
slot_point slot_rx = pdcch_slot - TX_ENB_DELAY;
|
|
|
|
slot_point slot_rx = pdcch_slot - TX_ENB_DELAY;
|
|
|
@ -103,14 +108,6 @@ void ue::new_slot(slot_point pdcch_slot)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
last_pdcch_slot = pdcch_slot;
|
|
|
|
last_pdcch_slot = pdcch_slot;
|
|
|
|
|
|
|
|
|
|
|
|
for (auto& ue_cc_cfg : ue_cfg.carriers) {
|
|
|
|
|
|
|
|
auto& cc = carriers[ue_cc_cfg.cc];
|
|
|
|
|
|
|
|
if (cc != nullptr) {
|
|
|
|
|
|
|
|
// Update CC HARQ state
|
|
|
|
|
|
|
|
cc->harq_ent.new_slot(pdcch_slot - TX_ENB_DELAY);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Compute pending DL/UL bytes for {rnti, pdcch_slot}
|
|
|
|
// Compute pending DL/UL bytes for {rnti, pdcch_slot}
|
|
|
|
if (sched_cfg.sched_cfg.auto_refill_buffer) {
|
|
|
|
if (sched_cfg.sched_cfg.auto_refill_buffer) {
|
|
|
|
dl_pending_bytes = 1000000;
|
|
|
|
dl_pending_bytes = 1000000;
|
|
|
@ -142,10 +139,7 @@ void ue::new_slot(slot_point pdcch_slot)
|
|
|
|
|
|
|
|
|
|
|
|
slot_ue ue::try_reserve(slot_point pdcch_slot, uint32_t cc)
|
|
|
|
slot_ue ue::try_reserve(slot_point pdcch_slot, uint32_t cc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (carriers[cc] == nullptr) {
|
|
|
|
srsran_assert(carriers[cc] != nullptr, "try_reserve() called for inexistent rnti=0x%x,cc=%d", rnti, cc);
|
|
|
|
return slot_ue();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return carriers[cc]->try_reserve(pdcch_slot, dl_pending_bytes, ul_pending_bytes);
|
|
|
|
return carriers[cc]->try_reserve(pdcch_slot, dl_pending_bytes, ul_pending_bytes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|