nr-ip-over-LTE: Temporary workaround for issue with ldpc number of iterations and reduction of logs
This commit is contained in:
@@ -524,6 +524,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
|
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
|
||||||
if (check_crc((uint8_t*)llrProcBuf,length_dec,harq_process->F,crc_type)) {
|
if (check_crc((uint8_t*)llrProcBuf,length_dec,harq_process->F,crc_type)) {
|
||||||
printf("\x1B[34m" "Segment %d CRC OK\n",r);
|
printf("\x1B[34m" "Segment %d CRC OK\n",r);
|
||||||
|
//Temporary hack
|
||||||
|
no_iteration_ldpc = dlsch->max_ldpc_iterations;
|
||||||
ret = no_iteration_ldpc;
|
ret = no_iteration_ldpc;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -572,7 +574,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
|
|
||||||
|
|
||||||
if ((err_flag == 0) && (ret>=(1+dlsch->max_ldpc_iterations))) {// a Code segment is in error so break;
|
if ((err_flag == 0) && (ret>=(1+dlsch->max_ldpc_iterations))) {// a Code segment is in error so break;
|
||||||
LOG_D(PHY,"AbsSubframe %d.%d CRC failed, segment %d/%d \n",frame%1024,nr_tti_rx,r,harq_process->C-1);
|
LOG_I(PHY,"AbsSubframe %d.%d CRC failed, segment %d/%d \n",frame%1024,nr_tti_rx,r,harq_process->C-1);
|
||||||
err_flag = 1;
|
err_flag = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -586,10 +588,10 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
frame_rx_prev = frame_rx_prev%1024;
|
frame_rx_prev = frame_rx_prev%1024;
|
||||||
|
|
||||||
if (err_flag == 1) {
|
if (err_flag == 1) {
|
||||||
#if UE_DEBUG_TRACE
|
//#if UE_DEBUG_TRACE
|
||||||
LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
|
LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
|
||||||
phy_vars_ue->Mod_id, frame, nr_tti_rx, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
|
phy_vars_ue->Mod_id, frame, nr_tti_rx, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
|
||||||
#endif
|
//#endif
|
||||||
harq_process->harq_ack.ack = 0;
|
harq_process->harq_ack.ack = 0;
|
||||||
harq_process->harq_ack.harq_id = harq_pid;
|
harq_process->harq_ack.harq_id = harq_pid;
|
||||||
harq_process->harq_ack.send_harq_status = 1;
|
harq_process->harq_ack.send_harq_status = 1;
|
||||||
@@ -610,10 +612,10 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
|
|
||||||
return((1 + dlsch->max_ldpc_iterations));
|
return((1 + dlsch->max_ldpc_iterations));
|
||||||
} else {
|
} else {
|
||||||
#if UE_DEBUG_TRACE
|
//#if UE_DEBUG_TRACE
|
||||||
LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for nr_tti_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d\n",
|
LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for nr_tti_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d\n",
|
||||||
phy_vars_ue->Mod_id,nr_tti_rx,harq_process->TBS,harq_process->mcs,harq_process->nb_rb, harq_process->round);
|
phy_vars_ue->Mod_id,nr_tti_rx,harq_process->TBS,harq_process->mcs,harq_process->nb_rb, harq_process->round);
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
harq_process->status = SCH_IDLE;
|
harq_process->status = SCH_IDLE;
|
||||||
harq_process->round = 0;
|
harq_process->round = 0;
|
||||||
@@ -663,10 +665,12 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
printf("%d : %d \n", i, harq_process->b[i]);
|
printf("%d : %d \n", i, harq_process->b[i]);
|
||||||
}*/
|
}*/
|
||||||
#endif
|
#endif
|
||||||
/*LOG_I (PHY, "Printing 100 first payload bytes:");
|
if (frame%100 == 0){
|
||||||
for (int i = 0; i <100 ; i++){ //Kr_bytes
|
LOG_I (PHY, "Printing 100 first payload bytes:");
|
||||||
|
for (int i = 0; i <10 ; i++){ //Kr_bytes
|
||||||
LOG_I(PHY, "[%d] : %x ", i, harq_process->b[i]);
|
LOG_I(PHY, "[%d] : %x ", i, harq_process->b[i]);
|
||||||
}*/
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ int configure_fapi_dl_Tx(nfapi_nr_dl_config_request_body_t *dl_req,
|
|||||||
pdu_rel15->pucch_resource_indicator = 7;
|
pdu_rel15->pucch_resource_indicator = 7;
|
||||||
pdu_rel15->pdsch_to_harq_feedback_timing_indicator = 7;
|
pdu_rel15->pdsch_to_harq_feedback_timing_indicator = 7;
|
||||||
|
|
||||||
LOG_I(MAC, "[gNB scheduler phytest] DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d ndi %d rv %d\n",
|
LOG_D(MAC, "[gNB scheduler phytest] DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d ndi %d rv %d\n",
|
||||||
pdu_rel15->frequency_domain_assignment,
|
pdu_rel15->frequency_domain_assignment,
|
||||||
pdu_rel15->time_domain_assignment,
|
pdu_rel15->time_domain_assignment,
|
||||||
pdu_rel15->vrb_to_prb_mapping,
|
pdu_rel15->vrb_to_prb_mapping,
|
||||||
@@ -247,7 +247,7 @@ int configure_fapi_dl_Tx(nfapi_nr_dl_config_request_body_t *dl_req,
|
|||||||
params_rel15->dci_format = NFAPI_NR_DL_DCI_FORMAT_1_0;
|
params_rel15->dci_format = NFAPI_NR_DL_DCI_FORMAT_1_0;
|
||||||
|
|
||||||
//params_rel15->aggregation_level = 1;
|
//params_rel15->aggregation_level = 1;
|
||||||
LOG_I(MAC, "DCI params: rnti %d, rnti_type %d, dci_format %d, config type %d\n \
|
LOG_D(MAC, "DCI params: rnti %d, rnti_type %d, dci_format %d, config type %d\n \
|
||||||
coreset params: mux_pattern %d, n_rb %d, n_symb %d, rb_offset %d \n \
|
coreset params: mux_pattern %d, n_rb %d, n_symb %d, rb_offset %d \n \
|
||||||
ss params : first symb %d, ss type %d\n",
|
ss params : first symb %d, ss type %d\n",
|
||||||
params_rel15->rnti,
|
params_rel15->rnti,
|
||||||
@@ -263,7 +263,7 @@ int configure_fapi_dl_Tx(nfapi_nr_dl_config_request_body_t *dl_req,
|
|||||||
nr_get_tbs(&dl_config_dlsch_pdu->dlsch_pdu, dl_config_dci_pdu->dci_dl_pdu, *cfg);
|
nr_get_tbs(&dl_config_dlsch_pdu->dlsch_pdu, dl_config_dci_pdu->dci_dl_pdu, *cfg);
|
||||||
// Hardcode it for now
|
// Hardcode it for now
|
||||||
TBS = dl_config_dlsch_pdu->dlsch_pdu.dlsch_pdu_rel15.transport_block_size;
|
TBS = dl_config_dlsch_pdu->dlsch_pdu.dlsch_pdu_rel15.transport_block_size;
|
||||||
LOG_I(MAC, "DLSCH PDU: start PRB %d n_PRB %d start symbol %d nb_symbols %d nb_layers %d nb_codewords %d mcs %d TBS: %d\n",
|
LOG_D(MAC, "DLSCH PDU: start PRB %d n_PRB %d start symbol %d nb_symbols %d nb_layers %d nb_codewords %d mcs %d TBS: %d\n",
|
||||||
dlsch_pdu_rel15->start_prb,
|
dlsch_pdu_rel15->start_prb,
|
||||||
dlsch_pdu_rel15->n_prb,
|
dlsch_pdu_rel15->n_prb,
|
||||||
dlsch_pdu_rel15->start_symbol,
|
dlsch_pdu_rel15->start_symbol,
|
||||||
@@ -457,8 +457,8 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
|||||||
|
|
||||||
memcpy(nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0],DLSCH_pdu.payload[0],TBS_bytes);
|
memcpy(nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0],DLSCH_pdu.payload[0],TBS_bytes);
|
||||||
|
|
||||||
LOG_I(MAC, "Printing payload bytes at the gNB side, Frame: %d, slot: %d : \n", frameP, slotP);
|
LOG_I(MAC, "Printing first 100 payload bytes at the gNB side, Frame: %d, slot: %d : \n", frameP, slotP);
|
||||||
for(int i = 0; i < TBS_bytes; i++) { //dlsch_pdu_rel15->transport_block_size/8 6784/8
|
for(int i = 0; i < 100; i++) { // TBS_bytes dlsch_pdu_rel15->transport_block_size/8 6784/8
|
||||||
LOG_I(MAC, "%x. ", ((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i]);
|
LOG_I(MAC, "%x. ", ((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,11 +480,18 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
|||||||
TBS_bytes = configure_fapi_dl_Tx(dl_req, TX_req, cfg, &nr_mac->coreset[CC_id][1], &nr_mac->search_space[CC_id][1], nr_mac->pdu_index[CC_id]);
|
TBS_bytes = configure_fapi_dl_Tx(dl_req, TX_req, cfg, &nr_mac->coreset[CC_id][1], &nr_mac->search_space[CC_id][1], nr_mac->pdu_index[CC_id]);
|
||||||
// HOT FIX for all zero pdu problem
|
// HOT FIX for all zero pdu problem
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
LOG_I(MAC, "Printing payload bytes at the gNB side, Frame: %d, slot: %d : \n", frameP, slotP);
|
|
||||||
for(int i = 0; i < TBS_bytes; i++) {
|
for(int i = 0; i < 100; i++) { //TBS_bytes
|
||||||
((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i] = (unsigned char) rand();
|
((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i] = (unsigned char) rand();
|
||||||
LOG_I(MAC, "%x. ", ((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i]);
|
//LOG_I(MAC, "%x. ", ((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i]);
|
||||||
}
|
}
|
||||||
|
if (frameP%100 == 0){
|
||||||
|
LOG_I(MAC, "Printing payload bytes at the gNB side, Frame: %d, slot: %d : \n", frameP, slotP);
|
||||||
|
for(int i = 0; i < 10; i++) {
|
||||||
|
LOG_I(MAC, "%x. ", ((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//TX_req->segments[0].segment_length = 8;
|
//TX_req->segments[0].segment_length = 8;
|
||||||
TX_req->segments[0].segment_length = TBS_bytes +2;
|
TX_req->segments[0].segment_length = TBS_bytes +2;
|
||||||
TX_req->segments[0].segment_data = nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0];
|
TX_req->segments[0].segment_data = nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user