Commit f35d25bc authored by kaltenbe's avatar kaltenbe

adding a few vdc signals to debug ue realtime behaviour


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7634 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 014010e5
......@@ -101,6 +101,8 @@ const char* eurecomVariablesNames[] = {
"itti_alloc_msg",
"mp_alloc",
"mp_free",
"ue_inst_cnt_rx",
"ue_inst_cnt_tx"
};
const char* eurecomFunctionsNames[] = {
......@@ -128,6 +130,8 @@ const char* eurecomFunctionsNames[] = {
"eNB_thread_rx8",
"eNB_thread_tx9",
"eNB_thread_rx9",
"ue_thread_tx",
"ue_thread_rx",
/* PHY signals */
"ue_synch",
......@@ -198,6 +202,7 @@ const char* eurecomFunctionsNames[] = {
"mac_dlsch_preprocessor",
"mac_schedule_dlsch",
"mac_fill_dlsch_dci",
"macxface_out_of_sync_ind",
"macxface_ue_decode_si",
"macxface_ue_decode_ccch",
......@@ -210,7 +215,6 @@ const char* eurecomFunctionsNames[] = {
"macxface_ue_get_sr",
"ue_send_mch_sdu",
"ue_synch",
/*RLC signals */
"rlc_data_req",
......
......@@ -73,6 +73,8 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_ALLOC_MSG,
VCD_SIGNAL_DUMPER_VARIABLE_MP_ALLOC,
VCD_SIGNAL_DUMPER_VARIABLE_MP_FREE,
VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_RX,
VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_TX,
VCD_SIGNAL_DUMPER_VARIABLES_LAST,
VCD_SIGNAL_DUMPER_VARIABLES_END = VCD_SIGNAL_DUMPER_VARIABLES_LAST,
} vcd_signal_dump_variables;
......@@ -102,6 +104,8 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX8,
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX9,
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX9,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RX,
/* PHY signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH,
......
......@@ -623,6 +623,7 @@ static void *UE_thread_tx(void *arg)
exit_fun("nothing to add");
return &UE_thread_tx_retval;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_TX, 1 );
if ((subframe_select( &UE->lte_frame_parms, UE->slot_tx>>1 ) == SF_UL) ||
(UE->lte_frame_parms.frame_type == FDD)) {
......@@ -661,6 +662,17 @@ static void *UE_thread_tx(void *arg)
}
#endif
UE->slot_tx += 2;
if (UE->slot_tx >= 20) {
UE->slot_tx -= 20;
UE->frame_tx++;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX_UE, UE->frame_tx );
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX_UE, UE->slot_tx>>1 );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_TX, 0 );
if (pthread_mutex_lock(&UE->mutex_tx) != 0) {
LOG_E( PHY, "[SCHED][UE] error locking mutex for UE TX thread\n" );
......@@ -669,6 +681,7 @@ static void *UE_thread_tx(void *arg)
}
UE->instance_cnt_tx--;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_TX, UE->instance_cnt_tx);
if (pthread_mutex_unlock(&UE->mutex_tx) != 0) {
LOG_E( PHY, "[SCHED][UE] error unlocking mutex for UE TX thread\n" );
......@@ -676,15 +689,6 @@ static void *UE_thread_tx(void *arg)
return &UE_thread_tx_retval;
}
UE->slot_tx += 2;
if (UE->slot_tx >= 20) {
UE->slot_tx -= 20;
UE->frame_tx++;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX_UE, UE->frame_tx );
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX_UE, UE->slot_tx>>1 );
}
return &UE_thread_tx_retval;
......@@ -794,6 +798,7 @@ static void *UE_thread_rx(void *arg)
return &UE_thread_rx_retval;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RX, 1 );
for (i=0; i<2; i++) {
if ((subframe_select( &UE->lte_frame_parms, UE->slot_rx>>1 ) == SF_DL) ||
(UE->lte_frame_parms.frame_type == FDD)) {
......@@ -908,6 +913,8 @@ static void *UE_thread_rx(void *arg)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX_UE, UE->slot_rx>>1 );
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RX, 0 );
if (pthread_mutex_lock(&UE->mutex_rx) != 0) {
LOG_E( PHY, "[SCHED][UE] error locking mutex for UE RX\n" );
......@@ -916,6 +923,7 @@ static void *UE_thread_rx(void *arg)
}
UE->instance_cnt_rx--;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_RX, UE->instance_cnt_rx);
if (pthread_mutex_unlock(&UE->mutex_rx) != 0) {
LOG_E( PHY, "[SCHED][UE] error unlocking mutex for UE RX\n" );
......@@ -1110,6 +1118,9 @@ void *UE_thread(void *arg)
return &UE_thread_retval;
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_RX, instance_cnt_rx);
if (instance_cnt_rx == 0) {
if (pthread_cond_signal(&UE->cond_rx) != 0) {
LOG_E( PHY, "[SCHED][UE] ERROR pthread_cond_signal for UE RX thread\n" );
......@@ -1117,6 +1128,8 @@ void *UE_thread(void *arg)
return &UE_thread_retval;
}
LOG_D(HW,"signalled rx thread to wake up, hw_frame %d, hw_subframe %d (time %lli)\n", frame, hw_subframe, rt_get_time_ns()-T0 );
if (UE->mode == rx_calib_ue) {
if (frame == 10) {
LOG_D(PHY,
......@@ -1156,6 +1169,8 @@ void *UE_thread(void *arg)
exit_fun("nothing to add");
return &UE_thread_retval;
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_TX, instance_cnt_tx);
if (instance_cnt_tx == 0) {
if (pthread_cond_signal(&UE->cond_tx) != 0) {
......@@ -1163,6 +1178,8 @@ void *UE_thread(void *arg)
exit_fun("nothing to add");
return &UE_thread_retval;
}
LOG_D(HW,"signalled tx thread to wake up, hw_frame %d, hw_subframe %d (time %lli)\n", frame, hw_subframe, rt_get_time_ns()-T0 );
} else {
LOG_E( PHY, "[SCHED][UE] UE TX thread busy!!\n" );
exit_fun("nothing to add");
......@@ -1504,11 +1521,13 @@ void *UE_thread(void *arg)
exit_fun("nothing to add");
} else {
UE->instance_cnt_rx++;
//printf("UE_thread: Unlocking UE mutex_rx\n");
int instance_cnt_rx = ++UE->instance_cnt_rx;
pthread_mutex_unlock(&UE->mutex_rx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_RX, instance_cnt_rx);
if (UE->instance_cnt_rx == 0) {
if (instance_cnt_rx == 0) {
LOG_D(HW,"Scheduling UE RX for frame %d (hw frame %d), subframe %d (%d), mode %d\n",UE->frame_rx,frame,slot>>1,UE->slot_rx>>1,UE->mode);
if (pthread_cond_signal(&UE->cond_rx) != 0) {
......@@ -1548,11 +1567,12 @@ void *UE_thread(void *arg)
exit_fun("nothing to add");
} else {
UE->instance_cnt_tx++;
//printf("UE_thread: Unlocking UE mutex_rx\n");
int instance_cnt_tx = ++UE->instance_cnt_tx;
pthread_mutex_unlock(&UE->mutex_tx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_TX, instance_cnt_tx);
if (UE->instance_cnt_tx == 0) {
if (instance_cnt_tx == 0) {
LOG_D(HW,"Scheduling UE TX for frame %d (hw frame %d), subframe %d (%d), mode %d\n",UE->frame_tx,frame,slot>>1,UE->slot_tx>>1,UE->mode);
if (pthread_cond_signal(&UE->cond_tx) != 0) {
......
[*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Thu Feb 5 17:45:30 2015
[*] Tue Jun 23 10:22:38 2015
[*]
[dumpfile] "/tmp/openair_dump_UE.vcd"
[dumpfile_mtime] "Thu Feb 5 17:10:05 2015"
[dumpfile_size] 18764854
[savefile] "/home/ephese/openair4G/targets/RT/USER/ue_exmimo2.gtkw"
[timestart] 4937140000
[size] 1463 640
[dumpfile_mtime] "Tue Jun 23 10:21:56 2015"
[dumpfile_size] 15561726
[savefile] "/home/stevens/openair4G/targets/RT/USER/ue_exmimo2.gtkw"
[timestart] 10448200000
[size] 1215 640
[pos] 105 102
*-22.000000 4947033063 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
*-23.292629 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 224
[signals_width] 262
[sst_expanded] 1
......@@ -26,9 +26,15 @@ functions.rt_sleep
variables.subframe_number_RX_UE[63:0]
variables.subframe_number_TX_UE[63:0]
variables.slot_number_RX_UE[63:0]
@25
variables.slot_number_RX_UE[63:0]
@28
functions.ue_thread_rx
functions.ue_thread_tx
@420
variables.ue_inst_cnt_rx[63:0]
@421
variables.ue_inst_cnt_tx[63:0]
@28
functions.phy_procedures_ue_rx
functions.phy_procedures_ue_tx
@24
......
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