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
wangwenhui
OpenXG-RAN
Commits
69a12690
Commit
69a12690
authored
Dec 19, 2018
by
Raymond Knoppp
Browse files
Options
Browse Files
Download
Plain Diff
final changes at slave RRU
parents
2a279bc7
1723c225
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
112 additions
and
39 deletions
+112
-39
common/utils/LOG/vcd_signal_dumper.c
common/utils/LOG/vcd_signal_dumper.c
+5
-0
common/utils/LOG/vcd_signal_dumper.h
common/utils/LOG/vcd_signal_dumper.h
+5
-0
common/utils/T/T_defs.h
common/utils/T/T_defs.h
+2
-2
common/utils/T/T_messages.txt
common/utils/T/T_messages.txt
+25
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+19
-15
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+55
-20
targets/RT/USER/ru_control.c
targets/RT/USER/ru_control.c
+1
-1
No files found.
common/utils/LOG/vcd_signal_dumper.c
View file @
69a12690
...
...
@@ -63,6 +63,8 @@ struct vcd_module_s {
const
char
*
eurecomVariablesNames
[]
=
{
"frame_number_TX0_eNB"
,
"mask_ru"
,
"mask_tx_ru"
,
"frame_number_TX1_eNB"
,
"frame_number_RX0_eNB"
,
"frame_number_RX1_eNB"
,
...
...
@@ -103,6 +105,7 @@ const char* eurecomVariablesNames[] = {
"frame_number_wakeup_rxtx_tx_ru"
,
"frame_number_wakeup_rxtx_tx_ru1"
,
"ic_enb"
,
"ic_enb1"
,
"l1_proc_ic"
,
"l1_proc_tx_ic"
,
"runtime_TX_eNB"
,
...
...
@@ -247,6 +250,8 @@ const char* eurecomFunctionsNames[] = {
"ue_lock_mutex_rxtx_for_cnt_decrement1"
,
"ue_lock_mutex_rxtx_for_cnt_increment0"
,
"ue_lock_mutex_rxtx_for_cnt_increment1"
,
"lock_mutex_ru"
,
"lock_mutex_ru1"
,
/* simulation signals */
"do_DL_sig"
,
"do_UL_sig"
,
...
...
common/utils/LOG/vcd_signal_dumper.h
View file @
69a12690
...
...
@@ -40,6 +40,8 @@
/* WARNING: if you edit the enums below, update also string definitions in vcd_signal_dumper.c */
typedef
enum
{
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB
=
0
,
VCD_SIGNAL_DUMPER_VARIABLES_MASK_RU
,
VCD_SIGNAL_DUMPER_VARIABLES_MASK_TX_RU
,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_ENB
,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB
,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_ENB
,
...
...
@@ -80,6 +82,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_TX_RU
,
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_TX_RU1
,
VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB
,
VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB1
,
VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_IC
,
VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_TX_IC
,
VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_TX_ENB
,
...
...
@@ -225,6 +228,8 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT1
,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT0
,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT1
,
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU
,
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU1
,
/* SIMULATION signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL
,
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL
,
...
...
common/utils/T/T_defs.h
View file @
69a12690
...
...
@@ -41,10 +41,10 @@ typedef struct {
}
T_cache_t
;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (2
18
)
#define VCD_NUM_FUNCTIONS (2
20
)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (15
5
)
#define VCD_NUM_VARIABLES (15
8
)
/* first VCD function (to be kept up to date! see in T_messages.txt) */
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
...
...
common/utils/T/T_messages.txt
View file @
69a12690
...
...
@@ -950,12 +950,21 @@ ID = buf_test
#to check that everything is correct you can run: make _check_vcd
#variables
ID = VCD_VARIABLE_FRAME_NUMBER_TX0_ENB
DESC = VCD variable FRAME_NUMBER_TX0_ENB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = frame_number_TX0_eNB
ID = VCD_VARIABLE_MASK_RU
DESC = VCD variable MASK_RU
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = mask_ru
ID = VCD_VARIABLE_MASK_TX_RU
DESC = VCD variable MASK_TX_RU
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = mask_tx_ru
ID = VCD_VARIABLE_FRAME_NUMBER_TX1_ENB
DESC = VCD variable FRAME_NUMBER_TX1_ENB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
...
...
@@ -1156,6 +1165,11 @@ ID = VCD_VARIABLE_IC_ENB
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ic_enb
ID = VCD_VARIABLE_IC_ENB1
DESC = VCD variable IC_ENB1
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ic_enb1
ID = VCD_VARIABLE_L1_PROC_IC
DESC = VCD variable L1_PROC_IC
GROUP = ALL:VCD:ENB:VCD_VARIABLE
...
...
@@ -1859,6 +1873,16 @@ ID = VCD_FUNCTION_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT1
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = ue_lock_mutex_rxtx_for_cnt_increment1
ID = VCD_FUNCTION_LOCK_MUTEX_RU
DESC = VCD function LOCK_MUTEX_RU
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = lock_mutex_ru
ID = VCD_FUNCTION_LOCK_MUTEX_RU1
DESC = VCD function LOCK_MUTEX_RU1
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = lock_mutex_ru1
ID = VCD_FUNCTION_SIM_DO_DL_SIGNAL
DESC = VCD function SIM_DO_DL_SIGNAL
GROUP = ALL:VCD:ENB:VCD_FUNCTION
...
...
targets/RT/USER/lte-enb.c
View file @
69a12690
...
...
@@ -425,9 +425,6 @@ static void* L1_thread( void* param ) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB
,
proc
->
subframe_rx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB
,
proc
->
frame_tx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB
,
proc
->
frame_rx
);
if
(
oai_exit
)
break
;
...
...
@@ -497,21 +494,23 @@ int wakeup_txfh(L1_rxtx_proc_t *proc,PHY_VARS_eNB *eNB) {
return
(
-
1
);
}
pthread_mutex_lock
(
&
eNB
->
proc
.
mutex_RU_tx
);
eNB
->
proc
.
RU_mask_tx
=
0
;
//
eNB->proc.RU_mask_tx = 0;
pthread_mutex_unlock
(
&
eNB
->
proc
.
mutex_RU_tx
);
if
(
release_thread
(
&
proc
->
mutex_RUs
,
&
proc
->
instance_cnt_RUs
,
"wakeup_txfh"
)
<
0
)
return
(
-
1
);
for
(
int
ru_id
=
0
;
ru_id
<
eNB
->
num_RU
;
ru_id
++
){
ru_proc
=
&
eNB
->
RU_list
[
ru_id
]
->
proc
;
fp
=
&
eNB
->
RU_list
[
ru_id
]
->
frame_parms
;
if
((
fp
->
frame_type
==
TDD
)
&&
(
subframe_select
(
fp
,
proc
->
subframe_tx
)
==
SF_UL
)){
if
((
fp
->
frame_type
==
TDD
)
&&
(
subframe_select
(
fp
,
proc
->
subframe_tx
)
==
SF_UL
)
||
(
eNB
->
RU_list
[
ru_id
]
->
state
==
RU_SYNC
)
||
(
eNB
->
RU_list
[
ru_id
]
->
wait_cnt
>
0
)){
pthread_mutex_lock
(
&
proc
->
mutex_RUs
);
proc
->
instance_cnt_RUs
=
0
;
pthread_mutex_unlock
(
&
proc
->
mutex_RUs
);
continue
;
//hacking only works when all RU_tx works on the same subframe #TODO: adding mask stuff
}
// skip the RUs that are not synced
if
(
eNB
->
RU_list
[
ru_id
]
->
state
==
RU_SYNC
)
{
LOG_D
(
PHY
,
"wakeup_txfh: eNB %d : Skipping ru %d
\n
"
,
eNB
->
Mod_id
,
ru_id
);
continue
;
}
//if (eNB->RU_list[ru_id]->state == RU_SYNC /*|| eNB->RU_list[ru_id]->wait_cnt>0*/
) { LOG_D(PHY,"wakeup_txfh: eNB %d : Skipping ru %d\n",eNB->Mod_id,ru_id); continue; }
//if(ru_proc == NULL) {return(0);}
...
...
@@ -519,19 +518,19 @@ int wakeup_txfh(L1_rxtx_proc_t *proc,PHY_VARS_eNB *eNB) {
LOG_E
(
PHY
,
"Frame %d, subframe %d: TX FH thread busy, dropping Frame %d, subframe %d
\n
"
,
ru_proc
->
frame_tx
,
ru_proc
->
subframe_tx
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
return
(
-
1
);
}
if
(
pthread_mutex_
timedlock
(
&
ru_proc
->
mutex_eNBs
,
&
wait
)
!=
0
)
{
if
(
pthread_mutex_
lock
(
&
ru_proc
->
mutex_eNBs
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_mutex_lock for eNB TX1 thread %d (IC %d)
\n
"
,
ru_proc
->
subframe_rx
&
1
,
ru_proc
->
instance_cnt_eNBs
);
exit_fun
(
"error locking mutex_eNB"
);
return
(
-
1
);
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB
,
ru_proc
->
instance_cnt_eNBs
);
//
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB,ru_proc->instance_cnt_eNBs);
ru_proc
->
instance_cnt_eNBs
=
0
;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB
,
ru_proc
->
instance_cnt_eNBs
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB
+
ru_id
,
ru_proc
->
instance_cnt_eNBs
);
ru_proc
->
timestamp_tx
=
proc
->
timestamp_tx
;
ru_proc
->
subframe_tx
=
proc
->
subframe_tx
;
ru_proc
->
frame_tx
=
proc
->
frame_tx
;
LOG_D
(
PHY
,
"wakeup_txfh: ru_proc->subframe_tx %d
\n
"
,
ru_proc
->
subframe_tx
);
// printf("wakeup_txfh: RU %d, frame_tx %d, subframe_tx %d\n",ru_id,ru_proc->frame_tx
,ru_proc->subframe_tx);
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
ru_proc
->
cond_eNBs
)
!=
0
)
{
...
...
@@ -559,7 +558,7 @@ int wakeup_tx(PHY_VARS_eNB *eNB) {
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
if
(
pthread_mutex_
timedlock
(
&
L1_proc_tx
->
mutex
,
&
wait
)
!=
0
)
{
if
(
pthread_mutex_
lock
(
&
L1_proc_tx
->
mutex
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][eNB] ERROR locking mutex for eNB L1_thread_tx
\n
"
);
exit_fun
(
"ERROR pthread_lock"
);
return
(
-
1
);
...
...
@@ -609,7 +608,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
// wake up TX for subframe n+sf_ahead
// lock the TX mutex and make sure the thread is ready
if
(
pthread_mutex_
timedlock
(
&
L1_proc
->
mutex
,
&
wait
)
!=
0
)
{
if
(
pthread_mutex_
lock
(
&
L1_proc
->
mutex
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_mutex_lock for eNB RXTX thread %d (IC %d)
\n
"
,
L1_proc
->
subframe_rx
&
1
,
L1_proc
->
instance_cnt
);
exit_fun
(
"error locking mutex_rxtx"
);
return
(
-
1
);
...
...
@@ -630,7 +629,12 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
L1_proc
->
frame_tx
=
(
L1_proc
->
subframe_rx
>
(
9
-
sf_ahead
))
?
(
L1_proc
->
frame_rx
+
1
)
&
1023
:
L1_proc
->
frame_rx
;
L1_proc
->
subframe_tx
=
(
L1_proc
->
subframe_rx
+
sf_ahead
)
%
10
;
LOG_D
(
PHY
,
"wakeup_rxtx: L1_proc->subframe_rx %d, L1_proc->subframe_tx %d
\n
"
,
L1_proc
->
subframe_rx
,
L1_proc
->
subframe_tx
);
//printf("wakeup_rxtx: L1_proc->subframe_rx %d, L1_proc->subframe_tx %d, RU %d\n",L1_proc->subframe_rx,L1_proc->subframe_tx,ru->idx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_RX_RU
+
ru
->
idx
,
L1_proc
->
frame_rx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_RXTX_RX_RU
+
ru
->
idx
,
L1_proc
->
subframe_rx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_TX_RU
+
ru
->
idx
,
L1_proc
->
frame_tx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_RXTX_TX_RU
+
ru
->
idx
,
L1_proc
->
subframe_tx
);
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
L1_proc
->
cond
)
!=
0
)
{
...
...
@@ -640,12 +644,12 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
}
pthread_mutex_unlock
(
&
L1_proc
->
mutex
);
/*
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_RX_RU+ru->idx, L1_proc->frame_rx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_RXTX_RX_RU+ru->idx, L1_proc->subframe_rx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_TX_RU+ru->idx, L1_proc->frame_tx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_RXTX_TX_RU+ru->idx, L1_proc->subframe_tx);
*/
return
(
0
);
}
...
...
targets/RT/USER/lte-ru.c
View file @
69a12690
This diff is collapsed.
Click to expand it.
targets/RT/USER/ru_control.c
View file @
69a12690
...
...
@@ -705,7 +705,7 @@ void* ru_thread_control( void* param ) {
if
(
ru
->
if_south
==
LOCAL_RF
)
LOG_E
(
PHY
,
"Received RRU_config_ok msg...Ignoring
\n
"
);
else
{
if
(
ru
->
is_slave
==
1
){
printf
(
PHY
,
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Received RRU_sync_ok from RRU %d
\n
"
,
ru
->
idx
);
printf
(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Received RRU_sync_ok from RRU %d
\n
"
,
ru
->
idx
);
// Just change the state of the RRU to unblock ru_thread()
ru
->
state
=
RU_RUN
;
}
else
LOG_E
(
PHY
,
"Received RRU_sync_ok from a master RRU...Ignoring
\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