Skip to content

gNB: SIMD Precoding Bug in nr_layer_precoder_simd for PMI = 4

While running the OAI gNB with 2 antennas and a UE with 1 antenna using two USRP N321s (develop branch tags/2025.w17 ), I encountered incorrect behavior during the downlink shared channel (DLSCH) precoding operation. The issue lies in the SIMD-based function nr_layer_precoder_simd , which fails to compute the correct precoded symbols when using certain precoding weights—specifically when the PMI index is 4.

To isolate the issue, I replaced the SIMD-based matrix multiplication with a scalar (trivial) implementation using the nr_layer_precoder_cm function:

for (; sc < sc_offset + re_cnt_align4; sc += sizeof(simde__m128i) / sizeof(c16_t)) {
  c16_t y_triv[4];
  for (int i = 0; i < 4; i++)
    y_triv[i] = nr_layer_precoder_cm(n_layers, symSz, txdataF_res_mapped, ant, pmi_pdu, sc + i);
  memcpy(&txdataF_precoded[sc], y_triv, sizeof(y_triv));
}

With this scalar implementation, the modulation behaves correctly and the UE successfully decodes the PDSCH without errors. This confirms that the SIMD function is the root cause of the issue. This issue may not appear when running in the rfsimulator.