Fixed DL channel estimator for ports 3&4

master
Xavier Arteaga 7 years ago
parent aa479f9543
commit 5b84d9be4b

@ -390,11 +390,12 @@ static void interpolate_pilots(srslte_chest_dl_t *q, cf_t *pilot_estimates, cf_t
} }
} else { } else {
if (q->average_subframe) { if (q->average_subframe) {
fidx_offset = SRSLTE_MIN(srslte_refsignal_cs_fidx(q->cell, 0, port_id, 0), fidx_offset = q->cell.id % 3;
srslte_refsignal_cs_fidx(q->cell, 1, port_id, 0)); srslte_interp_linear_offset(&q->srslte_interp_lin_3,
srslte_interp_linear_offset(&q->srslte_interp_lin_3, &pilot_estimates[q->cell.nof_prb * l], pilot_estimates,
&ce[srslte_refsignal_cs_nsymbol(l, q->cell.cp, port_id) * q->cell.nof_prb ce,
* SRSLTE_NRE], fidx_offset, SRSLTE_NRE / 4 - fidx_offset); fidx_offset,
SRSLTE_NRE / 4 - fidx_offset);
} else { } else {
fidx_offset = srslte_refsignal_cs_fidx(q->cell, l, port_id, 0); fidx_offset = srslte_refsignal_cs_fidx(q->cell, l, port_id, 0);
srslte_interp_linear_offset(&q->srslte_interp_lin, &pilot_estimates[2 * q->cell.nof_prb * l], srslte_interp_linear_offset(&q->srslte_interp_lin, &pilot_estimates[2 * q->cell.nof_prb * l],
@ -407,7 +408,7 @@ static void interpolate_pilots(srslte_chest_dl_t *q, cf_t *pilot_estimates, cf_t
/* Now interpolate in the time domain between symbols */ /* Now interpolate in the time domain between symbols */
if (q->average_subframe) { if (q->average_subframe) {
// If we average per subframe, just copy the estimates in the time domain // If we average per subframe, just copy the estimates in the time domain
for (l=0;l<2*SRSLTE_CP_NSYMB(q->cell.cp);l++) { for (l=1;l<2*SRSLTE_CP_NSYMB(q->cell.cp);l++) {
memcpy(&ce[l*SRSLTE_NRE*q->cell.nof_prb], ce, sizeof(cf_t)*SRSLTE_NRE*q->cell.nof_prb); memcpy(&ce[l*SRSLTE_NRE*q->cell.nof_prb], ce, sizeof(cf_t)*SRSLTE_NRE*q->cell.nof_prb);
} }
} else { } else {

@ -56,17 +56,17 @@ uint32_t srslte_refsignal_cs_v(uint32_t port_id, uint32_t ref_symbol_idx)
} }
break; break;
case 2: case 2:
if (ref_symbol_idx < 2) { if (ref_symbol_idx == 0) {
v = 0; v = 0;
} else { } else {
v = 3; v = 3;
} }
break; break;
case 3: case 3:
if (ref_symbol_idx < 2) { if (ref_symbol_idx == 0) {
v = 3; v = 3;
} else { } else {
v = 6; v = 0;
} }
break; break;
} }
@ -414,7 +414,7 @@ int srslte_refsignal_cs_get_sf(srslte_cell_t cell, uint32_t port_id, cf_t *sf_sy
for (l=0;l<srslte_refsignal_cs_nof_symbols(port_id);l++) { for (l=0;l<srslte_refsignal_cs_nof_symbols(port_id);l++) {
uint32_t nsymbol = srslte_refsignal_cs_nsymbol(l, cell.cp, port_id); uint32_t nsymbol = srslte_refsignal_cs_nsymbol(l, cell.cp, port_id);
/* Compute offset frequency index */ /* Compute offset frequency index */
fidx = ((srslte_refsignal_cs_v(port_id, l) + (cell.id % 6)) % 6); fidx = srslte_refsignal_cs_fidx(cell, l, port_id, 0);
for (i = 0; i < 2*cell.nof_prb; i++) { for (i = 0; i < 2*cell.nof_prb; i++) {
pilots[SRSLTE_REFSIGNAL_PILOT_IDX(i,l,cell)] = sf_symbols[SRSLTE_RE_IDX(cell.nof_prb, nsymbol, fidx)]; pilots[SRSLTE_REFSIGNAL_PILOT_IDX(i,l,cell)] = sf_symbols[SRSLTE_RE_IDX(cell.nof_prb, nsymbol, fidx)];
fidx += SRSLTE_NRE/2; // 2 references per PRB fidx += SRSLTE_NRE/2; // 2 references per PRB

Loading…
Cancel
Save