Commit 222e7010 authored by Florian Kaltenberger's avatar Florian Kaltenberger

improved l1 stats

replaced calls to exit with mac_xface->macphy_exit



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5766 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 26ce3333
...@@ -2482,7 +2482,7 @@ unsigned char phy_threegpplte_turbo_decoder(short *y, ...@@ -2482,7 +2482,7 @@ unsigned char phy_threegpplte_turbo_decoder(short *y,
break; break;
default: default:
printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n"); printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n");
exit(-1); return(255);
break; break;
} }
......
...@@ -927,7 +927,7 @@ unsigned char phy_threegpplte_turbo_decoder16(short *y, ...@@ -927,7 +927,7 @@ unsigned char phy_threegpplte_turbo_decoder16(short *y,
break; break;
default: default:
printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n"); printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n");
exit(-1); return(255);
break; break;
} }
......
...@@ -1033,7 +1033,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y, ...@@ -1033,7 +1033,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
break; break;
default: default:
printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n"); printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n");
exit(-1); return(255);
break; break;
} }
......
...@@ -83,12 +83,7 @@ int rate_matching(unsigned int N_coded, ...@@ -83,12 +83,7 @@ int rate_matching(unsigned int N_coded,
// the first condition represents the case where the rate is greater than 2/3 // the first condition represents the case where the rate is greater than 2/3
// the second condition represents the case where the rate is less than 1/4 // the second condition represents the case where the rate is less than 1/4
msg("[PHY][CODING] Rate matching parameter error (N_coded %d, N_input %d, N_bps %d), exiting\n",N_coded,N_input,N_bps); msg("[PHY][CODING] Rate matching parameter error (N_coded %d, N_input %d, N_bps %d), exiting\n",N_coded,N_input,N_bps);
#ifdef USER_MODE
exit(-1);
#else
return(-1); return(-1);
#endif
} }
//initialize all bits as transmitted //initialize all bits as transmitted
...@@ -166,12 +161,7 @@ int rate_matching_lte(unsigned int N_coded, ...@@ -166,12 +161,7 @@ int rate_matching_lte(unsigned int N_coded,
// the first condition represents the case where the rate is greater than 2/3 // the first condition represents the case where the rate is greater than 2/3
// the second condition represents the case where the rate is less than 1/4 // the second condition represents the case where the rate is less than 1/4
msg("[PHY][CODING] Rate matching parameter error (N_coded %d, N_input %d), exiting\n",N_coded,N_input); msg("[PHY][CODING] Rate matching parameter error (N_coded %d, N_input %d), exiting\n",N_coded,N_input);
#ifdef USER_MODE
exit(-1);
#else
return(-1); return(-1);
#endif
} }
//initialize all bits as transmitted //initialize all bits as transmitted
......
...@@ -2554,7 +2554,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **lte_ue_pdcch_vars,int do_common,uint ...@@ -2554,7 +2554,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **lte_ue_pdcch_vars,int do_common,uint
CCEmap = CCEmap2; CCEmap = CCEmap2;
else { else {
LOG_E(PHY,"Illegal CCEind %d (Yk %d, m %d, nCCE %d, L2 %d\n",CCEind,Yk,m,nCCE,L2); LOG_E(PHY,"Illegal CCEind %d (Yk %d, m %d, nCCE %d, L2 %d\n",CCEind,Yk,m,nCCE,L2);
exit(-1); mac_xface->macphy_exit("Illegal CCEind\n");
} }
switch (L2) { switch (L2) {
case 1: case 1:
......
...@@ -219,7 +219,7 @@ void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t ...@@ -219,7 +219,7 @@ void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t
} }
else { else {
LOG_E(PHY,"resource type 1 not supported for N_RB_DL=100\n"); LOG_E(PHY,"resource type 1 not supported for N_RB_DL=100\n");
exit(-1); mac_xface->macphy_exit("resource type 1 not supported for N_RB_DL=100\n");
/* /*
subset = rb_alloc&1; subset = rb_alloc&1;
shift = (rb_alloc>>1)&1; shift = (rb_alloc>>1)&1;
...@@ -248,7 +248,7 @@ void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t ...@@ -248,7 +248,7 @@ void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t
} }
else { else {
LOG_E(PHY,"resource type 1 not supported for N_RB_DL=100\n"); LOG_E(PHY,"resource type 1 not supported for N_RB_DL=100\n");
exit(-1); mac_xface->macphy_exit("resource type 1 not supported for N_RB_DL=100\n");
/* /*
subset = rb_alloc&1; subset = rb_alloc&1;
shift = (rb_alloc>>1)&1; shift = (rb_alloc>>1)&1;
......
...@@ -555,30 +555,33 @@ typedef struct { ...@@ -555,30 +555,33 @@ typedef struct {
UE_MODE_t mode; UE_MODE_t mode;
/// Current sector where UE is attached /// Current sector where UE is attached
uint8_t sector; uint8_t sector;
///
uint32_t dlsch_sliding_cnt; /// dlsch l2 errors
/// uint32_t dlsch_l2_errors[8];
uint32_t dlsch_ACK[8]; /// dlsch trials per harq and round
uint32_t dlsch_NAK[8]; uint32_t dlsch_trials[8][8];
/// /// dlsch ACK/NACK per hard_pid and round
uint32_t dlsch_l2_errors; uint32_t dlsch_ACK[8][8];
/// uint32_t dlsch_NAK[8][8];
uint32_t dlsch_trials[8];
/// /// ulsch l2 errors per harq_pid
uint32_t ulsch_errors[3]; uint32_t ulsch_errors[8];
/// /// ulsch l2 consecutive errors per harq_pid
uint32_t ulsch_consecutive_errors[3]; uint32_t ulsch_consecutive_errors[8];
/// /// ulsch trials/errors/fer per harq and round
uint32_t ulsch_decoding_attempts[3][8]; uint32_t ulsch_decoding_attempts[8][8];
/// uint32_t ulsch_round_errors[8][8];
uint32_t ulsch_round_errors[3][8]; uint32_t ulsch_decoding_attempts_last[8][8];
uint32_t ulsch_decoding_attempts_last[3][8]; uint32_t ulsch_round_errors_last[8][8];
uint32_t ulsch_round_errors_last[3][8]; uint32_t ulsch_round_fer[8][8];
uint32_t ulsch_round_fer[3][8];
uint32_t sr_received; uint32_t sr_received;
uint32_t sr_total; uint32_t sr_total;
/// dlsch sliding count and total errors in round 0 are used to compute the dlsch_mcs_offset
uint32_t dlsch_sliding_cnt;
uint32_t dlsch_NAK_round0;
int8_t dlsch_mcs_offset; int8_t dlsch_mcs_offset;
/// Target mcs1 after rate-adaptation (used by MAC layer scheduler) /// Target mcs1 after rate-adaptation (used by MAC layer scheduler)
uint8_t dlsch_mcs1; uint8_t dlsch_mcs1;
/// Target mcs2 after rate-adaptation (used by MAC layer scheduler) /// Target mcs2 after rate-adaptation (used by MAC layer scheduler)
...@@ -589,7 +592,7 @@ typedef struct { ...@@ -589,7 +592,7 @@ typedef struct {
int total_TBS; int total_TBS;
/// Total bits acknowledged on PDSCH (last interval) /// Total bits acknowledged on PDSCH (last interval)
int total_TBS_last; int total_TBS_last;
/// Bitrate on the PDSCH /// Bitrate on the PDSCH [bps]
unsigned int dlsch_bitrate; unsigned int dlsch_bitrate;
// unsigned int total_transmitted_bits; // unsigned int total_transmitted_bits;
} LTE_eNB_UE_stats; } LTE_eNB_UE_stats;
......
...@@ -294,7 +294,7 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eN ...@@ -294,7 +294,7 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eN
&phy_vars_eNB->dlsch_turbo_encoding_stats, &phy_vars_eNB->dlsch_turbo_encoding_stats,
&phy_vars_eNB->dlsch_interleaving_stats &phy_vars_eNB->dlsch_interleaving_stats
)<0) )<0)
exit(-1); mac_xface->macphy_exit("problem in dlsch_encoding");
dlsch_scrambling(&phy_vars_eNB->lte_frame_parms,1,phy_vars_eNB->dlsch_eNB_MCH,G,0,subframe<<1); dlsch_scrambling(&phy_vars_eNB->lte_frame_parms,1,phy_vars_eNB->dlsch_eNB_MCH,G,0,subframe<<1);
......
...@@ -265,7 +265,6 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) { ...@@ -265,7 +265,6 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
uint8_t eNB,UE_id,i,j,number_of_cards_l=1; uint8_t eNB,UE_id,i,j,number_of_cards_l=1;
uint32_t ulsch_errors=0; uint32_t ulsch_errors=0;
uint32_t ulsch_round_attempts[4]={0,0,0,0},ulsch_round_errors[4]={0,0,0,0}; uint32_t ulsch_round_attempts[4]={0,0,0,0},ulsch_round_errors[4]={0,0,0,0};
uint32_t harq_pid_ul, harq_pid_dl;
uint32_t UE_id_mac, RRC_status; uint32_t UE_id_mac, RRC_status;
if (phy_vars_eNB==NULL) if (phy_vars_eNB==NULL)
return 0; return 0;
...@@ -306,13 +305,15 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) { ...@@ -306,13 +305,15 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS + phy_vars_eNB->total_transmitted_bits; phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS + phy_vars_eNB->total_transmitted_bits;
//phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput; //phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput;
if (phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH) if (phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH)
success = success + ((phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]) - (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[3])); for (i=0;i<8;i++)
success = success + (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][0] - phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors[i]);
} }
#else #else
phy_vars_eNB->total_dlsch_bitrate = phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate + phy_vars_eNB->total_dlsch_bitrate; phy_vars_eNB->total_dlsch_bitrate = phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate + phy_vars_eNB->total_dlsch_bitrate;
phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS + phy_vars_eNB->total_transmitted_bits; phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS + phy_vars_eNB->total_transmitted_bits;
//phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput; //phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput;
success = success + ((phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]) - (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[0]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[1]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[2]+phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[3])); for (i=0;i<8;i++)
success = success + (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][0] - phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors[i]);
#endif #endif
} }
...@@ -331,17 +332,18 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) { ...@@ -331,17 +332,18 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
#ifdef OPENAIR2 #ifdef OPENAIR2
if (phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti>0) { if (phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti>0) {
#endif #endif
harq_pid_dl = phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->current_harq_pid; len += sprintf(&buffer[len],"[eNB PROC] UE %d (%x) RSSI: (%d,%d) dBm, Sector %d, DLSCH Mode %d\n",
harq_pid_ul = 2;
len += sprintf(&buffer[len],"[eNB PROC] UE %d (%x) RSSI: (%d,%d) dBm, Sector %d, DLSCH Mode %d, UE_DL_mcs %d, UE_UL_MCS %d\n",
UE_id, UE_id,
phy_vars_eNB->eNB_UE_stats[UE_id].crnti, phy_vars_eNB->eNB_UE_stats[UE_id].crnti,
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[0], phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[0],
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[1], phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[1],
phy_vars_eNB->eNB_UE_stats[UE_id].sector, phy_vars_eNB->eNB_UE_stats[UE_id].sector,
phy_vars_eNB->transmission_mode[UE_id], phy_vars_eNB->transmission_mode[UE_id]);
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid_dl]->mcs, for(i=0;i<8;i++)
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[harq_pid_ul]->mcs); len+= sprintf(&buffer[len]," harq %d, UE_DL_mcs %d, UE_UL_MCS %d\n",
i,
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[i]->mcs,
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[i]->mcs);
len += sprintf(&buffer[len],"[eNB PROC] Wideband CQI: (%d,%d) dB\n", len += sprintf(&buffer[len],"[eNB PROC] Wideband CQI: (%d,%d) dB\n",
phy_vars_eNB->PHY_measurements_eNB[eNB].wideband_cqi_dB[UE_id][0], phy_vars_eNB->PHY_measurements_eNB[eNB].wideband_cqi_dB[UE_id][0],
...@@ -381,84 +383,47 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) { ...@@ -381,84 +383,47 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
#ifdef OPENAIR2 #ifdef OPENAIR2
if (phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH) { if (phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH) {
#endif #endif
for (i=0;i<3;i++) {
ulsch_errors += phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_errors[i];
for (j=0;j<4;j++) {
ulsch_round_attempts[j] += phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][j];
ulsch_round_errors[j] += phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[i][j];
}
}
len += sprintf(&buffer[len],"[eNB PROC] SR received/total: %d/%d (diff %d)\n", len += sprintf(&buffer[len],"[eNB PROC] SR received/total: %d/%d (diff %d)\n",
phy_vars_eNB->eNB_UE_stats[UE_id].sr_received, phy_vars_eNB->eNB_UE_stats[UE_id].sr_received,
phy_vars_eNB->eNB_UE_stats[UE_id].sr_total, phy_vars_eNB->eNB_UE_stats[UE_id].sr_total,
phy_vars_eNB->eNB_UE_stats[UE_id].sr_total-phy_vars_eNB->eNB_UE_stats[UE_id].sr_received); phy_vars_eNB->eNB_UE_stats[UE_id].sr_total-phy_vars_eNB->eNB_UE_stats[UE_id].sr_received);
len += sprintf(&buffer[len],"[eNB PROC] ULSCH FER per round (%d, %d, %d, %d) : (%d, %d, %d, %d) : (%d, %d, %d, %d) \n", len += sprintf(&buffer[len],"[eNB PROC] ULSCH errors/attempts per harq (per round): \n");
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[0][0], for (i=0;i<8;i++)
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[0][1], len += sprintf(&buffer[len]," harq %d: %d/%d (%d/%d, %d/%d, %d/%d, %d/%d)\n",
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[0][2], i,
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[0][3], phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_errors[i],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[1][0], phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[1][1], phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[i][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[1][2], phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[1][3], phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[i][1],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[2][0], phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][1],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[2][1], phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[i][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[2][2], phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_fer[2][3]); phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[i][3],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][3]);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH errors/attempts per harq (per round): \n");
len += sprintf(&buffer[len],"[eNB PROC] ULSCH errors %d/%d (%d/%d,%d/%d,%d/%d,%d/%d) : %d/%d (%d/%d,%d/%d,%d/%d,%d/%d) : %d/%d (%d/%d,%d/%d,%d/%d,%d/%d) \n", for (i=0;i<8;i++)
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_errors[0], len += sprintf(&buffer[len]," harq %d: %d/%d (%d/%d/%d, %d/%d/%d, %d/%d/%d, %d/%d/%d)\n",
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[0][0], i,
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[0][0], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors[i],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[0][0], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[0][1], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[i][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[0][1], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[i][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[0][2], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[0][2], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[i][1],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[0][3], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[i][1],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[0][3], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][1],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_errors[1], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[i][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[1][0], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[i][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[1][0], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[1][0], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[i][3],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[1][1], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[i][3],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[1][1], phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][3]);
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[1][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[1][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[1][3],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[1][3],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_errors[2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[2][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[2][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[2][0],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[2][1],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[2][1],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[2][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[2][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[2][3],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[2][3]);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH errors %d/%d (%d/%d/%d,%d/%d/%d,%d/%d/%d,%d/%d/%d)\n",
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors,
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[0],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[0],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[0],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[0],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[1],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[1],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[1],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[2],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[2],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[2],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[3],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[3],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[3]);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits from MAC: %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC)/1000); len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits from MAC: %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC)/1000);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits ack'ed: %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS)/1000); len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits ack'ed: %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS)/1000);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH Average throughput (10 frames): %dkbps\n",(phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate/1000)); len += sprintf(&buffer[len],"[eNB PROC] DLSCH Average throughput (100 frames): %dkbps\n",(phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate/1000));
len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",phy_vars_eNB->transmission_mode[UE_id]); len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",phy_vars_eNB->transmission_mode[UE_id]);
if(phy_vars_eNB->transmission_mode[UE_id] == 5){ if(phy_vars_eNB->transmission_mode[UE_id] == 5){
...@@ -478,7 +443,6 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) { ...@@ -478,7 +443,6 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
len += sprintf(&buffer[len],"\n"); len += sprintf(&buffer[len],"\n");
len += sprintf(&buffer[len],"[eNB PROC] Total Number of Allocated PRBs = %d\n",phy_vars_eNB->mu_mimo_mode[UE_id].pre_nb_available_rbs); len += sprintf(&buffer[len],"[eNB PROC] Total Number of Allocated PRBs = %d\n",phy_vars_eNB->mu_mimo_mode[UE_id].pre_nb_available_rbs);
#ifdef OPENAIR2 #ifdef OPENAIR2
} }
} }
......
...@@ -1616,8 +1616,8 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -1616,8 +1616,8 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
mac_exit_wrapper("Invalid UE id (< 0) detected"); mac_exit_wrapper("Invalid UE id (< 0) detected");
} }
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
if (phy_vars_eNB->proc[sched_subframe].frame_tx%100 == 0) //if (phy_vars_eNB->proc[sched_subframe].frame_tx%100 == 0)
LOG_I(PHY,"[eNB %d][PUSCH %d] Frame %d subframe %d Generated format0 DCI (rnti %x, dci %x) (DCI pos %d/%d), aggregation %d\n", LOG_I(PHY,"[eNB %d][PUSCH %d] Frame %d subframe %d Generated ULSCH (format0) DCI (rnti %x, dci %x) (DCI pos %d/%d), aggregation %d\n",
phy_vars_eNB->Mod_id, phy_vars_eNB->Mod_id,
subframe2harq_pid(&phy_vars_eNB->lte_frame_parms, subframe2harq_pid(&phy_vars_eNB->lte_frame_parms,
pdcch_alloc2ul_frame(&phy_vars_eNB->lte_frame_parms,(((subframe)==0)?1:0)+phy_vars_eNB->proc[sched_subframe].frame_tx,subframe), pdcch_alloc2ul_frame(&phy_vars_eNB->lte_frame_parms,(((subframe)==0)?1:0)+phy_vars_eNB->proc[sched_subframe].frame_tx,subframe),
...@@ -1971,7 +1971,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -1971,7 +1971,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->eNB_UE_stats[(uint8_t)UE_id].dlsch_sliding_cnt++; phy_vars_eNB->eNB_UE_stats[(uint8_t)UE_id].dlsch_sliding_cnt++;
if (phy_vars_eNB->dlsch_eNB[(uint32_t)UE_id][0]->harq_processes[harq_pid]->round == 0) { if (phy_vars_eNB->dlsch_eNB[(uint32_t)UE_id][0]->harq_processes[harq_pid]->round == 0) {
phy_vars_eNB->eNB_UE_stats[(uint32_t)UE_id].dlsch_trials[0]++; phy_vars_eNB->eNB_UE_stats[(uint32_t)UE_id].dlsch_trials[harq_pid][0]++;
#ifdef OPENAIR2 #ifdef OPENAIR2
DLSCH_pdu = mac_xface->get_dlsch_sdu(phy_vars_eNB->Mod_id, DLSCH_pdu = mac_xface->get_dlsch_sdu(phy_vars_eNB->Mod_id,
...@@ -2005,7 +2005,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -2005,7 +2005,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
#endif #endif
} }
else { else {
phy_vars_eNB->eNB_UE_stats[(uint32_t)UE_id].dlsch_trials[phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->round]++; phy_vars_eNB->eNB_UE_stats[(uint32_t)UE_id].dlsch_trials[harq_pid][phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->round]++;
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
#ifdef DEBUG_DLSCH #ifdef DEBUG_DLSCH
LOG_D(PHY,"[eNB] This DLSCH is a retransmission\n"); LOG_D(PHY,"[eNB] This DLSCH is a retransmission\n");
...@@ -2173,7 +2173,7 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -2173,7 +2173,7 @@ void process_HARQ_feedback(uint8_t UE_id,
uint8_t pucch_sel, uint8_t pucch_sel,
uint8_t SR_payload) { uint8_t SR_payload) {
uint8_t dl_harq_pid[8],dlsch_ACK[8],j,dl_subframe; uint8_t dl_harq_pid[8],dlsch_ACK[8],dl_subframe;
LTE_eNB_DLSCH_t *dlsch = phy_vars_eNB->dlsch_eNB[(uint32_t)UE_id][0]; LTE_eNB_DLSCH_t *dlsch = phy_vars_eNB->dlsch_eNB[(uint32_t)UE_id][0];
LTE_eNB_UE_stats *ue_stats = &phy_vars_eNB->eNB_UE_stats[(uint32_t)UE_id]; LTE_eNB_UE_stats *ue_stats = &phy_vars_eNB->eNB_UE_stats[(uint32_t)UE_id];
LTE_DL_eNB_HARQ_t *dlsch_harq_proc; LTE_DL_eNB_HARQ_t *dlsch_harq_proc;
...@@ -2319,8 +2319,10 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -2319,8 +2319,10 @@ void process_HARQ_feedback(uint8_t UE_id,
dlsch->rnti,dl_harq_pid[m],M,m,mp,dlsch_harq_proc->round); dlsch->rnti,dl_harq_pid[m],M,m,mp,dlsch_harq_proc->round);
#endif #endif
// if (dlsch_harq_proc->round == 0) if (dlsch_harq_proc->round == 0)
ue_stats->dlsch_NAK[dlsch_harq_proc->round]++; ue_stats->dlsch_NAK_round0++;
ue_stats->dlsch_NAK[dl_harq_pid[m]][dlsch_harq_proc->round]++;
// then Increment DLSCH round index // then Increment DLSCH round index
dlsch_harq_proc->round++; dlsch_harq_proc->round++;
...@@ -2332,7 +2334,7 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -2332,7 +2334,7 @@ void process_HARQ_feedback(uint8_t UE_id,
dlsch->rnti,dl_harq_pid[m]); dlsch->rnti,dl_harq_pid[m]);
#endif #endif
dlsch_harq_proc->round = 0; dlsch_harq_proc->round = 0;
ue_stats->dlsch_l2_errors++; ue_stats->dlsch_l2_errors[dl_harq_pid[m]]++;
dlsch_harq_proc->status = SCH_IDLE; dlsch_harq_proc->status = SCH_IDLE;
dlsch->harq_ids[dl_subframe] = dlsch->Mdlharq; dlsch->harq_ids[dl_subframe] = dlsch->Mdlharq;
} }
...@@ -2342,7 +2344,7 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -2342,7 +2344,7 @@ void process_HARQ_feedback(uint8_t UE_id,
LOG_I(PHY,"[eNB %d][PDSCH %x/%d] ACK Received in round %d, resetting process\n",phy_vars_eNB->Mod_id, LOG_I(PHY,"[eNB %d][PDSCH %x/%d] ACK Received in round %d, resetting process\n",phy_vars_eNB->Mod_id,
dlsch->rnti,dl_harq_pid[m],dlsch_harq_proc->round); dlsch->rnti,dl_harq_pid[m],dlsch_harq_proc->round);
#endif #endif
ue_stats->dlsch_ACK[dlsch_harq_proc->round]++; ue_stats->dlsch_ACK[dl_harq_pid[m]][dlsch_harq_proc->round]++;
// Received ACK so set round to 0 and set dlsch_harq_pid IDLE // Received ACK so set round to 0 and set dlsch_harq_pid IDLE
dlsch_harq_proc->round = 0; dlsch_harq_proc->round = 0;
...@@ -2358,7 +2360,7 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -2358,7 +2360,7 @@ void process_HARQ_feedback(uint8_t UE_id,
} }
// Do fine-grain rate-adaptation for DLSCH // Do fine-grain rate-adaptation for DLSCH
if (ue_stats->dlsch_NAK[0] > dlsch->error_threshold) { if (ue_stats->dlsch_NAK_round0 > dlsch->error_threshold) {
if (ue_stats->dlsch_mcs_offset == 1) if (ue_stats->dlsch_mcs_offset == 1)
ue_stats->dlsch_mcs_offset=0; ue_stats->dlsch_mcs_offset=0;
else else
...@@ -2372,17 +2374,16 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -2372,17 +2374,16 @@ void process_HARQ_feedback(uint8_t UE_id,
// Clear NAK stats and adjust mcs offset // Clear NAK stats and adjust mcs offset
// after measurement window timer expires // after measurement window timer expires
if ((ue_stats->dlsch_sliding_cnt == dlsch->ra_window_size) ) { if ((ue_stats->dlsch_sliding_cnt == dlsch->ra_window_size) ) {
if ((ue_stats->dlsch_mcs_offset == 0) && (ue_stats->dlsch_NAK[0] < 2)) if ((ue_stats->dlsch_mcs_offset == 0) && (ue_stats->dlsch_NAK_round0 < 2))
ue_stats->dlsch_mcs_offset = 1; ue_stats->dlsch_mcs_offset = 1;
if ((ue_stats->dlsch_mcs_offset == 1) && (ue_stats->dlsch_NAK[0] > 2)) if ((ue_stats->dlsch_mcs_offset == 1) && (ue_stats->dlsch_NAK_round0 > 2))
ue_stats->dlsch_mcs_offset = 0; ue_stats->dlsch_mcs_offset = 0;
if ((ue_stats->dlsch_mcs_offset == 0) && (ue_stats->dlsch_NAK[0] > 2)) if ((ue_stats->dlsch_mcs_offset == 0) && (ue_stats->dlsch_NAK_round0 > 2))
ue_stats->dlsch_mcs_offset = -1; ue_stats->dlsch_mcs_offset = -1;
if ((ue_stats->dlsch_mcs_offset == -1) && (ue_stats->dlsch_NAK[0] < 2)) if ((ue_stats->dlsch_mcs_offset == -1) && (ue_stats->dlsch_NAK_round0 < 2))
ue_stats->dlsch_mcs_offset = 0; ue_stats->dlsch_mcs_offset = 0;
for (j=0;j<phy_vars_eNB->dlsch_eNB[j][0]->Mdlharq;j++) ue_stats->dlsch_NAK_round0 = 0;
ue_stats->dlsch_NAK[j] = 0;
ue_stats->dlsch_sliding_cnt = 0; ue_stats->dlsch_sliding_cnt = 0;
} }
...@@ -2562,7 +2563,7 @@ void prach_procedures(PHY_VARS_eNB *phy_vars_eNB,uint8_t sched_subframe,uint8_t ...@@ -2562,7 +2563,7 @@ void prach_procedures(PHY_VARS_eNB *phy_vars_eNB,uint8_t sched_subframe,uint8_t
memset(&preamble_energy_list[0],0,64*sizeof(uint16_t)); memset(&preamble_energy_list[0],0,64*sizeof(uint16_t));
memset(&preamble_delay_list[0],0,64*sizeof(uint16_t)); memset(&preamble_delay_list[0],0,64*sizeof(uint16_t));
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
LOG_I(PHY,"[eNB %d][RAPROC] Frame %d, Subframe %d : PRACH RX Signal Power : %d dBm\n",phy_vars_eNB->Mod_id, LOG_D(PHY,"[eNB %d][RAPROC] Frame %d, Subframe %d : PRACH RX Signal Power : %d dBm\n",phy_vars_eNB->Mod_id,
frame,subframe,dB_fixed(signal_energy(&phy_vars_eNB->lte_eNB_common_vars.rxdata[0][0][subframe*phy_vars_eNB->lte_frame_parms.samples_per_tti],512)) - phy_vars_eNB->rx_total_gain_eNB_dB); frame,subframe,dB_fixed(signal_energy(&phy_vars_eNB->lte_eNB_common_vars.rxdata[0][0][subframe*phy_vars_eNB->lte_frame_parms.samples_per_tti],512)) - phy_vars_eNB->rx_total_gain_eNB_dB);
// LOG_I(PHY,"[eNB %d][RAPROC] PRACH: rootSequenceIndex %d, prach_ConfigIndex %d, zeroCorrelationZoneConfig %d, highSpeedFlag %d, prach_FreqOffset %d\n",phy_vars_eNB->Mod_id,phy_vars_eNB->lte_frame_parms.prach_config_common.rootSequenceIndex,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex, phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset); // LOG_I(PHY,"[eNB %d][RAPROC] PRACH: rootSequenceIndex %d, prach_ConfigIndex %d, zeroCorrelationZoneConfig %d, highSpeedFlag %d, prach_FreqOffset %d\n",phy_vars_eNB->Mod_id,phy_vars_eNB->lte_frame_parms.prach_config_common.rootSequenceIndex,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex, phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset);
...@@ -2644,7 +2645,7 @@ void ulsch_decoding_procedures(unsigned char subframe, unsigned int i, PHY_VARS_ ...@@ -2644,7 +2645,7 @@ void ulsch_decoding_procedures(unsigned char subframe, unsigned int i, PHY_VARS_
void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_flag,relaying_type_t r_type) { void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_flag,relaying_type_t r_type) {
//RX processing //RX processing
uint32_t l, ret=0,i,j; uint32_t l, ret=0,i,j,k;
uint32_t sect_id=0; uint32_t sect_id=0;
uint32_t harq_pid, round; uint32_t harq_pid, round;
uint8_t SR_payload,*pucch_payload=NULL,pucch_payload0[2]={0,0},pucch_payload1[2]={0,0}; uint8_t SR_payload,*pucch_payload=NULL,pucch_payload0[2]={0,0},pucch_payload1[2]={0,0};
...@@ -3028,7 +3029,7 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -3028,7 +3029,7 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
//#endif //#endif
} // This is Msg3 error } // This is Msg3 error
else { //normal ULSCH else { //normal ULSCH
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n", LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n",
phy_vars_eNB->Mod_id,harq_pid, phy_vars_eNB->Mod_id,harq_pid,
frame,subframe, i, frame,subframe, i,
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round-1, phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round-1,
...@@ -3036,13 +3037,15 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -3036,13 +3037,15 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->ulsch_eNB[i]->o_ACK[0], phy_vars_eNB->ulsch_eNB[i]->o_ACK[0],
phy_vars_eNB->ulsch_eNB[i]->o_ACK[1]); phy_vars_eNB->ulsch_eNB[i]->o_ACK[1]);
LOG_I(PHY,"[eNB] Frame %d, Subframe %d : ULSCH SDU (RX harq_pid %d) %d bytes:\n",frame,subframe, /*
LOG_T(PHY,"[eNB] Frame %d, Subframe %d : ULSCH SDU (RX harq_pid %d) %d bytes:\n",frame,subframe,
harq_pid,phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3); harq_pid,phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3);
if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->c[0]!=NULL){ if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->c[0]!=NULL){
for (j=0;j<phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3;j++) for (j=0;j<phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3;j++)
LOG_T(PHY,"%x.",phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->c[0][j]); LOG_T(PHY,"%x.",phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->c[0][j]);
LOG_T(PHY,"\n"); LOG_T(PHY,"\n");
} }
*/
// dump_ulsch(phy_vars_eNB,sched_subframe,i); // dump_ulsch(phy_vars_eNB,sched_subframe,i);
...@@ -3117,10 +3120,25 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -3117,10 +3120,25 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
LOG_I(PHY,"[eNB %d][RAPROC] Frame %d : RX Subframe %d Setting UE %d mode to PUSCH\n",phy_vars_eNB->Mod_id,frame,subframe,i); LOG_I(PHY,"[eNB %d][RAPROC] Frame %d : RX Subframe %d Setting UE %d mode to PUSCH\n",phy_vars_eNB->Mod_id,frame,subframe,i);
#endif //DEBUG_PHY_PROC #endif //DEBUG_PHY_PROC
for (k=0;k<8;k++) {//harq_processes
for (j=0;j<phy_vars_eNB->dlsch_eNB[i][0]->Mdlharq;j++) { for (j=0;j<phy_vars_eNB->dlsch_eNB[i][0]->Mdlharq;j++) {
phy_vars_eNB->eNB_UE_stats[i].dlsch_NAK[j]=0; phy_vars_eNB->eNB_UE_stats[i].dlsch_NAK[k][j]=0;
phy_vars_eNB->eNB_UE_stats[i].dlsch_sliding_cnt=0; phy_vars_eNB->eNB_UE_stats[i].dlsch_ACK[k][j]=0;
phy_vars_eNB->eNB_UE_stats[i].dlsch_trials[k][j]=0;
}
phy_vars_eNB->eNB_UE_stats[i].dlsch_l2_errors[k]=0;
phy_vars_eNB->eNB_UE_stats[i].ulsch_errors[k]=0;
phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[k]=0;
for (j=0;j<phy_vars_eNB->ulsch_eNB[i]->Mdlharq;j++) {
phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts[k][j]=0;
phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts_last[k][j]=0;
phy_vars_eNB->eNB_UE_stats[i].ulsch_round_errors[k][j]=0;
phy_vars_eNB->eNB_UE_stats[i].ulsch_round_fer[k][j]=0;
} }
}
phy_vars_eNB->eNB_UE_stats[i].dlsch_sliding_cnt=0;
phy_vars_eNB->eNB_UE_stats[i].dlsch_NAK_round0=0;
phy_vars_eNB->eNB_UE_stats[i].dlsch_mcs_offset=0;
//mac_xface->macphy_exit("Mode PUSCH. Exiting.\n"); //mac_xface->macphy_exit("Mode PUSCH. Exiting.\n");
} }
...@@ -3202,8 +3220,10 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -3202,8 +3220,10 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts[harq_pid][0]); phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts[harq_pid][0]);
//#endif //#endif
}
if (frame % 100 == 0) { if (frame % 100 == 0) {
for (round=0;round<phy_vars_eNB->ulsch_eNB[i]->Mdlharq;round++) {
if ((phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts[harq_pid][round] - if ((phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts[harq_pid][round] -
phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts_last[harq_pid][round]) != 0) phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts_last[harq_pid][round]) != 0)
phy_vars_eNB->eNB_UE_stats[i].ulsch_round_fer[harq_pid][round] = phy_vars_eNB->eNB_UE_stats[i].ulsch_round_fer[harq_pid][round] =
...@@ -3217,10 +3237,8 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -3217,10 +3237,8 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->eNB_UE_stats[i].ulsch_round_errors_last[harq_pid][round] = phy_vars_eNB->eNB_UE_stats[i].ulsch_round_errors_last[harq_pid][round] =
phy_vars_eNB->eNB_UE_stats[i].ulsch_round_errors[harq_pid][round]; phy_vars_eNB->eNB_UE_stats[i].ulsch_round_errors[harq_pid][round];
} }
} }
#ifdef PUCCH #ifdef PUCCH
else if ((phy_vars_eNB->dlsch_eNB[i][0]) && else if ((phy_vars_eNB->dlsch_eNB[i][0]) &&
(phy_vars_eNB->dlsch_eNB[i][0]->rnti>0)) { // check for PUCCH (phy_vars_eNB->dlsch_eNB[i][0]->rnti>0)) { // check for PUCCH
...@@ -3471,9 +3489,9 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -3471,9 +3489,9 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
#endif //PUCCH #endif //PUCCH
if ((frame % 10 == 0) && (subframe==4)) { if ((frame % 100 == 0) && (subframe==4)) {
phy_vars_eNB->eNB_UE_stats[i].dlsch_bitrate = (phy_vars_eNB->eNB_UE_stats[i].total_TBS - phy_vars_eNB->eNB_UE_stats[i].dlsch_bitrate = (phy_vars_eNB->eNB_UE_stats[i].total_TBS -
phy_vars_eNB->eNB_UE_stats[i].total_TBS_last)*10; phy_vars_eNB->eNB_UE_stats[i].total_TBS_last);
phy_vars_eNB->eNB_UE_stats[i].total_TBS_last = phy_vars_eNB->eNB_UE_stats[i].total_TBS; phy_vars_eNB->eNB_UE_stats[i].total_TBS_last = phy_vars_eNB->eNB_UE_stats[i].total_TBS;
} }
......
...@@ -109,7 +109,7 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u ...@@ -109,7 +109,7 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u
phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH += ((alpha_lut[phy_vars_ue->lte_frame_parms.ul_power_control_config_common.alpha]*PL)/100); phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH += ((alpha_lut[phy_vars_ue->lte_frame_parms.ul_power_control_config_common.alpha]*PL)/100);
phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH += phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUSCH; phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH += phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUSCH;
phy_vars_ue->ulsch_ue[eNB_id]->PHR = 15-phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH; // 15 dBm, FIX ME phy_vars_ue->ulsch_ue[eNB_id]->PHR = 15-phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH; // 15 dBm, FIX ME should be P0_max
if (phy_vars_ue->ulsch_ue[eNB_id]->PHR < -23) if (phy_vars_ue->ulsch_ue[eNB_id]->PHR < -23)
phy_vars_ue->ulsch_ue[eNB_id]->PHR = -23; phy_vars_ue->ulsch_ue[eNB_id]->PHR = -23;
......
...@@ -610,12 +610,12 @@ int main(int argc, char **argv) { ...@@ -610,12 +610,12 @@ int main(int argc, char **argv) {
} }
/*
memcpy(&dci_alloc[0].dci_pdu[0],&DLSCH_alloc_pdu2,sizeof(DCI2_5MHz_2A_M10PRB_TDD_t)); memcpy(&dci_alloc[0].dci_pdu[0],&DLSCH_alloc_pdu2,sizeof(DCI2_5MHz_2A_M10PRB_TDD_t));
dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t; dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t;
dci_alloc[0].L = 2; dci_alloc[0].L = 2;
dci_alloc[0].rnti = 0x1234; dci_alloc[0].rnti = 0x1234;
dci_alloc[0].nCCE = 0; dci_alloc[0].nCCE = 0;
/*
memcpy(&dci_alloc[1].dci_pdu[1],&DLSCH_alloc_pdu2,sizeof(DCI2_5MHz_2A_M10PRB_TDD_t)); memcpy(&dci_alloc[1].dci_pdu[1],&DLSCH_alloc_pdu2,sizeof(DCI2_5MHz_2A_M10PRB_TDD_t));
dci_alloc[1].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t; dci_alloc[1].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t;
dci_alloc[1].L = 3; dci_alloc[1].L = 3;
...@@ -631,7 +631,7 @@ int main(int argc, char **argv) { ...@@ -631,7 +631,7 @@ int main(int argc, char **argv) {
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME); LTE_NUMBER_OF_SUBFRAMES_PER_FRAME);
/*
num_pdcch_symbols = generate_dci_top(1, num_pdcch_symbols = generate_dci_top(1,
0, 0,
dci_alloc, dci_alloc,
...@@ -640,7 +640,7 @@ int main(int argc, char **argv) { ...@@ -640,7 +640,7 @@ int main(int argc, char **argv) {
&PHY_vars_eNb->lte_frame_parms, &PHY_vars_eNb->lte_frame_parms,
PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
0); 0);
*/
if (num_pdcch_symbols<3) { if (num_pdcch_symbols<3) {
......
...@@ -601,6 +601,8 @@ int main(int argc, char **argv) { ...@@ -601,6 +601,8 @@ int main(int argc, char **argv) {
PHY_vars_UE->pusch_config_dedicated[eNB_id].betaOffset_RI_Index = beta_RI; PHY_vars_UE->pusch_config_dedicated[eNB_id].betaOffset_RI_Index = beta_RI;
PHY_vars_UE->pusch_config_dedicated[eNB_id].betaOffset_CQI_Index = beta_CQI; PHY_vars_UE->pusch_config_dedicated[eNB_id].betaOffset_CQI_Index = beta_CQI;
PHY_vars_UE->ul_power_control_dedicated[eNB_id].deltaMCS_Enabled = 1;
printf("PUSCH Beta : ACK %f, RI %f, CQI %f\n",(double)beta_ack[beta_ACK]/8,(double)beta_ri[beta_RI]/8,(double)beta_cqi[beta_CQI]/8); printf("PUSCH Beta : ACK %f, RI %f, CQI %f\n",(double)beta_ack[beta_ACK]/8,(double)beta_ri[beta_RI]/8,(double)beta_cqi[beta_CQI]/8);
UE2eNB = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, UE2eNB = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
...@@ -1264,12 +1266,13 @@ int main(int argc, char **argv) { ...@@ -1264,12 +1266,13 @@ int main(int argc, char **argv) {
#endif #endif
} //trials } //trials
printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %d dB (gain %f dB), N0W %f dB, I0 %d dB [ (%d,%d) dB / (%d,%d) dB ]**************************\n", printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %d dB (gain %f dB), N0W %f dB, I0 %d dB, delta_IF %d [ (%d,%d) dB / (%d,%d) dB ]**************************\n",
nb_rb,mcs,SNR,SNR2, nb_rb,mcs,SNR,SNR2,
tx_lev_dB, tx_lev_dB,
20*log10(tx_gain), 20*log10(tx_gain),
(double)N0, (double)N0,
PHY_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dB, PHY_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dB,
get_hundred_times_delta_IF(PHY_vars_UE,eNB_id,harq_pid) ,
dB_fixed(PHY_vars_eNB->lte_eNB_pusch_vars[0]->ulsch_power[0]), dB_fixed(PHY_vars_eNB->lte_eNB_pusch_vars[0]->ulsch_power[0]),
dB_fixed(PHY_vars_eNB->lte_eNB_pusch_vars[0]->ulsch_power[1]), dB_fixed(PHY_vars_eNB->lte_eNB_pusch_vars[0]->ulsch_power[1]),
PHY_vars_eNB->PHY_measurements_eNB->n0_power_dB[0], PHY_vars_eNB->PHY_measurements_eNB->n0_power_dB[0],
......
...@@ -406,7 +406,7 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header, ...@@ -406,7 +406,7 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
ce_len++; ce_len++;
else { else {
LOG_E(MAC,"unknown CE %d \n", lcid); LOG_E(MAC,"unknown CE %d \n", lcid);
exit(-1); mac_xface->macphy_exit("unknown CE");
} }
} }
} }
...@@ -593,7 +593,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -593,7 +593,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
BSR_TABLE[UE_template->bsr_info[LCGID2]]+ BSR_TABLE[UE_template->bsr_info[LCGID2]]+
BSR_TABLE[UE_template->bsr_info[LCGID3]]; // This is when remaining data in UE buffers (even if SR is triggered) BSR_TABLE[UE_template->bsr_info[LCGID3]]; // This is when remaining data in UE buffers (even if SR is triggered)
LOG_D(MAC,"[eNB %d][PUSCH %d/%x] Frame %d subframeP %d Scheduled UE, BSR for LCGID0 %d, LCGID1 %d, LCGID2 %d LCGID3 %d, BO %d\n", LOG_I(MAC,"[eNB %d][PUSCH %d/%x] Frame %d subframeP %d Scheduled UE, BSR for LCGID0 %d, LCGID1 %d, LCGID2 %d LCGID3 %d, BO %d\n",
module_idP, module_idP,
UE_id, UE_id,
rnti, rnti,
......
...@@ -24,8 +24,6 @@ endif ...@@ -24,8 +24,6 @@ endif
CFLAGS += -O2 CFLAGS += -O2
CFLAGS += -DDRIVER2013 -I$(OPENAIR_TARGETS)/ARCH/COMMON CFLAGS += -DDRIVER2013 -I$(OPENAIR_TARGETS)/ARCH/COMMON
CFLAGS += -DMAX_NUM_CCs=1
ifeq ($(USRP),0) ifeq ($(USRP),0)
CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/DEFS -DENABLE_VCD_FIFO CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/DEFS -DENABLE_VCD_FIFO
endif endif
...@@ -39,13 +37,10 @@ ifdef LIBCONFIG_LONG ...@@ -39,13 +37,10 @@ ifdef LIBCONFIG_LONG
CFLAGS += -DLIBCONFIG_LONG CFLAGS += -DLIBCONFIG_LONG
endif endif
ifndef RTAI ifndef RTAI
RTAI=1 RTAI=1
endif endif
ifeq ($(ENABLE_RAL), 1) ifeq ($(ENABLE_RAL), 1)
CFLAGS += -DENABLE_RAL CFLAGS += -DENABLE_RAL
endif endif
...@@ -65,6 +60,9 @@ endif ...@@ -65,6 +60,9 @@ endif
endif endif
endif endif
ifdef JF
CFLAGS += -DJUMBO_FRAME
endif
ifeq ($(RTAI),1) ifeq ($(RTAI),1)
CFLAGS += -DENABLE_RTAI_CLOCK CFLAGS += -DENABLE_RTAI_CLOCK
...@@ -138,7 +136,6 @@ endif ...@@ -138,7 +136,6 @@ endif
RTAI_OBJ += $(UTILS_OBJS) RTAI_OBJ += $(UTILS_OBJS)
#ifdef ENABLE_ITTI #ifdef ENABLE_ITTI
CFLAGS += -DEXMIMO_IOT CFLAGS += -DEXMIMO_IOT
#endif #endif
......
...@@ -301,8 +301,7 @@ static int mbox_bounds[20] = {8,16,24,30,38,46,54,60,68,7 ...@@ -301,8 +301,7 @@ static int mbox_bounds[20] = {8,16,24,30,38,46,54,60,68,7
static LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]; static LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
int multi_thread=1; int multi_thread=1;
// this allows uint32_t target_dl_mcs = 28; //maximum allowed mcs
uint32_t target_dl_mcs = 28;
uint32_t target_ul_mcs = 8; uint32_t target_ul_mcs = 8;
...@@ -453,7 +452,8 @@ static void *scope_thread(void *arg) { ...@@ -453,7 +452,8 @@ static void *scope_thread(void *arg) {
} }
//printf("doing forms\n"); //printf("doing forms\n");
usleep(100000); // 100 ms //usleep(100000); // 100 ms
sleep(1);
} }
# ifdef ENABLE_XFORMS_WRITE_STATS # ifdef ENABLE_XFORMS_WRITE_STATS
...@@ -1784,8 +1784,9 @@ static void get_options (int argc, char **argv) { ...@@ -1784,8 +1784,9 @@ static void get_options (int argc, char **argv) {
carrier_freq[CC_id][1] = downlink_frequency[CC_id][1]; carrier_freq[CC_id][1] = downlink_frequency[CC_id][1];
carrier_freq[CC_id][2] = downlink_frequency[CC_id][2]; carrier_freq[CC_id][2] = downlink_frequency[CC_id][2];
carrier_freq[CC_id][3] = downlink_frequency[CC_id][3]; carrier_freq[CC_id][3] = downlink_frequency[CC_id][3];
}
printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]); printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]);
}
break; break;
case 'd': case 'd':
...@@ -2338,6 +2339,7 @@ int main(int argc, char **argv) { ...@@ -2338,6 +2339,7 @@ int main(int argc, char **argv) {
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) { if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
printf("cannot create ITTI tasks\n");
exit(-1); // need a softer mode exit(-1); // need a softer mode
} }
printf("ITTI tasks created\n"); printf("ITTI tasks created\n");
...@@ -2366,10 +2368,10 @@ int main(int argc, char **argv) { ...@@ -2366,10 +2368,10 @@ int main(int argc, char **argv) {
openair_daq_vars.timing_advance = 0; openair_daq_vars.timing_advance = 0;
openair0_rf_map rf_map[MAX_NUM_CCs]; openair0_rf_map rf_map[MAX_NUM_CCs];
rf_map[0].card=0; for(CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
rf_map[0].chain=0; rf_map[CC_id].card=0;
rf_map[1].card=0; rf_map[CC_id].chain=CC_id+1;
rf_map[1].chain=1; }
// connect the TX/RX buffers // connect the TX/RX buffers
if (UE_flag==1) { if (UE_flag==1) {
......
...@@ -16,11 +16,11 @@ create_form_stats_form( void ) ...@@ -16,11 +16,11 @@ create_form_stats_form( void )
fdui->vdata = fdui->cdata = NULL; fdui->vdata = fdui->cdata = NULL;
fdui->ldata = 0; fdui->ldata = 0;
fdui->stats_form = fl_bgn_form( FL_NO_BOX, 1115, 659 ); fdui->stats_form = fl_bgn_form( FL_NO_BOX, 1115, 900 );
obj = fl_add_box( FL_UP_BOX, 0, 0, 1115, 659, "" ); obj = fl_add_box( FL_UP_BOX, 0, 0, 1115, 900, "" );
fdui->stats_text = obj = fl_add_text( FL_NORMAL_TEXT, 60, 50, 1000, 580, "test" ); fdui->stats_text = obj = fl_add_text( FL_NORMAL_TEXT, 60, 50, 1000, 810, "test" );
fl_set_object_lsize( obj, FL_TINY_SIZE ); fl_set_object_lsize( obj, FL_TINY_SIZE );
fl_end_form( ); fl_end_form( );
......
...@@ -9,13 +9,13 @@ Unit of measure: FL_COORD_PIXEL ...@@ -9,13 +9,13 @@ Unit of measure: FL_COORD_PIXEL
=============== FORM =============== =============== FORM ===============
Name: stats_form Name: stats_form
Width: 1115 Width: 1115
Height: 659 Height: 900
Number of Objects: 2 Number of Objects: 2
-------------------- --------------------
class: FL_BOX class: FL_BOX
type: UP_BOX type: UP_BOX
box: 0 0 1115 659 box: 0 0 1115 900
boxtype: FL_UP_BOX boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1 colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER alignment: FL_ALIGN_CENTER
...@@ -33,7 +33,7 @@ argument: ...@@ -33,7 +33,7 @@ argument:
-------------------- --------------------
class: FL_TEXT class: FL_TEXT
type: NORMAL_TEXT type: NORMAL_TEXT
box: 60 50 1000 580 box: 60 50 1000 810
boxtype: FL_FLAT_BOX boxtype: FL_FLAT_BOX
colors: FL_COL1 FL_MCOL colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
......
/* Header file generated by fdesign on Thu Jun 14 17:53:15 2012 */ /* Header file generated by fdesign on Thu Aug 28 12:13:51 2014 */
#ifndef FD_stats_form_h_ #ifndef FD_stats_form_h_
#define FD_stats_form_h_ #define FD_stats_form_h_
......
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