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
promise
OpenXG-RAN
Commits
84af6103
Commit
84af6103
authored
5 years ago
by
yilmazt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
another batch of cppcheck error corrections
parent
47825cbc
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
305 additions
and
284 deletions
+305
-284
common/utils/LOG/log.c
common/utils/LOG/log.c
+1
-1
common/utils/LOG/log.h
common/utils/LOG/log.h
+7
-7
common/utils/ocp_itti/intertask_interface.cpp
common/utils/ocp_itti/intertask_interface.cpp
+3
-3
executables/nr-ru.c
executables/nr-ru.c
+26
-20
executables/nr-softmodem.c
executables/nr-softmodem.c
+1
-1
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
...ir1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
+1
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+4
-3
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+2
-2
openair1/PHY/LTE_TRANSPORT/lte_mcs.c
openair1/PHY/LTE_TRANSPORT/lte_mcs.c
+22
-9
openair1/PHY/TOOLS/lte_phy_scope.c
openair1/PHY/TOOLS/lte_phy_scope.c
+5
-2
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
+33
-23
openair1/SIMULATION/LTE_PHY/syncsim.c
openair1/SIMULATION/LTE_PHY/syncsim.c
+2
-2
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/enb_paramdef.h
+155
-155
openair2/NETWORK_DRIVER/MESH/common.c
openair2/NETWORK_DRIVER/MESH/common.c
+2
-3
openair2/RRC/LTE/rrm_2_rrc_msg.c
openair2/RRC/LTE/rrm_2_rrc_msg.c
+1
-4
openair2/UTIL/OTG/otg_tx.c
openair2/UTIL/OTG/otg_tx.c
+10
-13
openair3/SCTP/sctp_common.h
openair3/SCTP/sctp_common.h
+1
-1
openair3/SCTP/sctp_eNB_task.c
openair3/SCTP/sctp_eNB_task.c
+1
-2
targets/RT/USER/lte-softmodem-common.c
targets/RT/USER/lte-softmodem-common.c
+3
-7
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+25
-25
No files found.
common/utils/LOG/log.c
View file @
84af6103
...
@@ -232,7 +232,7 @@ int write_file_matlab(const char *fname,
...
@@ -232,7 +232,7 @@ int write_file_matlab(const char *fname,
void
log_getconfig
(
log_t
*
g_log
)
void
log_getconfig
(
log_t
*
g_log
)
{
{
char
*
gloglevel
=
NULL
;
char
*
gloglevel
=
NULL
;
int
consolelog
;
int
consolelog
=
0
;
paramdef_t
logparams_defaults
[]
=
LOG_GLOBALPARAMS_DESC
;
paramdef_t
logparams_defaults
[]
=
LOG_GLOBALPARAMS_DESC
;
paramdef_t
logparams_level
[
MAX_LOG_PREDEF_COMPONENTS
];
paramdef_t
logparams_level
[
MAX_LOG_PREDEF_COMPONENTS
];
paramdef_t
logparams_logfile
[
MAX_LOG_PREDEF_COMPONENTS
];
paramdef_t
logparams_logfile
[
MAX_LOG_PREDEF_COMPONENTS
];
...
...
This diff is collapsed.
Click to expand it.
common/utils/LOG/log.h
View file @
84af6103
...
@@ -363,14 +363,14 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
...
@@ -363,14 +363,14 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------
*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* LOG globalconfiguration parameters */
/* LOG globalconfiguration parameters */
/* optname help paramflags XXXptr defXXXval type numelt */
/* optname help paramflags XXXptr defXXXval type numelt */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------
*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define LOG_GLOBALPARAMS_DESC { \
#define LOG_GLOBALPARAMS_DESC { \
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(consolelog), defintval:1, TYPE_INT, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(consolelog), defintval:1, TYPE_INT, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS,
LOG_CONFIG_HELP_OPTIONS, 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST,
0} \
{LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS,
LOG_CONFIG_HELP_OPTIONS, 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST,
0} \
}
}
#define LOG_OPTIONS_IDX 2
#define LOG_OPTIONS_IDX 2
...
...
This diff is collapsed.
Click to expand it.
common/utils/ocp_itti/intertask_interface.cpp
View file @
84af6103
This diff is collapsed.
Click to expand it.
executables/nr-ru.c
View file @
84af6103
...
@@ -1230,10 +1230,10 @@ static void *ru_stats_thread(void *param) {
...
@@ -1230,10 +1230,10 @@ static void *ru_stats_thread(void *param) {
static
void
*
ru_thread_tx
(
void
*
param
)
{
static
void
*
ru_thread_tx
(
void
*
param
)
{
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
NR_DL_FRAME_PARMS
*
fp
=
ru
->
nr_frame_parms
;
PHY_VARS_gNB
*
gNB
;
PHY_VARS_gNB
*
gNB
;
gNB_L1_proc_t
*
gNB_proc
;
gNB_L1_proc_t
*
gNB_proc
;
gNB_L1_rxtx_proc_t
*
L1_proc
;
gNB_L1_rxtx_proc_t
*
L1_proc
;
NR_DL_FRAME_PARMS
*
fp
=
ru
->
nr_frame_parms
;
char
filename
[
40
];
char
filename
[
40
];
int
print_frame
=
8
;
int
print_frame
=
8
;
int
i
=
0
;
int
i
=
0
;
...
@@ -1257,12 +1257,14 @@ static void *ru_thread_tx( void *param ) {
...
@@ -1257,12 +1257,14 @@ static void *ru_thread_tx( void *param ) {
// wait until eNBs are finished subframe RX n and TX n+4
// wait until eNBs are finished subframe RX n and TX n+4
wait_on_condition
(
&
proc
->
mutex_gNBs
,
&
proc
->
cond_gNBs
,
&
proc
->
instance_cnt_gNBs
,
"ru_thread_tx"
);
wait_on_condition
(
&
proc
->
mutex_gNBs
,
&
proc
->
cond_gNBs
,
&
proc
->
instance_cnt_gNBs
,
"ru_thread_tx"
);
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
proc
->
mutex_gNBs
))
==
0
,
"mutex_lock return %d
\n
"
,
ret
);
ret
=
pthread_mutex_lock
(
&
proc
->
mutex_gNBs
);
AssertFatal
(
ret
==
0
,
"mutex_lock return %d
\n
"
,
ret
);
int
frame_tx
=
proc
->
frame_tx
;
int
frame_tx
=
proc
->
frame_tx
;
int
tti_tx
=
proc
->
tti_tx
;
int
tti_tx
=
proc
->
tti_tx
;
uint64_t
timestamp_tx
=
proc
->
timestamp_tx
;
uint64_t
timestamp_tx
=
proc
->
timestamp_tx
;
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
proc
->
mutex_gNBs
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
ret
=
pthread_mutex_unlock
(
&
proc
->
mutex_gNBs
);
AssertFatal
(
ret
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
if
(
oai_exit
)
break
;
if
(
oai_exit
)
break
;
...
@@ -1313,7 +1315,8 @@ static void *ru_thread_tx( void *param ) {
...
@@ -1313,7 +1315,8 @@ static void *ru_thread_tx( void *param ) {
gNB
=
ru
->
gNB_list
[
i
];
gNB
=
ru
->
gNB_list
[
i
];
gNB_proc
=
&
gNB
->
proc
;
gNB_proc
=
&
gNB
->
proc
;
L1_proc
=
(
get_thread_parallel_conf
()
==
PARALLEL_RU_L1_TRX_SPLIT
)
?
&
gNB_proc
->
L1_proc_tx
:
&
gNB_proc
->
L1_proc
;
L1_proc
=
(
get_thread_parallel_conf
()
==
PARALLEL_RU_L1_TRX_SPLIT
)
?
&
gNB_proc
->
L1_proc_tx
:
&
gNB_proc
->
L1_proc
;
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
gNB_proc
->
mutex_RU_tx
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
ret
=
pthread_mutex_lock
(
&
gNB_proc
->
mutex_RU_tx
);
AssertFatal
(
ret
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
for
(
int
j
=
0
;
j
<
gNB
->
num_RU
;
j
++
)
{
for
(
int
j
=
0
;
j
<
gNB
->
num_RU
;
j
++
)
{
if
(
ru
==
gNB
->
RU_list
[
j
])
{
if
(
ru
==
gNB
->
RU_list
[
j
])
{
...
@@ -1326,12 +1329,15 @@ static void *ru_thread_tx( void *param ) {
...
@@ -1326,12 +1329,15 @@ static void *ru_thread_tx( void *param ) {
}
}
if
(
gNB_proc
->
RU_mask_tx
!=
(
1
<<
gNB
->
num_RU
)
-
1
)
{
// not all RUs have provided their information so return
if
(
gNB_proc
->
RU_mask_tx
!=
(
1
<<
gNB
->
num_RU
)
-
1
)
{
// not all RUs have provided their information so return
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
gNB_proc
->
mutex_RU_tx
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
ret
=
pthread_mutex_unlock
(
&
gNB_proc
->
mutex_RU_tx
);
AssertFatal
(
ret
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
}
else
{
// all RUs TX are finished so send the ready signal to gNB processing
}
else
{
// all RUs TX are finished so send the ready signal to gNB processing
gNB_proc
->
RU_mask_tx
=
0
;
gNB_proc
->
RU_mask_tx
=
0
;
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
gNB_proc
->
mutex_RU_tx
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
ret
=
pthread_mutex_unlock
(
&
gNB_proc
->
mutex_RU_tx
);
AssertFatal
(
ret
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
L1_proc
->
mutex_RUs_tx
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
ret
=
pthread_mutex_lock
(
&
L1_proc
->
mutex_RUs_tx
);
AssertFatal
(
ret
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
// the thread can now be woken up
// the thread can now be woken up
if
(
L1_proc
->
instance_cnt_RUs
==-
1
)
{
if
(
L1_proc
->
instance_cnt_RUs
==-
1
)
{
AssertFatal
(
pthread_cond_signal
(
&
L1_proc
->
cond_RUs
)
==
0
,
AssertFatal
(
pthread_cond_signal
(
&
L1_proc
->
cond_RUs
)
==
0
,
...
@@ -1339,8 +1345,8 @@ static void *ru_thread_tx( void *param ) {
...
@@ -1339,8 +1345,8 @@ static void *ru_thread_tx( void *param ) {
}
//else AssertFatal(1==0,"gNB TX thread is not ready\n");
}
//else AssertFatal(1==0,"gNB TX thread is not ready\n");
L1_proc
->
instance_cnt_RUs
=
0
;
L1_proc
->
instance_cnt_RUs
=
0
;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE
,
L1_proc
->
instance_cnt_RUs
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE
,
L1_proc
->
instance_cnt_RUs
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc
->
mutex_RUs_tx
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
ret
=
pthread_mutex_unlock
(
&
L1_proc
->
mutex_RUs_tx
);
AssertFatal
(
ret
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
}
}
}
}
}
}
...
@@ -1356,8 +1362,8 @@ static void *ru_thread( void *param ) {
...
@@ -1356,8 +1362,8 @@ static void *ru_thread( void *param ) {
NR_DL_FRAME_PARMS
*
fp
=
ru
->
nr_frame_parms
;
NR_DL_FRAME_PARMS
*
fp
=
ru
->
nr_frame_parms
;
int
ret
;
int
ret
;
int
slot
=
fp
->
slots_per_frame
-
1
;
int
slot
=
fp
->
slots_per_frame
-
1
;
int
frame
=
1023
;
int
frame
=
1023
;
char
filename
[
40
],
threadname
[
40
];
char
filename
[
40
],
threadname
[
40
];
int
print_frame
=
8
;
int
print_frame
=
8
;
int
i
=
0
;
int
i
=
0
;
// set default return value
// set default return value
...
@@ -1645,7 +1651,7 @@ void init_RU_proc(RU_t *ru) {
...
@@ -1645,7 +1651,7 @@ void init_RU_proc(RU_t *ru) {
memset
((
void
*
)
proc
,
0
,
sizeof
(
RU_proc_t
));
memset
((
void
*
)
proc
,
0
,
sizeof
(
RU_proc_t
));
proc
->
ru
=
ru
;
proc
->
ru
=
ru
;
proc
->
instance_cnt_prach
=
-
1
;
proc
->
instance_cnt_prach
=
-
1
;
proc
->
instance_cnt_synch
=
-
1
;
;
proc
->
instance_cnt_synch
=
-
1
;
proc
->
instance_cnt_FH
=
-
1
;
proc
->
instance_cnt_FH
=
-
1
;
proc
->
instance_cnt_FH1
=
-
1
;
proc
->
instance_cnt_FH1
=
-
1
;
proc
->
instance_cnt_gNBs
=
-
1
;
proc
->
instance_cnt_gNBs
=
-
1
;
...
@@ -1858,8 +1864,8 @@ void configure_ru(int idx,
...
@@ -1858,8 +1864,8 @@ void configure_ru(int idx,
if
(
capabilities
->
FH_fmt
<
MAX_FH_FMTs
)
LOG_I
(
PHY
,
"RU FH options %s
\n
"
,
rru_format_options
[
capabilities
->
FH_fmt
]);
if
(
capabilities
->
FH_fmt
<
MAX_FH_FMTs
)
LOG_I
(
PHY
,
"RU FH options %s
\n
"
,
rru_format_options
[
capabilities
->
FH_fmt
]);
AssertFatal
((
ret
=
check_capabilities
(
ru
,
capabilities
))
==
0
,
ret
=
check_capabilities
(
ru
,
capabilities
);
"Cannot configure RRU %d, check_capabilities returned %d
\n
"
,
idx
,
ret
);
AssertFatal
(
ret
==
0
,
"Cannot configure RRU %d, check_capabilities returned %d
\n
"
,
idx
,
ret
);
// take antenna capabilities of RRU
// take antenna capabilities of RRU
ru
->
nb_tx
=
capabilities
->
nb_tx
[
0
];
ru
->
nb_tx
=
capabilities
->
nb_tx
[
0
];
ru
->
nb_rx
=
capabilities
->
nb_rx
[
0
];
ru
->
nb_rx
=
capabilities
->
nb_rx
[
0
];
...
...
This diff is collapsed.
Click to expand it.
executables/nr-softmodem.c
View file @
84af6103
...
@@ -508,7 +508,7 @@ static void get_options(void) {
...
@@ -508,7 +508,7 @@ static void get_options(void) {
int
tddflag
,
nonbiotflag
;
int
tddflag
,
nonbiotflag
;
uint32_t
online_log_messages
;
uint32_t
online_log_messages
;
uint32_t
glog_level
,
glog_verbosity
;
uint32_t
glog_level
,
glog_verbosity
;
uint32_t
start_telnetsrv
;
uint32_t
start_telnetsrv
=
0
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_GNB
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_GNB
;
paramdef_t
cmdline_logparams
[]
=
CMDLINE_LOGPARAMS_DESC_NR
;
paramdef_t
cmdline_logparams
[]
=
CMDLINE_LOGPARAMS_DESC_NR
;
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
View file @
84af6103
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
84af6103
...
@@ -601,7 +601,8 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
...
@@ -601,7 +601,8 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint64_t
*
out
,
uint64_t
*
out
,
const
t_nrPolar_params
*
polarParams
)
{
const
t_nrPolar_params
*
polarParams
)
{
int16_t
d_tilde
[
polarParams
->
N
];
// = malloc(sizeof(double) * polarParams->N);
int16_t
d_tilde
[
polarParams
->
N
];
// = malloc(sizeof(double) * polarParams->N);
nr_polar_rate_matching_int16
(
input
,
d_tilde
,
polarParams
->
rate_matching_pattern
,
polarParams
->
K
,
polarParams
->
N
,
polarParams
->
encoderLength
);
nr_polar_rate_matching_int16
(
input
,
d_tilde
,
polarParams
->
rate_matching_pattern
,
polarParams
->
K
,
polarParams
->
N
,
polarParams
->
encoderLength
);
...
@@ -645,8 +646,8 @@ uint32_t polar_decoder_int16(int16_t *input,
...
@@ -645,8 +646,8 @@ uint32_t polar_decoder_int16(int16_t *input,
//int len_mod64=len&63;
//int len_mod64=len&63;
int
crclen
=
polarParams
->
crcParityBits
;
int
crclen
=
polarParams
->
crcParityBits
;
uint64_t
rxcrc
=
B
[
0
]
&
((
1
<<
crclen
)
-
1
);
uint64_t
rxcrc
=
B
[
0
]
&
((
1
<<
crclen
)
-
1
);
uint32_t
crc
;
uint32_t
crc
=
0
;
uint64_t
Ar
;
uint64_t
Ar
=
0
;
AssertFatal
(
len
<
65
,
"A must be less than 65 bits
\n
"
);
AssertFatal
(
len
<
65
,
"A must be less than 65 bits
\n
"
);
if
(
len
<=
32
)
{
if
(
len
<=
32
)
{
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
View file @
84af6103
...
@@ -880,8 +880,8 @@ int16_t lte_ul_freq_offset_estimation(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -880,8 +880,8 @@ int16_t lte_ul_freq_offset_estimation(LTE_DL_FRAME_PARMS *frame_parms,
int16_t
Ravg
[
2
];
int16_t
Ravg
[
2
];
Ravg
[
0
]
=
0
;
Ravg
[
0
]
=
0
;
Ravg
[
1
]
=
0
;
Ravg
[
1
]
=
0
;
int16_t
iv
,
rv
,
phase_idx
;
int16_t
iv
,
rv
,
phase_idx
=
0
;
__m128i
avg128U1
,
avg128U2
,
R
[
3
],
mmtmpD0
,
mmtmpD1
,
mmtmpD2
,
mmtmpD3
;
__m128i
avg128U1
,
avg128U2
,
R
[
3
],
mmtmpD0
,
mmtmpD1
,
mmtmpD2
,
mmtmpD3
;
// round(tan((pi/4)*[1:1:N]/N)*pow2(15))
// round(tan((pi/4)*[1:1:N]/N)*pow2(15))
int16_t
alpha
[
128
]
=
{
201
,
402
,
603
,
804
,
1006
,
1207
,
1408
,
1610
,
1811
,
2013
,
2215
,
2417
,
2619
,
2822
,
3024
,
3227
,
3431
,
3634
,
3838
,
4042
,
4246
,
4450
,
4655
,
4861
,
5066
,
5272
,
5479
,
5686
,
5893
,
6101
,
6309
,
6518
,
6727
,
6937
,
7147
,
7358
,
7570
,
7782
,
7995
,
8208
,
8422
,
8637
,
8852
,
9068
,
9285
,
9503
,
9721
,
9940
,
10160
,
10381
,
10603
,
10825
,
11049
,
11273
,
11498
,
11725
,
11952
,
12180
,
12410
,
12640
,
12872
,
13104
,
13338
,
13573
,
13809
,
14046
,
14285
,
14525
,
14766
,
15009
,
15253
,
15498
,
15745
,
15993
,
16243
,
16494
,
16747
,
17001
,
17257
,
17515
,
17774
,
18035
,
18298
,
18563
,
18829
,
19098
,
19368
,
19640
,
19915
,
20191
,
20470
,
20750
,
21033
,
21318
,
21605
,
21895
,
22187
,
22481
,
22778
,
23078
,
23380
,
23685
,
23992
,
24302
,
24615
,
24931
,
25250
,
25572
,
25897
,
26226
,
26557
,
26892
,
27230
,
27572
,
27917
,
28266
,
28618
,
28975
,
29335
,
29699
,
30067
,
30440
,
30817
,
31198
,
31583
,
31973
,
32368
,
32767
};
int16_t
alpha
[
128
]
=
{
201
,
402
,
603
,
804
,
1006
,
1207
,
1408
,
1610
,
1811
,
2013
,
2215
,
2417
,
2619
,
2822
,
3024
,
3227
,
3431
,
3634
,
3838
,
4042
,
4246
,
4450
,
4655
,
4861
,
5066
,
5272
,
5479
,
5686
,
5893
,
6101
,
6309
,
6518
,
6727
,
6937
,
7147
,
7358
,
7570
,
7782
,
7995
,
8208
,
8422
,
8637
,
8852
,
9068
,
9285
,
9503
,
9721
,
9940
,
10160
,
10381
,
10603
,
10825
,
11049
,
11273
,
11498
,
11725
,
11952
,
12180
,
12410
,
12640
,
12872
,
13104
,
13338
,
13573
,
13809
,
14046
,
14285
,
14525
,
14766
,
15009
,
15253
,
15498
,
15745
,
15993
,
16243
,
16494
,
16747
,
17001
,
17257
,
17515
,
17774
,
18035
,
18298
,
18563
,
18829
,
19098
,
19368
,
19640
,
19915
,
20191
,
20470
,
20750
,
21033
,
21318
,
21605
,
21895
,
22187
,
22481
,
22778
,
23078
,
23380
,
23685
,
23992
,
24302
,
24615
,
24931
,
25250
,
25572
,
25897
,
26226
,
26557
,
26892
,
27230
,
27572
,
27917
,
28266
,
28618
,
28975
,
29335
,
29699
,
30067
,
30440
,
30817
,
31198
,
31583
,
31973
,
32368
,
32767
};
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/lte_mcs.c
View file @
84af6103
...
@@ -107,7 +107,8 @@ unsigned char I_TBS2I_MCS(unsigned char I_TBS)
...
@@ -107,7 +107,8 @@ unsigned char I_TBS2I_MCS(unsigned char I_TBS)
return
I_MCS
;
return
I_MCS
;
}
}
uint32_t
get_TBS_DL
(
uint8_t
mcs
,
uint16_t
nb_rb
)
uint32_t
get_TBS_DL
(
uint8_t
mcs
,
uint16_t
nb_rb
)
{
{
uint32_t
TBS
;
uint32_t
TBS
;
...
@@ -121,7 +122,8 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
...
@@ -121,7 +122,8 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
}
}
}
}
uint32_t
get_TBS_UL
(
uint8_t
mcs
,
uint16_t
nb_rb
)
uint32_t
get_TBS_UL
(
uint8_t
mcs
,
uint16_t
nb_rb
)
{
{
uint32_t
TBS
=
0
;
uint32_t
TBS
=
0
;
...
@@ -136,7 +138,11 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
...
@@ -136,7 +138,11 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
}
}
int
adjust_G2
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
*
rb_alloc
,
uint8_t
mod_order
,
uint8_t
subframe
,
uint8_t
symbol
)
int
adjust_G2
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
*
rb_alloc
,
uint8_t
mod_order
,
uint8_t
subframe
,
uint8_t
symbol
)
{
{
int
rb
,
re_pbch_sss
=
0
;
int
rb
,
re_pbch_sss
=
0
;
...
@@ -228,7 +234,10 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
...
@@ -228,7 +234,10 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
return
(
re_pbch_sss
);
return
(
re_pbch_sss
);
}
}
int
adjust_G
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
*
rb_alloc
,
uint8_t
mod_order
,
uint8_t
subframe
)
int
adjust_G
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
*
rb_alloc
,
uint8_t
mod_order
,
uint8_t
subframe
)
{
{
int
rb
,
re_pbch_sss
=
0
;
int
rb
,
re_pbch_sss
=
0
;
...
@@ -315,7 +324,15 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
...
@@ -315,7 +324,15 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
return
(
0
);
return
(
0
);
}
}
int
get_G
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
nb_rb
,
uint32_t
*
rb_alloc
,
uint8_t
mod_order
,
uint8_t
Nl
,
uint8_t
num_pdcch_symbols
,
int
frame
,
uint8_t
subframe
,
uint8_t
beamforming_mode
)
int
get_G
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
nb_rb
,
uint32_t
*
rb_alloc
,
uint8_t
mod_order
,
uint8_t
Nl
,
uint8_t
num_pdcch_symbols
,
int
frame
,
uint8_t
subframe
,
uint8_t
beamforming_mode
)
{
{
int
G_adj
;
int
G_adj
;
...
@@ -426,10 +443,8 @@ unsigned char SE2I_TBS(float SE,
...
@@ -426,10 +443,8 @@ unsigned char SE2I_TBS(float SE,
}
}
//added for ALU icic purpose
//added for ALU icic purpose
uint8_t
Get_SB_size
(
uint8_t
n_rb_dl
)
uint8_t
Get_SB_size
(
uint8_t
n_rb_dl
)
{
{
if
(
n_rb_dl
<
27
)
if
(
n_rb_dl
<
27
)
return
4
;
return
4
;
else
if
(
n_rb_dl
<
64
)
else
if
(
n_rb_dl
<
64
)
...
@@ -437,6 +452,4 @@ uint8_t Get_SB_size(uint8_t n_rb_dl)
...
@@ -437,6 +452,4 @@ uint8_t Get_SB_size(uint8_t n_rb_dl)
else
else
return
8
;
return
8
;
}
}
//end ALU's algo
//end ALU's algo
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/lte_phy_scope.c
View file @
84af6103
...
@@ -559,7 +559,10 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
...
@@ -559,7 +559,10 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
}
chest_f_abs
=
(
float
*
)
calloc
(
nsymb_ce
*
nb_antennas_rx
*
nb_antennas_tx
,
sizeof
(
float
));
chest_f_abs
=
(
float
*
)
calloc
(
nsymb_ce
*
nb_antennas_rx
*
nb_antennas_tx
,
sizeof
(
float
));
llr
=
(
float
*
)
calloc
(
coded_bits_per_codeword
,
sizeof
(
float
));
// init to zero
//llr = (float*) calloc(coded_bits_per_codeword,sizeof(float)); // Cppcheck returns "invalidFunctionArg" error.
llr
=
(
float
*
)
malloc
(
coded_bits_per_codeword
*
sizeof
(
float
));
memset
((
void
*
)
llr
,
0
,
coded_bits_per_codeword
*
sizeof
(
float
));
// init to zero
bit
=
malloc
(
coded_bits_per_codeword
*
sizeof
(
float
));
bit
=
malloc
(
coded_bits_per_codeword
*
sizeof
(
float
));
llr_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
// init to zero
llr_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
// init to zero
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
...
@@ -572,7 +575,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
...
@@ -572,7 +575,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
pdcch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
llr
;
pdcch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
llr
;
pdcch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
rxdataF_comp
[
0
];
pdcch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
rxdataF_comp
[
0
];
pdsch_llr
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
llr
[
0
];
// stream 0
pdsch_llr
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
llr
[
0
];
// stream 0
//
pdsch_llr = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]->llr[0]; // stream 0
//pdsch_llr = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]->llr[0]; // stream 0
pdsch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
rxdataF_comp0
[
0
];
pdsch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
rxdataF_comp0
[
0
];
pdsch_mag
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
dl_ch_mag0
[
0
];
pdsch_mag
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]][
eNB_id
]
->
dl_ch_mag0
[
0
];
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
View file @
84af6103
...
@@ -31,6 +31,7 @@ float tput_enb[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}};
...
@@ -31,6 +31,7 @@ float tput_enb[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}};
float
tput_time_ue
[
NUMBER_OF_UE_MAX
][
TPUT_WINDOW_LENGTH
]
=
{{
0
}};
float
tput_time_ue
[
NUMBER_OF_UE_MAX
][
TPUT_WINDOW_LENGTH
]
=
{{
0
}};
float
tput_ue
[
NUMBER_OF_UE_MAX
][
TPUT_WINDOW_LENGTH
]
=
{{
0
}};
float
tput_ue
[
NUMBER_OF_UE_MAX
][
TPUT_WINDOW_LENGTH
]
=
{{
0
}};
float
tput_ue_max
[
NUMBER_OF_UE_MAX
]
=
{
0
};
float
tput_ue_max
[
NUMBER_OF_UE_MAX
]
=
{
0
};
static
void
ia_receiver_on_off
(
FL_OBJECT
*
button
,
long
arg
)
static
void
ia_receiver_on_off
(
FL_OBJECT
*
button
,
long
arg
)
{
{
if
(
fl_get_button
(
button
))
{
if
(
fl_get_button
(
button
))
{
...
@@ -43,6 +44,7 @@ static void ia_receiver_on_off( FL_OBJECT *button, long arg)
...
@@ -43,6 +44,7 @@ static void ia_receiver_on_off( FL_OBJECT *button, long arg)
fl_set_object_color
(
button
,
FL_RED
,
FL_RED
);
fl_set_object_color
(
button
,
FL_RED
,
FL_RED
);
}
}
}
}
static
void
dl_traffic_on_off
(
FL_OBJECT
*
button
,
long
arg
)
static
void
dl_traffic_on_off
(
FL_OBJECT
*
button
,
long
arg
)
{
{
if
(
fl_get_button
(
button
))
{
if
(
fl_get_button
(
button
))
{
...
@@ -140,6 +142,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
...
@@ -140,6 +142,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
fdui
->
lte_phy_scope_enb
->
fdui
=
fdui
;
fdui
->
lte_phy_scope_enb
->
fdui
=
fdui
;
return
fdui
;
return
fdui
;
}
}
void
phy_scope_eNB
(
FD_lte_phy_scope_enb
*
form
,
void
phy_scope_eNB
(
FD_lte_phy_scope_enb
*
form
,
PHY_VARS_eNB
*
phy_vars_enb
,
PHY_VARS_eNB
*
phy_vars_enb
,
int
UE_id
)
int
UE_id
)
...
@@ -325,7 +328,9 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
...
@@ -325,7 +328,9 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
free
(
bit
);
free
(
bit
);
free
(
chest_f_abs
);
free
(
chest_f_abs
);
}
}
FD_lte_phy_scope_ue
*
create_lte_phy_scope_ue
(
void
)
{
FD_lte_phy_scope_ue
*
create_lte_phy_scope_ue
(
void
)
{
FL_OBJECT
*
obj
;
FL_OBJECT
*
obj
;
FD_lte_phy_scope_ue
*
fdui
=
fl_malloc
(
sizeof
*
fdui
);
FD_lte_phy_scope_ue
*
fdui
=
fl_malloc
(
sizeof
*
fdui
);
// Define form
// Define form
...
@@ -429,11 +434,13 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void ) {
...
@@ -429,11 +434,13 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void ) {
fdui
->
lte_phy_scope_ue
->
fdui
=
fdui
;
fdui
->
lte_phy_scope_ue
->
fdui
=
fdui
;
return
fdui
;
return
fdui
;
}
}
void
phy_scope_UE
(
FD_lte_phy_scope_ue
*
form
,
void
phy_scope_UE
(
FD_lte_phy_scope_ue
*
form
,
PHY_VARS_UE
*
phy_vars_ue
,
PHY_VARS_UE
*
phy_vars_ue
,
int
eNB_id
,
int
eNB_id
,
int
UE_id
,
int
UE_id
,
uint8_t
subframe
){
uint8_t
subframe
)
{
int
i
,
arx
,
atx
,
ind
,
k
;
int
i
,
arx
,
atx
,
ind
,
k
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
phy_vars_ue
->
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
phy_vars_ue
->
frame_parms
;
int
nsymb_ce
=
frame_parms
->
ofdm_symbol_size
*
frame_parms
->
symbols_per_tti
;
int
nsymb_ce
=
frame_parms
->
ofdm_symbol_size
*
frame_parms
->
symbols_per_tti
;
...
@@ -526,9 +533,14 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
...
@@ -526,9 +533,14 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
chest_t_abs
[
arx
]
=
(
float
*
)
calloc
(
frame_parms
->
ofdm_symbol_size
,
sizeof
(
float
));
chest_t_abs
[
arx
]
=
(
float
*
)
calloc
(
frame_parms
->
ofdm_symbol_size
,
sizeof
(
float
));
}
}
chest_f_abs
=
(
float
*
)
calloc
(
nsymb_ce
*
nb_antennas_rx
*
nb_antennas_tx
,
sizeof
(
float
));
chest_f_abs
=
(
float
*
)
calloc
(
nsymb_ce
*
nb_antennas_rx
*
nb_antennas_tx
,
sizeof
(
float
));
llr0
=
(
float
*
)
calloc
(
coded_bits_per_codeword0
,
sizeof
(
float
));
// init to zero
//llr0 = (float*) calloc(coded_bits_per_codeword0,sizeof(float)); // Cppcheck returns "invalidFunctionArg" error.
llr0
=
(
float
*
)
malloc
(
coded_bits_per_codeword0
*
sizeof
(
float
));
memset
((
void
*
)
llr0
,
0
,
coded_bits_per_codeword0
*
sizeof
(
float
));
// init to zero
bit0
=
malloc
(
coded_bits_per_codeword0
*
sizeof
(
float
));
bit0
=
malloc
(
coded_bits_per_codeword0
*
sizeof
(
float
));
llr1
=
(
float
*
)
calloc
(
coded_bits_per_codeword1
,
sizeof
(
float
));
// init to zero
//llr1 = (float*) calloc(coded_bits_per_codeword1,sizeof(float)); // Cppcheck returns "invalidFunctionArg" error.
llr1
=
(
float
*
)
malloc
(
coded_bits_per_codeword1
*
sizeof
(
float
));
memset
((
void
*
)
llr1
,
0
,
coded_bits_per_codeword1
*
sizeof
(
float
));
// init to zero
bit1
=
malloc
(
coded_bits_per_codeword1
*
sizeof
(
float
));
bit1
=
malloc
(
coded_bits_per_codeword1
*
sizeof
(
float
));
llr_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
// init to zero
llr_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
// init to zero
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
...
@@ -822,6 +834,4 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
...
@@ -822,6 +834,4 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
for (int m=0; m<coded_bits_per_codeword1; ++m)
for (int m=0; m<coded_bits_per_codeword1; ++m)
phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0][m]=0;
phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0][m]=0;
}*/
}*/
}
}
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/LTE_PHY/syncsim.c
View file @
84af6103
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
#define BW 5.0
#define BW 5.0
PHY_VARS_eNB
*
PHY_vars_eNB
,
*
PHY_vars_eNB1
,
*
PHY_vars_eNB2
;
PHY_VARS_eNB
*
PHY_vars_eNB
,
*
PHY_vars_eNB1
,
*
PHY_vars_eNB2
;
PHY_VARS_UE
*
PHY_vars_UE
[
2
];
PHY_VARS_UE
*
PHY_vars_UE
[
2
];
#define DLSCH_RB_ALLOC 0x1fff // igore DC component,RB13
#define DLSCH_RB_ALLOC 0x1fff // igore DC component,RB13
...
@@ -699,7 +699,7 @@ int main(int argc, char **argv) {
...
@@ -699,7 +699,7 @@ int main(int argc, char **argv) {
bzero
(
txdataF2
[
0
],
FRAME_LENGTH_BYTES_NO_PREFIX
);
bzero
(
txdataF2
[
0
],
FRAME_LENGTH_BYTES_NO_PREFIX
);
bzero
(
txdataF2
[
1
],
FRAME_LENGTH_BYTES_NO_PREFIX
);
bzero
(
txdataF2
[
1
],
FRAME_LENGTH_BYTES_NO_PREFIX
);
#else
#else
txdata
=
PHY_vars_eNB
->
lte_eNB_common_vars
.
txdata
[
eNb_id
];
txdata
=
PHY_vars_eNB
->
common_vars
.
txdataF
[
eNb_id
];
txdata1
=
PHY_vars_eNB1
->
lte_eNB_common_vars
.
txdata
[
eNb_id
];
txdata1
=
PHY_vars_eNB1
->
lte_eNB_common_vars
.
txdata
[
eNb_id
];
txdata2
=
PHY_vars_eNB2
->
lte_eNB_common_vars
.
txdata
[
eNb_id
];
txdata2
=
PHY_vars_eNB2
->
lte_eNB_common_vars
.
txdata
[
eNb_id
];
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_paramdef.h
View file @
84af6103
...
@@ -876,7 +876,7 @@ typedef struct srb1_params_s {
...
@@ -876,7 +876,7 @@ typedef struct srb1_params_s {
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL,
TYPE_UINTARRAY, 6}
\
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL,
TYPE_UINTARRAY, 6}
\
}
}
#define ENB_MME_IPV4_ADDRESS_IDX 0
#define ENB_MME_IPV4_ADDRESS_IDX 0
...
...
This diff is collapsed.
Click to expand it.
openair2/NETWORK_DRIVER/MESH/common.c
View file @
84af6103
...
@@ -110,13 +110,12 @@ void nas_COMMON_receive(uint16_t dlen,
...
@@ -110,13 +110,12 @@ void nas_COMMON_receive(uint16_t dlen,
#ifdef NAS_ADDRESS_FIX
#ifdef NAS_ADDRESS_FIX
// Make the third byte of both the source and destination equal to the fourth of the destination
// Make the third byte of both the source and destination equal to the fourth of the destination
unsigned
char
*
ifaddr
,
*
saddr
,
daddr
;
unsigned
char
*
ifaddr
,
*
saddr
,
daddr
;
uint32_t
odaddr
=
0
,
osaddr
;
daddr
=
(
unsigned
char
*
)
&
((
struct
iphdr
*
)
skb
->
data
)
->
daddr
;
daddr
=
(
unsigned
char
*
)
&
((
struct
iphdr
*
)
skb
->
data
)
->
daddr
;
odaddr
=
((
struct
iphdr
*
)
skb
->
data
)
->
daddr
;
odaddr
=
((
struct
iphdr
*
)
skb
->
data
)
->
daddr
;
//
sn = addr[3];
//sn = addr[3];
saddr
=
(
unsigned
char
*
)
&
((
struct
iphdr
*
)
skb
->
data
)
->
saddr
;
saddr
=
(
unsigned
char
*
)
&
((
struct
iphdr
*
)
skb
->
data
)
->
saddr
;
uint32_t
odaddr
,
osaddr
;
osaddr
=
((
struct
iphdr
*
)
skb
->
data
)
->
saddr
;
osaddr
=
((
struct
iphdr
*
)
skb
->
data
)
->
saddr
;
if
(
daddr
[
0
]
==
saddr
[
0
])
{
// same network
if
(
daddr
[
0
]
==
saddr
[
0
])
{
// same network
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LTE/rrm_2_rrc_msg.c
View file @
84af6103
...
@@ -117,7 +117,7 @@ void fn_rrc (void) {
...
@@ -117,7 +117,7 @@ void fn_rrc (void) {
case
RRCI_CX_ESTABLISH_RESP
:
{
case
RRCI_CX_ESTABLISH_RESP
:
{
rrci_cx_establish_resp_t
*
p
=
(
rrci_cx_establish_resp_t
*
)
Data
;
rrci_cx_establish_resp_t
*
p
=
(
rrci_cx_establish_resp_t
*
)
Data
;
unsigned
char
CH_index
,
i
;
unsigned
char
i
,
CH_index
=
0
;
msg
(
"[RRCI]>[RRC][Inst %d]:RRCI_CX_ESTABLISH_RESP
\n
"
,
Header
->
inst
);
msg
(
"[RRCI]>[RRC][Inst %d]:RRCI_CX_ESTABLISH_RESP
\n
"
,
Header
->
inst
);
for
(
i
=
0
;
i
<
NB_SIG_CNX_UE
;
i
++
)
for
(
i
=
0
;
i
<
NB_SIG_CNX_UE
;
i
++
)
...
@@ -185,6 +185,3 @@ void fn_rrc (void) {
...
@@ -185,6 +185,3 @@ void fn_rrc (void) {
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
openair2/UTIL/OTG/otg_tx.c
View file @
84af6103
...
@@ -224,9 +224,9 @@ int size_dist(
...
@@ -224,9 +224,9 @@ int size_dist(
return
size_data
;
return
size_data
;
}
}
int
adjust_size
(
int
size
)
int
adjust_size
(
int
size
)
{
{
if
(
size
<
PAYLOAD_MIN
)
{
if
(
size
<
PAYLOAD_MIN
)
{
LOG_W
(
OTG
,
"Packet Size=%d out of range, size=%d
\n
"
,
size
,
PAYLOAD_MIN
);
LOG_W
(
OTG
,
"Packet Size=%d out of range, size=%d
\n
"
,
size
,
PAYLOAD_MIN
);
size
=
PAYLOAD_MIN
;
size
=
PAYLOAD_MIN
;
...
@@ -239,9 +239,6 @@ int adjust_size(int size)
...
@@ -239,9 +239,6 @@ int adjust_size(int size)
}
}
unsigned
char
*
packet_gen
(
unsigned
char
*
packet_gen
(
const
int
src_instance
,
const
int
src_instance
,
const
int
dst_instance
,
const
int
dst_instance
,
...
@@ -391,22 +388,20 @@ unsigned char *packet_gen(
...
@@ -391,22 +388,20 @@ unsigned char *packet_gen(
}
}
unsigned
char
*
packet_gen_multicast
(
unsigned
char
*
packet_gen_multicast
(
const
int
src_instance
,
const
int
src_instance
,
const
int
dst_instance
,
const
int
dst_instance
,
const
int
ctime
,
const
int
ctime
,
unsigned
int
*
const
pkt_size
)
unsigned
int
*
const
pkt_size
)
{
{
*
pkt_size
=
0
;
*
pkt_size
=
0
;
unsigned
int
size
=
0
;
unsigned
int
size
=
0
;
unsigned
int
buffer_size
=
0
;
unsigned
int
buffer_size
=
0
;
char
*
payload
=
NULL
;
char
*
payload
=
NULL
;
char
*
header
=
NULL
;
char
*
header
=
NULL
;
unsigned
int
flag
;
unsigned
int
flag
=
0
;
int
app
,
seq_num
=
0
;
int
app
,
seq_num
=
0
;
int
otg_hdr_size
=
sizeof
(
otg_hdr_info_t
)
+
sizeof
(
otg_hdr_t
);
int
otg_hdr_size
=
sizeof
(
otg_hdr_info_t
)
+
sizeof
(
otg_hdr_t
);
set_ctime
(
ctime
);
// fixme: this should be done separetly from packet_gen and packet_gen_multicast
set_ctime
(
ctime
);
// fixme: this should be done separetly from packet_gen and packet_gen_multicast
...
@@ -488,7 +483,9 @@ unsigned char *packet_gen_multicast(
...
@@ -488,7 +483,9 @@ unsigned char *packet_gen_multicast(
payload
,
payload
,
buffer_size
,
buffer_size
,
0
/*g_otg_multicast->application_type[src_instance][dst][app]*/
,
0
/*g_otg_multicast->application_type[src_instance][dst][app]*/
,
flag
,
0
,
ctime
,
flag
,
0
,
ctime
,
seq_num
,
seq_num
,
0
,
0
,
HDR_IP_v4_MIN
+
HDR_UDP
,
HDR_IP_v4_MIN
+
HDR_UDP
,
...
...
This diff is collapsed.
Click to expand it.
openair3/SCTP/sctp_common.h
View file @
84af6103
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
#if defined(ENB_MODE)
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h"
# include "common/utils/LOG/log.h"
# define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args)
# define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args)
# define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args)
# define SCTP_DEBUG(x, args...) LOG_I(SCTP, x, ##args)
# define SCTP_DEBUG(x, args...) LOG_I(SCTP, x, ##args)
# define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args)
#else
#else
# define SCTP_ERROR(x, args...) do { fprintf(stderr, "[SCTP][E]"x, ##args); } while(0)
# define SCTP_ERROR(x, args...) do { fprintf(stderr, "[SCTP][E]"x, ##args); } while(0)
# define SCTP_DEBUG(x, args...) do { fprintf(stdout, "[SCTP][D]"x, ##args); } while(0)
# define SCTP_DEBUG(x, args...) do { fprintf(stdout, "[SCTP][D]"x, ##args); } while(0)
...
...
This diff is collapsed.
Click to expand it.
openair3/SCTP/sctp_eNB_task.c
View file @
84af6103
...
@@ -717,8 +717,7 @@ static int sctp_create_new_listener(
...
@@ -717,8 +717,7 @@ static int sctp_create_new_listener(
SCTP_DEBUG
(
"ipv4 addresses:
\n
"
);
SCTP_DEBUG
(
"ipv4 addresses:
\n
"
);
for
(
i
=
0
;
i
<
init_p
->
nb_ipv4_addr
;
i
++
)
{
for
(
i
=
0
;
i
<
init_p
->
nb_ipv4_addr
;
i
++
)
{
SCTP_DEBUG
(
"
\t
- "
IPV4_ADDR
"
\n
"
,
SCTP_DEBUG
(
"
\t
- "
IPV4_ADDR
"
\n
"
,
IPV4_ADDR_FORMAT
(
init_p
->
ipv4_address
[
i
]));
IPV4_ADDR_FORMAT
(
init_p
->
ipv4_address
[
i
]));
ip4_addr
=
(
struct
sockaddr_in
*
)
&
addr
[
i
];
ip4_addr
=
(
struct
sockaddr_in
*
)
&
addr
[
i
];
ip4_addr
->
sin_family
=
AF_INET
;
ip4_addr
->
sin_family
=
AF_INET
;
ip4_addr
->
sin_port
=
htons
(
init_p
->
port
);
ip4_addr
->
sin_port
=
htons
(
init_p
->
port
);
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-softmodem-common.c
View file @
84af6103
...
@@ -56,14 +56,10 @@ softmodem_params_t *get_softmodem_params(void) {
...
@@ -56,14 +56,10 @@ softmodem_params_t *get_softmodem_params(void) {
void
get_common_options
(
void
)
{
void
get_common_options
(
void
)
{
uint32_t
online_log_messages
;
uint32_t
online_log_messages
;
uint32_t
glog_level
;
uint32_t
glog_level
;
uint32_t
start_telnetsrv
;
uint32_t
start_telnetsrv
=
0
;
uint32_t
noS1
;
uint32_t
noS1
=
0
,
nokrnmod
=
0
,
nonbiot
=
0
;
uint32_t
nokrnmod
;
uint32_t
rfsim
=
0
,
basicsim
=
0
,
do_forms
=
0
;
uint32_t
nonbiot
;
uint32_t
rfsim
;
uint32_t
basicsim
;
char
*
logmem_filename
=
NULL
;
char
*
logmem_filename
=
NULL
;
uint32_t
do_forms
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC
;
paramdef_t
cmdline_logparams
[]
=
CMDLINE_LOGPARAMS_DESC
;
paramdef_t
cmdline_logparams
[]
=
CMDLINE_LOGPARAMS_DESC
;
checkedparam_t
cmdline_log_CheckParams
[]
=
CMDLINE_LOGPARAMS_CHECK_DESC
;
checkedparam_t
cmdline_log_CheckParams
[]
=
CMDLINE_LOGPARAMS_CHECK_DESC
;
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-softmodem.h
View file @
84af6103
...
@@ -168,10 +168,10 @@
...
@@ -168,10 +168,10 @@
#define DEFAULT_DLF 2680000000
#define DEFAULT_DLF 2680000000
/*-----------------------------------------------------------------------------------------------------------------------------------------------------
----------------------
*/
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters common to eNodeB and UE */
/* command line parameters common to eNodeB and UE */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-----------------------------------------------------------------------------------------------------------------------------------------------------
----------------------
*/
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define RF_CONFIG_FILE softmodem_params.rf_config_file
#define RF_CONFIG_FILE softmodem_params.rf_config_file
#define PHY_TEST softmodem_params.phy_test
#define PHY_TEST softmodem_params.phy_test
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
...
@@ -198,7 +198,7 @@
...
@@ -198,7 +198,7 @@
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:0, 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}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&EMULATE_RF, defintval:0, TYPE_INT, 0}, \
{"parallel-config",
CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)¶llel_config, defstrval:NULL, TYPE_STRING,
0}, \
{"parallel-config",
CONFIG_HLP_PARALLEL_CMD, 0, strptr:(char **)¶llel_config, defstrval:NULL, TYPE_STRING,
0}, \
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
{"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, uptr:&noS1, defintval:0, TYPE_INT, 0}, \
{"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, uptr:&noS1, defintval:0, TYPE_INT, 0}, \
{"rfsim", CONFIG_HLP_RFSIM, PARAMFLAG_BOOL, uptr:&rfsim, defintval:0, TYPE_INT, 0}, \
{"rfsim", CONFIG_HLP_RFSIM, PARAMFLAG_BOOL, uptr:&rfsim, defintval:0, TYPE_INT, 0}, \
...
...
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