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,
break;
default:
printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n");
exit(-1);
return(255);
break;
}
......
......@@ -927,7 +927,7 @@ unsigned char phy_threegpplte_turbo_decoder16(short *y,
break;
default:
printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n");
exit(-1);
return(255);
break;
}
......
......@@ -1033,7 +1033,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
break;
default:
printf("FATAL: 3gpplte_turbo_decoder_sse.c: Unknown CRC\n");
exit(-1);
return(255);
break;
}
......
......@@ -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 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);
#ifdef USER_MODE
exit(-1);
#else
return(-1);
#endif
}
//initialize all bits as transmitted
......@@ -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 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);
#ifdef USER_MODE
exit(-1);
#else
return(-1);
#endif
}
//initialize all bits as transmitted
......
......@@ -2554,7 +2554,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **lte_ue_pdcch_vars,int do_common,uint
CCEmap = CCEmap2;
else {
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) {
case 1:
......
......@@ -219,7 +219,7 @@ void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t
}
else {
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;
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
}
else {
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;
shift = (rb_alloc>>1)&1;
......
......@@ -555,30 +555,33 @@ typedef struct {
UE_MODE_t mode;
/// Current sector where UE is attached
uint8_t sector;
///
uint32_t dlsch_sliding_cnt;
///
uint32_t dlsch_ACK[8];
uint32_t dlsch_NAK[8];
///
uint32_t dlsch_l2_errors;
///
uint32_t dlsch_trials[8];
///
uint32_t ulsch_errors[3];
///
uint32_t ulsch_consecutive_errors[3];
///
uint32_t ulsch_decoding_attempts[3][8];
///
uint32_t ulsch_round_errors[3][8];
uint32_t ulsch_decoding_attempts_last[3][8];
uint32_t ulsch_round_errors_last[3][8];
uint32_t ulsch_round_fer[3][8];
/// dlsch l2 errors
uint32_t dlsch_l2_errors[8];
/// dlsch trials per harq and round
uint32_t dlsch_trials[8][8];
/// dlsch ACK/NACK per hard_pid and round
uint32_t dlsch_ACK[8][8];
uint32_t dlsch_NAK[8][8];
/// ulsch l2 errors per harq_pid
uint32_t ulsch_errors[8];
/// ulsch l2 consecutive errors per harq_pid
uint32_t ulsch_consecutive_errors[8];
/// ulsch trials/errors/fer per harq and round
uint32_t ulsch_decoding_attempts[8][8];
uint32_t ulsch_round_errors[8][8];
uint32_t ulsch_decoding_attempts_last[8][8];
uint32_t ulsch_round_errors_last[8][8];
uint32_t ulsch_round_fer[8][8];
uint32_t sr_received;
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;
/// Target mcs1 after rate-adaptation (used by MAC layer scheduler)
uint8_t dlsch_mcs1;
/// Target mcs2 after rate-adaptation (used by MAC layer scheduler)
......@@ -589,7 +592,7 @@ typedef struct {
int total_TBS;
/// Total bits acknowledged on PDSCH (last interval)
int total_TBS_last;
/// Bitrate on the PDSCH
/// Bitrate on the PDSCH [bps]
unsigned int dlsch_bitrate;
// unsigned int total_transmitted_bits;
} 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
&phy_vars_eNB->dlsch_turbo_encoding_stats,
&phy_vars_eNB->dlsch_interleaving_stats
)<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);
......
This diff is collapsed.
This diff is collapsed.
......@@ -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 += 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)
phy_vars_ue->ulsch_ue[eNB_id]->PHR = -23;
......
......@@ -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));
dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t;
dci_alloc[0].L = 2;
dci_alloc[0].rnti = 0x1234;
dci_alloc[0].nCCE = 0;
/*
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].L = 3;
......@@ -631,7 +631,7 @@ int main(int argc, char **argv) {
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME);
/*
num_pdcch_symbols = generate_dci_top(1,
0,
dci_alloc,
......@@ -640,7 +640,7 @@ int main(int argc, char **argv) {
&PHY_vars_eNb->lte_frame_parms,
PHY_vars_eNb->lte_eNB_common_vars.txdataF[0],
0);
*/
if (num_pdcch_symbols<3) {
......
......@@ -600,6 +600,8 @@ int main(int argc, char **argv) {
PHY_vars_UE->pusch_config_dedicated[eNB_id].betaOffset_ACK_Index = beta_ACK;
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->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);
......@@ -1264,12 +1266,13 @@ int main(int argc, char **argv) {
#endif
} //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,
tx_lev_dB,
20*log10(tx_gain),
(double)N0,
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[1]),
PHY_vars_eNB->PHY_measurements_eNB->n0_power_dB[0],
......
......@@ -406,7 +406,7 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
ce_len++;
else {
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,
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)
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,
UE_id,
rnti,
......
......@@ -24,8 +24,6 @@ endif
CFLAGS += -O2
CFLAGS += -DDRIVER2013 -I$(OPENAIR_TARGETS)/ARCH/COMMON
CFLAGS += -DMAX_NUM_CCs=1
ifeq ($(USRP),0)
CFLAGS += -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/USERSPACE/LIB/ -I$(OPENAIR_TARGETS)/ARCH/EXMIMO/DEFS -DENABLE_VCD_FIFO
endif
......@@ -39,13 +37,10 @@ ifdef LIBCONFIG_LONG
CFLAGS += -DLIBCONFIG_LONG
endif
ifndef RTAI
RTAI=1
endif
ifeq ($(ENABLE_RAL), 1)
CFLAGS += -DENABLE_RAL
endif
......@@ -65,6 +60,9 @@ endif
endif
endif
ifdef JF
CFLAGS += -DJUMBO_FRAME
endif
ifeq ($(RTAI),1)
CFLAGS += -DENABLE_RTAI_CLOCK
......@@ -138,7 +136,6 @@ endif
RTAI_OBJ += $(UTILS_OBJS)
#ifdef ENABLE_ITTI
CFLAGS += -DEXMIMO_IOT
#endif
......
......@@ -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];
int multi_thread=1;
// this allows
uint32_t target_dl_mcs = 28;
uint32_t target_dl_mcs = 28; //maximum allowed mcs
uint32_t target_ul_mcs = 8;
......@@ -453,7 +452,8 @@ static void *scope_thread(void *arg) {
}
//printf("doing forms\n");
usleep(100000); // 100 ms
//usleep(100000); // 100 ms
sleep(1);
}
# ifdef ENABLE_XFORMS_WRITE_STATS
......@@ -1776,16 +1776,17 @@ static void get_options (int argc, char **argv) {
break;
case 'C':
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
downlink_frequency[CC_id][0] = atof(optarg); // Use float to avoid issue with frequency over 2^31.
downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0];
downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0];
downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0];
carrier_freq[CC_id][0] = downlink_frequency[CC_id][0];
carrier_freq[CC_id][1] = downlink_frequency[CC_id][1];
carrier_freq[CC_id][2] = downlink_frequency[CC_id][2];
carrier_freq[CC_id][3] = downlink_frequency[CC_id][3];
downlink_frequency[CC_id][0] = atof(optarg); // Use float to avoid issue with frequency over 2^31.
downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0];
downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0];
downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0];
carrier_freq[CC_id][0] = downlink_frequency[CC_id][0];
carrier_freq[CC_id][1] = downlink_frequency[CC_id][1];
carrier_freq[CC_id][2] = downlink_frequency[CC_id][2];
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;
case 'd':
......@@ -2338,6 +2339,7 @@ int main(int argc, char **argv) {
#if defined(ENABLE_ITTI)
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
printf("cannot create ITTI tasks\n");
exit(-1); // need a softer mode
}
printf("ITTI tasks created\n");
......@@ -2366,10 +2368,10 @@ int main(int argc, char **argv) {
openair_daq_vars.timing_advance = 0;
openair0_rf_map rf_map[MAX_NUM_CCs];
rf_map[0].card=0;
rf_map[0].chain=0;
rf_map[1].card=0;
rf_map[1].chain=1;
for(CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
rf_map[CC_id].card=0;
rf_map[CC_id].chain=CC_id+1;
}
// connect the TX/RX buffers
if (UE_flag==1) {
......
......@@ -16,11 +16,11 @@ create_form_stats_form( void )
fdui->vdata = fdui->cdata = NULL;
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_end_form( );
......
......@@ -9,13 +9,13 @@ Unit of measure: FL_COORD_PIXEL
=============== FORM ===============
Name: stats_form
Width: 1115
Height: 659
Height: 900
Number of Objects: 2
--------------------
class: FL_BOX
type: UP_BOX
box: 0 0 1115 659
box: 0 0 1115 900
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
......@@ -33,7 +33,7 @@ argument:
--------------------
class: FL_TEXT
type: NORMAL_TEXT
box: 60 50 1000 580
box: 60 50 1000 810
boxtype: FL_FLAT_BOX
colors: FL_COL1 FL_MCOL
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_
#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