Added ue location calculation for a particular L

master
Ismael Gomez 7 years ago
parent 5c7ce5a799
commit e4696fec38

@ -167,7 +167,15 @@ SRSLTE_API uint32_t srslte_pdcch_ue_locations(srslte_pdcch_t *q,
SRSLTE_API uint32_t srslte_pdcch_ue_locations_ncce(uint32_t nof_cce, SRSLTE_API uint32_t srslte_pdcch_ue_locations_ncce(uint32_t nof_cce,
srslte_dci_location_t *c, srslte_dci_location_t *c,
uint32_t max_candidates, uint32_t max_candidates,
uint32_t nsubframe, uint16_t rnti); uint32_t nsubframe,
uint16_t rnti);
SRSLTE_API uint32_t srslte_pdcch_ue_locations_ncce_L(uint32_t nof_cce,
srslte_dci_location_t *c,
uint32_t max_candidates,
uint32_t nsubframe,
uint16_t rnti,
int L);
/* Function for generation of common search space DCI locations */ /* Function for generation of common search space DCI locations */
SRSLTE_API uint32_t srslte_pdcch_common_locations(srslte_pdcch_t *q, SRSLTE_API uint32_t srslte_pdcch_common_locations(srslte_pdcch_t *q,

@ -218,13 +218,20 @@ uint32_t srslte_pdcch_ue_locations(srslte_pdcch_t *q, srslte_dci_location_t *c,
return srslte_pdcch_ue_locations_ncce(q->nof_cce, c, max_candidates, nsubframe, rnti); return srslte_pdcch_ue_locations_ncce(q->nof_cce, c, max_candidates, nsubframe, rnti);
} }
uint32_t srslte_pdcch_ue_locations_ncce(uint32_t nof_cce, srslte_dci_location_t *c, uint32_t max_candidates,
uint32_t nsubframe, uint16_t rnti)
{
return srslte_pdcch_ue_locations_ncce_L(nof_cce, c, max_candidates, nsubframe, rnti, -1);
}
/** 36.213 v9.1.1 /** 36.213 v9.1.1
* Computes up to max_candidates UE-specific candidates for DCI messages and saves them * Computes up to max_candidates UE-specific candidates for DCI messages and saves them
* in the structure pointed by c. * in the structure pointed by c.
* Returns the number of candidates saved in the array c. * Returns the number of candidates saved in the array c.
*/ */
uint32_t srslte_pdcch_ue_locations_ncce(uint32_t nof_cce, srslte_dci_location_t *c, uint32_t max_candidates, uint32_t srslte_pdcch_ue_locations_ncce_L(uint32_t nof_cce, srslte_dci_location_t *c, uint32_t max_candidates,
uint32_t nsubframe, uint16_t rnti) { uint32_t nsubframe, uint16_t rnti, int Ls) {
int l; // this must be int because of the for(;;--) loop int l; // this must be int because of the for(;;--) loop
uint32_t i, k, L, m; uint32_t i, k, L, m;
@ -241,20 +248,22 @@ uint32_t srslte_pdcch_ue_locations_ncce(uint32_t nof_cce, srslte_dci_location_t
// All aggregation levels from 8 to 1 // All aggregation levels from 8 to 1
for (l = 3; l >= 0; l--) { for (l = 3; l >= 0; l--) {
L = (1 << l); L = (1 << l);
// For all candidates as given in table 9.1.1-1 if (Ls<0 || Ls==L) {
for (i = 0; i < nof_candidates[l]; i++) { // For all candidates as given in table 9.1.1-1
if (nof_cce >= L) { for (i = 0; i < nof_candidates[l]; i++) {
ncce = L * ((Yk + i) % (nof_cce / L)); if (nof_cce >= L) {
// Check if candidate fits in c vector and in CCE region ncce = L * ((Yk + i) % (nof_cce / L));
if (k < max_candidates && ncce + L <= nof_cce) // Check if candidate fits in c vector and in CCE region
{ if (k < max_candidates && ncce + L <= nof_cce)
c[k].L = l; {
c[k].ncce = ncce; c[k].L = l;
c[k].ncce = ncce;
DEBUG("UE-specific SS Candidate %d: nCCE: %d, L: %d\n",
k, c[k].ncce, c[k].L); DEBUG("UE-specific SS Candidate %d: nCCE: %d, L: %d\n",
k, c[k].ncce, c[k].L);
k++;
k++;
}
} }
} }
} }

Loading…
Cancel
Save