activate scells in the phy

master
Francisco Paisana 5 years ago committed by Andre Puschmann
parent 7548402632
commit 9b4a0baa87

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

@ -447,7 +447,7 @@ void mac::rach_detected(uint32_t tti, uint32_t enb_cc_idx, uint32_t preamble_idx
// Create new UE // Create new UE
if (ue_db.count(rnti) == 0) { 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 // 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); mcch.pack(bref);
current_mcch_length = bref.distance_bytes(&mcch_payload_buffer[1]); current_mcch_length = bref.distance_bytes(&mcch_payload_buffer[1]);
current_mcch_length = current_mcch_length + rlc_header_len; 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, {}); rrc_h->add_user(SRSLTE_MRNTI, {});
} }

@ -34,19 +34,21 @@
namespace srsenb { namespace srsenb {
ue::ue(uint16_t rnti_, ue::ue(uint16_t rnti_,
uint32_t nof_prb_, uint32_t nof_prb_,
sched_interface* sched_, sched_interface* sched_,
rrc_interface_mac* rrc_, rrc_interface_mac* rrc_,
rlc_interface_mac* rlc_, rlc_interface_mac* rlc_,
srslte::log* log_, phy_interface_stack_lte* phy_,
uint32_t nof_rx_harq_proc_, srslte::log* log_,
uint32_t nof_tx_harq_proc_) : uint32_t nof_rx_harq_proc_,
uint32_t nof_tx_harq_proc_) :
rnti(rnti_), rnti(rnti_),
nof_prb(nof_prb_), nof_prb(nof_prb_),
sched(sched_), sched(sched_),
rrc(rrc_), rrc(rrc_),
rlc(rlc_), rlc(rlc_),
phy(phy_),
log_h(log_), log_h(log_),
mac_msg_dl(20, log_), mac_msg_dl(20, log_),
mch_mac_msg_dl(10, 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; 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)) { 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"); Info("CE: Added SCell Activation CE.\n");
// Allocate and initialize Rx/Tx softbuffers for new carriers (exclude PCell) // Allocate and initialize Rx/Tx softbuffers for new carriers (exclude PCell)
allocate_cc_buffers(active_scell_list.size() - 1); allocate_cc_buffers(active_scell_list.size() - 1);

Loading…
Cancel
Save