Commit 166235fd authored by Lionel Gauthier's avatar Lionel Gauthier

Trace mac_phy_exit cause

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5340 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 335289a6
......@@ -2416,7 +2416,6 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
break;
default:
LOG_E(PHY,"subframe2_harq_pid, Illegal subframe %d for TDD mode %d\n",subframe,frame_parms->tdd_config);
// mac_xface->macphy_exit("");
return(255);
break;
}
......@@ -2424,7 +2423,7 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
case 2:
if ((subframe!=2) && (subframe!=7)) {
LOG_E(PHY,"subframe2_harq_pid, Illegal subframe %d for TDD mode %d\n",subframe,frame_parms->tdd_config);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("subframe2_harq_pid, Illegal subframe");
return(255);
}
return(subframe/7);
......@@ -2432,7 +2431,6 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
case 3:
if ((subframe<2) || (subframe>4)) {
LOG_E(PHY,"subframe2_harq_pid, Illegal subframe %d for TDD mode %d\n",subframe,frame_parms->tdd_config);
// mac_xface->macphy_exit("");
return(255);
}
return(subframe-2);
......@@ -2440,7 +2438,6 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
case 4:
if ((subframe<2) || (subframe>3)) {
LOG_E(PHY,"subframe2_harq_pid, Illegal subframe %d for TDD mode %d\n",subframe,frame_parms->tdd_config);
// mac_xface->macphy_exit("");
return(255);
}
return(subframe-2);
......@@ -2448,14 +2445,12 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
case 5:
if (subframe!=2) {
LOG_E(PHY,"subframe2_harq_pid, Illegal subframe %d for TDD mode %d\n",subframe,frame_parms->tdd_config);
// mac_xface->macphy_exit("");
return(255);
}
return(subframe-2);
break;
default:
LOG_E(PHY,"subframe2_harq_pid, Unsupported TDD mode %d\n",frame_parms->tdd_config);
// mac_xface->macphy_exit("");
return(255);
}
......@@ -2790,11 +2785,11 @@ void fill_CQI(void *o,UCI_format_t uci_format,PHY_MEASUREMENTS *meas,uint8_t eNB
break;
case ue_selected:
LOG_E(PHY,"fill_CQI ue_selected CQI not supported yet!!!\n");
mac_xface->macphy_exit("");
mac_xface->macphy_exit("fill_CQI ue_selected CQI not supported yet!!!");
break;
default:
LOG_E(PHY,"unsupported CQI mode (%d)!!!\n",uci_format);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("unsupported CQI mode !!!");
break;
}
......
......@@ -313,13 +313,11 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t su
if (prach_ConfigIndex>=64) {
LOG_E(PHY,"[PHY] Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
//mac_xface->macphy_exit("");
return(0);
}
if (tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach==0) {
LOG_E(PHY,"[PHY] Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
//mac_xface->macphy_exit("");
return(0);
}
......@@ -411,14 +409,14 @@ int32_t generate_prach(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe,
if (restricted_set == 0) {
if (Ncs_config>15) {
LOG_E(PHY,"[PHY] FATAL, Illegal Ncs_config for unrestricted format %d\n",Ncs_config);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("PRACH: Illegal Ncs_config for unrestricted format");
}
NCS = NCS_unrestricted[Ncs_config];
}
else {
if (Ncs_config>14) {
LOG_E(PHY,"[PHY] FATAL, Illegal Ncs_config for restricted format %d\n",Ncs_config);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("PRACH: Illegal Ncs_config for restricted format");
}
NCS = NCS_restricted[Ncs_config];
}
......@@ -726,7 +724,7 @@ int32_t generate_prach(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe,
if (prach_fmt==4) {
//TODO: account for repeated format in fft output
LOG_E(PHY,"prach_fmt4 not fully implemented");
mac_xface->macphy_exit("");
mac_xface->macphy_exit("prach_fmt4 not fully implemented");
}
else {
#ifdef BIT8_TX
......@@ -815,14 +813,14 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe,uint16_t *preamble_ene
if (restricted_set == 0) {
if (Ncs_config>15) {
LOG_E(PHY,"FATAL, Illegal Ncs_config for unrestricted format %d\n",Ncs_config);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("PRACH Illegal Ncs_config for unrestricted format");
}
NCS = NCS_unrestricted[Ncs_config];
}
else {
if (Ncs_config>14) {
LOG_E(PHY,"FATAL, Illegal Ncs_config for restricted format %d\n",Ncs_config);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("PRACH Illegal Ncs_config for restricted format");
}
NCS = NCS_restricted[Ncs_config];
}
......@@ -1190,7 +1188,7 @@ void compute_prach_seq(PRACH_CONFIG_COMMON *prach_config_common,
if (prach_fmt>=4) {
LOG_E(PHY, "PRACH sequence is only precomputed for prach_fmt<4 (have %d)\n");
mac_xface->macphy_exit("");
mac_xface->macphy_exit("PRACH sequence is only precomputed for prach_fmt<4");
}
N_ZC = (prach_fmt < 4) ? 839 : 139;
......@@ -1210,7 +1208,7 @@ void compute_prach_seq(PRACH_CONFIG_COMMON *prach_config_common,
#endif
if (prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig>15) {
LOG_E(PHY,"FATAL, Illegal Ncs_config for unrestricted format %d\n",prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("PRACH Illegal Ncs_config for unrestricted format");
}
else {
NCS = NCS_unrestricted[prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig];
......@@ -1226,7 +1224,7 @@ void compute_prach_seq(PRACH_CONFIG_COMMON *prach_config_common,
#endif
if (prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig>14) {
LOG_E(PHY,"FATAL, Illegal Ncs_config for restricted format %d\n",prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("PRACH Illegal Ncs_config for restricted format");
}
else {
NCS = NCS_restricted[prach_config_common->prach_ConfigInfo.zeroCorrelationZoneConfig];
......
......@@ -341,7 +341,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
ulsch->harq_processes[harq_pid]->O_ACK,
G,
subframe);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("ulsch_decoding.c: FATAL sumKr is 0!");
return(-1);
}
......
......@@ -210,7 +210,7 @@ uint8_t get_Msg3_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,
break;
default:
LOG_E(PHY,"get_Msg3_harq_pid: Unsupported TDD configuration %d\n",frame_parms->tdd_config);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("get_Msg3_harq_pid: Unsupported TDD configuration");
break;
}
}
......@@ -492,7 +492,7 @@ lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub
break;
default:
LOG_E(PHY,"subframe %d Unsupported TDD configuration %d\n",subframe,frame_parms->tdd_config);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("subframe x Unsupported TDD configuration");
return(255);
}
......
......@@ -1387,7 +1387,6 @@ void phy_procedures_eNB_TX(unsigned char next_slot,PHY_VARS_eNB *phy_vars_eNB,ui
/*
if (phy_vars_eNB->frame > 28000) {
LOG_E(PHY,"More that 28000 frames reached! Exiting!\n");
mac_xface->macphy_exit("");
}
*/
#endif
......@@ -3043,7 +3042,6 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,ui
// dump_ulsch(phy_vars_eNB,last_slot>>1,i);
// mac_xface->macphy_exit("");
if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round== phy_vars_eNB->ulsch_eNB[i]->Mdlharq) {
LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d ULSCH Mdlharq %d reached\n",
......@@ -3056,7 +3054,6 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,ui
phy_vars_eNB->eNB_UE_stats[i].ulsch_errors[harq_pid]++;
phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid]++;
//dump_ulsch(phy_vars_eNB, last_slot>>1, i);
//mac_xface->macphy_exit("");
}
// If we've dropped the UE, go back to PRACH mode for this UE
......@@ -3133,7 +3130,6 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,ui
#endif
#endif
//dump_ulsch(phy_vars_eNB,last_slot>>1,i);
//mac_xface->macphy_exit("");
#ifdef OPENAIR2
......
......@@ -88,7 +88,7 @@ int8_t get_DELTA_PREAMBLE(module_id_t module_idP) {
LOG_E(MAC,"[UE %d] ue_procedures.c: FATAL, Illegal preambleformat %d, prachConfigIndex %d\n",
module_idP,
preambleformat,prachConfigIndex);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("MAC get_DELTA_PREAMBLE Illegal preamble format");
return(0);
}
......@@ -111,7 +111,7 @@ void get_prach_resources(module_id_t module_idP,
rach_ConfigCommon = &UE_mac_inst[module_idP].radioResourceConfigCommon->rach_ConfigCommon;
else {
LOG_E(MAC,"[UE %d] FATAL radioResourceConfigCommon is NULL !!!\n",module_idP);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("MAC FATAL radioResourceConfigCommon is NULL");
}
if (rach_ConfigDedicated) { // This is for network controlled Mobility, later
......@@ -270,7 +270,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,frame_t frameP, uint8_t eN
}
else {
LOG_D(MAC,"[UE %d] FATAL Frame %d: rach_ConfigCommon is NULL !!!\n",module_idP,frameP);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("MAC rach_ConfigCommon is NULL");
}
UE_mac_inst[module_idP].RA_tx_frame = frameP;
UE_mac_inst[module_idP].RA_tx_subframe = subframeP;
......@@ -326,7 +326,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,frame_t frameP, uint8_t eN
}
else {
LOG_D(MAC,"[UE %d] FATAL Frame %d: rach_ConfigCommon is NULL !!!\n",module_idP,frameP);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("MAC rach_ConfigCommon is NULL");
}
UE_mac_inst[module_idP].RA_tx_frame = frameP;
UE_mac_inst[module_idP].RA_tx_subframe = subframeP;
......@@ -397,7 +397,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,frame_t frameP, uint8_t eN
}
else if (UE_mode == PUSCH) {
LOG_D(MAC,"[UE %d] FATAL: Should not have checked for RACH in PUSCH yet ...",module_idP);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("MAC FATAL: Should not have checked for RACH in PUSCH yet");
}
return(NULL);
}
......@@ -68,7 +68,7 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
rlc_pP->ue_module_id,
rlc_pP->rb_id,
eventP);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("RLC-UM FSM WARNING PROTOCOL ERROR - EVENT NOT EXPECTED FROM NULL_STATE");
return 0;
}
break;
......
......@@ -180,7 +180,7 @@ get_free_mem_block (uint16_t sizeP)
if (sizeP > MEM_MNGT_MB12_BLOCK_SIZE) {
msg ("[MEM_MNGT][ERROR][FATAL] size requested %d out of bounds\n", sizeP);
display_mem_load ();
mac_xface->macphy_exit("");
mac_xface->macphy_exit("[MEM_MNGT][ERROR][FATAL] get_free_mem_block size requested out of bounds");
return NULL;
}
size = sizeP >> 6;
......@@ -212,7 +212,7 @@ get_free_mem_block (uint16_t sizeP)
#endif
} while (pool_selected++ < 12);
mac_xface->macphy_exit("");
mac_xface->macphy_exit("[MEM_MNGT][ERROR][FATAL] get_free_mem_block failed");
return NULL;
};
......@@ -235,7 +235,7 @@ get_free_copy_mem_block (void)
// break_point ();
//#endif
mac_xface->macphy_exit("");
mac_xface->macphy_exit("[MEM_MNGT][ERROR][FATAL] get_free_copy_mem_block failed");
return NULL;
}
}
......
......@@ -285,7 +285,7 @@ void signal_handler(int sig)
void exit_fun(const char* s)
{
if (s != NULL) {
printf("Exiting: %s\n",s);
printf("%s %s() Exiting: %s\n",__FILE__, __FUNCTION__, s);
}
oai_exit = 1;
......@@ -1050,7 +1050,7 @@ static void *UE_thread(void *arg)
}
if (abs(openair_daq_vars.freq_offset) > 7500) {
LOG_I(PHY,"[initial_sync] No cell synchronization found, abondoning\n");
mac_xface->macphy_exit("");
mac_xface->macphy_exit("No cell synchronization found, abondoning");
}
else {
LOG_I(PHY,"[initial_sync] trying carrier off %d Hz\n",openair_daq_vars.freq_offset);
......
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