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
1547de9a
Commit
1547de9a
authored
Feb 24, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging for simulator target
parent
72cd1b1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
+26
-12
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+7
-3
openair1/PHY/defs.h
openair1/PHY/defs.h
+2
-1
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+16
-7
targets/SIMU/USER/oaisim.c
targets/SIMU/USER/oaisim.c
+1
-1
No files found.
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
1547de9a
...
...
@@ -287,14 +287,18 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
LOG_D
(
PHY
,
"recv IF4p5: RU %d waiting (%d samples)
\n
"
,
ru
->
idx
,
db_fulllength
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF
,
1
);
if
(
ru
->
ifdevice
.
trx_read_func
(
&
ru
->
ifdevice
,
int
read_cnt
=
0
;
while
(
ru
->
ifdevice
.
trx_read_func
(
&
ru
->
ifdevice
,
(
int64_t
*
)
packet_type
,
&
rx_buffer
,
db_fulllength
,
0
)
<
0
)
{
perror
(
"ETHERNET read"
);
ru
->
cmd
=
STOP_RU
;
return
;
read_cnt
++
;
if
(
read_cnt
==
2
)
{
ru
->
cmd
=
STOP_RU
;
return
;
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF
,
0
);
if
(
eth
->
flags
==
ETH_RAW_IF4p5_MODE
)
{
...
...
openair1/PHY/defs.h
View file @
1547de9a
...
...
@@ -686,7 +686,8 @@ typedef enum {
/// Some commamds to RRU. Not sure we should do it like this !
typedef
enum
{
STOP_RU
=
0
EMPTY
=
0
,
STOP_RU
=
1
}
rru_cmd_t
;
typedef
struct
RU_t_s
{
...
...
targets/RT/USER/lte-ru.c
View file @
1547de9a
...
...
@@ -681,16 +681,17 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *subframe) {
uint32_t
symbol_number
,
symbol_mask
,
symbol_mask_full
;
int
subframe_tx
,
frame_tx
;
LOG_D
(
PHY
,
"%s(ru:%p frame, subframe)
\n
"
,
__FUNCTION__
,
ru
);
symbol_number
=
0
;
symbol_mask
=
0
;
symbol_mask_full
=
((
subframe_select
(
fp
,
*
subframe
)
==
SF_S
)
?
(
1
<<
fp
->
dl_symbols_in_S_subframe
)
:
(
1
<<
fp
->
symbols_per_tti
))
-
1
;
do
{
recv_IF4p5
(
ru
,
&
frame_tx
,
&
subframe_tx
,
&
packet_type
,
&
symbol_number
);
if
(
ru
->
cmd
!=
STOP_RU
){
if
(
ru
->
cmd
==
STOP_RU
){
LOG_E
(
PHY
,
"Got STOP_RU
\n
"
);
pthread_mutex_lock
(
&
proc
->
mutex_ru
);
proc
->
instance_cnt_ru
=
-
1
;
pthread_mutex_unlock
(
&
proc
->
mutex_ru
);
ru
->
cmd
=
EMPTY
;
return
;
}
if
((
subframe_select
(
fp
,
subframe_tx
)
==
SF_DL
)
&&
(
symbol_number
==
0
))
start_meas
(
&
ru
->
rx_fhaul
);
...
...
@@ -711,7 +712,7 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *subframe) {
if
(
packet_type
==
IF4p5_PDLFFT
)
{
symbol_mask
=
symbol_mask
|
(
1
<<
symbol_number
);
}
else
AssertFatal
(
1
==
0
,
"Illegal IF4p5 packet type (should only be IF4p5_PDLFFT%d
\n
"
,
packet_type
);
else
AssertFatal
(
1
==
0
,
"Illegal IF4p5 packet type (should only be IF4p5_PDLFFT
got
%d
\n
"
,
packet_type
);
}
while
(
symbol_mask
!=
symbol_mask_full
);
if
(
subframe_select
(
fp
,
subframe_tx
)
==
SF_DL
)
stop_meas
(
&
ru
->
rx_fhaul
);
...
...
@@ -754,6 +755,7 @@ void fh_if4p5_north_out(RU_t *ru) {
const
int
subframe
=
proc
->
subframe_rx
;
if
(
ru
->
idx
==
0
)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_RU
,
proc
->
subframe_rx
);
LOG_D
(
PHY
,
"Sending IF4p5_PULFFT SFN.SF %d.%d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
if
((
fp
->
frame_type
==
TDD
)
&&
(
subframe_select
(
fp
,
subframe
)
!=
SF_UL
))
{
/// **** in TDD during DL send_IF4 of ULTICK to RCC **** ///
send_IF4p5
(
ru
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
IF4p5_PULTICK
);
...
...
@@ -1305,7 +1307,7 @@ static inline int wakeup_prach_ru(RU_t *ru) {
ru
->
eNB_list
[
0
]
->
proc
.
frame_prach
=
ru
->
proc
.
frame_rx
;
ru
->
eNB_list
[
0
]
->
proc
.
subframe_prach
=
ru
->
proc
.
subframe_rx
;
}
LOG_
I
(
PHY
,
"RU %d: waking up PRACH thread
\n
"
,
ru
->
idx
);
LOG_
D
(
PHY
,
"RU %d: waking up PRACH thread
\n
"
,
ru
->
idx
);
// the thread can now be woken up
AssertFatal
(
pthread_cond_signal
(
&
ru
->
proc
.
cond_prach
)
==
0
,
"ERROR pthread_cond_signal for RU prach thread
\n
"
);
}
...
...
@@ -1826,16 +1828,23 @@ static void* ru_thread( void* param ) {
if
(
ru
->
stop_rf
&&
ru
->
cmd
==
STOP_RU
)
{
ru
->
stop_rf
(
ru
);
ru
->
state
=
RU_IDLE
;
ru
->
cmd
=
EMPTY
;
LOG_I
(
PHY
,
"RU %d rf device stopped
\n
"
,
ru
->
idx
);
break
;
}
else
if
(
ru
->
cmd
==
STOP_RU
)
{
ru
->
state
=
RU_IDLE
;
ru
->
cmd
=
EMPTY
;
LOG_I
(
PHY
,
"RU %d rf device stopped
\n
"
,
ru
->
idx
);
break
;
}
if
(
ru
->
fh_south_in
&&
ru
->
state
==
RU_RUN
)
ru
->
fh_south_in
(
ru
,
&
frame
,
&
subframe
);
else
AssertFatal
(
1
==
0
,
"No fronthaul interface at south port"
);
/*
LOG_
D
(PHY,"AFTER fh_south_in - SFN/SF:%d%d RU->proc[RX:%d%d TX:%d%d] RC.eNB[0][0]:[RX:%d%d TX(SFN):%d]\n",
LOG_
I
(PHY,"AFTER fh_south_in - SFN/SF:%d%d RU->proc[RX:%d%d TX:%d%d] RC.eNB[0][0]:[RX:%d%d TX(SFN):%d]\n",
frame,subframe,
proc->frame_rx,proc->subframe_rx,
proc->frame_tx,proc->subframe_tx,
...
...
@@ -1846,7 +1855,7 @@ static void* ru_thread( void* param ) {
ru->do_prach,
is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx),
proc->frame_rx,proc->subframe_rx);
*/
*/
if
((
ru
->
do_prach
>
0
)
&&
(
is_prach_subframe
(
fp
,
proc
->
frame_rx
,
proc
->
subframe_rx
)
==
1
))
{
wakeup_prach_ru
(
ru
);
}
...
...
@@ -2590,7 +2599,7 @@ void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t ti
ru
->
idx
=
ru_id
;
ru
->
ts_offset
=
0
;
ru
->
in_synch
=
(
ru
->
is_slave
==
1
)
?
0
:
1
;
ru
->
cmd
=
-
1
;
ru
->
cmd
=
EMPTY
;
// use eNB_list[0] as a reference for RU frame parameters
// NOTE: multiple CC_id are not handled here yet!
ru
->
openair0_cfg
.
clock_source
=
clock_source
;
...
...
targets/SIMU/USER/oaisim.c
View file @
1547de9a
...
...
@@ -741,7 +741,7 @@ l2l1_task (void *args_p)
while
(
all_done
==
0
)
{
pthread_mutex_lock
(
&
subframe_mutex
);
int
subframe_ru_mask_local
=
subframe_ru_mask
;
int
subframe_ru_mask_local
=
((
1
<<
NB_RU
)
-
1
);
//
subframe_ru_mask;
int
subframe_UE_mask_local
=
subframe_UE_mask
;
pthread_mutex_unlock
(
&
subframe_mutex
);
LOG_D
(
EMU
,
"Frame %d, Subframe %d, NB_RU %d, NB_UE %d: Checking masks %x,%x
\n
"
,
frame
,
sf
,
NB_RU
,
NB_UE_INST
,
subframe_ru_mask_local
,
subframe_UE_mask_local
);
...
...
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