Merge remote-tracking branch 'origin/oran_prach_start_symbol' into integration_2026_w02 (!3677)

Support prach with start symbol of PRACH not at symbol 0

The following PRACH indice have been tested.

    index / format (nf mod x = y) / Subframe/ start_symbol /no_of_slot / occ / duration
    152     B4     2 1                4,9          0               2      1    12
    151     B4     2 1                4,9          2               1      1    12
    157     B4     1 0                 4           0               1      1    12
    159     B4     1 0                 9           0               1      1    12
This commit is contained in:
Robert Schmidt
2026-01-08 13:03:39 +01:00
+6 -3
View File
@@ -173,6 +173,9 @@ static int read_prach_data(ru_info_t *ru, int frame, int slot)
struct xran_fh_init *fh_init = get_xran_fh_init(); struct xran_fh_init *fh_init = get_xran_fh_init();
struct xran_fh_config *fh_cfg = get_xran_fh_config(0); struct xran_fh_config *fh_cfg = get_xran_fh_config(0);
nr_prach_info_t prach_info = get_prach_info(0); nr_prach_info_t prach_info = get_prach_info(0);
int prach_start_sym = prach_info.start_symbol;
int prach_end_sym = prach_info.N_dur + prach_start_sym;
struct xran_ru_config *ru_conf = &fh_cfg->ru_conf; struct xran_ru_config *ru_conf = &fh_cfg->ru_conf;
int slots_per_frame = 10 << fh_cfg->frame_conf.nNumerology; int slots_per_frame = 10 << fh_cfg->frame_conf.nNumerology;
int slots_per_subframe = 1 << fh_cfg->frame_conf.nNumerology; int slots_per_subframe = 1 << fh_cfg->frame_conf.nNumerology;
@@ -190,7 +193,7 @@ static int read_prach_data(ru_info_t *ru, int frame, int slot)
LOG_W(HW, "we get rach data from ru, but it is not scheduled %d.%d\n", frame, slot); LOG_W(HW, "we get rach data from ru, but it is not scheduled %d.%d\n", frame, slot);
return -1; return -1;
} }
for (sym_idx = 0; sym_idx < prach_info.N_dur; sym_idx++) { for (sym_idx = prach_start_sym; sym_idx < prach_end_sym; sym_idx++) {
for (int aa = 0; aa < ru->nb_rx; aa++) { for (int aa = 0; aa < ru->nb_rx; aa++) {
int16_t *dst, *src; int16_t *dst, *src;
int idx = 0; int idx = 0;
@@ -200,7 +203,7 @@ static int read_prach_data(ru_info_t *ru, int frame, int slot)
src = (int16_t *)bufs->prachdstdecomp[aa % nb_rx_per_ru][tti % XRAN_N_FE_BUF_LEN].pBuffers[sym_idx].pData; src = (int16_t *)bufs->prachdstdecomp[aa % nb_rx_per_ru][tti % XRAN_N_FE_BUF_LEN].pBuffers[sym_idx].pData;
/* convert Network order to host order */ /* convert Network order to host order */
if (ru_conf->compMeth_PRACH == XRAN_COMPMETHOD_NONE) { if (ru_conf->compMeth_PRACH == XRAN_COMPMETHOD_NONE) {
if (sym_idx == 0) { if (sym_idx == prach_start_sym) {
for (idx = 0; idx < 139 * 2; idx++) { for (idx = 0; idx < 139 * 2; idx++) {
dst[idx] = ((int16_t)ntohs(src[idx + g_kbar])); dst[idx] = ((int16_t)ntohs(src[idx + g_kbar]));
} }
@@ -233,7 +236,7 @@ static int read_prach_data(ru_info_t *ru, int frame, int slot)
AssertFatal(1 == 0, "BFP decompression not supported on this architecture"); AssertFatal(1 == 0, "BFP decompression not supported on this architecture");
#endif #endif
// note: this is hardwired for 139 point PRACH sequence, kbar=2 // note: this is hardwired for 139 point PRACH sequence, kbar=2
if (sym_idx == 0) // if (sym_idx == prach_start_sym)
for (idx = 0; idx < (139 * 2); idx++) for (idx = 0; idx < (139 * 2); idx++)
dst[idx] = local_dst[idx + g_kbar]; dst[idx] = local_dst[idx + g_kbar];
else else