Commit fbb32c56 authored by Joanne Hugé's avatar Joanne Hugé

512kPPS TX and RX

parent 0ea04a2b
...@@ -41,7 +41,6 @@ IQ samples: {}'''.format( ...@@ -41,7 +41,6 @@ IQ samples: {}'''.format(
parse_binary(iq_samples))[1:] parse_binary(iq_samples))[1:]
return (avg == 0, s) return (avg == 0, s)
# Parse RX/TX frame
def read_trace(name, n): def read_trace(name, n):
log_directory = '/root/ecpri-logs' log_directory = '/root/ecpri-logs'
file_name = '{}/{}'.format(log_directory, name) file_name = '{}/{}'.format(log_directory, name)
...@@ -124,7 +123,6 @@ def print_iq_list(data, start, end, tx=False): ...@@ -124,7 +123,6 @@ def print_iq_list(data, start, end, tx=False):
prev_x = x prev_x = x
print(h + " " + " ".join(map(lambda x: "{}*{}".format(*x), iq_packed))) print(h + " " + " ".join(map(lambda x: "{}*{}".format(*x), iq_packed)))
# Parse RX/TX frame
def read_trx_trace(name, n, channels): def read_trx_trace(name, n, channels):
log_directory = '/root/ecpri-logs' log_directory = '/root/ecpri-logs'
file_name = '{}/{}'.format(log_directory, name) file_name = '{}/{}'.format(log_directory, name)
...@@ -160,6 +158,8 @@ def analyze_trx_tdd(data, channels): ...@@ -160,6 +158,8 @@ def analyze_trx_tdd(data, channels):
avg_iq_sample += iq_samples_abs_avg avg_iq_sample += iq_samples_abs_avg
empty = iq_samples_abs_avg < 0.1 empty = iq_samples_abs_avg < 0.1
if i == 0:
first_tdd_period = empty
if i > 0 and empty != prev_empty: if i > 0 and empty != prev_empty:
tdd_switch_list.append(i-prev_i) tdd_switch_list.append(i-prev_i)
prev_i = i prev_i = i
...@@ -176,6 +176,7 @@ def analyze_trx_tdd(data, channels): ...@@ -176,6 +176,7 @@ def analyze_trx_tdd(data, channels):
ratio = total_frames / null_frames if null_frames > 0 else 'inf' ratio = total_frames / null_frames if null_frames > 0 else 'inf'
print('TDD ratio: {}\n'.format(ratio)) print('TDD ratio: {}\n'.format(ratio))
print('TDD switch list: ' + ', '.join(map(str, tdd_switch_list)) + '\n') print('TDD switch list: ' + ', '.join(map(str, tdd_switch_list)) + '\n')
print('First TDD period: ' + "Not emitting" if first_tdd_period else "emitting")
BF1_PATH="../bf1/bf1" BF1_PATH="../bf1/bf1"
......
...@@ -7,7 +7,7 @@ $DIR/stop-ecpri.sh; ...@@ -7,7 +7,7 @@ $DIR/stop-ecpri.sh;
cd $DIR/..; cd $DIR/..;
#make clean; #make clean;
make; make &&
#$DIR/launch-ptp > $LOG_DIRECTORY/ptp.log 2> $LOG_DIRECTORY/ptp.error & #$DIR/launch-ptp > $LOG_DIRECTORY/ptp.log 2> $LOG_DIRECTORY/ptp.error &
#$DIR/launch-phc2sys > $LOG_DIRECTORY/phc2sys.log 2> $LOG_DIRECTORY/phc2sys.error & #$DIR/launch-phc2sys > $LOG_DIRECTORY/phc2sys.log 2> $LOG_DIRECTORY/phc2sys.error &
......
This diff is collapsed.
...@@ -52,25 +52,6 @@ static void log_info(const char * section, const char * msg, ...) { ...@@ -52,25 +52,6 @@ static void log_info(const char * section, const char * msg, ...) {
puts(line); puts(line);
} }
static void log_exit(const char * section, const char * msg, ...) {
time_t t;
struct tm ts;
char line[256];
va_list arglist;
time(&t);
ts = *localtime(&t);
strftime(line, 80, "%m-%d %H:%M:%S", &ts);
sprintf(line + strlen(line), " EXIT [%s] ", section);
va_start(arglist, msg);
vsprintf(line + strlen(line), msg, arglist);
va_end(arglist);
fprintf(stderr, "%s\n", line);
fflush(stdout);
fflush(stderr);
exit(EXIT_FAILURE);
}
#ifdef DEBUG #ifdef DEBUG
static void log_debug(const char * section, const char * msg, ...) { static void log_debug(const char * section, const char * msg, ...) {
time_t t; time_t 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