Commit 024a4142 authored by Raymond Knopp's avatar Raymond Knopp

nr-ip-over-LTE: Debug logs rearrangements

parent 175c813f
......@@ -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
}
......
......@@ -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));
......
......@@ -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++) {
......
......@@ -41,7 +41,7 @@
#include <stdio.h>
#include <math.h>
#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);
......
......@@ -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]);
#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 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;
......
......@@ -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");
#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);
}
......
......@@ -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);
......
......@@ -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 ++;
......
......@@ -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
......
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