Commit f7b90f30 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

T2 encoder - fix n_cb calculation

parent c48f42b4
......@@ -1100,6 +1100,7 @@ int32_t LDPCencoder(unsigned char **input, unsigned char **output, encoder_imple
// hardcoded to use the first found board
struct active_device *ad = active_devs;
int ret;
uint32_t Nref = 0;
t_nrLDPCoffload_params offloadParams = {.E = impp->E,
.n_cb = (impp->BG == 1) ? (66 * impp->Zc) : (50 * impp->Zc),
.BG = impp->BG,
......@@ -1112,6 +1113,10 @@ int32_t LDPCencoder(unsigned char **input, unsigned char **output, encoder_imple
for (int r = 0; r < impp->n_segments; r++) {
offloadParams.E_cb[r] = impp->E_cb[r];
}
if (impp->Tbslbrm != 0){
Nref = 3*impp->Tbslbrm/(2*impp->n_segments);
offloadParams.n_cb = min(offloadParams.n_cb, Nref);
}
struct rte_bbdev_info info;
rte_bbdev_info_get(ad->dev_id, &info);
int socket_id = GET_SOCKET(info.socket_id);
......
......@@ -61,6 +61,7 @@ typedef struct {
uint8_t Qm;
uint32_t E;
uint32_t E_cb[NR_LDPC_MAX_NUM_CB];
uint32_t Tbslbrm;
uint8_t status_cb[NR_LDPC_MAX_NUM_CB];
unsigned int G;
// Redundancy version index
......
......@@ -365,6 +365,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
impp.harq = harq;
if (gNB->ldpc_offload_flag) {
impp.Qm = rel15->qamModOrder[0];
impp.Tbslbrm = rel15->maintenance_parms_v3.tbSizeLbrmBytes;
impp.rv = rel15->rvIndex[0];
int nb_re_dmrs =
(rel15->dmrsConfigType == NFAPI_NR_DMRS_TYPE1) ? (6 * rel15->numDmrsCdmGrpsNoData) : (4 * rel15->numDmrsCdmGrpsNoData);
......
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