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
wangjie
OpenXG-RAN
Commits
42687dfe
Commit
42687dfe
authored
Oct 26, 2018
by
magounak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes at wakeup_rxtx for the RU mask
parent
4c83082e
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
95 deletions
+36
-95
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+14
-66
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+22
-29
No files found.
targets/RT/USER/lte-enb.c
View file @
42687dfe
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ru.c
View file @
42687dfe
...
...
@@ -155,10 +155,11 @@ static inline void fh_if5_south_out(RU_t *ru) {
// southbound IF4p5 fronthaul
static
inline
void
fh_if4p5_south_out
(
RU_t
*
ru
)
{
if
(
ru
==
RC
.
ru
[
0
])
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
ru
->
proc
.
timestamp_tx
&
0xffffffff
);
LOG_
D
(
PHY
,
"Sending IF4p5 for frame %d subframe %d
\n
"
,
ru
->
proc
.
frame_tx
,
ru
->
proc
.
subframe_t
x
);
LOG_
I
(
PHY
,
"ENTERED fh_if4p5_south_out Sending IF4p5 for frame %d subframe %d ru %d
\n
"
,
ru
->
proc
.
frame_tx
,
ru
->
proc
.
subframe_tx
,
ru
->
id
x
);
if
(
subframe_select
(
&
ru
->
frame_parms
,
ru
->
proc
.
subframe_tx
)
!=
SF_UL
)
{
send_IF4p5
(
ru
,
ru
->
proc
.
frame_tx
,
ru
->
proc
.
subframe_tx
,
IF4p5_PDLFFT
);
ru
->
south_out_cnt
++
;
LOG_I
(
PHY
,
"south_out_cnt %d
\n
"
,
ru
->
south_out_cnt
);
}
/*if (ru == RC.ru[0] || ru == RC.ru[1]) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU+ru->idx, ru->proc.frame_tx );
...
...
@@ -210,7 +211,7 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
RU_proc_t
*
proc
=
&
ru
->
proc
;
int
f
,
sf
;
LOG_I
(
PHY
,
"ENTERED fh_if4p5_south_in
\n
"
);
uint16_t
packet_type
;
uint32_t
symbol_number
=
0
;
uint32_t
symbol_mask_full
;
...
...
@@ -219,7 +220,7 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
symbol_mask_full
=
(
1
<<
fp
->
ul_symbols_in_S_subframe
)
-
1
;
else
symbol_mask_full
=
(
1
<<
fp
->
symbols_per_tti
)
-
1
;
LOG_
D
(
PHY
,
"fh_if4p5_south_in: RU %d, frame %d, subframe %d
\n
"
,
ru
->
idx
,
*
frame
,
*
subframe
);
LOG_
I
(
PHY
,
"fh_if4p5_south_in: RU %d, frame %d, subframe %d, ru %d
\n
"
,
ru
->
idx
,
*
frame
,
*
subframe
,
ru
->
idx
);
AssertFatal
(
proc
->
symbol_mask
[
*
subframe
]
==
0
,
"rx_fh_if4p5: proc->symbol_mask[%d] = %x
\n
"
,
*
subframe
,
proc
->
symbol_mask
[
*
subframe
]);
do
{
recv_IF4p5
(
ru
,
&
f
,
&
sf
,
&
packet_type
,
&
symbol_number
);
...
...
@@ -232,7 +233,7 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
}
else
if
(
packet_type
==
IF4p5_PRACH
)
{
// nothing in RU for RAU
}
ru
->
south_out_cnt
=
0
;
}
//ru->south_out_cnt= 0; (why??? I guess this is wrong)
LOG_D
(
PHY
,
"rx_fh_if4p5: subframe %d symbol mask %x
\n
"
,
*
subframe
,
proc
->
symbol_mask
[
*
subframe
]);
}
while
(
proc
->
symbol_mask
[
*
subframe
]
!=
symbol_mask_full
);
...
...
@@ -1142,12 +1143,9 @@ void wakeup_eNBs(RU_t *ru) {
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
RU_proc_t
*
ruproc
=
&
ru
->
proc
;
struct
timespec
t
;
LOG_I
(
PHY
,
"ENTERED wakeup_eNBs
\n
"
);
LOG_D
(
PHY
,
"wakeup_eNBs (num %d) for RU %d (state %s)ru->eNB_top:%p
\n
"
,
ru
->
num_eNB
,
ru
->
idx
,
ru_states
[
ru
->
state
],
ru
->
eNB_top
);
if
(
ru
->
num_eNB
==
1
&&
ru
->
eNB_top
!=
0
&&
get_thread_parallel_conf
()
==
PARALLEL_SINGLE_THREAD
)
{
// call eNB function directly
char
string
[
20
];
sprintf
(
string
,
"Incoming RU %d"
,
ru
->
idx
);
...
...
@@ -1184,7 +1182,6 @@ void wakeup_eNBs(RU_t *ru) {
//clock_gettime(CLOCK_MONOTONIC,&t);
//LOG_I(PHY,"RU mask is now %x, time is %lu\n",proc->RU_mask[ru->proc.subframe_rx], t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec);
if
(
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
==
(
1
<<
eNB
->
num_RU
)
-
1
)
{
LOG_D
(
PHY
,
"ru_mask is %d
\n
"
,
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]);
LOG_D
(
PHY
,
"the number of RU is %d, the current ru is RU %d
\n
"
,
(
1
<<
eNB
->
num_RU
)
-
1
,
ru
->
idx
);
...
...
@@ -1202,8 +1199,19 @@ void wakeup_eNBs(RU_t *ru) {
// unlock RUs that are waiting for eNB processing to be completed
LOG_D
(
PHY
,
"RU %d wakeup eNB top for for subframe %d
\n
"
,
ru
->
idx
,
ru
->
proc
.
subframe_rx
);
if
(
ru
->
wait_cnt
==
0
)
ru
->
eNB_top
(
eNB_list
[
0
],
proc
->
frame_rx
,
proc
->
subframe_rx
,
string
,
ru
);
if
(
ru
->
wait_cnt
==
0
)
{
if
(
ru
->
num_eNB
==
1
&&
ru
->
eNB_top
!=
0
&&
get_thread_parallel_conf
()
==
PARALLEL_SINGLE_THREAD
)
ru
->
eNB_top
(
eNB_list
[
0
],
proc
->
frame_rx
,
proc
->
subframe_rx
,
string
,
ru
);
else
{
for
(
i
=
0
;
i
<
ru
->
num_eNB
;
i
++
)
{
eNB_list
[
i
]
->
proc
.
ru_proc
=
&
ru
->
proc
;
if
(
ru
->
wakeup_rxtx
!=
0
&&
ru
->
wakeup_rxtx
(
eNB_list
[
i
],
ru
)
<
0
)
{
LOG_E
(
PHY
,
"could not wakeup eNB rxtx process for subframe %d
\n
"
,
ru
->
proc
.
subframe_rx
);
}
}
}
}
AssertFatal
(
0
==
pthread_mutex_lock
(
&
ruproc
->
mutex_eNBs
),
""
);
LOG_D
(
PHY
,
"RU %d sending signal to unlock waiting ru_threads
\n
"
,
ru
->
idx
);
AssertFatal
(
0
==
pthread_cond_broadcast
(
&
ruproc
->
cond_eNBs
),
""
);
...
...
@@ -1219,23 +1227,8 @@ void wakeup_eNBs(RU_t *ru) {
// ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.subframe_rx,string);
ru
->
proc
.
emulate_rf_busy
=
0
;
}
else
{
for
(
i
=
0
;
i
<
ru
->
num_eNB
;
i
++
)
{
LOG_I
(
PHY
,
"ru->wakeup_rxtx:%p
\n
"
,
ru
->
wakeup_rxtx
);
eNB_list
[
i
]
->
proc
.
ru_proc
=
&
ru
->
proc
;
if
(
ru
->
wakeup_rxtx
!=
0
&&
ru
->
wakeup_rxtx
(
eNB_list
[
i
],
ru
)
<
0
)
{
LOG_E
(
PHY
,
"could not wakeup eNB rxtx process for subframe %d
\n
"
,
ru
->
proc
.
subframe_rx
);
}
ru
->
proc
.
emulate_rf_busy
=
0
;
}
}
}
static
inline
int
wakeup_prach_ru
(
RU_t
*
ru
)
{
...
...
@@ -1516,7 +1509,7 @@ static void* ru_thread_tx( void* param ) {
//printf("ru_thread_tx, ru_proc->cond_eNBs, ru_proc->instance_cnt_eNBs\n");
wait_on_condition
(
&
proc
->
mutex_eNBs
,
&
proc
->
cond_eNBs
,
&
proc
->
instance_cnt_eNBs
,
"ru_thread_tx"
);
//printf("Passed ru_thread_tx ru_proc->cond_eNBs\n");
LOG_
D
(
PHY
,
"ru_thread_tx (ru %d): Woken from condition
\n
"
,
ru
->
idx
);
LOG_
I
(
PHY
,
"ru_thread_tx (ru %d): Woken from condition
\n
"
,
ru
->
idx
);
if
(
oai_exit
)
break
;
// do TX front-end processing if needed (precoding and/or IDFTs)
...
...
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