removed enb multi functions

master
Ismael Gomez 8 years ago
parent 995af27452
commit 7cc0b7206b

@ -135,12 +135,6 @@ SRSLTE_API void srslte_enb_dl_put_phich(srslte_enb_dl_t *q,
uint32_t n_dmrs,
uint32_t sf_idx);
SRSLTE_API void srslte_enb_dl_put_phich_multi(srslte_enb_dl_t *q,
srslte_enb_ul_t *q_ul,
srslte_enb_dl_phich_t *acks,
uint32_t nof_acks,
uint32_t sf_idx);
SRSLTE_API void srslte_enb_dl_put_base(srslte_enb_dl_t *q,
uint32_t tti);
@ -175,14 +169,5 @@ SRSLTE_API int srslte_enb_dl_put_pdcch_ul(srslte_enb_dl_t *q,
uint32_t rnti_idx,
uint32_t sf_idx);
SRSLTE_API int srslte_enb_dl_put_grant_pdsch(srslte_enb_dl_t *q,
srslte_enb_dl_pdsch_t *grants,
uint32_t nof_grants,
uint32_t sf_idx);
SRSLTE_API int srslte_enb_dl_put_grant_pusch(srslte_enb_dl_t *q,
srslte_enb_ul_pusch_t *grants,
uint32_t nof_grants,
uint32_t sf_idx);
#endif

