store CC idx in DL/UL HARQ entity

master
Andre Puschmann 5 years ago
parent 33a410bda4
commit df31a5c4cc

@ -37,7 +37,7 @@ namespace srsue {
class dl_harq_entity class dl_harq_entity
{ {
public: public:
dl_harq_entity(); dl_harq_entity(uint8_t cc_idx_);
bool init(srslte::log* log_h, bool init(srslte::log* log_h,
mac_interface_rrc::ue_rnti_t* rntis, mac_interface_rrc::ue_rnti_t* rntis,
@ -120,15 +120,16 @@ private:
std::vector<dl_harq_process> proc; std::vector<dl_harq_process> proc;
dl_harq_process bcch_proc; dl_harq_process bcch_proc;
demux* demux_unit; demux* demux_unit = nullptr;
srslte::log* log_h; srslte::log* log_h = nullptr;
srslte::mac_pcap* pcap; srslte::mac_pcap* pcap = nullptr;
mac_interface_rrc::ue_rnti_t* rntis; mac_interface_rrc::ue_rnti_t* rntis = nullptr;
uint16_t last_temporal_crnti; uint16_t last_temporal_crnti = 0;
int si_window_start; int si_window_start = 0;
float average_retx; float average_retx = 0.0;
uint64_t nof_pkts; uint64_t nof_pkts = 0;
uint8_t cc_idx = 0;
}; };
typedef std::unique_ptr<dl_harq_entity> dl_harq_entity_ptr; typedef std::unique_ptr<dl_harq_entity> dl_harq_entity_ptr;

@ -178,6 +178,8 @@ private:
mac_metrics_t metrics[SRSLTE_MAX_CARRIERS] = {}; mac_metrics_t metrics[SRSLTE_MAX_CARRIERS] = {};
bool initialized = false; bool initialized = false;
const uint8_t PCELL_CC_IDX = 0;
}; };
} // namespace srsue } // namespace srsue

@ -43,7 +43,7 @@ namespace srsue {
class ul_harq_entity class ul_harq_entity
{ {
public: public:
ul_harq_entity(); ul_harq_entity(const uint8_t cc_idx_);
bool init(srslte::log* log_h_, mac_interface_rrc_common::ue_rnti_t* rntis_, ra_proc* ra_proc_h_, mux* mux_unit_); bool init(srslte::log* log_h_, mac_interface_rrc_common::ue_rnti_t* rntis_, ra_proc* ra_proc_h_, mux* mux_unit_);
@ -108,16 +108,18 @@ private:
std::vector<ul_harq_process> proc; std::vector<ul_harq_process> proc;
mux* mux_unit; mux* mux_unit = nullptr;
srslte::mac_pcap* pcap; srslte::mac_pcap* pcap = nullptr;
srslte::log* log_h; srslte::log* log_h = nullptr;
mac_interface_rrc_common::ue_rnti_t* rntis = nullptr;
srslte::ul_harq_cfg_t harq_cfg = {};
mac_interface_rrc_common::ue_rnti_t* rntis; float average_retx = 0.0;
srslte::ul_harq_cfg_t harq_cfg; uint64_t nof_pkts = 0;
ra_proc* ra_procedure = nullptr;
float average_retx; uint8_t cc_idx = 0;
uint64_t nof_pkts;
ra_proc* ra_procedure;
}; };
typedef std::unique_ptr<ul_harq_entity> ul_harq_entity_ptr; typedef std::unique_ptr<ul_harq_entity> ul_harq_entity_ptr;

@ -32,16 +32,7 @@
namespace srsue { namespace srsue {
dl_harq_entity::dl_harq_entity() : proc(SRSLTE_MAX_HARQ_PROC) dl_harq_entity::dl_harq_entity(uint8_t cc_idx_) : proc(SRSLTE_MAX_HARQ_PROC), cc_idx(cc_idx_) {}
{
pcap = nullptr;
demux_unit = nullptr;
log_h = nullptr;
si_window_start = 0;
last_temporal_crnti = 0;
average_retx = 0;
nof_pkts = 0;
}
bool dl_harq_entity::init(srslte::log* log_h_, mac_interface_rrc::ue_rnti_t* rntis_, demux* demux_unit_) bool dl_harq_entity::init(srslte::log* log_h_, mac_interface_rrc::ue_rnti_t* rntis_, demux* demux_unit_)
{ {

@ -40,8 +40,8 @@ namespace srsue {
mac::mac(srslte::log* log_) : mch_msg(10, log_), mux_unit(log_), demux_unit(log_), pcap(nullptr), log_h(log_) mac::mac(srslte::log* log_) : mch_msg(10, log_), mux_unit(log_), demux_unit(log_), pcap(nullptr), log_h(log_)
{ {
// Create PCell HARQ entities // Create PCell HARQ entities
auto ul = ul_harq_entity_ptr(new ul_harq_entity()); auto ul = ul_harq_entity_ptr(new ul_harq_entity(PCELL_CC_IDX));
auto dl = dl_harq_entity_ptr(new dl_harq_entity()); auto dl = dl_harq_entity_ptr(new dl_harq_entity(PCELL_CC_IDX));
ul_harq.clear(); ul_harq.clear();
dl_harq.clear(); dl_harq.clear();
@ -130,13 +130,13 @@ void mac::reconfiguration(const uint32_t& cc_idx, const bool& enable)
if (cc_idx < SRSLTE_MAX_CARRIERS) { if (cc_idx < SRSLTE_MAX_CARRIERS) {
// Create as many HARQ entities as carriers required // Create as many HARQ entities as carriers required
while (ul_harq.size() < cc_idx + 1) { while (ul_harq.size() < cc_idx + 1) {
auto ul = ul_harq_entity_ptr(new ul_harq_entity()); auto ul = ul_harq_entity_ptr(new ul_harq_entity(cc_idx));
ul->init(log_h, &uernti, &ra_procedure, &mux_unit); ul->init(log_h, &uernti, &ra_procedure, &mux_unit);
ul->set_config(ul_harq_cfg); ul->set_config(ul_harq_cfg);
ul_harq.push_back(std::move(ul)); ul_harq.push_back(std::move(ul));
} }
while (dl_harq.size() < cc_idx + 1) { while (dl_harq.size() < cc_idx + 1) {
auto dl = dl_harq_entity_ptr(new dl_harq_entity()); auto dl = dl_harq_entity_ptr(new dl_harq_entity(cc_idx));
dl->init(log_h, &uernti, &demux_unit); dl->init(log_h, &uernti, &demux_unit);
if (pcap) { if (pcap) {

@ -33,16 +33,7 @@
namespace srsue { namespace srsue {
ul_harq_entity::ul_harq_entity() : proc(SRSLTE_MAX_HARQ_PROC) ul_harq_entity::ul_harq_entity(const uint8_t cc_idx_) : proc(SRSLTE_MAX_HARQ_PROC), cc_idx(cc_idx_) {}
{
pcap = NULL;
mux_unit = NULL;
ra_procedure = NULL;
log_h = NULL;
rntis = NULL;
average_retx = 0;
nof_pkts = 0;
}
bool ul_harq_entity::init(srslte::log* log_h_, bool ul_harq_entity::init(srslte::log* log_h_,
mac_interface_rrc_common::ue_rnti_t* rntis_, mac_interface_rrc_common::ue_rnti_t* rntis_,

Loading…
Cancel
Save