Commit 53417ed1 authored by Florian Kaltenberger's avatar Florian Kaltenberger Committed by Wolfgang A. Mozart

init dumpframe, phy_scope_ue during initial_sync, fixes to loop_through_memory

parent ec4429c1
...@@ -59,6 +59,8 @@ ...@@ -59,6 +59,8 @@
#include "T.h" #include "T.h"
#include "PHY/TOOLS/nr_phy_scope.h"
extern double cpuf; extern double cpuf;
//static nfapi_nr_config_request_t config_t; //static nfapi_nr_config_request_t config_t;
//static nfapi_nr_config_request_t* config =&config_t; //static nfapi_nr_config_request_t* config =&config_t;
...@@ -587,6 +589,12 @@ static void *UE_thread_synch(void *arg) { ...@@ -587,6 +589,12 @@ static void *UE_thread_synch(void *arg) {
break; break;
} }
extern FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX];
phy_scope_UE(form_ue[0],
PHY_vars_UE_g[0][0],
0,0,7);
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
// indicate readiness // indicate readiness
UE->proc.instance_cnt_synch--; UE->proc.instance_cnt_synch--;
...@@ -1016,6 +1024,10 @@ void *UE_thread(void *arg) { ...@@ -1016,6 +1024,10 @@ void *UE_thread(void *arg) {
if ( first_symbols <0 ) if ( first_symbols <0 )
LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols); LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols);
} }
} //UE->mode != loop_through_memory
else
rt_sleep_ns(1000*1000);
pickTime(gotIQs); pickTime(gotIQs);
// operate on thread sf mod 2 // operate on thread sf mod 2
AssertFatal(pthread_mutex_lock(&proc->mutex_rxtx) ==0,""); AssertFatal(pthread_mutex_lock(&proc->mutex_rxtx) ==0,"");
...@@ -1076,7 +1088,7 @@ void *UE_thread(void *arg) { ...@@ -1076,7 +1088,7 @@ void *UE_thread(void *arg) {
printf("%s\n",exit_fun_string); printf("%s\n",exit_fun_string);
fflush(stdout); fflush(stdout);
sleep(1); sleep(1);
exit_fun(exit_fun_string); exit_fun(exit_fun_string);
} }
} }
...@@ -1087,10 +1099,6 @@ void *UE_thread(void *arg) { ...@@ -1087,10 +1099,6 @@ void *UE_thread(void *arg) {
// updateTimes(lastTime, &t1, 20000, "Delay between two IQ acquisitions (case 1)"); // updateTimes(lastTime, &t1, 20000, "Delay between two IQ acquisitions (case 1)");
// pickStaticTime(lastTime); // pickStaticTime(lastTime);
} else {
printf("Processing subframe %d",proc->subframe_rx);
getchar();
}
} // start_rx_stream==1 } // start_rx_stream==1
} // UE->is_synchronized==1 } // UE->is_synchronized==1
......
...@@ -419,10 +419,11 @@ static void *scope_thread(void *arg) { ...@@ -419,10 +419,11 @@ static void *scope_thread(void *arg) {
fl_clear_browser(form_stats->stats_text); fl_clear_browser(form_stats->stats_text);
fl_add_browser_line(form_stats->stats_text, stats_buffer); fl_add_browser_line(form_stats->stats_text, stats_buffer);
phy_scope_UE(form_ue[0], if (PHY_vars_UE_g[0][0]->is_synchronized == 1)
PHY_vars_UE_g[0][0], phy_scope_UE(form_ue[0],
0,0,7); PHY_vars_UE_g[0][0],
0,0,7);
//else it is done in the synch thread
//printf("doing forms\n"); //printf("doing forms\n");
//usleep(100000); // 100 ms //usleep(100000); // 100 ms
...@@ -498,7 +499,7 @@ static void get_options(void) { ...@@ -498,7 +499,7 @@ static void get_options(void) {
int CC_id; int CC_id;
int tddflag, nonbiotflag; int tddflag, nonbiotflag;
char *loopfile=NULL; char *loopfile=NULL;
int dumpframe; int dumpframe=0;
uint32_t online_log_messages; uint32_t online_log_messages;
uint32_t glog_level, glog_verbosity; uint32_t glog_level, glog_verbosity;
uint32_t start_telnetsrv; uint32_t start_telnetsrv;
...@@ -1190,16 +1191,18 @@ int main( int argc, char **argv ) { ...@@ -1190,16 +1191,18 @@ int main( int argc, char **argv ) {
printf("TYPE <CTRL-C> TO TERMINATE\n"); printf("TYPE <CTRL-C> TO TERMINATE\n");
//getchar(); //getchar();
/*
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
printf("Entering ITTI signals handler\n"); printf("Entering ITTI signals handler\n");
itti_wait_tasks_end(); itti_wait_tasks_end();
oai_exit=1; oai_exit=1;
#else #else
*/
while (oai_exit==0) while (oai_exit==0)
rt_sleep_ns(100000000ULL); rt_sleep_ns(100000000ULL);
#endif //#endif
// stop threads // stop threads
#ifdef XFORMS #ifdef XFORMS
......
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