adding offload multiple segments
This commit is contained in:
committed by
Hongzhi Wang
parent
52450c449f
commit
c739337e66
File diff suppressed because it is too large
Load Diff
@@ -74,6 +74,20 @@ typedef struct nrLDPC_dec_params {
|
|||||||
e_nrLDPC_outMode outMode; /**< Output format */
|
e_nrLDPC_outMode outMode; /**< Output format */
|
||||||
} t_nrLDPC_dec_params;
|
} t_nrLDPC_dec_params;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Structure containing LDPC decoder parameters.
|
||||||
|
*/
|
||||||
|
typedef struct nrLDPCoffload_params {
|
||||||
|
uint8_t BG; /**< Base graph */
|
||||||
|
uint16_t Z;
|
||||||
|
uint16_t Kr;
|
||||||
|
uint8_t rv;
|
||||||
|
uint32_t E;
|
||||||
|
uint16_t n_cb;
|
||||||
|
uint16_t F; /**< Filler bits */
|
||||||
|
uint8_t Qm; /**< Modulation */
|
||||||
|
} t_nrLDPCoffload_params;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Structure containing LDPC decoder processing time statistics.
|
Structure containing LDPC decoder processing time statistics.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -576,7 +576,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
if (enable_ldpc_offload) {
|
if (enable_ldpc_offload) {
|
||||||
memset(harq_process->c[0],0,Kr_bytes);
|
|
||||||
|
|
||||||
if (harq_process->C == 1) {
|
if (harq_process->C == 1) {
|
||||||
if (A > 3824)
|
if (A > 3824)
|
||||||
@@ -594,7 +593,10 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
|
|
||||||
E = nr_get_E(G, harq_process->C, Qm, n_layers, 0);
|
E = nr_get_E(G, harq_process->C, Qm, n_layers, 0);
|
||||||
|
|
||||||
memcpy((&z_ol[0]),ulsch_llr,G*sizeof(int16_t));
|
for (r=0; r<harq_process->C; r++) {
|
||||||
|
memset(harq_process->c[r],0,Kr_bytes);
|
||||||
|
|
||||||
|
memcpy((&z_ol[0]),ulsch_llr+r*E,E*sizeof(int16_t));
|
||||||
|
|
||||||
for (i=0, j=0; j < ((kc*harq_process->Z)>>4)+1; i+=2, j++)
|
for (i=0, j=0; j < ((kc*harq_process->Z)>>4)+1; i+=2, j++)
|
||||||
{
|
{
|
||||||
@@ -602,7 +604,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = nrLDPC_decoder_offload(p_decParams,
|
ret = nrLDPC_decoder_offload(p_decParams,
|
||||||
harq_process->C,
|
1, //harq_process->C,
|
||||||
pusch_pdu->pusch_data.rv_index,
|
pusch_pdu->pusch_data.rv_index,
|
||||||
harq_process->F,
|
harq_process->F,
|
||||||
E,
|
E,
|
||||||
@@ -610,8 +612,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
(int8_t*)&pl_ol128[0],
|
(int8_t*)&pl_ol128[0],
|
||||||
llrProcBuf);
|
llrProcBuf);
|
||||||
|
|
||||||
for (r=0; r<harq_process->C; r++) {
|
|
||||||
|
|
||||||
for (int m=0; m < Kr>>3; m ++) {
|
for (int m=0; m < Kr>>3; m ++) {
|
||||||
harq_process->c[r][m]= (uint8_t) llrProcBuf[m];
|
harq_process->c[r][m]= (uint8_t) llrProcBuf[m];
|
||||||
}
|
}
|
||||||
@@ -627,12 +627,12 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
#endif
|
#endif
|
||||||
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
no_iteration_ldpc = ulsch->max_ldpc_iterations + 1;
|
||||||
}
|
}
|
||||||
/*for (int k=0;k<8;k++)
|
for (int k=0;k<8;k++)
|
||||||
{
|
{
|
||||||
printf("output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
|
printf("output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
|
||||||
printf("llrprocbuf [%d] = %x adr %p\n", k, llrProcBuf[k], llrProcBuf+k);
|
printf("llrprocbuf [%d] = %x adr %p\n", k, llrProcBuf[k], llrProcBuf+k);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
memcpy(harq_process->b+offset,
|
memcpy(harq_process->b+offset,
|
||||||
harq_process->c[r],
|
harq_process->c[r],
|
||||||
@@ -649,7 +649,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
for (r=0; r<harq_process->C; r++) {
|
for (r=0; r<harq_process->C; r++) {
|
||||||
|
|
||||||
E = nr_get_E(G, harq_process->C, Qm, n_layers, r);
|
E = nr_get_E(G, harq_process->C, Qm, n_layers, r);
|
||||||
printf("rm length %d seg %d\n", E,r);
|
|
||||||
union ldpcReqUnion id = {.s={ulsch->rnti,frame,nr_tti_rx,0,0}};
|
union ldpcReqUnion id = {.s={ulsch->rnti,frame,nr_tti_rx,0,0}};
|
||||||
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(ldpcDecode_t), id.p, phy_vars_gNB->respDecode, nr_processULSegment_ptr);
|
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(ldpcDecode_t), id.p, phy_vars_gNB->respDecode, nr_processULSegment_ptr);
|
||||||
ldpcDecode_t * rdata=(ldpcDecode_t *) NotifiedFifoData(req);
|
ldpcDecode_t * rdata=(ldpcDecode_t *) NotifiedFifoData(req);
|
||||||
|
|||||||
Reference in New Issue
Block a user