mirror of https://github.com/PentHertz/srsLTE.git
minor RA changes
This commit is contained in:
parent
238818f1d3
commit
cf7be556ef
|
@ -94,10 +94,9 @@ typedef struct {
|
||||||
srslte_dci_location_t location;
|
srslte_dci_location_t location;
|
||||||
uint32_t rv_idx;
|
uint32_t rv_idx;
|
||||||
uint32_t current_tx_nb;
|
uint32_t current_tx_nb;
|
||||||
bool needs_pdcch;
|
|
||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
srslte_softbuffer_rx_t *softbuffer;
|
srslte_softbuffer_rx_t *softbuffer;
|
||||||
|
bool needs_pdcch;
|
||||||
} srslte_enb_ul_pusch_t;
|
} srslte_enb_ul_pusch_t;
|
||||||
|
|
||||||
/* This function shall be called just after the initial synchronization */
|
/* This function shall be called just after the initial synchronization */
|
||||||
|
|
|
@ -206,6 +206,10 @@ SRSLTE_API void srslte_ra_dl_grant_to_nbits(srslte_ra_dl_grant_t *grant,
|
||||||
uint32_t sf_idx,
|
uint32_t sf_idx,
|
||||||
srslte_ra_nbits_t *nbits);
|
srslte_ra_nbits_t *nbits);
|
||||||
|
|
||||||
|
SRSLTE_API uint32_t srslte_ra_dl_approx_nof_re(srslte_cell_t cell,
|
||||||
|
uint32_t nof_prb,
|
||||||
|
uint32_t nof_ctrl_symbols);
|
||||||
|
|
||||||
SRSLTE_API uint32_t srslte_ra_dl_grant_nof_re(srslte_ra_dl_grant_t *grant,
|
SRSLTE_API uint32_t srslte_ra_dl_grant_nof_re(srslte_ra_dl_grant_t *grant,
|
||||||
srslte_cell_t cell,
|
srslte_cell_t cell,
|
||||||
uint32_t sf_idx,
|
uint32_t sf_idx,
|
||||||
|
|
|
@ -198,6 +198,7 @@ static int ul_dci_to_grant_mcs(srslte_ra_ul_dci_t *dci, srslte_ra_ul_grant_t *gr
|
||||||
// 8.6.1 and 8.6.2 36.213 second paragraph
|
// 8.6.1 and 8.6.2 36.213 second paragraph
|
||||||
grant->mcs.mod = SRSLTE_MOD_QPSK;
|
grant->mcs.mod = SRSLTE_MOD_QPSK;
|
||||||
tbs = srslte_ra_tbs_from_idx(last_ul_tbs_idx[harq_pid%8], grant->L_prb);
|
tbs = srslte_ra_tbs_from_idx(last_ul_tbs_idx[harq_pid%8], grant->L_prb);
|
||||||
|
dci->rv_idx = 1;
|
||||||
} else if (dci->mcs_idx >= 29) {
|
} else if (dci->mcs_idx >= 29) {
|
||||||
// Else use last TBS/Modulation and use mcs to obtain rv_idx
|
// Else use last TBS/Modulation and use mcs to obtain rv_idx
|
||||||
tbs = srslte_ra_tbs_from_idx(last_ul_tbs_idx[harq_pid%8], grant->L_prb);
|
tbs = srslte_ra_tbs_from_idx(last_ul_tbs_idx[harq_pid%8], grant->L_prb);
|
||||||
|
@ -249,6 +250,24 @@ int srslte_ra_ul_dci_to_grant(srslte_ra_ul_dci_t *dci, uint32_t nof_prb, uint32_
|
||||||
return SRSLTE_SUCCESS;
|
return SRSLTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t srslte_ra_dl_approx_nof_re(srslte_cell_t cell, uint32_t nof_prb, uint32_t nof_ctrl_symbols)
|
||||||
|
{
|
||||||
|
uint32_t nof_refs = 0;
|
||||||
|
uint32_t nof_symb = 2*SRSLTE_CP_NSYMB(cell.cp)-nof_ctrl_symbols;
|
||||||
|
switch(cell.nof_ports) {
|
||||||
|
case 1:
|
||||||
|
nof_refs = 2*3;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
nof_refs = 4*3;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
nof_refs = 4*4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return nof_prb * (nof_symb*SRSLTE_NRE-nof_refs);
|
||||||
|
}
|
||||||
|
|
||||||
/* Computes the number of RE for each PRB in the prb_dist structure */
|
/* Computes the number of RE for each PRB in the prb_dist structure */
|
||||||
uint32_t srslte_ra_dl_grant_nof_re(srslte_ra_dl_grant_t *grant, srslte_cell_t cell,
|
uint32_t srslte_ra_dl_grant_nof_re(srslte_ra_dl_grant_t *grant, srslte_cell_t cell,
|
||||||
uint32_t sf_idx, uint32_t nof_ctrl_symbols)
|
uint32_t sf_idx, uint32_t nof_ctrl_symbols)
|
||||||
|
|
Loading…
Reference in New Issue