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
570ac353
Commit
570ac353
authored
Mar 04, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
frame resynchronization in RAU and RRU
parent
103471e9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
81 deletions
+117
-81
openair1/PHY/defs.h
openair1/PHY/defs.h
+11
-3
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+9
-8
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+97
-70
No files found.
openair1/PHY/defs.h
View file @
570ac353
...
...
@@ -559,7 +559,9 @@ typedef struct eNB_proc_t_s {
/// mutex for RU access to eNB processing (PRACH BR)
pthread_mutex_t
mutex_RU_PRACH_br
;
/// mask for RUs serving eNB (PDSCH/PUSCH)
int
RU_mask
;
int
RU_mask
[
10
];
/// time measurements for RU arrivals
struct
timespec
t
[
10
];
/// mask for RUs serving eNB (PRACH)
int
RU_mask_prach
;
#ifdef Rel14
...
...
@@ -687,7 +689,8 @@ typedef enum {
/// Some commamds to RRU. Not sure we should do it like this !
typedef
enum
{
EMPTY
=
0
,
STOP_RU
=
1
STOP_RU
=
1
,
RU_FRAME_RESYNCH
=
2
}
rru_cmd_t
;
typedef
struct
RU_t_s
{
...
...
@@ -709,6 +712,8 @@ typedef struct RU_t_s{
int
rx_offset
;
/// flag to indicate the RU is a slave to another source
int
is_slave
;
/// counter to delay start of processing of RU until HW settles
int
wait_cnt
;
/// Total gain of receive chain
uint32_t
rx_total_gain_dB
;
/// number of bands that this device can support
...
...
@@ -812,6 +817,8 @@ typedef struct RU_t_s{
rru_state_t
state
;
/// Command to do
rru_cmd_t
cmd
;
/// value to be passed using command
uint16_t
cmdval
;
/// process scheduling variables
RU_proc_t
proc
;
/// stats thread pthread descriptor
...
...
@@ -1501,7 +1508,8 @@ typedef enum {
RRU_config_ok
=
4
,
RRU_start
=
5
,
RRU_stop
=
6
,
RRU_sync_ok
=
7
RRU_sync_ok
=
7
,
RRU_frame_resynch
=
8
}
rru_config_msg_type_t
;
...
...
targets/RT/USER/lte-enb.c
View file @
570ac353
...
...
@@ -225,6 +225,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
// UE-specific RX processing for subframe n
if
(
nfapi_mode
==
0
||
nfapi_mode
==
1
)
{
LOG_I
(
PHY
,
"Calling RX procedures for SFNSF %d.%d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
phy_procedures_eNB_uespec_RX
(
eNB
,
proc
,
no_relay
);
}
...
...
@@ -250,7 +251,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
if
(
oai_exit
)
return
(
-
1
);
LOG_
D
(
PHY
,
"Calling eNB_procedures_TX for SFN.SF %d.%d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
LOG_
I
(
PHY
,
"Calling eNB_procedures_TX for SFN.SF %d.%d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
phy_procedures_eNB_TX
(
eNB
,
proc
,
no_relay
,
NULL
,
1
);
stop_meas
(
&
softmodem_stats_rxtx_sf
);
...
...
@@ -416,21 +417,21 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
pthread_mutex_lock
(
&
proc
->
mutex_RU
);
for
(
i
=
0
;
i
<
eNB
->
num_RU
;
i
++
)
{
if
(
ru
==
eNB
->
RU_list
[
i
])
{
if
((
proc
->
RU_mask
&
(
1
<<
i
))
>
0
)
if
((
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
&
(
1
<<
i
))
>
0
)
LOG_E
(
PHY
,
"eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!
\n
"
,
eNB
->
Mod_id
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
ru
->
idx
,
eNB
->
num_RU
,
proc
->
RU_mask
);
proc
->
RU_mask
|=
(
1
<<
i
);
eNB
->
Mod_id
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
ru
->
idx
,
eNB
->
num_RU
,
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
);
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
|=
(
1
<<
i
);
}
else
if
(
eNB
->
RU_list
[
i
]
->
state
==
RU_SYNC
){
proc
->
RU_mask
|=
(
1
<<
i
);
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
|=
(
1
<<
i
);
}
}
if
(
proc
->
RU_mask
!=
(
1
<<
eNB
->
num_RU
)
-
1
)
{
// not all RUs have provided their information so return
if
(
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
!=
(
1
<<
eNB
->
num_RU
)
-
1
)
{
// not all RUs have provided their information so return
LOG_E
(
PHY
,
"Not all RUs have provided their info
\n
"
);
pthread_mutex_unlock
(
&
proc
->
mutex_RU
);
return
(
0
);
}
else
{
// all RUs have provided their information so continue on and wakeup eNB processing
proc
->
RU_mask
=
0
;
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
=
0
;
pthread_mutex_unlock
(
&
proc
->
mutex_RU
);
}
...
...
@@ -724,7 +725,7 @@ void init_eNB_proc(int inst) {
proc
->
first_rx
=
1
;
proc
->
first_tx
=
1
;
proc
->
RU_mask
=
0
;
for
(
i
=
0
;
i
<
10
;
i
++
)
proc
->
RU_mask
[
i
]
=
0
;
proc
->
RU_mask_prach
=
0
;
pthread_mutex_init
(
&
eNB
->
UL_INFO_mutex
,
NULL
);
...
...
targets/RT/USER/lte-ru.c
View file @
570ac353
This diff is collapsed.
Click to expand it.
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