SRSENB: minor format, renaming and interface changes

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent 67c07dfb56
commit 385102fa2d

@ -101,19 +101,48 @@ public:
virtual int sr_detected(uint32_t tti, uint16_t rnti) = 0; virtual int sr_detected(uint32_t tti, uint16_t rnti) = 0;
virtual int rach_detected(uint32_t tti, uint32_t primary_cc_idx, uint32_t preamble_idx, uint32_t time_adv) = 0; virtual int rach_detected(uint32_t tti, uint32_t primary_cc_idx, uint32_t preamble_idx, uint32_t time_adv) = 0;
virtual int ri_info(uint32_t tti, uint16_t rnti, uint32_t ri_value) = 0; /**
virtual int pmi_info(uint32_t tti, uint16_t rnti, uint32_t pmi_value) = 0; * PHY callback for giving MAC the Rank Indicator information of a given RNTI for an eNb cell/carrier.
*
* @param tti the given TTI
* @param rnti the UE identifier in the eNb
* @param cc_idx The eNb Cell/Carrier where the measurement corresponds
* @param ri_value the actual Rank Indicator value, 0 for 1 layer, 1 for two layers and so on.
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/
virtual int ri_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t ri_value) = 0;
/**
* PHY callback for giving MAC the Pre-coding Matrix Indicator information of a given RNTI for an eNb cell/carrier.
*
* @param tti the given TTI
* @param rnti the UE identifier in the eNb
* @param cc_idx The eNb Cell/Carrier where the measurement corresponds
* @param pmi_value the actual PMI value
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/
virtual int pmi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t pmi_value) = 0;
/** /**
* PHY callback for for giving MAC the Channel Quality information of a given RNTI, TTI and eNb cell/carrier * PHY callback for for giving MAC the Channel Quality information of a given RNTI, TTI and eNb cell/carrier
* @param tti the given TTI * @param tti the given TTI
* @param rnti the UE identifier in the eNb * @param rnti the UE identifier in the eNb
* @param cc_idx The eNb Cell/Carrier where the measurement corresponds
* @param cqi_value the corresponding Channel Quality Information * @param cqi_value the corresponding Channel Quality Information
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs * @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/ */
virtual int cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_value) = 0; virtual int cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_value) = 0;
virtual int snr_info(uint32_t tti, uint16_t rnti, float snr_db) = 0; /**
* PHY callback for giving MAC the SNR in dB of an UL transmission for a given RNTI at a given carrier
*
* @param tti The measurement was made
* @param rnti The UE identifier in the eNb
* @param cc_idx The eNb Cell/Carrier where the UL transmission was received
* @param snr_db The actual SNR of the received signal
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/
virtual int snr_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, float snr_db) = 0;
/** /**
* PHY callback for giving MAC the HARQ DL ACK/NACK feedback information for a given RNTI, TTI, eNb cell/carrier and * PHY callback for giving MAC the HARQ DL ACK/NACK feedback information for a given RNTI, TTI, eNb cell/carrier and
@ -127,7 +156,18 @@ public:
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs * @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/ */
virtual int ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx, bool ack) = 0; virtual int ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx, bool ack) = 0;
virtual int crc_info(uint32_t tti, uint16_t rnti, uint32_t nof_bytes, bool crc_res) = 0;
/**
* Informs MAC about a received PUSCH transmission for given RNTI, TTI and eNb Cell/carrier.
*
* @param tti the given TTI
* @param rnti the UE identifier in the eNb
* @param cc_idx the eNb Cell/Carrier identifier
* @param nof_bytes the number of grants carrierd by the PUSCH message
* @param crc_res the CRC check, set to true if the message was decoded succesfully
* @return SRSLTE_SUCCESS if no error occurs, SRSLTE_ERROR* if an error occurs
*/
virtual int crc_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t nof_bytes, bool crc_res) = 0;
virtual int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) = 0; virtual int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) = 0;
virtual int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) = 0; virtual int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) = 0;
@ -152,9 +192,29 @@ public:
* @param pcell_index Primary cell (PCell) index * @param pcell_index Primary cell (PCell) index
* @param is_temporal Indicates whether the UE is temporal * @param is_temporal Indicates whether the UE is temporal
*/ */
virtual int add_rnti(uint16_t rnti, uint32_t pcell_index, bool is_temporal) = 0; virtual int add_rnti(uint16_t rnti, uint32_t pcell_index, bool is_temporal) = 0;
virtual void rem_rnti(uint16_t rnti) = 0;
virtual void set_mch_period_stop(uint32_t stop) = 0; /**
* Removes an RNTI context from all the physical layer components, including secondary cells
* @param rnti identifier of the user
*/
virtual void rem_rnti(uint16_t rnti) = 0;
/**
*
* @param stop
*/
virtual void set_mch_period_stop(uint32_t stop) = 0;
/**
* Activates and/or deactivates Secondary Cells in the PHY for a given RNTI. Requires the RNTI of the given UE and a
* vector with the activation/deactivation values. Use true for activation and false for deactivation. The index 0 is
* reserved for PCell and will not be used.
*
* @param rnti identifier of the user
* @param activation vector with the activate/deactivate.
*/
virtual void set_activation_deactivation_scell(uint16_t rnti, bool activation[SRSLTE_MAX_CARRIERS]) = 0;
}; };
/* Interface RRC -> PHY */ /* Interface RRC -> PHY */
@ -176,9 +236,9 @@ public:
configure_mbsfn(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, asn1::rrc::mcch_msg_s mcch) = 0; configure_mbsfn(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, asn1::rrc::mcch_msg_s mcch) = 0;
typedef struct { typedef struct {
bool active = false; ///< Indicates whether PHY shall consider using this or not bool configured = false; ///< Indicates whether PHY shall consider configuring this cell/carrier
uint32_t cc_idx = 0; ///< eNb Cell index uint32_t cc_idx = 0; ///< eNb Cell index
srslte::phy_cfg_t phy_cfg = {}; ///< Dedicated physical layer configuration srslte::phy_cfg_t phy_cfg = {}; ///< Dedicated physical layer configuration
} phy_rrc_dedicated_t; } phy_rrc_dedicated_t;
typedef std::vector<phy_rrc_dedicated_t> phy_rrc_dedicated_list_t; typedef std::vector<phy_rrc_dedicated_t> phy_rrc_dedicated_list_t;

