Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
trx-ecpri
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
trx-ecpri
Commits
fbb32c56
Commit
fbb32c56
authored
Mar 23, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
512kPPS TX and RX
parent
0ea04a2b
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
230 additions
and
202 deletions
+230
-202
parse-trace/parse-trace.py
parse-trace/parse-trace.py
+3
-2
scripts/start-ecpri.sh
scripts/start-ecpri.sh
+1
-1
trx_ecpri_dpdk.c
trx_ecpri_dpdk.c
+226
-180
utils.c
utils.c
+0
-19
No files found.
parse-trace/parse-trace.py
View file @
fbb32c56
...
...
@@ -41,7 +41,6 @@ IQ samples: {}'''.format(
parse_binary
(
iq_samples
))[
1
:]
return
(
avg
==
0
,
s
)
# Parse RX/TX frame
def
read_trace
(
name
,
n
):
log_directory
=
'/root/ecpri-logs'
file_name
=
'{}/{}'
.
format
(
log_directory
,
name
)
...
...
@@ -124,7 +123,6 @@ def print_iq_list(data, start, end, tx=False):
prev_x
=
x
print
(
h
+
" "
+
" "
.
join
(
map
(
lambda
x
:
"{}*{}"
.
format
(
*
x
),
iq_packed
)))
# Parse RX/TX frame
def
read_trx_trace
(
name
,
n
,
channels
):
log_directory
=
'/root/ecpri-logs'
file_name
=
'{}/{}'
.
format
(
log_directory
,
name
)
...
...
@@ -160,6 +158,8 @@ def analyze_trx_tdd(data, channels):
avg_iq_sample
+=
iq_samples_abs_avg
empty
=
iq_samples_abs_avg
<
0.1
if
i
==
0
:
first_tdd_period
=
empty
if
i
>
0
and
empty
!=
prev_empty
:
tdd_switch_list
.
append
(
i
-
prev_i
)
prev_i
=
i
...
...
@@ -176,6 +176,7 @@ def analyze_trx_tdd(data, channels):
ratio
=
total_frames
/
null_frames
if
null_frames
>
0
else
'inf'
print
(
'TDD ratio: {}
\
n
'
.
format
(
ratio
))
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"
...
...
scripts/start-ecpri.sh
View file @
fbb32c56
...
...
@@ -7,7 +7,7 @@ $DIR/stop-ecpri.sh;
cd
$DIR
/..
;
#make clean;
make
;
make
&&
#$DIR/launch-ptp > $LOG_DIRECTORY/ptp.log 2> $LOG_DIRECTORY/ptp.error &
#$DIR/launch-phc2sys > $LOG_DIRECTORY/phc2sys.log 2> $LOG_DIRECTORY/phc2sys.error &
...
...
trx_ecpri_dpdk.c
View file @
fbb32c56
This diff is collapsed.
Click to expand it.
utils.c
View file @
fbb32c56
...
...
@@ -52,25 +52,6 @@ static void log_info(const char * section, const char * msg, ...) {
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
static
void
log_debug
(
const
char
*
section
,
const
char
*
msg
,
...)
{
time_t
t
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment