Added TM2 (Tx diversity) support for eNB

master
Xavier Arteaga 7 years ago
parent e8da7160f0
commit 95897ceb71

@ -219,15 +219,19 @@ void srslte_enb_dl_clear_sf(srslte_enb_dl_t *q)
void srslte_enb_dl_put_sync(srslte_enb_dl_t *q, uint32_t sf_idx) void srslte_enb_dl_put_sync(srslte_enb_dl_t *q, uint32_t sf_idx)
{ {
if (sf_idx == 0 || sf_idx == 5) { if (sf_idx == 0 || sf_idx == 5) {
srslte_pss_put_slot(q->pss_signal, q->sf_symbols[0], q->cell.nof_prb, q->cell.cp); for (int p = 0; p < q->cell.nof_ports; p++) {
srslte_sss_put_slot(sf_idx ? q->sss_signal5 : q->sss_signal0, q->sf_symbols[0], srslte_pss_put_slot(q->pss_signal, q->sf_symbols[p], q->cell.nof_prb, q->cell.cp);
q->cell.nof_prb, SRSLTE_CP_NORM); srslte_sss_put_slot(sf_idx ? q->sss_signal5 : q->sss_signal0, q->sf_symbols[p],
q->cell.nof_prb, SRSLTE_CP_NORM);
}
} }
} }
void srslte_enb_dl_put_refs(srslte_enb_dl_t *q, uint32_t sf_idx) void srslte_enb_dl_put_refs(srslte_enb_dl_t *q, uint32_t sf_idx)
{ {
srslte_refsignal_cs_put_sf(q->cell, 0, q->csr_signal.pilots[0][sf_idx], q->sf_symbols[0]); for (int p = 0; p < q->cell.nof_ports; p++) {
srslte_refsignal_cs_put_sf(q->cell, (uint32_t) p, q->csr_signal.pilots[p / 2][sf_idx], q->sf_symbols[p]);
}
} }
void srslte_enb_dl_put_mib(srslte_enb_dl_t *q, uint32_t tti) void srslte_enb_dl_put_mib(srslte_enb_dl_t *q, uint32_t tti)

@ -90,12 +90,12 @@ void phch_worker::init(phch_common* phy_, srslte::log *log_h_)
// Init cell here // Init cell here
for(int p = 0; p < SRSLTE_MAX_PORTS; p++) { for(int p = 0; p < SRSLTE_MAX_PORTS; p++) {
signal_buffer_rx[p] = (cf_t *) srslte_vec_malloc(2 * SRSLTE_SF_LEN_PRB(phy->cell.nof_prb) * sizeof(cf_t)); signal_buffer_rx[p] = (cf_t *) srslte_vec_malloc(2 * SRSLTE_SF_LEN_PRB(phy->cell.nof_prb) * sizeof(cf_t));
if (!signal_buffer_rx) { if (!signal_buffer_rx[p]) {
fprintf(stderr, "Error allocating memory\n"); fprintf(stderr, "Error allocating memory\n");
return; return;
} }
signal_buffer_tx[p] = (cf_t *) srslte_vec_malloc(2 * SRSLTE_SF_LEN_PRB(phy->cell.nof_prb) * sizeof(cf_t)); signal_buffer_tx[p] = (cf_t *) srslte_vec_malloc(2 * SRSLTE_SF_LEN_PRB(phy->cell.nof_prb) * sizeof(cf_t));
if (!signal_buffer_tx) { if (!signal_buffer_tx[p]) {
fprintf(stderr, "Error allocating memory\n"); fprintf(stderr, "Error allocating memory\n");
return; return;
} }
@ -155,11 +155,13 @@ void phch_worker::stop()
srslte_enb_dl_free(&enb_dl); srslte_enb_dl_free(&enb_dl);
srslte_enb_ul_free(&enb_ul); srslte_enb_ul_free(&enb_ul);
if (signal_buffer_rx) { for (int p = 0; p < SRSLTE_MAX_PORTS; p++) {
free(signal_buffer_rx); if (signal_buffer_rx[p]) {
} free(signal_buffer_rx[p]);
if (signal_buffer_tx) { }
free(signal_buffer_tx); if (signal_buffer_tx[p]) {
free(signal_buffer_tx[p]);
}
} }
pthread_mutex_unlock(&mutex); pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&mutex); pthread_mutex_destroy(&mutex);

@ -1114,6 +1114,9 @@ void rrc::ue::send_connection_setup(bool is_setup)
phy_cfg->sched_request_cnfg_present = true; phy_cfg->sched_request_cnfg_present = true;
phy_cfg->sched_request_cnfg.setup_present = true; phy_cfg->sched_request_cnfg.setup_present = true;
phy_cfg->sched_request_cnfg.dsr_trans_max = parent->cfg.sr_cfg.dsr_max; phy_cfg->sched_request_cnfg.dsr_trans_max = parent->cfg.sr_cfg.dsr_max;
memcpy(&phy_cfg->antenna_info_explicit_value, &parent->cfg.antenna_info, sizeof(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT));
phy_cfg->antenna_info_present = true;
phy_cfg->antenna_info_default_value = false;
if (is_setup) { if (is_setup) {
if (sr_allocate(parent->cfg.sr_cfg.period, &phy_cfg->sched_request_cnfg.sr_cnfg_idx, &phy_cfg->sched_request_cnfg.sr_pucch_resource_idx)) { if (sr_allocate(parent->cfg.sr_cfg.period, &phy_cfg->sched_request_cnfg.sr_cnfg_idx, &phy_cfg->sched_request_cnfg.sr_pucch_resource_idx)) {

Loading…
Cancel
Save