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
常顺宇
OpenXG-RAN
Commits
fa8b42c0
Commit
fa8b42c0
authored
May 31, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging of --siml1
parent
16b7faaa
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
21 deletions
+36
-21
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/PHY/INIT/lte_init_ue.c
openair1/PHY/INIT/lte_init_ue.c
+1
-0
openair1/PHY/defs_common.h
openair1/PHY/defs_common.h
+1
-1
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+1
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+2
-1
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+2
-0
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+12
-3
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+9
-6
targets/RT/USER/rfsim.c
targets/RT/USER/rfsim.c
+7
-8
No files found.
cmake_targets/CMakeLists.txt
View file @
fa8b42c0
...
...
@@ -2014,7 +2014,7 @@ target_link_libraries (lte-uesoftmodem ${T_LIB})
add_executable
(
lte-uesoftmodem-nos1
${
rrc_h
}
${
s1ap_h
}
#
${OPENAIR_BIN_DIR}/messages_xml.h
${
OPENAIR_BIN_DIR
}
/messages_xml.h
${
OPENAIR_TARGETS
}
/RT/USER/rt_wrapper.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-ue.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-uesoftmodem.c
...
...
openair1/PHY/INIT/lte_init_ue.c
View file @
fa8b42c0
...
...
@@ -709,6 +709,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
common_vars
->
rxdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
(
fp
->
samples_per_tti
*
10
+
2048
)
*
sizeof
(
int32_t
)
);
LOG_I
(
PHY
,
"common_vars->rxdata[%d] %p
\n
"
,
i
,
common_vars
->
rxdata
[
i
]);
common_vars
->
common_vars_rx_data_per_thread
[
0
].
rxdataF
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
(
fp
->
ofdm_symbol_size
*
14
)
);
common_vars
->
common_vars_rx_data_per_thread
[
1
].
rxdataF
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
(
fp
->
ofdm_symbol_size
*
14
)
);
}
...
...
openair1/PHY/defs_common.h
View file @
fa8b42c0
...
...
@@ -986,7 +986,7 @@ typedef uint8_t(*encoder_if_t)(uint8_t *input,
static
inline
void
wait_sync
(
char
*
thread_name
)
{
printf
(
"waiting for sync (%s
)
\n
"
,
thread_name
);
printf
(
"waiting for sync (%s
,%p,%p,%p)
\n
"
,
thread_name
,
&
sync_var
,
&
sync_cond
,
&
sync_mutex
);
pthread_mutex_lock
(
&
sync_mutex
);
while
(
sync_var
<
0
)
...
...
targets/RT/USER/lte-ru.c
View file @
fa8b42c0
...
...
@@ -1644,7 +1644,7 @@ static void* ru_thread( void* param ) {
// wakeup all eNB processes waiting for this RU
if
(
ru
->
num_eNB
>
0
)
wakeup_eNBs
(
ru
);
if
(
get_nprocs
()
<=
4
){
if
(
get_nprocs
()
<=
4
||
ru
->
num_eNB
==
0
){
// do TX front-end processing if needed (precoding and/or IDFTs)
if
(
ru
->
feptx_prec
)
ru
->
feptx_prec
(
ru
);
...
...
targets/RT/USER/lte-softmodem.c
View file @
fa8b42c0
...
...
@@ -154,7 +154,8 @@ static char *itti_dump_file = NULL;
int
UE_scan
=
1
;
int
UE_scan_carrier
=
0
;
runmode_t
mode
=
normal_txrx
;
int
simL1flag
;
int
snr_dB
;
FILE
*
input_fd
=
NULL
;
...
...
targets/RT/USER/lte-softmodem.h
View file @
fa8b42c0
...
...
@@ -81,6 +81,7 @@
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
#define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n"
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
#define CONFIG_HLP_L2MONP "Enable L2 pcap messages on localhost \n"
...
...
@@ -183,6 +184,7 @@
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"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}, \
{"s" , CONFIG_HLP_SNR, PARAMFLAG_BOOL, iptr:&snr_dB, defintval:15, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
{"codingw" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \
...
...
targets/RT/USER/lte-ue.c
View file @
fa8b42c0
...
...
@@ -254,8 +254,18 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
for
(
inst
=
0
;
inst
<
nb_inst
;
inst
++
)
{
if
(
PHY_vars_UE_g
[
inst
]
==
NULL
)
PHY_vars_UE_g
[
inst
]
=
(
PHY_VARS_UE
**
)
calloc
(
1
+
MAX_NUM_CCs
,
sizeof
(
PHY_VARS_UE
*
));
if
(
simL1flag
==
0
)
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
NULL
,
inst
,
0
);
else
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
&
RC
.
ru
[
0
]
->
frame_parms
,
inst
,
0
);
else
{
RC
.
ru
[
0
]
->
frame_parms
.
nb_antennas_rx
=
nb_rx
;
RC
.
ru
[
0
]
->
frame_parms
.
nb_antennas_tx
=
nb_tx
;
RC
.
ru
[
0
]
->
frame_parms
.
frame_type
=
FDD
;
RC
.
ru
[
0
]
->
frame_parms
.
tdd_config
=
3
;
RC
.
ru
[
0
]
->
frame_parms
.
tdd_config_S
=
0
;
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
&
RC
.
ru
[
0
]
->
frame_parms
,
inst
,
0
);
}
// turn off timing control loop in UE
PHY_vars_UE_g
[
inst
][
0
]
->
no_timing_correction
=
timing_correction
;
...
...
@@ -1476,8 +1486,7 @@ void *UE_thread(void *arg) {
pthread_mutex_unlock(&sync_mutex);
*/
wait_sync
(
"UE thread
\n
"
);
LOG_I
(
PHY
,
"UE_thread Got sync
\n
"
);
wait_sync
(
"UE thread"
);
#ifdef NAS_UE
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_NAS_UE
,
INITIALIZE_MESSAGE
);
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
fa8b42c0
...
...
@@ -157,6 +157,8 @@ static char *itti_dump_file = NULL;
int
UE_scan
=
1
;
int
UE_scan_carrier
=
0
;
int
simL1flag
=
0
;
int
snr_dB
=
15
;
runmode_t
mode
=
normal_txrx
;
FILE
*
input_fd
=
NULL
;
...
...
@@ -870,6 +872,9 @@ int main( int argc, char **argv )
log_set_instance_type
(
LOG_INSTANCE_UE
);
pthread_cond_init
(
&
sync_cond
,
NULL
);
pthread_mutex_init
(
&
sync_mutex
,
NULL
);
printf
(
"ITTI init
\n
"
);
itti_init
(
TASK_MAX
,
THREAD_MAX
,
MESSAGES_ID_MAX
,
tasks_info
,
messages_info
,
messages_definition_xml
,
itti_dump_file
);
...
...
@@ -1052,8 +1057,6 @@ int main( int argc, char **argv )
mlockall
(
MCL_CURRENT
|
MCL_FUTURE
);
pthread_cond_init
(
&
sync_cond
,
NULL
);
pthread_mutex_init
(
&
sync_mutex
,
NULL
);
#ifdef XFORMS
int
UE_id
;
...
...
@@ -1144,19 +1147,19 @@ int main( int argc, char **argv )
}
//p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX;
if
(
simL1flag
==
1
)
init_ocm
();
if
(
simL1flag
==
1
)
init_ocm
(
(
double
)
snr_dB
,
0
);
printf
(
"Sending sync to all threads
\n
"
);
printf
(
"Sending sync to all threads
(%p,%p,%p)
\n
"
,
&
sync_var
,
&
sync_mutex
,
&
sync_cond
);
pthread_mutex_lock
(
&
sync_mutex
);
sync_var
=
0
;
pthread_cond_broadcast
(
&
sync_cond
);
pthread_mutex_unlock
(
&
sync_mutex
);
/*
printf("About to call end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
end_configmodule();
printf("Called end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
*/
// wait for end of program
printf
(
"TYPE <CTRL-C> TO TERMINATE
\n
"
);
//getchar();
...
...
targets/RT/USER/rfsim.c
View file @
fa8b42c0
...
...
@@ -151,7 +151,7 @@ void RCConfig_sim(void) {
init_ru_devices
();
int
nframes
=
100000
;
static
int
nframes
=
100000
;
AssertFatal
(
0
==
pthread_create
(
&
rfsim_thread
,
NULL
,
...
...
@@ -223,7 +223,8 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
usleep
(
500
);
}
subframe
=
(
last_ru_rx_timestamp
[
ru_id
][
CC_id
]
/
RC
.
ru
[
ru_id
]
->
frame_parms
.
samples_per_tti
)
%
10
;
if
(
subframe_select
(
&
RC
.
ru
[
ru_id
]
->
frame_parms
,
subframe
)
!=
SF_DL
||
RC
.
ru
[
ru_id
]
->
frame_parms
.
frame_type
==
FDD
)
{
LOG_D
(
SIM
,
"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)
\n
"
,
...
...
@@ -373,7 +374,7 @@ void init_ru_devices(){
if
(
RC
.
ru
==
NULL
)
RC
.
ru
=
(
RU_t
**
)
malloc
(
RC
.
nb_RU
*
sizeof
(
RU_t
*
));
for
(
ru_id
=
0
;
ru_id
<
RC
.
nb_RU
;
ru_id
++
)
{
LOG_
I
(
SIM
,
"Initiaizing rfdevice for RU %d
\n
"
,
ru_id
);
LOG_
D
(
SIM
,
"Initiaizing rfdevice for RU %d
\n
"
,
ru_id
);
if
(
RC
.
ru
[
ru_id
]
==
NULL
)
RC
.
ru
[
ru_id
]
=
(
RU_t
*
)
malloc
(
sizeof
(
RU_t
));
ru
=
RC
.
ru
[
ru_id
];
ru
->
rfdevice
.
Mod_id
=
ru_id
;
...
...
@@ -530,13 +531,11 @@ void init_channel_vars(void)
void
rfsim_top
(
void
*
n_frames
)
{
LOG_I
(
PHY
,
"rfsim_top: Waiting for sync
\n
"
);
while
(
sync_var
<
0
)
pthread_cond_wait
(
&
sync_cond
,
&
sync_mutex
);
pthread_mutex_unlock
(
&
sync_mutex
);
wait_sync
(
"rfsim_top"
);
printf
(
"Running rfsim with %d frames
\n
"
,
*
(
int
*
)
n_frames
);
for
(
int
frame
=
0
;
frame
<
*
(
int
*
)
n_frames
;
frame
++
)
{
...
...
@@ -544,10 +543,10 @@ void rfsim_top(void *n_frames) {
for
(
int
sf
=
0
;
sf
<
10
;
sf
++
)
{
int
CC_id
=
0
;
int
all_done
=
0
;
printf
(
"Running %d.%d
\n
"
,
frame
,
sf
);
while
(
all_done
==
0
)
{
pthread_mutex_lock
(
&
subframe_mutex
);
int
subframe_ru_mask_local
=
(
subframe_select
(
&
RC
.
ru
[
0
]
->
frame_parms
,(
sf
+
4
)
%
10
)
!=
SF_UL
)
?
subframe_ru_mask
:
((
1
<<
RC
.
nb_RU
)
-
1
);
int
subframe_UE_mask_local
=
(
RC
.
ru
[
0
]
->
frame_parms
.
frame_type
==
FDD
||
subframe_select
(
&
RC
.
ru
[
0
]
->
frame_parms
,(
sf
+
4
)
%
10
)
!=
SF_DL
)
?
subframe_UE_mask
:
((
1
<<
NB_UE_INST
)
-
1
);
pthread_mutex_unlock
(
&
subframe_mutex
);
...
...
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