|
|
@ -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,24 +248,26 @@ 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++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DEBUG("Initiated %d candidate(s) in the UE-specific search space for C-RNTI: 0x%x, nsubframe=%d, nof_cce=%d\n",
|
|
|
|
DEBUG("Initiated %d candidate(s) in the UE-specific search space for C-RNTI: 0x%x, nsubframe=%d, nof_cce=%d\n",
|
|
|
|
k, rnti, nsubframe, nof_cce);
|
|
|
|
k, rnti, nsubframe, nof_cce);
|
|
|
|