Commit 366715f2 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/t2-offload-mr3' into integration_2024_w04

parents 679a0084 b166286a
...@@ -62,7 +62,7 @@ sudo python3 ~/dpdk-stable/usertools/dpdk-devbind.py --bind=vfio-pci 41:00.0 ...@@ -62,7 +62,7 @@ sudo python3 ~/dpdk-stable/usertools/dpdk-devbind.py --bind=vfio-pci 41:00.0
Replace PCI address of the card *41:00.0* by address detected by *lspci | grep "Xilinx"* command Replace PCI address of the card *41:00.0* by address detected by *lspci | grep "Xilinx"* command
- hugepages setup (10 x 1GB hugepages) - hugepages setup (10 x 1GB hugepages)
``` ```
sudo python3 ~/dpdk-stable/usertools/dpdk-hugepages.py -p 1G --setup 10G` sudo python3 ~/dpdk-stable/usertools/dpdk-hugepages.py -p 1G --setup 10G
``` ```
*Note: device binding and hugepages setup has to be done after every reboot of *Note: device binding and hugepages setup has to be done after every reboot of
...@@ -144,7 +144,6 @@ sudo ./nr-softmodem --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa ...@@ -144,7 +144,6 @@ sudo ./nr-softmodem --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa
# Limitations # Limitations
## AMD Xilinx T2 card ## AMD Xilinx T2 card
- offload of the LDPC encoding implemented for MCS > 2, OAI CPU encoder is used for MCS =< 2
- functionality of the LDPC encoding and decoding offload verified in OTA SISO setup with USRP N310 and Quectel RM500Q, blocking of the card reported for MIMO setup (2 layers) - functionality of the LDPC encoding and decoding offload verified in OTA SISO setup with USRP N310 and Quectel RM500Q, blocking of the card reported for MIMO setup (2 layers)
*Note: AMD Xilinx T1 Telco card is not supported anymore.* *Note: AMD Xilinx T1 Telco card is not supported anymore.*
...@@ -568,14 +568,14 @@ static void set_ldpc_enc_op(struct rte_bbdev_enc_op **ops, ...@@ -568,14 +568,14 @@ static void set_ldpc_enc_op(struct rte_bbdev_enc_op **ops,
{ {
// struct rte_bbdev_op_ldpc_enc *ldpc_enc = &ref_op->ldpc_enc; // struct rte_bbdev_op_ldpc_enc *ldpc_enc = &ref_op->ldpc_enc;
for (int i = 0; i < n; ++i) { for (int i = 0; i < n; ++i) {
ops[i]->ldpc_enc.cb_params.e = 3 * p_offloadParams->E; // Fix mee: what is the correct size for "e" ??? ops[i]->ldpc_enc.cb_params.e = p_offloadParams->E;
ops[i]->ldpc_enc.basegraph = p_offloadParams->BG; ops[i]->ldpc_enc.basegraph = p_offloadParams->BG;
ops[i]->ldpc_enc.z_c = p_offloadParams->Z; ops[i]->ldpc_enc.z_c = p_offloadParams->Z;
ops[i]->ldpc_enc.q_m = p_offloadParams->Qm; ops[i]->ldpc_enc.q_m = p_offloadParams->Qm;
ops[i]->ldpc_enc.n_filler = p_offloadParams->F; ops[i]->ldpc_enc.n_filler = p_offloadParams->F;
ops[i]->ldpc_enc.n_cb = p_offloadParams->n_cb; ops[i]->ldpc_enc.n_cb = p_offloadParams->n_cb;
ops[i]->ldpc_enc.rv_index = p_offloadParams->rv; ops[i]->ldpc_enc.rv_index = p_offloadParams->rv;
ops[i]->ldpc_enc.op_flags = RTE_BBDEV_LDPC_INTERLEAVER_BYPASS; // RTE_BBDEV_LDPC_RATE_MATCH; ops[i]->ldpc_enc.op_flags = RTE_BBDEV_LDPC_RATE_MATCH;
ops[i]->ldpc_enc.code_block_mode = 1; ops[i]->ldpc_enc.code_block_mode = 1;
ops[i]->ldpc_enc.output = outputs[start_idx + i]; ops[i]->ldpc_enc.output = outputs[start_idx + i];
ops[i]->ldpc_enc.input = inputs[start_idx + i]; ops[i]->ldpc_enc.input = inputs[start_idx + i];
...@@ -613,7 +613,7 @@ static int retrieve_ldpc_enc_op(struct rte_bbdev_enc_op **ops, const uint16_t n, ...@@ -613,7 +613,7 @@ static int retrieve_ldpc_enc_op(struct rte_bbdev_enc_op **ops, const uint16_t n,
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
output = &ops[i]->ldpc_enc.output; output = &ops[i]->ldpc_enc.output;
m = output->data; m = output->data;
uint16_t data_len = min((384 * 68) / 8, rte_pktmbuf_data_len(m)); // fix me uint16_t data_len = min((LDPC_MAX_CB_SIZE) / 8, rte_pktmbuf_data_len(m)); // fix me
data = m->buf_addr; data = m->buf_addr;
for (int byte = 0; byte < data_len; byte++) for (int byte = 0; byte < data_len; byte++)
for (int bit = 0; bit < 8; bit++) for (int bit = 0; bit < 8; bit++)
...@@ -1103,10 +1103,10 @@ int32_t LDPCencoder(unsigned char **input, unsigned char **output, encoder_imple ...@@ -1103,10 +1103,10 @@ int32_t LDPCencoder(unsigned char **input, unsigned char **output, encoder_imple
.n_cb = (BG == 1) ? (66 * Zc) : (50 * Zc), .n_cb = (BG == 1) ? (66 * Zc) : (50 * Zc),
.BG = BG, .BG = BG,
.Z = Zc, .Z = Zc,
.rv = 0, //impp->rv, .rv = impp->rv,
.F = 0, //impp->F, .F = impp->F,
.Qm = impp->Qm, .Qm = impp->Qm,
.Kr = impp->Kr}; .Kr = (impp->K - impp->F + 7) / 8};
struct rte_bbdev_info info; struct rte_bbdev_info info;
rte_bbdev_info_get(ad->dev_id, &info); rte_bbdev_info_get(ad->dev_id, &info);
int socket_id = GET_SOCKET(info.socket_id); int socket_id = GET_SOCKET(info.socket_id);
...@@ -1126,7 +1126,7 @@ int32_t LDPCencoder(unsigned char **input, unsigned char **output, encoder_imple ...@@ -1126,7 +1126,7 @@ int32_t LDPCencoder(unsigned char **input, unsigned char **output, encoder_imple
for (enum op_data_type type = DATA_INPUT; type < 3; type += 2) { for (enum op_data_type type = DATA_INPUT; type < 3; type += 2) {
int ret = init_op_data_objs(*queue_ops[type], int ret = init_op_data_objs(*queue_ops[type],
*input, *input,
(offloadParams.Kr + 7) / 8, offloadParams.Kr,
m_head[type], m_head[type],
mbuf_pools[type], mbuf_pools[type],
1, 1,
......
...@@ -363,7 +363,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, ...@@ -363,7 +363,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
impp.tparity = tparity; impp.tparity = tparity;
impp.toutput = toutput; impp.toutput = toutput;
impp.harq = harq; impp.harq = harq;
if (gNB->ldpc_offload_flag && *rel15->mcsIndex > 2) { if (gNB->ldpc_offload_flag) {
impp.Qm = rel15->qamModOrder[0]; impp.Qm = rel15->qamModOrder[0];
impp.rv = rel15->rvIndex[0]; impp.rv = rel15->rvIndex[0];
int nb_re_dmrs = int nb_re_dmrs =
...@@ -375,26 +375,11 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, ...@@ -375,26 +375,11 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
harq->unav_res, harq->unav_res,
rel15->qamModOrder[0], rel15->qamModOrder[0],
rel15->nrOfLayers); rel15->nrOfLayers);
uint8_t tmp[68 * 384] __attribute__((aligned(32)));
uint8_t *d = tmp;
int r_offset = 0; int r_offset = 0;
for (int r = 0; r < impp.n_segments; r++) { for (int r = 0; r < impp.n_segments; r++) {
impp.E = nr_get_E(impp.G, impp.n_segments, impp.Qm, rel15->nrOfLayers, r); impp.E = nr_get_E(impp.G, impp.n_segments, impp.Qm, rel15->nrOfLayers, r);
impp.Kr = impp.K; uint8_t *f = impp.output + r_offset;
ldpc_interface_offload.LDPCencoder(&harq->c[r], &d, &impp); ldpc_interface_offload.LDPCencoder(&harq->c[r], &f, &impp);
uint8_t e[impp.E];
bzero(e, impp.E);
nr_rate_matching_ldpc(rel15->maintenance_parms_v3.tbSizeLbrmBytes,
impp.BG,
impp.Zc,
tmp,
e,
impp.n_segments,
impp.F,
impp.K - impp.F - 2 * impp.Zc,
impp.rv,
impp.E);
nr_interleaving_ldpc(impp.E, impp.Qm, e, impp.output + r_offset);
r_offset += impp.E; r_offset += impp.E;
} }
} else { } else {
......
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