@ -73,7 +73,6 @@ typedef struct SRSLTE_API {
srslte_prach_t prach;
srslte_pusch_cfg_t pusch_cfg;
srslte_enb_ul_phich_info_t *phich_info;
} srslte_enb_ul_t;
@ -107,10 +106,6 @@ SRSLTE_API int srslte_enb_ul_rem_rnti(srslte_enb_ul_t *q,
SRSLTE_API void srslte_enb_ul_fft(srslte_enb_ul_t *q,
cf_t *signal_buffer);
SRSLTE_API void srslte_enb_ul_get_phich_info(srslte_enb_ul_t *q,
uint32_t rnti_idx,
srslte_enb_ul_phich_info_t *phich_info);
SRSLTE_API int srslte_enb_ul_get_pusch(srslte_enb_ul_t *q,
srslte_ra_ul_grant_t *grant,
srslte_softbuffer_rx_t *softbuffer,
@ -121,13 +116,6 @@ SRSLTE_API int srslte_enb_ul_get_pusch(srslte_enb_ul_t *q,
srslte_uci_data_t *uci_data,
uint32_t sf_idx);
SRSLTE_API int srslte_enb_ul_get_pusch_multi(srslte_enb_ul_t *q,
srslte_enb_ul_pusch_t *grants,
bool *pusch_crc_res,
srslte_uci_data_t *uci_data,
uint32_t nof_pusch,
uint32_t sf_idx);
SRSLTE_API int srslte_enb_ul_detect_prach(srslte_enb_ul_t *q,
uint32_t tti,
uint32_t freq_offset,

@ -194,16 +194,6 @@ void srslte_enb_dl_put_phich(srslte_enb_dl_t *q, uint8_t ack, uint32_t n_prb_low
srslte_phich_encode(&q->phich, ack, ngroup, nseq, sf_idx, q->sf_symbols);
}
void srslte_enb_dl_put_phich_multi(srslte_enb_dl_t *q, srslte_enb_ul_t *q_ul,
srslte_enb_dl_phich_t *acks, uint32_t nof_acks, uint32_t sf_idx)
{
for (int i=0;i<nof_acks;i++) {
srslte_enb_ul_phich_info_t info;
srslte_enb_ul_get_phich_info(q_ul, acks[i].rnti_idx, &info);
srslte_enb_dl_put_phich(q, acks[i].ack, info.n_prb_lowest, info.n_dmrs, sf_idx);
}
}
void srslte_enb_dl_put_base(srslte_enb_dl_t *q, uint32_t tti)
{
uint32_t sf_idx = tti%10;
@ -294,52 +284,3 @@ int srslte_enb_dl_put_pdsch(srslte_enb_dl_t *q, srslte_ra_dl_grant_t *grant, srs
}
return SRSLTE_SUCCESS;
}
int srslte_enb_dl_put_grant_pusch(srslte_enb_dl_t *q, srslte_enb_ul_pusch_t *grants, uint32_t nof_grants, uint32_t sf_idx)
{
for (int i=0;i<nof_grants;i++) {
if (srslte_enb_dl_put_pdcch_ul(q, &grants[i].grant, grants[i].location, grants[i].rnti_idx, sf_idx)) {
fprintf(stderr, "Error putting PUSCH %d\n",i);
return SRSLTE_ERROR;
}
}
return SRSLTE_SUCCESS;
}
int srslte_enb_dl_put_grant_pdsch(srslte_enb_dl_t *q, srslte_enb_dl_pdsch_t *grants,
uint32_t nof_grants, uint32_t sf_idx)
{
for (int i=0;i<nof_grants;i++) {
srslte_dci_format_t format = SRSLTE_DCI_FORMAT1;
switch(grants[i].grant.dci_format) {
case SRSLTE_RA_DCI_FORMAT1:
format = SRSLTE_DCI_FORMAT1;
break;
case SRSLTE_RA_DCI_FORMAT1A:
format = SRSLTE_DCI_FORMAT1A;
break;
case SRSLTE_RA_DCI_FORMAT1C:
format = SRSLTE_DCI_FORMAT1C;
break;
}
if (srslte_enb_dl_put_pdcch_dl(q, &grants[i].grant, format, grants[i].location, grants[i].rnti_idx, sf_idx)) {
fprintf(stderr, "Error putting PDCCH %d\n",i);
return SRSLTE_ERROR;
}
uint16_t rnti = srslte_pdsch_get_rnti_multi(&q->pdsch, grants[i].rnti_idx);
bool rnti_is_user = true;
if (rnti == SRSLTE_SIRNTI || rnti == SRSLTE_PRNTI || rnti == SRSLTE_MRNTI) {
rnti_is_user = false;
}
srslte_ra_dl_grant_t phy_grant;
srslte_ra_dl_dci_to_grant(&grants[i].grant, q->cell.nof_prb, rnti_is_user, &phy_grant);
if (srslte_enb_dl_put_pdsch(q, &phy_grant, grants[i].softbuffer, grants[i].rnti_idx, grants[i].grant.rv_idx, sf_idx,
grants[i].data))
{
fprintf(stderr, "Error putting PDSCH %d\n",i);
return SRSLTE_ERROR;
}
}
return SRSLTE_SUCCESS;
}

@ -104,12 +104,6 @@ int srslte_enb_ul_init(srslte_enb_ul_t *q, srslte_cell_t cell,
goto clean_exit;
}
q->phich_info = malloc(nof_rnti*sizeof(srslte_enb_ul_phich_info_t));
if (!q->phich_info) {
perror("malloc");
goto clean_exit;
}
ret = SRSLTE_SUCCESS;
} else {
@ -138,9 +132,6 @@ void srslte_enb_ul_free(srslte_enb_ul_t *q)
if (q->ce) {
free(q->ce);
}
if (q->phich_info) {
free(q->phich_info);
}
bzero(q, sizeof(srslte_enb_ul_t));
}
}
@ -183,40 +174,6 @@ int srslte_enb_ul_get_pusch(srslte_enb_ul_t *q, srslte_ra_ul_grant_t *grant, srs
uci_data);
}
int srslte_enb_ul_get_pusch_multi(srslte_enb_ul_t *q, srslte_enb_ul_pusch_t *grants,
bool *pusch_crc_res, srslte_uci_data_t *uci_data,
uint32_t nof_pusch, uint32_t tti)
{
uint32_t n_rb_ho = 0;
for (int i=0;i<nof_pusch;i++) {
srslte_ra_ul_grant_t phy_grant;
srslte_ra_ul_dci_to_grant(&grants[i].grant, q->cell.nof_prb, n_rb_ho, &phy_grant, tti%8);
pusch_crc_res[i] = (srslte_enb_ul_get_pusch(q, &phy_grant, grants[i].softbuffer,
grants[i].rnti_idx, grants[i].rv_idx,
grants[i].current_tx_nb,
grants[i].data,
&uci_data[i],
tti%10) == 0);
srslte_vec_fprint_byte(stdout, grants[i].data, 20);
printf("crc=%d, noise=%.2f\n", pusch_crc_res[i], 10*log10(srslte_chest_ul_get_noise_estimate(&q->chest)));
q->phich_info[grants[i].rnti_idx].n_prb_lowest = q->pusch_cfg.grant.n_prb_tilde[0];
q->phich_info[grants[i].rnti_idx].n_dmrs = phy_grant.ncs_dmrs;
}
return SRSLTE_SUCCESS;
}
void srslte_enb_ul_get_phich_info(srslte_enb_ul_t *q,
uint32_t rnti_idx,
srslte_enb_ul_phich_info_t *phich_info)
{
if (rnti_idx < q->nof_rnti) {
phich_info->n_dmrs = q->phich_info[rnti_idx].n_dmrs;
phich_info->n_prb_lowest = q->phich_info[rnti_idx].n_prb_lowest;
}
}
int srslte_enb_ul_detect_prach(srslte_enb_ul_t *q, uint32_t tti,
uint32_t freq_offset, cf_t *signal,

@ -664,4 +664,9 @@ int srslte_pusch_uci_decode_rnti_idx(srslte_pusch_t *q,
}
}
uint32_t srslte_pusch_last_noi(srslte_pusch_t *q) {
return q->ul_sch.nof_iterations;
}

Loading…
Cancel
Save