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
canghaiwuhen
OpenXG-RAN
Commits
f0e10b0d
Commit
f0e10b0d
authored
Jan 30, 2018
by
Eurecom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix for shared info between threads
parent
3efaa383
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
19 deletions
+21
-19
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+18
-14
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+3
-3
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+0
-2
No files found.
targets/RT/USER/lte-enb.c
View file @
f0e10b0d
...
...
@@ -241,6 +241,9 @@ static void* tx_thread(void* param) {
pthread_mutex_lock
(
&
eNB_proc
->
ru_proc
->
mutex_eNBs
);
++
eNB_proc
->
ru_proc
->
instance_cnt_eNBs
;
eNB_proc
->
ru_proc
->
timestamp_tx
=
proc
->
timestamp_tx
;
eNB_proc
->
ru_proc
->
subframe_tx
=
proc
->
subframe_tx
;
eNB_proc
->
ru_proc
->
frame_tx
=
proc
->
frame_tx
;
pthread_cond_signal
(
&
eNB_proc
->
ru_proc
->
cond_eNBs
);
pthread_mutex_unlock
(
&
eNB_proc
->
ru_proc
->
mutex_eNBs
);
}
...
...
@@ -369,7 +372,8 @@ int wakeup_tx(PHY_VARS_eNB *eNB,RU_proc_t *ru_proc) {
eNB_proc_t
*
proc
=&
eNB
->
proc
;
eNB_rxtx_proc_t
*
proc_rxtx
=&
proc
->
proc_rxtx
[
1
];
//*proc_rxtx=&proc->proc_rxtx[proc->frame_rx&1];
eNB_rxtx_proc_t
*
proc_rxtx1
=&
proc
->
proc_rxtx
[
1
];
//*proc_rxtx=&proc->proc_rxtx[proc->frame_rx&1];
eNB_rxtx_proc_t
*
proc_rxtx0
=&
proc
->
proc_rxtx
[
0
];
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
...
...
@@ -377,34 +381,34 @@ int wakeup_tx(PHY_VARS_eNB *eNB,RU_proc_t *ru_proc) {
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
if
(
proc_rxtx
->
instance_cnt_rxtx
==
0
)
{
LOG_E
(
PHY
,
"Frame %d, subframe %d: TX1 thread busy, dropping
\n
"
,
proc_rxtx
->
frame_rx
,
proc_rxtx
->
subframe_rx
);
if
(
proc_rxtx
1
->
instance_cnt_rxtx
==
0
)
{
LOG_E
(
PHY
,
"Frame %d, subframe %d: TX1 thread busy, dropping
\n
"
,
proc_rxtx
1
->
frame_rx
,
proc_rxtx1
->
subframe_rx
);
return
(
-
1
);
}
if
(
pthread_mutex_timedlock
(
&
proc_rxtx
->
mutex_rxtx
,
&
wait
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_mutex_lock for eNB TX1 thread %d (IC %d)
\n
"
,
proc_rxtx
->
subframe_rx
&
1
,
proc_rxtx
->
instance_cnt_rxtx
);
if
(
pthread_mutex_timedlock
(
&
proc_rxtx
1
->
mutex_rxtx
,
&
wait
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_mutex_lock for eNB TX1 thread %d (IC %d)
\n
"
,
proc_rxtx
1
->
subframe_rx
&
1
,
proc_rxtx1
->
instance_cnt_rxtx
);
exit_fun
(
"error locking mutex_tx"
);
return
(
-
1
);
}
++
proc_rxtx
->
instance_cnt_rxtx
;
++
proc_rxtx
1
->
instance_cnt_rxtx
;
proc_rxtx
->
subframe_rx
=
ru_proc
->
subframe_rx
;
proc_rxtx
->
frame_rx
=
ru_proc
->
frame_rx
;
proc_rxtx
->
subframe_tx
=
(
ru_proc
->
subframe_rx
+
4
)
%
10
;
proc_rxtx
->
frame_tx
=
(
ru_proc
->
subframe_rx
>
5
)
?
(
1
+
ru_proc
->
frame_rx
)
&
1023
:
ru_proc
->
frame_r
x
;
proc_rxtx
->
timestamp_tx
=
ru_proc
->
timestamp_tx
;
proc_rxtx
1
->
subframe_rx
=
proc_rxtx0
->
subframe_rx
;
proc_rxtx
1
->
frame_rx
=
proc_rxtx0
->
frame_rx
;
proc_rxtx
1
->
subframe_tx
=
proc_rxtx0
->
subframe_tx
;
proc_rxtx
1
->
frame_tx
=
proc_rxtx0
->
frame_t
x
;
proc_rxtx
1
->
timestamp_tx
=
proc_rxtx0
->
timestamp_tx
;
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
proc_rxtx
->
cond_rxtx
)
!=
0
)
{
if
(
pthread_cond_signal
(
&
proc_rxtx
1
->
cond_rxtx
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
}
pthread_mutex_unlock
(
&
proc_rxtx
->
mutex_rxtx
);
pthread_mutex_unlock
(
&
proc_rxtx
1
->
mutex_rxtx
);
return
(
0
);
}
...
...
@@ -486,7 +490,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
proc_rxtx
->
frame_tx
=
(
ru_proc
->
subframe_rx
>
5
)
?
(
1
+
ru_proc
->
frame_rx
)
&
1023
:
ru_proc
->
frame_rx
;
proc
->
frame_tx
=
proc_rxtx
->
frame_tx
;
proc
->
frame_rx
=
proc_rxtx
->
frame_rx
;
proc_rxtx
->
timestamp_tx
=
ru_proc
->
timestamp_
tx
;
proc_rxtx
->
timestamp_tx
=
ru_proc
->
timestamp_
rx
+
(
4
*
fp
->
samples_per_tti
)
;
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
proc_rxtx
->
cond_rxtx
)
!=
0
)
{
...
...
targets/RT/USER/lte-ru.c
View file @
f0e10b0d
...
...
@@ -761,9 +761,9 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) {
proc
->
subframe_rx
=
(
proc
->
timestamp_rx
/
fp
->
samples_per_tti
)
%
10
;
// synchronize first reception to frame 0 subframe 0
proc
->
timestamp_tx
=
proc
->
timestamp_rx
+
(
4
*
fp
->
samples_per_tti
);
proc
->
subframe_tx
=
(
proc
->
subframe_rx
+
4
)
%
10
;
proc
->
frame_tx
=
(
proc
->
subframe_rx
>
5
)
?
(
proc
->
frame_rx
+
1
)
&
1023
:
proc
->
frame_rx
;
//
proc->timestamp_tx = proc->timestamp_rx+(4*fp->samples_per_tti);
//
proc->subframe_tx = (proc->subframe_rx+4)%10;
//
proc->frame_tx = (proc->subframe_rx>5) ? (proc->frame_rx+1)&1023 : proc->frame_rx;
LOG_D
(
PHY
,
"RU %d/%d TS %llu (off %d), frame %d, subframe %d
\n
"
,
ru
->
idx
,
...
...
targets/RT/USER/lte-softmodem.h
View file @
f0e10b0d
...
...
@@ -171,8 +171,6 @@ extern int16_t dlsch_demod_shift;
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0} \
//{"coding-worker-disable" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \
//{"fep-worker-disable" , CONFIG_HLP_FEPW, PARAMFLAG_BOOL, iptr:&fepw, defintval:0, TYPE_INT, 0} \
}
#define CONFIG_HLP_FLOG "Enable online log \n"
...
...
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