diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index aff4479114..7542ce8c48 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -44,6 +44,7 @@ #include "PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.h" #include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h" //#define DEBUG_DLSCH_DECODING +//#define ENABLE_PHY_PAYLOAD_DEBUG 1 #define OAI_LDPC_MAX_NUM_LLR 27000//26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX @@ -593,7 +594,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; - 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; } } @@ -687,12 +688,15 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, printf("%d : %d \n", i, harq_process->b[i]); }*/ #endif + +#if defined(ENABLE_PHY_PAYLOAD_DEBUG) if (frame%100 == 0){ - LOG_I (PHY, "Printing 100 first payload bytes at frame: %d ", frame); + LOG_I (PHY, "Printing 10 first payload bytes at frame: %d ", frame); for (int i = 0; i <10 ; i++){ //Kr_bytes LOG_I(PHY, "[%d] : %x ", i, harq_process->b[i]); } } +#endif } diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index a213aedf18..6802b77d8c 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -217,17 +217,17 @@ int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){ if(phy_config != NULL){ if(phy_config->config_req.config_mask & FAPI_NR_CONFIG_REQUEST_MASK_PBCH){ - LOG_D(MAC,"[L1][IF module][PHY CONFIG]\n"); - LOG_D(MAC,"subcarrier spacing: %d\n", phy_config->config_req.pbch_config.subcarrier_spacing_common); - LOG_D(MAC,"ssb carrier offset: %d\n", phy_config->config_req.pbch_config.ssb_subcarrier_offset); - LOG_D(MAC,"dmrs type A position: %d\n", phy_config->config_req.pbch_config.dmrs_type_a_position); - LOG_D(MAC,"pdcch config sib1: %d\n", phy_config->config_req.pbch_config.pdcch_config_sib1); - LOG_D(MAC,"cell barred: %d\n", phy_config->config_req.pbch_config.cell_barred); - LOG_D(MAC,"intra frequency reselection: %d\n", phy_config->config_req.pbch_config.intra_frequency_reselection); - LOG_D(MAC,"system frame number: %d\n", phy_config->config_req.pbch_config.system_frame_number); - LOG_D(MAC,"ssb index: %d\n", phy_config->config_req.pbch_config.ssb_index); - LOG_D(MAC,"half frame bit: %d\n", phy_config->config_req.pbch_config.half_frame_bit); - LOG_D(MAC,"-------------------------------\n"); + LOG_I(MAC,"[L1][IF module][PHY CONFIG]\n"); + LOG_I(MAC,"subcarrier spacing: %d\n", phy_config->config_req.pbch_config.subcarrier_spacing_common); + LOG_I(MAC,"ssb carrier offset: %d\n", phy_config->config_req.pbch_config.ssb_subcarrier_offset); + LOG_I(MAC,"dmrs type A position: %d\n", phy_config->config_req.pbch_config.dmrs_type_a_position); + LOG_I(MAC,"pdcch config sib1: %d\n", phy_config->config_req.pbch_config.pdcch_config_sib1); + LOG_I(MAC,"cell barred: %d\n", phy_config->config_req.pbch_config.cell_barred); + LOG_I(MAC,"intra frequency reselection: %d\n", phy_config->config_req.pbch_config.intra_frequency_reselection); + LOG_I(MAC,"system frame number: %d\n", phy_config->config_req.pbch_config.system_frame_number); + LOG_I(MAC,"ssb index: %d\n", phy_config->config_req.pbch_config.ssb_index); + LOG_I(MAC,"half frame bit: %d\n", phy_config->config_req.pbch_config.half_frame_bit); + LOG_I(MAC,"-------------------------------\n"); memcpy(&nrUE_config.pbch_config,&phy_config->config_req.pbch_config,sizeof(fapi_nr_pbch_config_t)); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index c6facd5dda..8873394a18 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -4336,7 +4336,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, // looking for pbch only in slot where it is supposed to be if ((ue->decode_MIB == 1) && slot_pbch) { - LOG_D(PHY," ------ PBCH ChannelComp/LLR: frame.slot %d.%d ------ \n", frame_rx%1024, nr_tti_rx); + LOG_I(PHY," ------ PBCH ChannelComp/LLR: frame.slot %d.%d ------ \n", frame_rx%1024, nr_tti_rx); for (int i=1; i<4; i++) { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 92bb451296..d5dc4bb9ce 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -41,7 +41,7 @@ #include #include -#define ENABLE_MAC_PAYLOAD_DEBUG 1 +//#define ENABLE_MAC_PAYLOAD_DEBUG 1 extern void mac_rlc_data_ind ( const module_id_t module_idP, @@ -228,7 +228,7 @@ int8_t nr_ue_decode_mib( void *pduP, uint16_t cell_id ){ - LOG_D(MAC,"[L2][MAC] decode mib\n"); + LOG_I(MAC,"[L2][MAC] decode mib\n"); NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index ce57cb9450..9d04885feb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -35,6 +35,7 @@ #include "PHY/NR_TRANSPORT/nr_dci.h" #include "executables/nr-softmodem.h" extern RAN_CONTEXT_t RC; +//#define ENABLE_MAC_PAYLOAD_DEBUG 1 /*Scheduling of DLSCH with associated DCI in common search space * current version has only a DCI for type 1 PDCCH for C_RNTI*/ @@ -459,10 +460,12 @@ 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]); - LOG_I(MAC, "Printing first 10 payload bytes at the gNB side, Frame: %d, slot: %d, , TBS size: %d \n \n", frameP, slotP, TBS_bytes); - for(int i = 0; i < 10; 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]); - } + #if defined(ENABLE_MAC_PAYLOAD_DEBUG) + LOG_I(MAC, "Printing first 10 payload bytes at the gNB side, Frame: %d, slot: %d, , TBS size: %d \n \n", frameP, slotP, TBS_bytes); + for(int i = 0; i < 10; 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]); + } + #endif //TX_req->segments[0].segment_length = 8; TX_req->segments[0].segment_length = TBS_bytes +2; @@ -487,12 +490,14 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, ((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]); } - if (frameP%100 == 0){ - LOG_I(MAC, "Printing first 10 payload bytes at the gNB side, Frame: %d, slot: %d, TBS size: %d \n", frameP, slotP, TBS_bytes); - 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]); - } - } + #if defined(ENABLE_MAC_PAYLOAD_DEBUG) + if (frameP%100 == 0){ + LOG_I(MAC, "Printing first 10 payload bytes at the gNB side, Frame: %d, slot: %d, TBS size: %d \n", frameP, slotP, TBS_bytes); + 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]); + } + } + #endif //TX_req->segments[0].segment_length = 8; TX_req->segments[0].segment_length = TBS_bytes +2; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 81ffb33712..d7cbb33c9e 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1053,10 +1053,12 @@ pdcp_data_ind( &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset); - LOG_I(PDCP, "Printing PDCP SDU before adding it to the list: \n"); - for (int i=0; i<30; i++){ + #if defined(ENABLE_PDCP_PAYLOAD_DEBUG) + LOG_I(PDCP, "Printing first bytes of PDCP SDU before adding it to the list: \n"); + for (int i=0; i<30; i++){ LOG_I(PDCP, "%x", sdu_buffer_pP->data[i]); - } + } + #endif list_add_tail_eurecom (new_sdu_p, sdu_list_p); } diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h index 7b04c2ba3d..7634c53cc8 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h @@ -93,6 +93,8 @@ extern int pdcp_instance_cnt; #define PROTOCOL_PDCP_CTXT_ARGS(CTXT_Pp, pDCP_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp),\ (pDCP_Pp->is_srb) ? "SRB" : "DRB",\ pDCP_Pp->rb_id +//#define ENABLE_PDCP_PAYLOAD_DEBUG 1 + int init_pdcp_thread(void); void cleanup_pdcp_thread(void); diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index 582b776da7..bc3474a369 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -135,10 +135,13 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) { } // PDCP_USE_NETLINK AssertFatal(ret >= 0,"[PDCP_FIFOS] pdcp_fifo_flush_sdus (errno: %d %s)\n", errno, strerror(errno)); - LOG_I(PDCP, "Printing PDCP SDU before removing it from the list: \n"); + + #if defined(ENABLE_PDCP_PAYLOAD_DEBUG) + LOG_I(PDCP, "Printing first bytes of PDCP SDU before removing it from the list: \n"); for (int i=0; i<30; i++){ LOG_I(PDCP, "%x", sdu_p->data[i]); } + #endif list_remove_head (&pdcp_sdu_list); free_mem_block (sdu_p, __func__); pdcp_nb_sdu_sent ++; diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c index 832770f3ba..c8faa08358 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c @@ -726,7 +726,6 @@ void rlc_um_check_timer_dar_time_out( VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_CHECK_TIMER_DAR_TIME_OUT,VCD_FUNCTION_IN); if ((rlc_pP->t_reordering.running)) { - //LOG_I(RLC, "[rlc_um_check_timer_dar_time_out] 2 \n"); if ( // CASE 1: start time out // +-----------+------------------+----------+ @@ -787,7 +786,6 @@ void rlc_um_check_timer_dar_time_out( LOG_D(RLC, " %d", rlc_pP->vr_ur); LOG_D(RLC, "\n"); #endif - LOG_I(RLC, "[rlc_um_check_timer_dar_time_out] 3 \n"); rlc_um_try_reassembly(ctxt_pP, rlc_pP ,old_vr_ur, rlc_pP->vr_ur); in_window = rlc_um_in_window(ctxt_pP, rlc_pP, rlc_pP->vr_ur, rlc_pP->vr_uh, rlc_pP->vr_uh); @@ -1040,7 +1038,6 @@ rlc_um_receive_process_dar ( } else { free_mem_block(pdu_mem_pP, __func__); pdu_mem_pP = NULL; - //LOG_I(RLC, "[rlc_um_receive_process_dar] Problematic case 1 \n"); return; } @@ -1067,7 +1064,6 @@ rlc_um_receive_process_dar ( rlc_pP->stat_rx_data_pdu_out_of_window += 1; rlc_pP->stat_rx_data_bytes_out_of_window += tb_sizeP; free_mem_block(pdu_mem_pP, __func__); - //LOG_I(RLC, "[rlc_um_receive_process_dar] Problematic case 2 \n"); pdu_mem_pP = NULL; RLC_UM_MUTEX_UNLOCK(&rlc_pP->lock_dar_buffer); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_RECEIVE_PROCESS_DAR, VCD_FUNCTION_OUT); @@ -1086,7 +1082,6 @@ rlc_um_receive_process_dar ( //discard the PDU rlc_pP->stat_rx_data_pdus_duplicate += 1; rlc_pP->stat_rx_data_bytes_duplicate += tb_sizeP; - //LOG_I(RLC, "[rlc_um_receive_process_dar] Problematic case 3 \n"); free_mem_block(pdu_mem_pP, __func__); pdu_mem_pP = NULL; RLC_UM_MUTEX_UNLOCK(&rlc_pP->lock_dar_buffer); @@ -1119,7 +1114,6 @@ rlc_um_receive_process_dar ( // -if VR(UR) falls outside of the reordering window: // -set VR(UR) to (VR(UH) – UM_Window_Size); if (rlc_um_in_reordering_window(ctxt_pP, rlc_pP, sn) < 0) { - LOG_I(RLC, "[rlc_um_receive_process_dar] Before calling rlc_um_try_reassembly() 1 \n"); #if TRACE_RLC_UM_DAR LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RX PDU SN %d OUTSIDE REORDERING WINDOW VR(UH)=%d UM_Window_Size=%d\n", PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP), @@ -1135,7 +1129,6 @@ rlc_um_receive_process_dar ( if (in_window < 0) { in_window = in_window + rlc_pP->rx_sn_modulo; } - LOG_I(RLC, "[rlc_um_receive_process_dar] Before calling rlc_um_try_reassembly() 2 \n"); rlc_um_try_reassembly(ctxt_pP, rlc_pP, rlc_pP->vr_ur, in_window); } @@ -1160,18 +1153,12 @@ rlc_um_receive_process_dar ( // SDUs to upper layer in ascending order of the RLC SN if not // delivered before; if ((sn == rlc_pP->vr_ur) && rlc_um_get_pdu_from_dar_buffer(ctxt_pP, rlc_pP, rlc_pP->vr_ur)) { - LOG_I(RLC, "[rlc_um_receive_process_dar] Before calling rlc_um_try_reassembly() 3 \n"); //sn_tmp = rlc_pP->vr_ur; do { rlc_pP->vr_ur = (rlc_pP->vr_ur+1) % rlc_pP->rx_sn_modulo; } while (rlc_um_get_pdu_from_dar_buffer(ctxt_pP, rlc_pP, rlc_pP->vr_ur) && (rlc_pP->vr_ur != rlc_pP->vr_uh)); - LOG_I(RLC, "[rlc_um_receive_process_dar] Before calling rlc_um_try_reassembly() 4 \n"); rlc_um_try_reassembly(ctxt_pP, rlc_pP, sn, rlc_pP->vr_ur); - } - else if (sn != rlc_pP->vr_ur) - LOG_I(RLC, "[rlc_um_receive_process_dar] Problematic case 5, sn: %d, rlc_pP->vr_ur: %d \n",sn, rlc_pP->vr_ur); - else if(!rlc_um_get_pdu_from_dar_buffer(ctxt_pP, rlc_pP, rlc_pP->vr_ur)) - //LOG_I(RLC, "[rlc_um_receive_process_dar] Problematic case 6 \n"); + } // -if t-Reordering is running: // -if VR(UX) <= VR(UR); or