Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
ZhouShuya
OpenXG-RAN
Commits
a623d444
Commit
a623d444
authored
Mar 24, 2017
by
younes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addeed a thread for if stats
parent
8f6c9ff7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
5 deletions
+45
-5
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+19
-4
openair1/PHY/defs.h
openair1/PHY/defs.h
+4
-0
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+22
-1
No files found.
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
a623d444
...
...
@@ -33,6 +33,7 @@
#include "PHY/defs.h"
#include "PHY/TOOLS/alaw_lut.h"
#include "PHY/extern.h"
#include "PHY/defs.h"
#include "SCHED/defs.h"
//#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
...
...
@@ -62,7 +63,10 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
eth_state_t
*
eth
=
(
eth_state_t
*
)
(
eNB
->
ifdevice
.
priv
);
int
nsym
=
fp
->
symbols_per_tti
;
if
(
eNB
->
CC_id
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4
,
1
);
if
(
eNB
->
CC_id
==
0
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4
,
1
);
start_meas
(
&
eNB
->
send_if4p5_stats
);
}
if
(
packet_type
==
IF4p5_PDLFFT
)
{
if
(
subframe_select
(
fp
,
subframe
)
==
SF_S
)
...
...
@@ -211,7 +215,10 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
AssertFatal
(
1
==
0
,
"send_IF4p5 - Unknown packet_type %x"
,
packet_type
);
}
if
(
eNB
->
CC_id
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4
,
0
);
if
(
eNB
->
CC_id
==
0
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4
,
0
);
stop_meas
(
&
eNB
->
send_if4p5_stats
);
}
return
;
}
...
...
@@ -228,7 +235,11 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t
int
slotoffsetF
=
0
,
blockoffsetF
=
0
;
eth_state_t
*
eth
=
(
eth_state_t
*
)
(
eNB
->
ifdevice
.
priv
);
if
(
eNB
->
CC_id
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4
,
1
);
if
(
eNB
->
CC_id
==
0
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4
,
1
);
start_meas
(
&
eNB
->
recv_if4p5_stats
);
}
if
(
eNB
->
node_function
==
NGFI_RRU_IF4p5
)
{
db_fulllength
=
(
12
*
fp
->
N_RB_DL
);
...
...
@@ -325,7 +336,11 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t
AssertFatal
(
1
==
0
,
"recv_IF4p5 - Unknown packet_type %x"
,
*
packet_type
);
}
if
(
eNB
->
CC_id
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4
,
0
);
if
(
eNB
->
CC_id
==
0
)
{
stop_meas
(
&
eNB
->
recv_if4p5_stats
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4
,
0
);
}
return
;
}
...
...
openair1/PHY/defs.h
View file @
a623d444
...
...
@@ -632,6 +632,10 @@ typedef struct PHY_VARS_eNB_s {
time_stats_t
ulsch_tc_intl1_stats
;
time_stats_t
ulsch_tc_intl2_stats
;
// IF4 stats
time_stats_t
send_if4p5_stats
;
time_stats_t
recv_if4p5_stats
;
#ifdef LOCALIZATION
/// time state for localization
time_stats_t
localization_stats
;
...
...
targets/RT/USER/lte-enb.c
View file @
a623d444
...
...
@@ -135,6 +135,7 @@ extern int transmission_mode;
extern
int
oaisim_flag
;
//pthread_t main_eNB_thread;
pthread_t
if_stats_thread
;
time_stats_t
softmodem_stats_mt
;
// main thread
time_stats_t
softmodem_stats_hw
;
// hw acquisition
...
...
@@ -668,6 +669,24 @@ static void wait_system_ready (char *message, volatile int *start_flag) {
}
#endif
//Thread for printing stats
static
void
*
print_stats_thread
(
void
*
param
)
{
eNB_rxtx_proc_t
*
proc
=
(
eNB_rxtx_proc_t
*
)
param
;
PHY_VARS_eNB
*
eNB
=
PHY_vars_eNB_g
[
0
][
proc
->
CC_id
];
printf
(
"[eNB] Launching print_stats thread...
\n
"
);
reset_meas
(
&
eNB
->
send_if4p5_stats
);
while
(
!
oai_exit
)
{
sleep
(
2
);
print_meas
(
&
eNB
->
send_if4p5_stats
,
"send_if4p5_stats"
,
NULL
,
NULL
);
print_meas
(
&
eNB
->
recv_if4p5_stats
,
"recv_if4p5_stats"
,
NULL
,
NULL
);
}
}
// asynchronous UL with IF5 (RCC,RAU,eNodeB_BBU)
void
fh_if5_asynch_UL
(
PHY_VARS_eNB
*
eNB
,
int
*
frame
,
int
*
subframe
)
{
...
...
@@ -967,7 +986,7 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
else
{
if
(
proc
->
timestamp_rx
-
old_ts
!=
fp
->
samples_per_tti
)
{
LOG_I
(
PHY
,
"
r
x_rf: rfdevice timing drift of %"
PRId64
" samples
\n
"
,
proc
->
timestamp_rx
-
old_ts
-
fp
->
samples_per_tti
);
LOG_I
(
PHY
,
"
x
x_rf: rfdevice timing drift of %"
PRId64
" samples
\n
"
,
proc
->
timestamp_rx
-
old_ts
-
fp
->
samples_per_tti
);
eNB
->
ts_offset
+=
(
proc
->
timestamp_rx
-
old_ts
-
fp
->
samples_per_tti
);
proc
->
timestamp_rx
=
ts
-
eNB
->
ts_offset
;
}
...
...
@@ -1809,6 +1828,8 @@ void init_eNB_proc(int inst) {
(
eNB
->
node_function
==
NGFI_RRU_IF5
)
||
(
eNB
->
node_function
==
NGFI_RRU_IF4p5
))
if
(
eNB
->
node_function
==
NGFI_RRU_IF4p5
)
pthread_create
(
&
if_stats_thread
,
NULL
,
print_stats_thread
,
&
eNB
->
proc
);
pthread_create
(
&
proc
->
pthread_asynch_rxtx
,
attr_asynch
,
eNB_thread_asynch_rxtx
,
&
eNB
->
proc
);
...
...
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