activate scells in the phy

This commit is contained in:
Francisco Paisana 2020-03-11 16:31:14 +00:00 committed by Andre Puschmann
parent 7548402632
commit 9b4a0baa87
3 changed files with 27 additions and 22 deletions

View File

@ -38,14 +38,15 @@ namespace srsenb {
class ue : public srslte::read_pdu_interface, public srslte::pdu_queue::process_callback
{
public:
ue(uint16_t rnti,
uint32_t nof_prb,
sched_interface* sched,
rrc_interface_mac* rrc_,
rlc_interface_mac* rlc,
srslte::log* log_,
uint32_t nof_rx_harq_proc = SRSLTE_FDD_NOF_HARQ,
uint32_t nof_tx_harq_proc = SRSLTE_FDD_NOF_HARQ * SRSLTE_MAX_TB);
ue(uint16_t rnti,
uint32_t nof_prb,
sched_interface* sched,
rrc_interface_mac* rrc_,
rlc_interface_mac* rlc,
phy_interface_stack_lte* phy_,
srslte::log* log_,
uint32_t nof_rx_harq_proc = SRSLTE_FDD_NOF_HARQ,
uint32_t nof_tx_harq_proc = SRSLTE_FDD_NOF_HARQ * SRSLTE_MAX_TB);
virtual ~ue();
void reset();
@ -140,10 +141,11 @@ private:
srslte::sch_pdu mac_msg_dl, mac_msg_ul;
srslte::mch_pdu mch_mac_msg_dl;
rlc_interface_mac* rlc = nullptr;
rrc_interface_mac* rrc = nullptr;
srslte::log* log_h = nullptr;
sched_interface* sched = nullptr;
rlc_interface_mac* rlc = nullptr;
rrc_interface_mac* rrc = nullptr;
phy_interface_stack_lte* phy = nullptr;
srslte::log* log_h = nullptr;
sched_interface* sched = nullptr;
bool conres_id_available = false;

View File

@ -447,7 +447,7 @@ void mac::rach_detected(uint32_t tti, uint32_t enb_cc_idx, uint32_t preamble_idx
// Create new UE
if (ue_db.count(rnti) == 0) {
ue_db[rnti] = new ue(rnti, args.nof_prb, &scheduler, rrc_h, rlc_h, log_h, SRSLTE_FDD_NOF_HARQ);
ue_db[rnti] = new ue(rnti, args.nof_prb, &scheduler, rrc_h, rlc_h, phy_h, log_h, SRSLTE_FDD_NOF_HARQ);
}
// Set PCAP if available
@ -859,7 +859,7 @@ void mac::write_mcch(sib_type2_s* sib2_, sib_type13_r9_s* sib13_, mcch_msg_s* mc
mcch.pack(bref);
current_mcch_length = bref.distance_bytes(&mcch_payload_buffer[1]);
current_mcch_length = current_mcch_length + rlc_header_len;
ue_db[SRSLTE_MRNTI] = new ue(SRSLTE_MRNTI, args.nof_prb, &scheduler, rrc_h, rlc_h, log_h);
ue_db[SRSLTE_MRNTI] = new ue(SRSLTE_MRNTI, args.nof_prb, &scheduler, rrc_h, rlc_h, phy_h, log_h);
rrc_h->add_user(SRSLTE_MRNTI, {});
}

View File

@ -34,19 +34,21 @@
namespace srsenb {
ue::ue(uint16_t rnti_,
uint32_t nof_prb_,
sched_interface* sched_,
rrc_interface_mac* rrc_,
rlc_interface_mac* rlc_,
srslte::log* log_,
uint32_t nof_rx_harq_proc_,
uint32_t nof_tx_harq_proc_) :
ue::ue(uint16_t rnti_,
uint32_t nof_prb_,
sched_interface* sched_,
rrc_interface_mac* rrc_,
rlc_interface_mac* rlc_,
phy_interface_stack_lte* phy_,
srslte::log* log_,
uint32_t nof_rx_harq_proc_,
uint32_t nof_tx_harq_proc_) :
rnti(rnti_),
nof_prb(nof_prb_),
sched(sched_),
rrc(rrc_),
rlc(rlc_),
phy(phy_),
log_h(log_),
mac_msg_dl(20, log_),
mch_mac_msg_dl(10, log_),
@ -474,6 +476,7 @@ void ue::allocate_ce(srslte::sch_pdu* pdu, uint32_t lcid)
active_scell_list[enb_ue_cc_map[enb_cc_idx]] = true;
}
if (enb_cc_idx == enb_ue_cc_map.size() and pdu->get()->set_scell_activation_cmd(active_scell_list)) {
phy->set_activation_deactivation_scell(rnti, active_scell_list);
Info("CE: Added SCell Activation CE.\n");
// Allocate and initialize Rx/Tx softbuffers for new carriers (exclude PCell)
allocate_cc_buffers(active_scell_list.size() - 1);