Commit 1d358902 authored by Khalid Ahmed's avatar Khalid Ahmed Committed by Thomas Schlichter

Add macro to print CRC OK at gNB PUSCH

parent c4ae0b06
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
//#define DEBUG_ULSCH_DECODING //#define DEBUG_ULSCH_DECODING
#define OAI_UL_LDPC_MAX_NUM_LLR 27000//26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX = 68*384 #define OAI_UL_LDPC_MAX_NUM_LLR 27000//26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX = 68*384
#define PRINT_CRC_CHECK
static uint64_t nb_total_decod =0; static uint64_t nb_total_decod =0;
static uint64_t nb_error_decod =0; static uint64_t nb_error_decod =0;
...@@ -269,6 +270,10 @@ void clean_gNB_ulsch(NR_gNB_ULSCH_t *ulsch) ...@@ -269,6 +270,10 @@ void clean_gNB_ulsch(NR_gNB_ULSCH_t *ulsch)
} }
} }
#ifdef PRINT_CRC_CHECK
static uint32_t prnt_crc_cnt = 0;
#endif
uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint8_t UE_id, uint8_t UE_id,
short *ulsch_llr, short *ulsch_llr,
...@@ -287,6 +292,10 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -287,6 +292,10 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint32_t r,r_offset=0,Kr=8424,Kr_bytes,K_bytes_F,err_flag=0; uint32_t r,r_offset=0,Kr=8424,Kr_bytes,K_bytes_F,err_flag=0;
uint8_t crc_type; uint8_t crc_type;
int8_t llrProcBuf[OAI_UL_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32))); int8_t llrProcBuf[OAI_UL_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
#ifdef PRINT_CRC_CHECK
prnt_crc_cnt++;
#endif
NR_gNB_ULSCH_t *ulsch = phy_vars_gNB->ulsch[UE_id+1][0]; NR_gNB_ULSCH_t *ulsch = phy_vars_gNB->ulsch[UE_id+1][0];
...@@ -584,10 +593,16 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -584,10 +593,16 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
p_procTime); p_procTime);
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)) {
LOG_I(PHY, "Segment %d CRC OK\n",r); #ifdef PRINT_CRC_CHECK
if (prnt_crc_cnt % 10 == 0)
LOG_I(PHY, "Segment %d CRC OK\n",r);
#endif
ret = 2; ret = 2;
} else { } else {
LOG_I(PHY, "CRC NOK\n"); #ifdef PRINT_CRC_CHECK
if (prnt_crc_cnt%10 == 0)
LOG_I(PHY, "CRC NOK\n");
#endif
ret = 1+ulsch->max_ldpc_iterations; ret = 1+ulsch->max_ldpc_iterations;
} }
......
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