Added TM3 (1 layer only) eNB support at RRC

master
Xavier Arteaga 7 years ago
parent 95897ceb71
commit 21355de77e

@ -93,6 +93,7 @@ public:
class phy_interface_rrc class phy_interface_rrc
{ {
public: public:
virtual void set_conf_dedicated_ack(uint16_t rnti, bool rrc_completed) = 0;
virtual void set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated) = 0; virtual void set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated) = 0;
}; };

@ -57,12 +57,14 @@ public:
int read_pusch_d(cf_t *pusch_d); int read_pusch_d(cf_t *pusch_d);
void start_plot(); void start_plot();
void set_conf_dedicated_ack(uint16_t rnti,
bool rrc_completed);
void set_config_dedicated(uint16_t rnti, void set_config_dedicated(uint16_t rnti,
srslte_uci_cfg_t *uci_cfg, srslte_uci_cfg_t *uci_cfg,
srslte_pucch_sched_t *pucch_sched, srslte_pucch_sched_t *pucch_sched,
srslte_refsignal_srs_cfg_t *srs_cfg, srslte_refsignal_srs_cfg_t *srs_cfg,
uint32_t I_sr, bool pucch_cqi, uint32_t pmi_idx, bool pucch_cqi_ack); LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated);
uint32_t get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]); uint32_t get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]);
@ -99,13 +101,16 @@ private:
// Class to store user information // Class to store user information
class ue { class ue {
public: public:
ue() : I_sr(0), I_sr_en(false), cqi_en(false), pucch_cqi_ack(false), pmi_idx(0), has_grant_tti(0) {bzero(&metrics, sizeof(phy_metrics_t));} ue() : I_sr(0), I_sr_en(false), cqi_en(false), pucch_cqi_ack(false), pmi_idx(0), has_grant_tti(0),
dedicated_ack(false) {bzero(&metrics, sizeof(phy_metrics_t));}
uint32_t I_sr; uint32_t I_sr;
uint32_t pmi_idx; uint32_t pmi_idx;
bool I_sr_en; bool I_sr_en;
bool cqi_en; bool cqi_en;
bool pucch_cqi_ack; bool pucch_cqi_ack;
int has_grant_tti; int has_grant_tti;
LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT dedicated;
bool dedicated_ack;
uint32_t rnti; uint32_t rnti;
srslte_enb_ul_phich_info_t phich_info; srslte_enb_ul_phich_info_t phich_info;
void metrics_read(phy_metrics_t *metrics); void metrics_read(phy_metrics_t *metrics);

@ -66,6 +66,7 @@ public:
static uint32_t tti_to_subf(uint32_t tti); static uint32_t tti_to_subf(uint32_t tti);
void start_plot(); void start_plot();
void set_conf_dedicated_ack(uint16_t rnti, bool dedicated_ack);
void set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated); void set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated);
void get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]); void get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]);

