Commit 57dfae19 authored by nikaeinn's avatar nikaeinn

* update ulsim/dlsim stats


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6268 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2e579801
......@@ -6,7 +6,7 @@ OPENAIR1_TOP = $(OPENAIR1_DIR)
OPENAIR2_TOP = $(OPENAIR2_DIR)
OPENAIR3 = $(OPENAIR3_DIR)
CFLAGS += -DMAX_NUM_CCs=1 -Wall -DPHYSIM -DNODE_RG -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 -DMALLOC_CHECK_=1 -DENABLE_VCD_FIFO # -Wno-packed-bitfield-compat
CFLAGS += -DMAX_NUM_CCs=1 -Wall -DPHYSIM -DNODE_RG -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 -DMALLOC_CHECK_=1 -DENABLE_VCD_FIFO -DLOG_NO_THREAD # -Wno-packed-bitfield-compat
# DCI Debug
......
......@@ -337,7 +337,7 @@ int main(int argc, char **argv) {
int rballocset=0;
int print_perf=0;
int test_perf=0;
int dump_table=0;
int llr8_flag=0;
double effective_rate=0.0;
......@@ -366,7 +366,7 @@ int main(int argc, char **argv) {
snr0 = 0;
num_layers = 1;
while ((c = getopt (argc, argv, "ahdpDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:")) != -1) {
while ((c = getopt (argc, argv, "ahdpXDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:")) != -1) {
switch (c)
{
case 'a':
......@@ -561,6 +561,9 @@ int main(int argc, char **argv) {
test_perf=atoi(optarg);
//print_perf =1;
break;
case 'X':
dump_table=1;
break;
case 'h':
default:
printf("%s -h(elp) -a(wgn on) -d(ci decoding on) -p(extended prefix on) -m mcs1 -M mcs2 -n n_frames -s snr0 -x transmission mode (1,2,5,6) -y TXant -z RXant -I trch_file\n",argv[0]);
......@@ -3298,17 +3301,22 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
// sort table
qsort (table_tx, time_vector_tx.size, sizeof(double), &compare);
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
#ifdef DEBUG
int n;
printf("The transmitter raw data: \n");
for (n=0; n< time_vector_tx.size; n++)
printf("%f ", table_tx[n]);
printf("\n");
printf("The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++)
printf("%f ", table_rx[n]);
printf("\n");
#endif
if (dump_table == 1 ) {
set_component_filelog(USIM); // file located in /tmp/usim.txt
int n;
LOG_F(USIM,"The transmitter raw data: \n");
for (n=0; n< time_vector_tx.size; n++){
printf("%f ", table_tx[n]);
LOG_F(USIM,"%f ", table_tx[n]);
}
LOG_F(USIM,"\n");
LOG_F(USIM,"The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++){
// printf("%f ", table_rx[n]);
LOG_F(USIM,"%f ", table_rx[n]);
}
LOG_F(USIM,"\n");
}
double tx_median = table_tx[time_vector_tx.size/2];
double tx_q1 = table_tx[time_vector_tx.size/4];
double tx_q3 = table_tx[3*time_vector_tx.size/4];
......
......@@ -258,6 +258,7 @@ int main(int argc, char **argv) {
int s,Kr,Kr_bytes;
int dump_perf=0;
int test_perf=0;
int dump_table=0;
double effective_rate=0.0;
char channel_model_input[10];
......@@ -276,7 +277,7 @@ int main(int argc, char **argv) {
logInit();
while ((c = getopt (argc, argv, "hapbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:L")) != -1) {
while ((c = getopt (argc, argv, "hapbXm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:L")) != -1) {
switch (c) {
case 'a':
channel_model = AWGN;
......@@ -1313,17 +1314,22 @@ int main(int argc, char **argv) {
// sort table
qsort (table_tx, time_vector_tx.size, sizeof(double), &compare);
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
#ifdef DEBUG
int n;
printf("The transmitter raw data: \n");
for (n=0; n< time_vector_tx.size; n++)
printf("%f ", table_tx[n]);
printf("\n");
printf("The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++)
printf("%f ", table_rx[n]);
printf("\n");
#endif
if (dump_table == 1 ) {
int n;
set_component_filelog(USIM); // file located in /tmp/usim.txt
LOG_F(USIM,"The transmitter raw data: \n");
for (n=0; n< time_vector_tx.size; n++){
// printf("%f ", table_tx[n]);
LOG_F(USIM,"%f ", table_tx[n]);
}
LOG_F(USIM,"\n");
LOG_F(USIM,"The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++){
// printf("%f ", table_rx[n]);
LOG_F(USIM,"%f ", table_rx[n]);
}
LOG_F(USIM,"\n");
}
double tx_median = table_tx[time_vector_tx.size/2];
double tx_q1 = table_tx[time_vector_tx.size/4];
double tx_q3 = table_tx[3*time_vector_tx.size/4];
......
......@@ -381,13 +381,21 @@ int logInit (void)
g_log->log_component[TMR].filelog = 0;
g_log->log_component[TMR].filelog_name = "";
g_log->log_component[USIM].name = "USIM";
g_log->log_component[USIM].level = LOG_DEBUG;
g_log->log_component[USIM].flag = LOG_NONE;
g_log->log_component[USIM].interval = 1;
g_log->log_component[USIM].fd = 0;
g_log->log_component[USIM].filelog = 0;
g_log->log_component[USIM].filelog_name = "/tmp/usim.txt";
/* following log component are used for the localization*/
g_log->log_component[LOCALIZE].name = "LOCALIZE";
g_log->log_component[LOCALIZE].level = LOG_EMERG;
g_log->log_component[LOCALIZE].flag = LOG_MED;
g_log->log_component[LOCALIZE].interval = 1;
g_log->log_component[LOCALIZE].fd = 0;
g_log->log_component[LOCALIZE].filelog = 1;
g_log->log_component[LOCALIZE].filelog = 0;
g_log->log_component[LOCALIZE].filelog_name = "/tmp/localize.log";
g_log->level2string[LOG_EMERG] = "G"; //EMERG
......@@ -587,7 +595,7 @@ void logRecord_thread_safe(const char *file, const char *func,
}
if ((g_log->log_component[comp].filelog) && (level == LOG_FILE)) {
if (write(g_log->log_component[comp].fd, log_buffer, total_len) < total_len) {
// TODO assert ?
// TODO assert ?
}
}
#endif
......@@ -750,7 +758,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
}
if ((g_log->log_component[comp].filelog) && (level == LOG_FILE)) {
if (write(g_log->log_component[comp].fd, c->log_buffer, len) < len) {
// TODO assert ?
// TODO assert ?
}
}
#else
......
......@@ -265,6 +265,7 @@ typedef enum {
RAL_UE,
ENB_APP,
TMR,
USIM,
LOCALIZE,
MAX_LOG_COMPONENTS,
} comp_name_t;
......
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