mirror of https://github.com/PentHertz/srsLTE.git
Fixed blind search
This commit is contained in:
parent
9b01555626
commit
d80146e657
|
@ -187,7 +187,7 @@ uint32_t srslte_pdcch_ue_locations_ncce(uint32_t nof_cce, srslte_dci_location_t
|
|||
int l; // this must be int because of the for(;;--) loop
|
||||
uint32_t i, k, L, m;
|
||||
uint32_t Yk, ncce;
|
||||
const int S[4] = { 6, 12, 8, 16 };
|
||||
const int M[4] = { 6, 6, 2, 2 };
|
||||
|
||||
// Compute Yk for this subframe
|
||||
Yk = rnti;
|
||||
|
@ -200,7 +200,7 @@ uint32_t srslte_pdcch_ue_locations_ncce(uint32_t nof_cce, srslte_dci_location_t
|
|||
for (l = 3; l >= 0; l--) {
|
||||
L = (1 << l);
|
||||
// For all possible ncce offset
|
||||
for (i = 0; i < SRSLTE_MIN(nof_cce / L, S[l]/PDCCH_FORMAT_NOF_CCE(l)); i++) {
|
||||
for (i = 0; i < M[l]; i++) {
|
||||
ncce = L * ((Yk + i) % (nof_cce / L));
|
||||
if (k < max_candidates &&
|
||||
ncce + PDCCH_FORMAT_NOF_CCE(l) <= nof_cce)
|
||||
|
@ -239,14 +239,18 @@ uint32_t srslte_pdcch_common_locations(srslte_pdcch_t *q, srslte_dci_location_t
|
|||
uint32_t srslte_pdcch_common_locations_ncce(uint32_t nof_cce, srslte_dci_location_t *c, uint32_t max_candidates)
|
||||
{
|
||||
uint32_t i, l, L, k;
|
||||
|
||||
const int M[4] = { 0, 0, 4, 2 };
|
||||
|
||||
k = 0;
|
||||
for (l = 3; l > 1; l--) {
|
||||
L = (1 << l);
|
||||
for (i = 0; i < SRSLTE_MIN(nof_cce, 16) / (L); i++) {
|
||||
if (k < max_candidates) {
|
||||
for (i = 0; i < M[l]; i++) {
|
||||
uint32_t ncce = L * (i % (nof_cce / L));
|
||||
if (k < max_candidates &&
|
||||
ncce + PDCCH_FORMAT_NOF_CCE(l) <= nof_cce)
|
||||
{
|
||||
c[k].L = l;
|
||||
c[k].ncce = (L) * (i % (nof_cce / (L)));
|
||||
c[k].ncce = ncce;
|
||||
DEBUG("Common SS Candidate %d: nCCE: %d, L: %d\n",
|
||||
k, c[k].ncce, c[k].L);
|
||||
k++;
|
||||
|
|
Loading…
Reference in New Issue