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
zzha zzha
OpenXG-RAN
Commits
8364b4f9
Commit
8364b4f9
authored
May 26, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding thread_tx from develop
parent
0ad9ab94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
2 deletions
+55
-2
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+55
-2
No files found.
targets/RT/USER/lte-ru.c
View file @
8364b4f9
...
@@ -134,7 +134,7 @@ void configure_rru(int idx,
...
@@ -134,7 +134,7 @@ void configure_rru(int idx,
void
*
arg
);
void
*
arg
);
int
attach_rru
(
RU_t
*
ru
);
int
attach_rru
(
RU_t
*
ru
);
void
reset_proc
(
RU_t
*
ru
);
int
connect_rau
(
RU_t
*
ru
);
int
connect_rau
(
RU_t
*
ru
);
extern
uint16_t
sf_ahead
;
extern
uint16_t
sf_ahead
;
...
@@ -1574,8 +1574,61 @@ static void* ru_stats_thread(void* param) {
...
@@ -1574,8 +1574,61 @@ static void* ru_stats_thread(void* param) {
return
(
NULL
);
return
(
NULL
);
}
}
static
void
*
ru_thread_tx
(
void
*
param
)
{
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
cpu_set_t
cpuset
;
CPU_ZERO
(
&
cpuset
);
thread_top_init
(
"ru_thread_tx"
,
1
,
400000
,
500000
,
500000
);
//CPU_SET(5, &cpuset);
//pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
//wait_sync("ru_thread_tx");
wait_on_condition
(
&
proc
->
mutex_FH1
,
&
proc
->
cond_FH1
,
&
proc
->
instance_cnt_FH1
,
"ru_thread_tx"
);
printf
(
"ru_thread_tx ready
\n
"
);
while
(
!
oai_exit
)
{
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX
,
sched_getcpu
());
if
(
oai_exit
)
break
;
LOG_D
(
PHY
,
"ru_thread_tx: Waiting for TX processing
\n
"
);
// wait until eNBs are finished subframe RX n and TX n+4
wait_on_condition
(
&
proc
->
mutex_eNBs
,
&
proc
->
cond_eNBs
,
&
proc
->
instance_cnt_eNBs
,
"ru_thread_tx"
);
if
(
oai_exit
)
break
;
// do TX front-end processing if needed (precoding and/or IDFTs)
if
(
ru
->
feptx_prec
)
ru
->
feptx_prec
(
ru
);
// do OFDM if needed
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
feptx_ofdm
))
ru
->
feptx_ofdm
(
ru
);
if
(
!
emulate_rf
){
// do outgoing fronthaul (south) if needed
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
);
}
release_thread
(
&
proc
->
mutex_eNBs
,
&
proc
->
instance_cnt_eNBs
,
"ru_thread_tx"
);
pthread_mutex_lock
(
&
proc
->
mutex_eNBs
);
proc
->
ru_tx_ready
++
;
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
proc
->
cond_eNBs
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
}
pthread_mutex_unlock
(
&
proc
->
mutex_eNBs
);
}
release_thread
(
&
proc
->
mutex_FH1
,
&
proc
->
instance_cnt_FH1
,
"ru_thread_tx"
);
return
0
;
}
void
reset_proc
(
RU_t
*
ru
);
static
void
*
ru_thread_control
(
void
*
param
)
{
static
void
*
ru_thread_control
(
void
*
param
)
{
...
...
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