@ -75,7 +75,7 @@ srslte_pucch_format_t srslte_pucch_proc_select_format(const srslte_cell_t*
else if (total_ack == 2) { else if (total_ack == 2) {
format = SRSLTE_PUCCH_FORMAT_2B; format = SRSLTE_PUCCH_FORMAT_2B;
} }
// CQI + 2-bit ACK + cyclic prefix // CQI + 1-bit ACK + extended cyclic prefix
else if (total_ack == 1 && SRSLTE_CP_ISEXT(cell->cp)) { else if (total_ack == 1 && SRSLTE_CP_ISEXT(cell->cp)) {
format = SRSLTE_PUCCH_FORMAT_2B; format = SRSLTE_PUCCH_FORMAT_2B;
} }

@ -54,6 +54,7 @@ public:
int add_rnti(uint16_t rnti, uint32_t pcell_index, bool is_temporal) final; int add_rnti(uint16_t rnti, uint32_t pcell_index, bool is_temporal) final;
void rem_rnti(uint16_t rnti) final; void rem_rnti(uint16_t rnti) final;
void set_mch_period_stop(uint32_t stop) final; void set_mch_period_stop(uint32_t stop) final;
void set_activation_deactivation_scell(uint16_t rnti, bool activation[SRSLTE_MAX_CARRIERS]);
/*RRC-PHY interface*/ /*RRC-PHY interface*/
void configure_mbsfn(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, asn1::rrc::mcch_msg_s mcch); void configure_mbsfn(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, asn1::rrc::mcch_msg_s mcch);

@ -141,9 +141,9 @@ public:
{ {
public: public:
pending_ack_t pending_ack[TTIMOD_SZ] = {}; pending_ack_t pending_ack[TTIMOD_SZ] = {};
uint8_t ri = 0; uint8_t ri = 0;
uint32_t pcell_idx = 0; uint32_t pcell_idx = 0;
srslte_ra_tb_t last_tb[SRSLTE_MAX_HARQ_PROC] = {}; srslte_ra_tb_t last_tb[SRSLTE_MAX_HARQ_PROC] = {};
std::map<uint32_t, uint32_t> scell_map; std::map<uint32_t, uint32_t> scell_map;
}; };
@ -163,7 +163,7 @@ public:
* *
* @param rnti identifier of the UE * @param rnti identifier of the UE
*/ */
void ue_db_rem_rnti(uint16_t rnti); void ue_db_rem_rnti(uint16_t rnti);
/** /**
* Removes all the pending ACKs of all the RNTIs for a given TTI * Removes all the pending ACKs of all the RNTIs for a given TTI

@ -67,20 +67,29 @@ public:
{ {
return mac.rach_detected(tti, primary_cc_idx, preamble_idx, time_adv); return mac.rach_detected(tti, primary_cc_idx, preamble_idx, time_adv);
} }
int ri_info(uint32_t tti, uint16_t rnti, uint32_t ri_value) final { return mac.ri_info(tti, rnti, ri_value); } int ri_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t ri_value) final
int pmi_info(uint32_t tti, uint16_t rnti, uint32_t pmi_value) final { return mac.pmi_info(tti, rnti, pmi_value); } {
return mac.ri_info(tti, rnti, cc_idx, ri_value);
}
int pmi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t pmi_value) final
{
return mac.pmi_info(tti, rnti, cc_idx, pmi_value);
}
int cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_value) final int cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_value) final
{ {
return mac.cqi_info(tti, rnti, cc_idx, cqi_value); return mac.cqi_info(tti, rnti, cc_idx, cqi_value);
} }
int snr_info(uint32_t tti, uint16_t rnti, float snr_db) final { return mac.snr_info(tti, rnti, snr_db); } int snr_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, float snr_db) final
{
return mac.snr_info(tti, rnti, cc_idx, snr_db);
}
int ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx, bool ack) final int ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx, bool ack) final
{ {
return mac.ack_info(tti, rnti, cc_idx, tb_idx, ack); return mac.ack_info(tti, rnti, cc_idx, tb_idx, ack);
} }
int crc_info(uint32_t tti, uint16_t rnti, uint32_t nof_bytes, bool crc_res) final int crc_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t nof_bytes, bool crc_res) final
{ {
return mac.crc_info(tti, rnti, nof_bytes, crc_res); return mac.crc_info(tti, rnti, cc_idx, nof_bytes, crc_res);
} }
int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) final { return mac.get_dl_sched(tti, dl_sched_res); } int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) final { return mac.get_dl_sched(tti, dl_sched_res); }
int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) final int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) final

@ -56,23 +56,23 @@ public:
int sr_detected(uint32_t tti, uint16_t rnti) final; int sr_detected(uint32_t tti, uint16_t rnti) final;
int rach_detected(uint32_t tti, uint32_t primary_cc_idx, uint32_t preamble_idx, uint32_t time_adv) final; int rach_detected(uint32_t tti, uint32_t primary_cc_idx, uint32_t preamble_idx, uint32_t time_adv) final;
int ri_info(uint32_t tti, uint16_t rnti, uint32_t ri_value); int ri_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t ri_value) override;
int pmi_info(uint32_t tti, uint16_t rnti, uint32_t pmi_value); int pmi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t pmi_value) override;
int cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_value) override; int cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_value) override;
int snr_info(uint32_t tti, uint16_t rnti, float snr); int snr_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, float snr) override;
int ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx, bool ack) override; int ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx, bool ack) override;
int crc_info(uint32_t tti, uint16_t rnti, uint32_t nof_bytes, bool crc_res); int crc_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t nof_bytes, bool crc_res) override;
int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res); int get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res) override;
int get_ul_sched(uint32_t tti, ul_sched_list_t& ul_sched_res); int get_ul_sched(uint32_t tti, ul_sched_list_t& ul_sched_res) override;
int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res); int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res) override;
void set_sched_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs) final void set_sched_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs) override
{ {
scheduler.set_dl_tti_mask(tti_mask, nof_sfs); scheduler.set_dl_tti_mask(tti_mask, nof_sfs);
} }
void build_mch_sched(uint32_t tbs); void build_mch_sched(uint32_t tbs);
void rl_failure(uint16_t rnti); void rl_failure(uint16_t rnti) override;
void rl_ok(uint16_t rnti); void rl_ok(uint16_t rnti) override;
/******** Interface from RRC (RRC -> MAC) ****************/ /******** Interface from RRC (RRC -> MAC) ****************/
/* Provides cell configuration including SIB periodicity, etc. */ /* Provides cell configuration including SIB periodicity, etc. */

@ -251,12 +251,12 @@ void cc_worker::set_config_dedicated(uint16_t rnti, const srslte::phy_cfg_t& ded
std::lock_guard<std::mutex> lock(mutex); std::lock_guard<std::mutex> lock(mutex);
if (ue_db.count(rnti)) { if (ue_db.count(rnti)) {
ue_db[rnti]->ul_cfg = dedicated.ul_cfg; ue_db[rnti]->ul_cfg = dedicated.ul_cfg;
ue_db[rnti]->ul_cfg.pucch.threshold_format1 = SRSLTE_PUCCH_DEFAULT_THRESHOLD_FORMAT1; ue_db[rnti]->ul_cfg.pucch.threshold_format1 = SRSLTE_PUCCH_DEFAULT_THRESHOLD_FORMAT1;
ue_db[rnti]->ul_cfg.pucch.rnti = rnti; ue_db[rnti]->ul_cfg.pucch.rnti = rnti;
ue_db[rnti]->ul_cfg.pusch.rnti = rnti; ue_db[rnti]->ul_cfg.pusch.rnti = rnti;
ue_db[rnti]->dl_cfg = dedicated.dl_cfg; ue_db[rnti]->dl_cfg = dedicated.dl_cfg;
ue_db[rnti]->dl_cfg.pdsch.rnti = rnti; ue_db[rnti]->dl_cfg.pdsch.rnti = rnti;
} else { } else {
Error("Setting config dedicated: rnti=0x%x does not exist\n", rnti); Error("Setting config dedicated: rnti=0x%x does not exist\n", rnti);
} }
@ -397,7 +397,7 @@ void cc_worker::send_uci_data(uint16_t rnti, srslte_uci_cfg_t* uci_cfg, srslte_u
phy->stack->cqi_info(tti_rx, rnti, 0, cqi_value); phy->stack->cqi_info(tti_rx, rnti, 0, cqi_value);
} }
if (uci_cfg->cqi.ri_len) { if (uci_cfg->cqi.ri_len) {
phy->stack->ri_info(tti_rx, rnti, uci_value->ri); phy->stack->ri_info(tti_rx, 0, rnti, uci_value->ri);
phy->ue_db_set_ri(rnti, uci_value->ri); phy->ue_db_set_ri(rnti, uci_value->ri);
} }
if (uci_cfg->cqi.pmi_present) { if (uci_cfg->cqi.pmi_present) {
@ -413,7 +413,7 @@ void cc_worker::send_uci_data(uint16_t rnti, srslte_uci_cfg_t* uci_cfg, srslte_u
Error("CQI type=%d not implemented for PMI\n", uci_cfg->cqi.type); Error("CQI type=%d not implemented for PMI\n", uci_cfg->cqi.type);
break; break;
} }
phy->stack->pmi_info(tti_rx, rnti, pmi_value); phy->stack->pmi_info(tti_rx, rnti, 0, pmi_value);
} }
} }
} }
@ -466,7 +466,7 @@ int cc_worker::decode_pusch(stack_interface_phy_lte::ul_sched_grant_t* grants, u
// Notify MAC of RL status // Notify MAC of RL status
if (snr_db >= PUSCH_RL_SNR_DB_TH) { if (snr_db >= PUSCH_RL_SNR_DB_TH) {
phy->stack->snr_info(ul_sf.tti, rnti, snr_db); phy->stack->snr_info(ul_sf.tti, rnti, cc_idx, snr_db);
if (grants[i].dci.tb.rv == 0) { if (grants[i].dci.tb.rv == 0) {
if (!pusch_res.crc) { if (!pusch_res.crc) {
@ -483,7 +483,7 @@ int cc_worker::decode_pusch(stack_interface_phy_lte::ul_sched_grant_t* grants, u
// Notify MAC new received data and HARQ Indication value // Notify MAC new received data and HARQ Indication value
if (pusch_res.data) { if (pusch_res.data) {
phy->stack->crc_info(tti_rx, rnti, grant->tb.tbs / 8, pusch_res.crc); phy->stack->crc_info(tti_rx, rnti, cc_idx, grant->tb.tbs / 8, pusch_res.crc);
// Save metrics stats // Save metrics stats
ue_db[rnti]->metrics_ul(grants[i].dci.tb.mcs_idx, 0, snr_db, pusch_res.avg_iterations_block); ue_db[rnti]->metrics_ul(grants[i].dci.tb.mcs_idx, 0, snr_db, pusch_res.avg_iterations_block);

@ -222,6 +222,11 @@ void phy::set_mch_period_stop(uint32_t stop)
workers_common.set_mch_period_stop(stop); workers_common.set_mch_period_stop(stop);
} }
void phy::set_activation_deactivation_scell(uint16_t rnti, bool activation[SRSLTE_MAX_CARRIERS])
{
Info("Set activation/deactivation not implemented\n");
}
void phy::get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]) void phy::get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS])
{ {
phy_metrics_t metrics_tmp[ENB_METRICS_MAX_USERS] = {}; phy_metrics_t metrics_tmp[ENB_METRICS_MAX_USERS] = {};
@ -259,11 +264,9 @@ void phy::set_config_dedicated(uint16_t rnti, const phy_rrc_dedicated_list_t& de
// Create list, empty by default // Create list, empty by default
std::vector<uint32_t> scell_idx_list; std::vector<uint32_t> scell_idx_list;
for (uint32_t i = 0; i < dedicated_list.size(); i++) { for (const auto& config : dedicated_list) {
auto& config = dedicated_list[i];
// Configure only if active, ignore otherwise // Configure only if active, ignore otherwise
if (config.active) { if (config.configured) {
// Set PCell/SCell index in list // Set PCell/SCell index in list
scell_idx_list.push_back(config.cc_idx); scell_idx_list.push_back(config.cc_idx);

@ -306,7 +306,6 @@ void mac::rl_ok(uint16_t rnti)
int mac::ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx, bool ack) int mac::ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx, bool ack)
{ {
// TODO: add cc_idx to interface
pthread_rwlock_rdlock(&rwlock); pthread_rwlock_rdlock(&rwlock);
log_h->step(tti); log_h->step(tti);
uint32_t nof_bytes = scheduler.dl_ack_info(tti, rnti, cc_idx, tb_idx, ack); uint32_t nof_bytes = scheduler.dl_ack_info(tti, rnti, cc_idx, tb_idx, ack);
@ -322,10 +321,8 @@ int mac::ack_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t tb_idx,
return 0; return 0;
} }
int mac::crc_info(uint32_t tti, uint16_t rnti, uint32_t nof_bytes, bool crc) int mac::crc_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t nof_bytes, bool crc)
{ {
// TODO: add cc_idx to interface
uint32_t cc_idx = 0;
log_h->step(tti); log_h->step(tti);
int ret = -1; int ret = -1;
pthread_rwlock_rdlock(&rwlock); pthread_rwlock_rdlock(&rwlock);
@ -351,10 +348,8 @@ int mac::crc_info(uint32_t tti, uint16_t rnti, uint32_t nof_bytes, bool crc)
return ret; return ret;
} }
int mac::ri_info(uint32_t tti, uint16_t rnti, uint32_t ri_value) int mac::ri_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t ri_value)
{ {
// TODO: add cc_idx to interface
uint32_t cc_idx = 0;
log_h->step(tti); log_h->step(tti);
int ret = -1; int ret = -1;
pthread_rwlock_rdlock(&rwlock); pthread_rwlock_rdlock(&rwlock);
@ -369,10 +364,8 @@ int mac::ri_info(uint32_t tti, uint16_t rnti, uint32_t ri_value)
return ret; return ret;
} }
int mac::pmi_info(uint32_t tti, uint16_t rnti, uint32_t pmi_value) int mac::pmi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t pmi_value)
{ {
// TODO: add cc_idx to interface
uint32_t cc_idx = 0;
log_h->step(tti); log_h->step(tti);
pthread_rwlock_rdlock(&rwlock); pthread_rwlock_rdlock(&rwlock);
int ret = -1; int ret = -1;
@ -404,10 +397,8 @@ int mac::cqi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t cqi_val
return ret; return ret;
} }
int mac::snr_info(uint32_t tti, uint16_t rnti, float snr) int mac::snr_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, float snr)
{ {
// TODO: add cc_idx to interface
uint32_t cc_idx = 0;
log_h->step(tti); log_h->step(tti);
int ret = -1; int ret = -1;
pthread_rwlock_rdlock(&rwlock); pthread_rwlock_rdlock(&rwlock);

@ -2154,15 +2154,15 @@ void rrc::ue::apply_setup_phy_config(const asn1::rrc::phys_cfg_ded_s& phys_cfg_d
} }
// Set PCell index // Set PCell index
phy_rrc_dedicated_list[0].active = true; phy_rrc_dedicated_list[0].configured = true;
phy_rrc_dedicated_list[0].cc_idx = current_sched_ue_cfg.supported_cc_list[0].enb_cc_idx; phy_rrc_dedicated_list[0].cc_idx = current_sched_ue_cfg.supported_cc_list[0].enb_cc_idx;
// Load PCell dedicated configuration // Load PCell dedicated configuration
srslte::set_phy_cfg_t_dedicated_cfg(&phy_rrc_dedicated_list[0].phy_cfg, phys_cfg_ded); srslte::set_phy_cfg_t_dedicated_cfg(&phy_rrc_dedicated_list[0].phy_cfg, phys_cfg_ded);
// Deactivates eNb/Cells for this UE // Deactivates eNb/Cells for this UE
for (uint32_t cc = 1; cc < phy_rrc_dedicated_list.size(); cc++) { for (uint32_t cc = 1; cc < phy_rrc_dedicated_list.size(); cc++) {
phy_rrc_dedicated_list[cc].active = false; phy_rrc_dedicated_list[cc].configured = false;
} }
// Send configuration to physical layer // Send configuration to physical layer
@ -2211,8 +2211,8 @@ void rrc::ue::apply_reconf_phy_config(const asn1::rrc::rrc_conn_recfg_r8_ies_s&
auto& phy_rrc_dedicated = phy_rrc_dedicated_list[scell_idx]; auto& phy_rrc_dedicated = phy_rrc_dedicated_list[scell_idx];
// Set eNb Cell/Carrier index // Set eNb Cell/Carrier index
phy_rrc_dedicated.active = true; phy_rrc_dedicated.configured = true;
phy_rrc_dedicated.cc_idx = current_sched_ue_cfg.supported_cc_list[scell_idx].enb_cc_idx; phy_rrc_dedicated.cc_idx = current_sched_ue_cfg.supported_cc_list[scell_idx].enb_cc_idx;
// Set SCell configuration // Set SCell configuration
srslte::set_phy_cfg_t_scell_config(&phy_rrc_dedicated.phy_cfg, scell_config); srslte::set_phy_cfg_t_scell_config(&phy_rrc_dedicated.phy_cfg, scell_config);
@ -2233,7 +2233,7 @@ void rrc::ue::apply_reconf_phy_config(const asn1::rrc::rrc_conn_recfg_r8_ies_s&
parent->rrc_log->error("SCell index (%d) is reserved for PCell\n", scell_to_release); parent->rrc_log->error("SCell index (%d) is reserved for PCell\n", scell_to_release);
} else if (scell_to_release < current_sched_ue_cfg.supported_cc_list.size()) { } else if (scell_to_release < current_sched_ue_cfg.supported_cc_list.size()) {
// Deactivate cell configuration // Deactivate cell configuration
phy_rrc_dedicated_list[scell_to_release].active = false; phy_rrc_dedicated_list[scell_to_release].configured = false;
} else { } else {
// Out of bounds, log error // Out of bounds, log error
parent->rrc_log->error("SCell index (%d) points out of the supported list (%ld)\n", parent->rrc_log->error("SCell index (%d) points out of the supported list (%ld)\n",

@ -330,12 +330,12 @@ public:
notify_rach_detected(); notify_rach_detected();
return 0; return 0;
} }
int ri_info(uint32_t tti, uint16_t rnti, uint32_t ri_value) override int ri_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t ri_value) override
{ {
notify_ri_info(); notify_ri_info();
return 0; return 0;
} }
int pmi_info(uint32_t tti, uint16_t rnti, uint32_t pmi_value) override int pmi_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t pmi_value) override
{ {
notify_pmi_info(); notify_pmi_info();
return 0; return 0;
@ -345,7 +345,7 @@ public:
notify_cqi_info(); notify_cqi_info();
return 0; return 0;
} }
int snr_info(uint32_t tti, uint16_t rnti, float snr_db) override int snr_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, float snr_db) override
{ {
notify_snr_info(); notify_snr_info();
return 0; return 0;
@ -363,7 +363,7 @@ public:
notify_ack_info(); notify_ack_info();
return 0; return 0;
} }
int crc_info(uint32_t tti, uint16_t rnti, uint32_t nof_bytes, bool crc_res) override int crc_info(uint32_t tti, uint16_t rnti, uint32_t cc_idx, uint32_t nof_bytes, bool crc_res) override
{ {
notify_crc_info(); notify_crc_info();
return 0; return 0;
@ -769,7 +769,7 @@ public:
for (uint32_t i = 0; i < 4; i++) { for (uint32_t i = 0; i < 4; i++) {
common_dedicated.dl_cfg.cqi_report.pmi_idx = 16 + i; common_dedicated.dl_cfg.cqi_report.pmi_idx = 16 + i;
dedicated_list[i].cc_idx = (i + pcell_idx) % phy_cfg.phy_cell_cfg.size(); dedicated_list[i].cc_idx = (i + pcell_idx) % phy_cfg.phy_cell_cfg.size();
dedicated_list[i].active = true; dedicated_list[i].configured = true;
dedicated_list[i].phy_cfg = common_dedicated; dedicated_list[i].phy_cfg = common_dedicated;
// Disable SCell stuff // Disable SCell stuff

Loading…
Cancel
Save