Commit 4cf94f9d authored by Robert Schmidt's avatar Robert Schmidt

add kbar parameter

parent a4d3a8d8
......@@ -36,6 +36,8 @@
#include "oaioran.h"
#include <rte_ethdev.h>
#include "oran-config.h" // for g_kbar
#define USE_POLLING 1
// Declare variable useful for the send buffer function
volatile uint8_t first_call_set = 0;
......@@ -171,13 +173,13 @@ int read_prach_data(ru_info_t *ru, int frame, int slot)
if (sym_idx==0) {
for (idx = 0; idx < 139*2; idx++)
{
dst[idx] = ((int16_t)ntohs(src[idx+4]));
dst[idx] = ((int16_t)ntohs(src[idx + g_kbar]));
}
}
else {
for (idx = 0; idx < 139*2; idx++)
{
dst[idx] += ((int16_t)ntohs(src[idx+4]));
dst[idx] += ((int16_t)ntohs(src[idx + g_kbar]));
}
}
} else if (ru_conf->compMeth_PRACH == XRAN_COMPMETHOD_BLKFLOAT) {
......@@ -202,9 +204,9 @@ int read_prach_data(ru_info_t *ru, int frame, int slot)
xranlib_decompress_avx512(&bfp_decom_req, &bfp_decom_rsp);
// note: this is hardwired for 139 point PRACH sequence, kbar=2
if (sym_idx == 0) //
for (idx = 0; idx < (139*2); idx++) dst[idx]=local_dst[idx+4];
for (idx = 0; idx < (139*2); idx++) dst[idx]=local_dst[idx + g_kbar];
else
for (idx = 0; idx < (139*2); idx++) dst[idx]+=(local_dst[idx+4]);
for (idx = 0; idx < (139*2); idx++) dst[idx]+=(local_dst[idx + g_kbar]);
} // COMPMETHOD_BLKFLOAT
} //aa
}// symb_indx
......
......@@ -637,6 +637,13 @@ static enum xran_cp_filterindex get_prach_filterindex_fr1(duplex_mode_t mode, in
return XRAN_FILTERINDEX_STANDARD;
}
// PRACH guard interval. Raymond: "[it] is not in the configuration, (i.e. it
// is deterministic depending on others). LiteON must hard-code this in the
// O-RU itself, benetel doesn't (as O-RAN specifies). So we will need to tell
// the driver what the case is and provide"
// this is a hack
int g_kbar;
static bool set_fh_prach_config(const openair0_config_t* oai0, const paramdef_t *prachp, int nprach, struct xran_prach_config *prach_config)
{
const split7_config_t *s7cfg = &oai0->split7;
......@@ -663,6 +670,8 @@ static bool set_fh_prach_config(const openair0_config_t* oai0, const paramdef_t
prach_config->eAxC_offset = *gpd(prachp, nprach, ORAN_PRACH_CONFIG_EAXC_OFFSET)->uptr;
DevAssert(prach_config->eAxC_offset == 4);
g_kbar = *gpd(prachp, nprach, ORAN_PRACH_CONFIG_KBAR)->uptr;
return true;
}
......
......@@ -34,4 +34,7 @@ bool set_fh_init(struct xran_fh_init *fh_init);
struct openair0_config;
bool set_fh_config(int ru_idx, const struct openair0_config *oai0_cfg, struct xran_fh_config *fh_config);
// hack to workaround LiteOn limitation
extern int g_kbar;
#endif /* ORAN_CONFIG_H */
......@@ -105,10 +105,12 @@
#define CONFIG_STRING_ORAN_PRACH "prach_config"
#define ORAN_PRACH_CONFIG_EAXC_OFFSET "eAxC_offset"
#define ORAN_PRACH_CONFIG_KBAR "kbar"
// clang-format off
#define ORAN_PRACH_DESC {\
{ORAN_PRACH_CONFIG_EAXC_OFFSET, "RU's eAxC offset for PRACH\n", PARAMFLAG_MANDATORY, .u8ptr=NULL, .defuintval=0, TYPE_UINT8, 0}, \
{ORAN_PRACH_CONFIG_KBAR, "PRACH guard interval\n", 0, .uptr=NULL, .defuintval=4, TYPE_UINT, 0}, \
}
// clang-format on
......
......@@ -297,6 +297,7 @@ fhi_72 = {
};
prach_config = {
eAxC_offset = 4;
kbar = 0;
};
});
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment