Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
60427c21
Commit
60427c21
authored
Oct 15, 2017
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time profiling for RU and activation of feprx worker thread in RU if get_nprocs()>2
parent
861a4b92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
7 deletions
+34
-7
openair1/PHY/TOOLS/time_meas.c
openair1/PHY/TOOLS/time_meas.c
+1
-2
openair1/PHY/defs.h
openair1/PHY/defs.h
+4
-0
openair1/SCHED/ru_procedures.c
openair1/SCHED/ru_procedures.c
+6
-0
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+23
-5
No files found.
openair1/PHY/TOOLS/time_meas.c
View file @
60427c21
...
@@ -83,9 +83,8 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti
...
@@ -83,9 +83,8 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
if
((
total_exec_time
==
NULL
)
||
(
sf_exec_time
==
NULL
))
{
if
((
total_exec_time
==
NULL
)
||
(
sf_exec_time
==
NULL
))
{
fprintf
(
stderr
,
"%25s: %15.3f
ms ; %15.3f
us; %15d;
\n
"
,
fprintf
(
stderr
,
"%25s: %15.3f us; %15d;
\n
"
,
name
,
name
,
(
ts
->
diff
/
cpu_freq_GHz
/
1000000
.
0
),
(
ts
->
diff
/
ts
->
trials
/
cpu_freq_GHz
/
1000
.
0
),
(
ts
->
diff
/
ts
->
trials
/
cpu_freq_GHz
/
1000
.
0
),
ts
->
trials
);
ts
->
trials
);
}
else
{
}
else
{
...
...
openair1/PHY/defs.h
View file @
60427c21
...
@@ -740,6 +740,8 @@ typedef struct RU_t_s{
...
@@ -740,6 +740,8 @@ typedef struct RU_t_s{
void
(
*
eNB_top
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
frame_rx
,
int
subframe_rx
,
char
*
string
);
void
(
*
eNB_top
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
frame_rx
,
int
subframe_rx
,
char
*
string
);
/// Timing statistics
/// Timing statistics
time_stats_t
ofdm_demod_stats
;
time_stats_t
ofdm_demod_stats
;
/// Timing statistics (TX)
time_stats_t
ofdm_mod_stats
;
/// RX and TX buffers for precoder output
/// RX and TX buffers for precoder output
RU_COMMON
common
;
RU_COMMON
common
;
/// beamforming weight vectors per eNB
/// beamforming weight vectors per eNB
...
@@ -755,6 +757,8 @@ typedef struct RU_t_s{
...
@@ -755,6 +757,8 @@ typedef struct RU_t_s{
openair0_timestamp
ts_offset
;
openair0_timestamp
ts_offset
;
/// process scheduling variables
/// process scheduling variables
RU_proc_t
proc
;
RU_proc_t
proc
;
/// stats thread pthread descriptor
pthread_t
ru_stats_thread
;
}
RU_t
;
}
RU_t
;
...
...
openair1/SCHED/ru_procedures.c
View file @
60427c21
...
@@ -83,6 +83,8 @@ void feptx_ofdm(RU_t *ru) {
...
@@ -83,6 +83,8 @@ void feptx_ofdm(RU_t *ru) {
((
subframe_select
(
fp
,
subframe
)
==
SF_S
)))
{
((
subframe_select
(
fp
,
subframe
)
==
SF_S
)))
{
// LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot);
// LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot);
start_meas
(
&
ru
->
ofdm_mod_stats
);
for
(
aa
=
0
;
aa
<
ru
->
nb_tx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
ru
->
nb_tx
;
aa
++
)
{
if
(
fp
->
Ncp
==
EXTENDED
)
{
if
(
fp
->
Ncp
==
EXTENDED
)
{
PHY_ofdm_mod
(
&
ru
->
common
.
txdataF_BF
[
aa
][
0
],
PHY_ofdm_mod
(
&
ru
->
common
.
txdataF_BF
[
aa
][
0
],
...
@@ -185,6 +187,7 @@ void feptx_ofdm(RU_t *ru) {
...
@@ -185,6 +187,7 @@ void feptx_ofdm(RU_t *ru) {
ru
->
common
.
txdata
[
aa
][
tx_offset
]
=
0x00000000
;
ru
->
common
.
txdata
[
aa
][
tx_offset
]
=
0x00000000
;
}
}
}
}
stop_meas
(
&
ru
->
ofdm_mod_stats
);
LOG_D
(
PHY
,
"feptx_ofdm (TXPATH): frame %d, subframe %d: txp (time %p) %d dB, txp (freq) %d dB
\n
"
,
LOG_D
(
PHY
,
"feptx_ofdm (TXPATH): frame %d, subframe %d: txp (time %p) %d dB, txp (freq) %d dB
\n
"
,
ru
->
proc
.
frame_tx
,
subframe
,
txdata
,
dB_fixed
(
signal_energy
((
int32_t
*
)
txdata
,
fp
->
samples_per_tti
)),
ru
->
proc
.
frame_tx
,
subframe
,
txdata
,
dB_fixed
(
signal_energy
((
int32_t
*
)
txdata
,
fp
->
samples_per_tti
)),
dB_fixed
(
signal_energy_nodc
(
ru
->
common
.
txdataF_BF
[
aa
],
2
*
slot_sizeF
)));
dB_fixed
(
signal_energy_nodc
(
ru
->
common
.
txdataF_BF
[
aa
],
2
*
slot_sizeF
)));
...
@@ -265,6 +268,9 @@ static void *fep_thread(void *param) {
...
@@ -265,6 +268,9 @@ static void *fep_thread(void *param) {
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
thread_top_init
(
"fep_thread"
,
0
,
870000
,
1000000
,
1000000
);
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
if
(
wait_on_condition
(
&
proc
->
mutex_fep
,
&
proc
->
cond_fep
,
&
proc
->
instance_cnt_fep
,
"fep thread"
)
<
0
)
break
;
if
(
wait_on_condition
(
&
proc
->
mutex_fep
,
&
proc
->
cond_fep
,
&
proc
->
instance_cnt_fep
,
"fep thread"
)
<
0
)
break
;
...
...
targets/RT/USER/lte-ru.c
View file @
60427c21
...
@@ -1323,6 +1323,21 @@ int setup_RU_buffers(RU_t *ru) {
...
@@ -1323,6 +1323,21 @@ int setup_RU_buffers(RU_t *ru) {
return
(
0
);
return
(
0
);
}
}
static
void
*
ru_stats_thread
(
void
*
param
)
{
RU_t
*
ru
=
(
RU_t
*
)
param
;
wait_sync
(
"ru_stats_thread"
);
while
(
!
oai_exit
)
{
sleep
(
1
);
if
(
opp_enabled
==
1
)
{
if
(
ru
->
feprx
)
print_meas
(
&
ru
->
ofdm_demod_stats
,
"feprx"
,
NULL
,
NULL
);
if
(
ru
->
feptx_ofdm
)
print_meas
(
&
ru
->
ofdm_mod_stats
,
"feptx_ofdm"
,
NULL
,
NULL
);
}
}
}
static
void
*
ru_thread
(
void
*
param
)
{
static
void
*
ru_thread
(
void
*
param
)
{
static
int
ru_thread_status
;
static
int
ru_thread_status
;
...
@@ -1462,6 +1477,7 @@ static void* ru_thread( void* param ) {
...
@@ -1462,6 +1477,7 @@ static void* ru_thread( void* param ) {
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
fh_south_out
))
ru
->
fh_south_out
(
ru
);
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
fh_south_out
))
ru
->
fh_south_out
(
ru
);
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
}
}
...
@@ -1563,7 +1579,7 @@ int start_rf(RU_t *ru) {
...
@@ -1563,7 +1579,7 @@ int start_rf(RU_t *ru) {
}
}
extern
void
fep_full
(
RU_t
*
ru
);
extern
void
fep_full
(
RU_t
*
ru
);
extern
void
fep_full_2thread
(
RU_t
*
ru
);
extern
void
ru_
fep_full_2thread
(
RU_t
*
ru
);
extern
void
feptx_ofdm
(
RU_t
*
ru
);
extern
void
feptx_ofdm
(
RU_t
*
ru
);
extern
void
feptx_prec
(
RU_t
*
ru
);
extern
void
feptx_prec
(
RU_t
*
ru
);
...
@@ -1648,7 +1664,9 @@ void init_RU_proc(RU_t *ru) {
...
@@ -1648,7 +1664,9 @@ void init_RU_proc(RU_t *ru) {
pthread_setname_np
(
proc
->
pthread_FH
,
name
);
pthread_setname_np
(
proc
->
pthread_FH
,
name
);
}
}
init_fep_thread
(
ru
,
NULL
);
if
(
opp_enabled
==
1
)
pthread_create
(
&
ru
->
ru_stats_thread
,
NULL
,
ru_stats_thread
,(
void
*
)
ru
);
}
}
...
@@ -1902,7 +1920,7 @@ void init_RU(char *rf_config_file) {
...
@@ -1902,7 +1920,7 @@ void init_RU(char *rf_config_file) {
ru
->
fh_north_out
=
fh_if4p5_north_out
;
// send_IF4p5 on reception
ru
->
fh_north_out
=
fh_if4p5_north_out
;
// send_IF4p5 on reception
ru
->
fh_south_out
=
tx_rf
;
// send output to RF
ru
->
fh_south_out
=
tx_rf
;
// send output to RF
ru
->
fh_north_asynch_in
=
fh_if4p5_north_asynch_in
;
// TX packets come asynchronously
ru
->
fh_north_asynch_in
=
fh_if4p5_north_asynch_in
;
// TX packets come asynchronously
ru
->
feprx
=
fep_full
;
// RX DFTs
ru
->
feprx
=
(
get_nprocs
()
<=
2
)
?
fep_full
:
fep_full
;
// RX DFTs
ru
->
feptx_ofdm
=
feptx_ofdm
;
// this is fep with idft only (no precoding in RRU)
ru
->
feptx_ofdm
=
feptx_ofdm
;
// this is fep with idft only (no precoding in RRU)
ru
->
feptx_prec
=
NULL
;
ru
->
feptx_prec
=
NULL
;
ru
->
start_if
=
start_if
;
// need to start the if interface for if4p5
ru
->
start_if
=
start_if
;
// need to start the if interface for if4p5
...
@@ -1920,7 +1938,7 @@ void init_RU(char *rf_config_file) {
...
@@ -1920,7 +1938,7 @@ void init_RU(char *rf_config_file) {
}
}
else
if
(
ru
->
function
==
eNodeB_3GPP
)
{
else
if
(
ru
->
function
==
eNodeB_3GPP
)
{
ru
->
do_prach
=
0
;
// no prach processing in RU
ru
->
do_prach
=
0
;
// no prach processing in RU
ru
->
feprx
=
fep_full
;
// RX DFTs
ru
->
feprx
=
(
get_nprocs
()
<=
2
)
?
fep_full
:
ru_fep_full_2thread
;
// RX DFTs
ru
->
feptx_ofdm
=
feptx_ofdm
;
// this is fep with idft and precoding
ru
->
feptx_ofdm
=
feptx_ofdm
;
// this is fep with idft and precoding
ru
->
feptx_prec
=
feptx_prec
;
// this is fep with idft and precoding
ru
->
feptx_prec
=
feptx_prec
;
// this is fep with idft and precoding
ru
->
fh_north_in
=
NULL
;
// no incoming fronthaul from north
ru
->
fh_north_in
=
NULL
;
// no incoming fronthaul from north
...
@@ -1948,7 +1966,7 @@ void init_RU(char *rf_config_file) {
...
@@ -1948,7 +1966,7 @@ void init_RU(char *rf_config_file) {
case
REMOTE_IF5
:
// the remote unit is IF5 RRU
case
REMOTE_IF5
:
// the remote unit is IF5 RRU
ru
->
do_prach
=
0
;
ru
->
do_prach
=
0
;
ru
->
feprx
=
fep_full
;
// this is frequency-shift + DFTs
ru
->
feprx
=
(
get_nprocs
()
<=
2
)
?
fep_full
:
fep_full
;
// this is frequency-shift + DFTs
ru
->
feptx_prec
=
feptx_prec
;
// need to do transmit Precoding + IDFTs
ru
->
feptx_prec
=
feptx_prec
;
// need to do transmit Precoding + IDFTs
ru
->
feptx_ofdm
=
feptx_ofdm
;
// need to do transmit Precoding + IDFTs
ru
->
feptx_ofdm
=
feptx_ofdm
;
// need to do transmit Precoding + IDFTs
if
(
ru
->
if_timing
==
synch_to_other
)
{
if
(
ru
->
if_timing
==
synch_to_other
)
{
...
...
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