@ -210,12 +210,27 @@ uint32_t phch_worker::get_nof_rnti() {
return ue_db.size(); return ue_db.size();
} }
void phch_worker::set_conf_dedicated_ack(uint16_t rnti, bool ack){
pthread_mutex_lock(&mutex);
if (ue_db.count(rnti)) {
ue_db[rnti].dedicated_ack = ack;
} else {
Error("Setting dedicated ack: rnti=0x%x does not exist\n");
}
pthread_mutex_unlock(&mutex);
}
void phch_worker::set_config_dedicated(uint16_t rnti, void phch_worker::set_config_dedicated(uint16_t rnti,
srslte_uci_cfg_t *uci_cfg, srslte_uci_cfg_t *uci_cfg,
srslte_pucch_sched_t *pucch_sched, srslte_pucch_sched_t *pucch_sched,
srslte_refsignal_srs_cfg_t *srs_cfg, srslte_refsignal_srs_cfg_t *srs_cfg,
uint32_t I_sr, bool pucch_cqi, uint32_t pmi_idx, bool pucch_cqi_ack) LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated)
{ {
uint32_t I_sr = dedicated->sched_request_cnfg.sr_cnfg_idx;
bool pucch_cqi = dedicated->cqi_report_cnfg.report_periodic_setup_present;
uint32_t pmi_idx = dedicated->cqi_report_cnfg.report_periodic.pmi_cnfg_idx;
bool pucch_cqi_ack = dedicated->cqi_report_cnfg.report_periodic.simult_ack_nack_and_cqi;
pthread_mutex_lock(&mutex); pthread_mutex_lock(&mutex);
if (ue_db.count(rnti)) { if (ue_db.count(rnti)) {
pucch_sched->N_pucch_1 = phy->pucch_cfg.n1_pucch_an; pucch_sched->N_pucch_1 = phy->pucch_cfg.n1_pucch_an;
@ -233,6 +248,8 @@ void phch_worker::set_config_dedicated(uint16_t rnti,
ue_db[rnti].cqi_en = false; ue_db[rnti].cqi_en = false;
} }
/* Copy all dedicated RRC configuration to UE */
memcpy(&ue_db[rnti].dedicated, dedicated, sizeof(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT));
} else { } else {
Error("Setting config dedicated: rnti=0x%x does not exist\n"); Error("Setting config dedicated: rnti=0x%x does not exist\n");
} }
@ -624,14 +641,25 @@ int phch_worker::encode_pdcch_ul(srslte_enb_ul_pusch_t *grants, uint32_t nof_gra
int phch_worker::encode_pdcch_dl(srslte_enb_dl_pdsch_t *grants, uint32_t nof_grants, uint32_t sf_idx) int phch_worker::encode_pdcch_dl(srslte_enb_dl_pdsch_t *grants, uint32_t nof_grants, uint32_t sf_idx)
{ {
/* For each grant... */
for (uint32_t i=0;i<nof_grants;i++) { for (uint32_t i=0;i<nof_grants;i++) {
uint16_t rnti = grants[i].rnti; uint16_t rnti = grants[i].rnti;
if (rnti) { if (rnti) {
bool dedicated_acknowledged = ue_db[grants[i].rnti].dedicated_ack;
bool antenna_info_present = ue_db[grants[i].rnti].dedicated.antenna_info_present;
LIBLTE_RRC_TRANSMISSION_MODE_ENUM tx_mode = ue_db[grants[i].rnti].dedicated.antenna_info_explicit_value.tx_mode;
srslte_dci_format_t format = SRSLTE_DCI_FORMAT1; srslte_dci_format_t format = SRSLTE_DCI_FORMAT1;
switch(grants[i].grant.alloc_type) { switch(grants[i].grant.alloc_type) {
case SRSLTE_RA_ALLOC_TYPE0: case SRSLTE_RA_ALLOC_TYPE0:
case SRSLTE_RA_ALLOC_TYPE1: case SRSLTE_RA_ALLOC_TYPE1:
if (dedicated_acknowledged && antenna_info_present && tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_3) {
format = SRSLTE_DCI_FORMAT2A;
} else if (dedicated_acknowledged && antenna_info_present && tx_mode == LIBLTE_RRC_TRANSMISSION_MODE_4) {
format = SRSLTE_DCI_FORMAT2;
} else {
format = SRSLTE_DCI_FORMAT1; format = SRSLTE_DCI_FORMAT1;
}
break; break;
case SRSLTE_RA_ALLOC_TYPE2: case SRSLTE_RA_ALLOC_TYPE2:
format = SRSLTE_DCI_FORMAT1A; format = SRSLTE_DCI_FORMAT1A;

@ -207,6 +207,13 @@ void phy::get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS])
/***** RRC->PHY interface **********/ /***** RRC->PHY interface **********/
void phy::set_conf_dedicated_ack(uint16_t rnti, bool ack)
{
for (uint32_t i = 0; i < nof_workers; i++) {
workers[i].set_conf_dedicated_ack(rnti, ack);
}
}
void phy::set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated) void phy::set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT* dedicated)
{ {
// Parse RRC config // Parse RRC config
@ -225,11 +232,7 @@ void phy::set_config_dedicated(uint16_t rnti, LIBLTE_RRC_PHYSICAL_CONFIG_DEDICAT
pucch_sched.n_pucch_sr = dedicated->sched_request_cnfg.sr_pucch_resource_idx; pucch_sched.n_pucch_sr = dedicated->sched_request_cnfg.sr_pucch_resource_idx;
for (uint32_t i=0;i<nof_workers;i++) { for (uint32_t i=0;i<nof_workers;i++) {
workers[i].set_config_dedicated(rnti, &uci_cfg, &pucch_sched, NULL, workers[i].set_config_dedicated(rnti, &uci_cfg, &pucch_sched, NULL, dedicated);
dedicated->sched_request_cnfg.sr_cnfg_idx,
dedicated->cqi_report_cnfg.report_periodic_setup_present,
dedicated->cqi_report_cnfg.report_periodic.pmi_cnfg_idx,
dedicated->cqi_report_cnfg.report_periodic.simult_ack_nack_and_cqi);
} }
} }

@ -862,6 +862,9 @@ void rrc::ue::handle_rrc_con_setup_complete(LIBLTE_RRC_CONNECTION_SETUP_COMPLETE
memcpy(pdu->msg, msg->dedicated_info_nas.msg, msg->dedicated_info_nas.N_bytes); memcpy(pdu->msg, msg->dedicated_info_nas.msg, msg->dedicated_info_nas.N_bytes);
pdu->N_bytes = msg->dedicated_info_nas.N_bytes; pdu->N_bytes = msg->dedicated_info_nas.N_bytes;
// Acknowledge Dedicated Configuration
parent->phy->set_conf_dedicated_ack(rnti, true);
if(has_tmsi) { if(has_tmsi) {
parent->s1ap->initial_ue(rnti, pdu, m_tmsi, mmec); parent->s1ap->initial_ue(rnti, pdu, m_tmsi, mmec);
} else { } else {
@ -1197,6 +1200,7 @@ void rrc::ue::send_connection_setup(bool is_setup)
// Configure PHY layer // Configure PHY layer
parent->phy->set_config_dedicated(rnti, phy_cfg); parent->phy->set_config_dedicated(rnti, phy_cfg);
parent->phy->set_conf_dedicated_ack(rnti, false);
parent->mac->phy_config_enabled(rnti, true); parent->mac->phy_config_enabled(rnti, true);
rr_cfg->drb_to_add_mod_list_size = 0; rr_cfg->drb_to_add_mod_list_size = 0;

@ -1438,7 +1438,9 @@ void rrc::apply_phy_config_dedicated(LIBLTE_RRC_PHYSICAL_CONFIG_DEDICATED_STRUCT
if (phy_cnfg->antenna_info_present) { if (phy_cnfg->antenna_info_present) {
if (!phy_cnfg->antenna_info_default_value) { if (!phy_cnfg->antenna_info_default_value) {
if (phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_1 && if (phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_1 &&
phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_2) { phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_2 &&
phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_3 &&
phy_cnfg->antenna_info_explicit_value.tx_mode != LIBLTE_RRC_TRANSMISSION_MODE_4) {
rrc_log->error("Transmission mode TM%s not currently supported by srsUE\n", rrc_log->error("Transmission mode TM%s not currently supported by srsUE\n",
liblte_rrc_transmission_mode_text[phy_cnfg->antenna_info_explicit_value.tx_mode]); liblte_rrc_transmission_mode_text[phy_cnfg->antenna_info_explicit_value.tx_mode]);
} }

Loading…
Cancel
Save