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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
2b05aba1
Commit
2b05aba1
authored
May 22, 2019
by
yilmazt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--phy_simulators compile up to nr_dlsim
parent
264725c5
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
166 additions
and
147 deletions
+166
-147
common/config/config_load_configmodule.c
common/config/config_load_configmodule.c
+7
-3
common/utils/ocp_itti/intertask_interface.h
common/utils/ocp_itti/intertask_interface.h
+0
-7
executables/nr-gnb.c
executables/nr-gnb.c
+0
-2
executables/nr-softmodem.c
executables/nr-softmodem.c
+1
-1
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+1
-1
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
+18
-18
openair1/PHY/CODING/viterbi_lte.c
openair1/PHY/CODING/viterbi_lte.c
+1
-6
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+3
-2
openair1/PHY/INIT/nr_init_ru.c
openair1/PHY/INIT/nr_init_ru.c
+3
-2
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+3
-2
openair1/PHY/LTE_TRANSPORT/if5_tools.c
openair1/PHY/LTE_TRANSPORT/if5_tools.c
+18
-3
openair1/PHY/LTE_TRANSPORT/prach.c
openair1/PHY/LTE_TRANSPORT/prach.c
+1
-2
openair1/PHY/TOOLS/alaw_lut.h
openair1/PHY/TOOLS/alaw_lut.h
+0
-3
openair1/PHY/TOOLS/time_meas.c
openair1/PHY/TOOLS/time_meas.c
+17
-6
openair1/PHY/defs_RU.h
openair1/PHY/defs_RU.h
+18
-7
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+8
-8
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+1
-1
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-1
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+1
-1
openair2/COMMON/platform_types.h
openair2/COMMON/platform_types.h
+1
-0
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+6
-6
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+10
-12
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+8
-8
openair2/RRC/LTE/rrc_eNB_S1AP.c
openair2/RRC/LTE/rrc_eNB_S1AP.c
+15
-16
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+5
-10
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+14
-13
openair2/RRC/NR/nr_rrc_extern.h
openair2/RRC/NR/nr_rrc_extern.h
+1
-1
targets/RT/USER/nr-gnb.c
targets/RT/USER/nr-gnb.c
+0
-2
targets/RT/USER/nr-softmodem.c
targets/RT/USER/nr-softmodem.c
+1
-1
No files found.
common/config/config_load_configmodule.c
View file @
2b05aba1
...
...
@@ -181,7 +181,10 @@ int config_cmdlineonly_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
return
numdefvals
;
}
configmodule_interface_t
*
load_configmodule
(
int
argc
,
char
**
argv
,
uint32_t
initflags
)
{
configmodule_interface_t
*
load_configmodule
(
int
argc
,
char
**
argv
,
uint32_t
initflags
)
{
char
*
cfgparam
=
NULL
;
char
*
modeparams
=
NULL
;
char
*
cfgmode
=
NULL
;
...
...
@@ -193,7 +196,8 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
/* first parse the command line to look for the -O option */
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
if
(
strlen
(
argv
[
i
])
<
2
)
continue
;
if
(
strlen
(
argv
[
i
])
<
2
)
continue
;
if
(
argv
[
i
][
1
]
==
'O'
&&
i
<
(
argc
-
1
))
{
cfgparam
=
argv
[
i
+
1
];
...
...
@@ -223,7 +227,7 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
if
(
cfgparam
==
NULL
)
{
tmpflags
=
tmpflags
|
CONFIG_NOOOPT
;
if
(
initflags
&
CONFIG_ENABLECMDLINEONLY
)
{
if
(
initflags
&
CONFIG_ENABLECMDLINEONLY
)
{
cfgparam
=
CONFIG_CMDLINEONLY
":dbgl0"
;
}
else
{
cfgparam
=
CONFIG_CMDLINEONLY
":dbgl0"
;
...
...
common/utils/ocp_itti/intertask_interface.h
View file @
2b05aba1
...
...
@@ -403,13 +403,6 @@ typedef struct __attribute__ ((__packed__)) MessageDef_s {
#define INSTANCE_DEFAULT (UINT16_MAX - 1)
/* already defined in common/utils/time_utils.h*/
/*
static inline int64_t clock_difftime_ns(struct timespec start, struct timespec end) {
return (int64_t)( end.tv_sec-start.tv_sec) * (int64_t)(1000*1000*1000) + end.tv_nsec-start.tv_nsec;
}
*/
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
executables/nr-gnb.c
View file @
2b05aba1
...
...
@@ -33,8 +33,6 @@
#define _GNU_SOURCE
#include <pthread.h>
#include "time_utils.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
...
...
executables/nr-softmodem.c
View file @
2b05aba1
...
...
@@ -954,7 +954,7 @@ int main( int argc, char **argv ) {
start_background_system
();
///static configuration for NR at the moment
if
(
load_configmodule
(
argc
,
argv
)
==
NULL
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
NULL
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
...
...
executables/nr-uesoftmodem.c
View file @
2b05aba1
...
...
@@ -650,7 +650,7 @@ int main( int argc, char **argv ) {
PHY_VARS_NR_UE
*
UE
[
MAX_NUM_CCs
];
start_background_system
();
if
(
load_configmodule
(
argc
,
argv
)
==
NULL
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
NULL
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
View file @
2b05aba1
...
...
@@ -578,25 +578,25 @@ typedef struct {
uint16_t
length
;
uint8_t
pdu_index
;
uint16_t
rnti
;
uint16_t
nb_mod_symbols
;
uint8_t
time_allocation_type
;
uint16_t
nb_mod_symbols
;
uint8_t
time_allocation_type
;
uint8_t
freq_allocation_type
;
uint8_t
start_prb
;
uint8_t
n_prb
;
uint8_t
start_symbol
;
uint8_t
nb_symbols
;
uint8_t
mcs_idx
;
uint8_t
ndi
;
uint8_t
nb_codewords
;
uint8_t
nb_layers
;
uint16_t
coding_rate
;
uint8_t
modulation
;
uint8_t
modulation_order
;
uint16_t
transport_block_size
;
uint8_t
nb_re_dmrs
;
uint8_t
time_alloc_list_flag
;
uint8_t
time_alloc_list
;
uint8_t
rbg_list
;
uint8_t
start_prb
;
uint8_t
n_prb
;
uint8_t
start_symbol
;
uint8_t
nb_symbols
;
uint8_t
mcs_idx
;
uint8_t
ndi
;
uint8_t
nb_codewords
;
uint8_t
nb_layers
;
uint16_t
coding_rate
;
uint8_t
modulation
;
uint8_t
modulation_order
;
uint16_t
transport_block_size
;
uint8_t
nb_re_dmrs
;
uint8_t
time_alloc_list_flag
;
uint8_t
time_alloc_list
;
uint8_t
rbg_list
;
uint8_t
virtual_resource_block_assignment_flag
;
uint32_t
resource_block_coding
;
uint8_t
redundancy_version
;
...
...
openair1/PHY/CODING/viterbi_lte.c
View file @
2b05aba1
...
...
@@ -43,15 +43,12 @@
extern
uint8_t
ccodelte_table
[
128
],
ccodelte_table_rev
[
128
];
static
int8_t
m0_table
[
64
*
16
*
16
*
16
]
__attribute__
((
aligned
(
16
)));
static
int8_t
m1_table
[
64
*
16
*
16
*
16
]
__attribute__
((
aligned
(
16
)));
// Set up Viterbi tables for SSE2 implementation
void
phy_generate_viterbi_tables_lte
()
void
phy_generate_viterbi_tables_lte
(
void
)
{
int8_t
w
[
8
],
in0
,
in1
,
in2
;
...
...
@@ -474,5 +471,3 @@ int main(int argc, char **argv)
}
#endif // TEST_DEBUG
openair1/PHY/INIT/nr_init.c
View file @
2b05aba1
...
...
@@ -25,11 +25,12 @@
#include "PHY/INIT/phy_init.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "RadioResourceConfigCommonSIB.h"
/*
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"*/
#include "openair1/PHY/defs_RU.h"
#include "LAYER2/MAC/mac_extern.h"
#include "MBSFN-SubframeConfigList.h"
#include "assertions.h"
#include <math.h>
...
...
openair1/PHY/INIT/nr_init_ru.c
View file @
2b05aba1
...
...
@@ -23,13 +23,14 @@
#include "SCHED/sched_common.h"
#include "PHY/phy_extern.h"
#include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h"
/*
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "MBSFN-SubframeConfigList.h"
*/
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
#include "openair1/PHY/defs_RU.h"
int
nr_phy_init_RU
(
RU_t
*
ru
)
{
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
2b05aba1
...
...
@@ -23,10 +23,11 @@
#include "SCHED_UE/sched_UE.h"
#include "PHY/phy_extern_nr_ue.h"
//#include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h"
/*
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "MBSFN-SubframeConfigList.h"*/
#include "openair1/PHY/defs_RU.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
...
...
openair1/PHY/LTE_TRANSPORT/if5_tools.c
View file @
2b05aba1
...
...
@@ -30,15 +30,13 @@
* \warning
*/
#include <time.h>
#include "PHY/defs_eNB.h"
#include "PHY/TOOLS/alaw_lut.h"
//#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
#include <intertask_interface.h>
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/time_utils.h"
//#define DEBUG_DL_MOBIPASS
//#define DEBUG_UL_MOBIPASS
#define SUBFRAME_SKIP_NUM_MOBIPASS 8
...
...
@@ -52,6 +50,23 @@ int dummy_cnt = 0;
int
subframe_skip_extra
=
0
;
int
start_flag
=
1
;
int
offset_cnt
=
1
;
static
inline
int64_t
clock_difftime_ns
(
struct
timespec
start
,
struct
timespec
end
)
{
struct
timespec
temp
;
int64_t
temp_ns
;
if
((
end
.
tv_nsec
-
start
.
tv_nsec
)
<
0
)
{
temp
.
tv_sec
=
end
.
tv_sec
-
start
.
tv_sec
-
1
;
temp
.
tv_nsec
=
1000000000
+
end
.
tv_nsec
-
start
.
tv_nsec
;
}
else
{
temp
.
tv_sec
=
end
.
tv_sec
-
start
.
tv_sec
;
temp
.
tv_nsec
=
end
.
tv_nsec
-
start
.
tv_nsec
;
}
temp_ns
=
(
int64_t
)(
temp
.
tv_sec
)
*
(
int64_t
)
1000000000
+
(
temp
.
tv_nsec
);
return
temp_ns
;
}
void
send_IF5
(
RU_t
*
ru
,
openair0_timestamp
proc_timestamp
,
int
subframe
,
uint8_t
*
seqno
,
uint16_t
packet_type
)
{
LTE_DL_FRAME_PARMS
*
fp
=
ru
->
frame_parms
;
...
...
openair1/PHY/LTE_TRANSPORT/prach.c
View file @
2b05aba1
...
...
@@ -101,14 +101,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
fp
=
&
(
eNB
->
frame_parms
);
nb_rx
=
fp
->
nb_antennas_rx
;
}
else
{
fp
=
&
(
ru
->
frame_parms
);
fp
=
(
ru
->
frame_parms
);
nb_rx
=
ru
->
nb_rx
;
}
AssertFatal
(
fp
!=
NULL
,
"rx_prach called without valid RU or eNB descriptor
\n
"
);
frame_type
=
fp
->
frame_type
;
frame_type
=
fp
->
frame_type
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if
(
br_flag
==
1
)
{
...
...
openair1/PHY/TOOLS/alaw_lut.h
View file @
2b05aba1
...
...
@@ -38,9 +38,6 @@ extern const uint8_t lin2alaw_if4p5[65536];
// 8 bit unsigned integer to 16 bit signed integer (typecasted as uint16_t)
extern
const
uint16_t
alaw2lin_if4p5
[
256
];
extern
const
uint8_t
lin2alaw_if5
[
65536
];
extern
const
uint16_t
alaw2lin_if5
[
256
];
openair1/PHY/TOOLS/time_meas.c
View file @
2b05aba1
...
...
@@ -27,8 +27,8 @@
// global var for openair performance profiler
int
opp_enabled
=
0
;
double
get_cpu_freq_GHz
(
void
)
{
double
get_cpu_freq_GHz
(
void
)
{
time_stats_t
ts
=
{
0
};
reset_meas
(
&
ts
);
ts
.
trials
++
;
...
...
@@ -39,7 +39,9 @@ double get_cpu_freq_GHz(void) {
printf
(
"CPU Freq is %f
\n
"
,
cpu_freq_GHz
);
return
cpu_freq_GHz
;
}
int
cpumeas
(
int
action
)
{
int
cpumeas
(
int
action
)
{
switch
(
action
)
{
case
CPUMEAS_ENABLE
:
opp_enabled
=
1
;
...
...
@@ -56,7 +58,11 @@ int cpumeas(int action) {
return
opp_enabled
;
}
void
print_meas_now
(
time_stats_t
*
ts
,
const
char
*
name
,
FILE
*
file_name
)
{
void
print_meas_now
(
time_stats_t
*
ts
,
const
char
*
name
,
FILE
*
file_name
)
{
if
(
opp_enabled
)
{
//static double cpu_freq_GHz = 3.2;
...
...
@@ -69,7 +75,11 @@ void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name) {
}
}
void
print_meas
(
time_stats_t
*
ts
,
const
char
*
name
,
time_stats_t
*
total_exec_time
,
time_stats_t
*
sf_exec_time
)
{
void
print_meas
(
time_stats_t
*
ts
,
const
char
*
name
,
time_stats_t
*
total_exec_time
,
time_stats_t
*
sf_exec_time
)
{
if
(
opp_enabled
)
{
static
int
first_time
=
0
;
static
double
cpu_freq_GHz
=
0
.
0
;
...
...
@@ -106,7 +116,8 @@ void print_meas(time_stats_t *ts, const char *name, time_stats_t *total_exec_tim
}
}
double
get_time_meas_us
(
time_stats_t
*
ts
)
{
double
get_time_meas_us
(
time_stats_t
*
ts
)
{
static
double
cpu_freq_GHz
=
0
.
0
;
if
(
cpu_freq_GHz
==
0
.
0
)
...
...
openair1/PHY/defs_RU.h
View file @
2b05aba1
...
...
@@ -34,6 +34,11 @@
#define __PHY_DEFS_RU__H__
#include "common_lib.h"
#include "openairinterface5g_limits.h"
#include "PHY/TOOLS/time_meas.h"
#define MAX_BANDS_PER_RRU 4
#define MAX_RRU_CONFIG_SIZE 1024
...
...
@@ -127,7 +132,7 @@ typedef struct RU_proc_t_s {
int
tti_tx
;
/// subframe to act upon for reception of prach
int
subframe_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (
LTE_
RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// subframe to act upon for reception of prach BL/CE UEs
int
subframe_prach_br
;
#endif
...
...
@@ -135,11 +140,17 @@ typedef struct RU_proc_t_s {
int
frame_rx
;
/// frame to act upon for transmission
int
frame_tx
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// subframe to act upon for transmission
int
subframe_tx
;
/// subframe to act upon for reception
int
subframe_rx
;
#endif
/// unwrapped frame count
int
frame_tx_unwrap
;
/// frame to act upon for reception of prach
int
frame_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (
LTE_
RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// frame to act upon for reception of prach
int
frame_prach_br
;
#endif
...
...
@@ -151,7 +162,7 @@ typedef struct RU_proc_t_s {
int
instance_cnt_FH1
;
/// \internal This variable is protected by \ref mutex_prach.
int
instance_cnt_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (
LTE_
RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// \internal This variable is protected by \ref mutex_prach.
int
instance_cnt_prach_br
;
#endif
...
...
@@ -174,7 +185,7 @@ typedef struct RU_proc_t_s {
pthread_t
pthread_FH1
;
/// pthread structure for RU prach processing thread
pthread_t
pthread_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (
LTE_
RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread structure for RU prach processing thread BL/CE UEs
pthread_t
pthread_prach_br
;
#endif
...
...
@@ -197,7 +208,7 @@ typedef struct RU_proc_t_s {
pthread_attr_t
attr_FH1
;
/// pthread attributes for RU prach
pthread_attr_t
attr_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (
LTE_
RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread attributes for RU prach BL/CE UEs
pthread_attr_t
attr_prach_br
;
#endif
...
...
@@ -229,7 +240,7 @@ typedef struct RU_proc_t_s {
pthread_cond_t
cond_FH1
;
/// condition variable for RU prach thread
pthread_cond_t
cond_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (
LTE_
RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// condition variable for RU prach thread BL/CE UEs
pthread_cond_t
cond_prach_br
;
#endif
...
...
@@ -252,7 +263,7 @@ typedef struct RU_proc_t_s {
pthread_mutex_t
mutex_FH1
;
/// mutex for RU prach
pthread_mutex_t
mutex_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (
LTE_
RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mutex for RU prach BL/CE UEs
pthread_mutex_t
mutex_prach_br
;
#endif
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
2b05aba1
...
...
@@ -192,7 +192,7 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
// snr=pow(10.0,.1*SNR);
fprintf
(
csv_fd
,
"%f,"
,
SNR
);
for
(
u
=
0
;
u
<
2
*
ru
->
frame_parms
.
N_RB_DL
;
u
++
)
{
for
(
u
=
0
;
u
<
2
*
ru
->
frame_parms
->
N_RB_DL
;
u
++
)
{
for
(
aarx
=
0
;
aarx
<
eNB2UE
[
0
]
->
nb_rx
;
aarx
++
)
{
for
(
aatx
=
0
;
aatx
<
eNB2UE
[
0
]
->
nb_tx
;
aatx
++
)
{
channelx
=
eNB2UE
[
0
]
->
chF
[
aarx
+
(
aatx
*
eNB2UE
[
0
]
->
nb_rx
)][
u
].
x
;
...
...
@@ -203,9 +203,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
}
if
(
num_rounds
>
1
)
{
freq_channel
(
eNB2UE
[
1
],
ru
->
frame_parms
.
N_RB_DL
,
2
*
ru
->
frame_parms
.
N_RB_DL
+
1
);
freq_channel
(
eNB2UE
[
1
],
ru
->
frame_parms
->
N_RB_DL
,
2
*
ru
->
frame_parms
->
N_RB_DL
+
1
);
for
(
u
=
0
;
u
<
2
*
ru
->
frame_parms
.
N_RB_DL
;
u
++
)
{
for
(
u
=
0
;
u
<
2
*
ru
->
frame_parms
->
N_RB_DL
;
u
++
)
{
for
(
aarx
=
0
;
aarx
<
eNB2UE
[
1
]
->
nb_rx
;
aarx
++
)
{
for
(
aatx
=
0
;
aatx
<
eNB2UE
[
1
]
->
nb_tx
;
aatx
++
)
{
channelx
=
eNB2UE
[
1
]
->
chF
[
aarx
+
(
aatx
*
eNB2UE
[
1
]
->
nb_rx
)][
u
].
x
;
...
...
@@ -215,9 +215,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
}
}
freq_channel
(
eNB2UE
[
2
],
ru
->
frame_parms
.
N_RB_DL
,
2
*
ru
->
frame_parms
.
N_RB_DL
+
1
);
freq_channel
(
eNB2UE
[
2
],
ru
->
frame_parms
->
N_RB_DL
,
2
*
ru
->
frame_parms
->
N_RB_DL
+
1
);
for
(
u
=
0
;
u
<
2
*
ru
->
frame_parms
.
N_RB_DL
;
u
++
)
{
for
(
u
=
0
;
u
<
2
*
ru
->
frame_parms
->
N_RB_DL
;
u
++
)
{
for
(
aarx
=
0
;
aarx
<
eNB2UE
[
2
]
->
nb_rx
;
aarx
++
)
{
for
(
aatx
=
0
;
aatx
<
eNB2UE
[
2
]
->
nb_tx
;
aatx
++
)
{
channelx
=
eNB2UE
[
2
]
->
chF
[
aarx
+
(
aatx
*
eNB2UE
[
2
]
->
nb_rx
)][
u
].
x
;
...
...
@@ -227,9 +227,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
}
}
freq_channel
(
eNB2UE
[
3
],
ru
->
frame_parms
.
N_RB_DL
,
2
*
ru
->
frame_parms
.
N_RB_DL
+
1
);
freq_channel
(
eNB2UE
[
3
],
ru
->
frame_parms
->
N_RB_DL
,
2
*
ru
->
frame_parms
->
N_RB_DL
+
1
);
for
(
u
=
0
;
u
<
2
*
ru
->
frame_parms
.
N_RB_DL
;
u
++
)
{
for
(
u
=
0
;
u
<
2
*
ru
->
frame_parms
->
N_RB_DL
;
u
++
)
{
for
(
aarx
=
0
;
aarx
<
eNB2UE
[
3
]
->
nb_rx
;
aarx
++
)
{
for
(
aatx
=
0
;
aatx
<
eNB2UE
[
3
]
->
nb_tx
;
aatx
++
)
{
channelx
=
eNB2UE
[
3
]
->
chF
[
aarx
+
(
aatx
*
eNB2UE
[
3
]
->
nb_rx
)][
u
].
x
;
...
...
@@ -990,7 +990,7 @@ int main(int argc, char **argv) {
if
((
transmission_mode
==
1
)
||
(
transmission_mode
==
7
))
{
for
(
aa
=
0
;
aa
<
ru
->
nb_tx
;
aa
++
)
for
(
re
=
0
;
re
<
ru
->
frame_parms
.
ofdm_symbol_size
;
re
++
)
for
(
re
=
0
;
re
<
ru
->
frame_parms
->
ofdm_symbol_size
;
re
++
)
ru
->
beam_weights
[
0
][
0
][
aa
][
re
]
=
0x00007fff
/
eNB
->
frame_parms
.
nb_antennas_tx
;
}
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
2b05aba1
...
...
@@ -169,7 +169,7 @@ int main(int argc, char **argv) {
cpuf
=
get_cpu_freq_GHz
();
if
(
load_configmodule
(
argc
,
argv
)
==
0
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
2b05aba1
...
...
@@ -193,7 +193,7 @@ int main(int argc, char **argv)
cpuf
=
get_cpu_freq_GHz
();
if
(
load_configmodule
(
argc
,
argv
)
==
0
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
2b05aba1
...
...
@@ -145,7 +145,7 @@ int main(int argc, char **argv)
cpuf
=
get_cpu_freq_GHz
();
if
(
load_configmodule
(
argc
,
argv
)
==
0
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
2b05aba1
...
...
@@ -171,7 +171,7 @@ int main(int argc, char **argv) {
cpuf
=
get_cpu_freq_GHz
();
if
(
load_configmodule
(
argc
,
argv
)
==
0
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
...
...
openair2/COMMON/platform_types.h
View file @
2b05aba1
...
...
@@ -65,6 +65,7 @@ typedef int32_t sdu_size_t;
typedef
uint32_t
frame_t
;
typedef
int32_t
sframe_t
;
typedef
uint32_t
sub_frame_t
;
typedef
uint32_t
slot_t
;
typedef
uint16_t
module_id_t
;
typedef
uint8_t
slice_id_t
;
typedef
uint8_t
eNB_index_t
;
...
...
openair2/COMMON/rrc_messages_types.h
View file @
2b05aba1
...
...
@@ -52,12 +52,12 @@
#include "LTE_UL-CCCH-Message.h"
#include "LTE_UL-DCCH-Message.h"
typedef
BCCH_DL_SCH_Message_t
RrcDlBcchMessage
;
typedef
DL_CCCH_Message_t
RrcDlCcchMessage
;
typedef
DL_DCCH_Message_t
RrcDlDcchMessage
;
typedef
UE_EUTRA_Capability_t
RrcUeEutraCapability
;
typedef
UL_CCCH_Message_t
RrcUlCcchMessage
;
typedef
UL_DCCH_Message_t
RrcUlDcchMessage
;
typedef
LTE_
BCCH_DL_SCH_Message_t
RrcDlBcchMessage
;
typedef
LTE_
DL_CCCH_Message_t
RrcDlCcchMessage
;
typedef
LTE_
DL_DCCH_Message_t
RrcDlDcchMessage
;
typedef
LTE_
UE_EUTRA_Capability_t
RrcUeEutraCapability
;
typedef
LTE_
UL_CCCH_Message_t
RrcUlCcchMessage
;
typedef
LTE_
UL_DCCH_Message_t
RrcUlDcchMessage
;
#endif
//-------------------------------------------------------------------------------------------//
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
2b05aba1
...
...
@@ -1309,7 +1309,8 @@ initiate_ra_proc(module_id_t module_idP,
frame_t
frameP
,
sub_frame_t
subframeP
,
uint16_t
preamble_index
,
int16_t
timing_offset
,
uint16_t
ra_rnti
int16_t
timing_offset
,
uint16_t
ra_rnti
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint8_t
rach_resource_type
#endif
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
2b05aba1
...
...
@@ -42,25 +42,23 @@
#include <stdlib.h>
#include <string.h>
#include "COMMON/platform_constants.h"
#include "NR_BCCH-BCH-Message.h"
#include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfigCommon.h"
#include "NR_MeasConfig.h"
#include "nfapi_nr_interface.h"
#include "NR_PHY_INTERFACE/NR_IF_Module.h"
#include "PHY/TOOLS/time_meas.h"
#include "PHY/defs_gNB.h"
#include "targets/ARCH/COMMON/common_lib.h"
#include "COMMON/platform_constants.h"
#include "common/ran_context.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "common/ran_context.h"
#include "PHY/defs_gNB.h"
#include "PHY/TOOLS/time_meas.h"
#include "targets/ARCH/COMMON/common_lib.h"
/*! \brief gNB common channels */
typedef
struct
{
...
...
@@ -70,8 +68,8 @@ typedef struct {
int
nr_band
;
uint32_t
dl_CarrierFreq
;
NR_BCCH_BCH_Message_t
*
mib
;
TDD_Config
_t
*
tdd_Config
;
ARFCN_ValueEUTRA_t
ul_CarrierFreq
;
NR_TDD_UL_DL_ConfigCommon
_t
*
tdd_Config
;
NR_
ARFCN_ValueEUTRA_t
ul_CarrierFreq
;
long
ul_Bandwidth
;
/// Outgoing MIB PDU for PHY
MIB_PDU
MIB_pdu
;
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
2b05aba1
...
...
@@ -61,16 +61,16 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
=
0
;
LOG_D
(
MAC
,
"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SF:%d
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
,
NFAPI_SFNSF2DEC
(
UL_info
->
rach_ind
.
sfn_sf
));
initiate_ra_proc
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
NFAPI_SFNSF2SFN
(
UL_info
->
rach_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL_info
->
rach_ind
.
sfn_sf
),
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
preamble
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
timing_advance
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
rnti
UL_info
->
CC_id
,
NFAPI_SFNSF2SFN
(
UL_info
->
rach_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL_info
->
rach_ind
.
sfn_sf
),
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
preamble
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
timing_advance
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
rnti
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
0
,
0
#endif
);
);
}
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
...
...
openair2/RRC/LTE/rrc_eNB_S1AP.c
View file @
2b05aba1
...
...
@@ -28,25 +28,24 @@
* \email: navid.nikaein@eurecom.fr
*/
# include "rrc_defs.h"
# include "rrc_extern.h"
# include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
# include "RRC/LTE/MESSAGES/asn1_msg.h"
# include "rrc_eNB_UE_context.h"
# include "rrc_eNB_S1AP.h"
# include "enb_config.h"
# include "common/ran_context.h"
# include "gtpv1u.h"
# include "s1ap_eNB_defs.h"
# include "s1ap_eNB_management_procedures.h"
# include "s1ap_eNB_ue_context.h"
#include "rrc_defs.h"
#include "rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "RRC/LTE/MESSAGES/asn1_msg.h"
#include "rrc_eNB_UE_context.h"
#include "rrc_eNB_S1AP.h"
#include "enb_config.h"
#include "common/ran_context.h"
#include "gtpv1u.h"
#include "s1ap_eNB.h"
#include "s1ap_eNB_defs.h"
#include "s1ap_eNB_management_procedures.h"
#include "s1ap_eNB_ue_context.h"
#include "asn1_conversions.h"
#include "intertask_interface.h"
#include "pdcp.h"
#include "pdcp_primitives.h"
#include "s1ap_eNB.h"
#include "UTIL/OSA/osa_defs.h"
#include "msc.h"
...
...
@@ -429,7 +428,7 @@ static e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_inte
int
rrc_eNB_process_security
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_eNB_ue_context_t
*
const
ue_context_pP
,
rrc_eNB_ue_context_t
*
const
ue_context_pP
,
security_capabilities_t
*
security_capabilities_pP
)
{
boolean_t
changed
=
FALSE
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
2b05aba1
...
...
@@ -79,15 +79,17 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
@param configuration Pointer Configuration Request structure
@return size of encoded bit stream in bytes*/
uint8_t
do_SIB1_NR
(
rrc_gNB_carrier_data_t
*
carrier
,
int
Mod_id
,
int
CC_id
,
gNB_RrcConfigurationReq
*
configuration
);
uint8_t
do_SIB1_NR
(
rrc_gNB_carrier_data_t
*
carrier
,
int
Mod_id
,
int
CC_id
,
gNB_RrcConfigurationReq
*
configuration
);
void
do_SERVINGCELLCONFIGCOMMON
(
uint8_t
Mod_id
,
int
CC_id
,
#if defined(ENABLE_ITTI)
gNB_RrcConfigurationReq
*
configuration
,
#endif
int
initial_flag
);
int
initial_flag
);
void
do_RLC_BEARER
(
uint8_t
Mod_id
,
int
CC_id
,
...
...
@@ -107,10 +109,3 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id,
void
do_SpCellConfig
(
uint8_t
Mod_id
,
int
CC_id
,
struct
NR_SpCellConfig
*
spconfig
);
openair2/RRC/NR/nr_rrc_defs.h
View file @
2b05aba1
...
...
@@ -55,6 +55,7 @@
//#include "RRCConnectionSetupComplete.h"
//#include "RRCConnectionRequest.h"
//#include "RRCConnectionReestablishmentRequest.h"
#include "NR_RRCReestablishmentRequest.h"
//#include "BCCH-DL-SCH-Message.h"
#include "NR_BCCH-BCH-Message.h"
//#include "MCCH-Message.h"
...
...
@@ -64,9 +65,9 @@
//#include "AS-Context.h"
#include "NR_UE-NR-Capability.h"
#include "NR_MeasResults.h"
#include "NR_MeasResults.h"
#include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfigCommon.h"
#include "NR_EstablishmentCause.h"
//-------------------
#if defined(ENABLE_ITTI)
...
...
@@ -262,22 +263,22 @@ typedef struct gNB_RRC_UE_s {
#if defined(Rel10) || defined(Rel14)
SCellToAddMod_r10_t
sCell_config
[
2
];
#endif
SRB_ToAddModList_t
*
SRB_configList
;
SRB_ToAddModList_t
*
SRB_configList2
[
RRC_TRANSACTION_IDENTIFIER_NUMBER
];
DRB_ToAddModList_t
*
DRB_configList
;
DRB_ToAddModList_t
*
DRB_configList2
[
RRC_TRANSACTION_IDENTIFIER_NUMBER
];
DRB_ToReleaseList_t
*
DRB_Release_configList2
[
RRC_TRANSACTION_IDENTIFIER_NUMBER
];
NR_SRB_ToAddModList_t
*
SRB_configList
;
NR_SRB_ToAddModList_t
*
SRB_configList2
[
RRC_TRANSACTION_IDENTIFIER_NUMBER
];
NR_DRB_ToAddModList_t
*
DRB_configList
;
NR_DRB_ToAddModList_t
*
DRB_configList2
[
RRC_TRANSACTION_IDENTIFIER_NUMBER
];
NR_DRB_ToReleaseList_t
*
DRB_Release_configList2
[
RRC_TRANSACTION_IDENTIFIER_NUMBER
];
uint8_t
DRB_active
[
8
];
SRB_INFO
SI
;
SRB_INFO
Srb0
;
SRB_INFO_TABLE_ENTRY
Srb1
;
SRB_INFO_TABLE_ENTRY
Srb2
;
MeasConfig_t
*
measConfig
;
NR_MeasConfig_t
*
measConfig
;
HANDOVER_INFO
*
handover_info
;
MeasResults_t
*
measResults
;
NR_MeasResults_t
*
measResults
;
UE_EUTRA
_Capability_t
*
UE_Capability
;
NR_UE_NR
_Capability_t
*
UE_Capability
;
ImsiMobileIdentity_t
imsi
;
#if defined(ENABLE_SECURITY)
...
...
@@ -288,8 +289,8 @@ typedef struct gNB_RRC_UE_s {
int8_t
nh_ncc
;
#endif
/* Used integrity/ciphering algorithms */
CipheringAlgorithm_r12_t
ciphering_algorithm
;
e_
SecurityAlgorithmConfig__integrityProtAlgorithm
integrity_algorithm
;
NR_CipheringAlgorithm_t
ciphering_algorithm
;
e_
NR_IntegrityProtAlgorithm
integrity_algorithm
;
uint8_t
Status
;
rnti_t
rnti
;
...
...
@@ -298,10 +299,10 @@ typedef struct gNB_RRC_UE_s {
#if defined(ENABLE_ITTI)
/* Information from UE RRC ConnectionRequest */
UE_S_TMSI
Initialue_identity_s_TMSI
;
EstablishmentCause_t
establishment_cause
;
NR_EstablishmentCause_t
establishment_cause
;
/* Information from UE RRC ConnectionReestablishmentRequest */
ReestablishmentCause_t
reestablishment_cause
;
NR_
ReestablishmentCause_t
reestablishment_cause
;
/* UE id for initial connection to S1AP */
uint16_t
ue_initial_id
;
...
...
openair2/RRC/NR/nr_rrc_extern.h
View file @
2b05aba1
...
...
@@ -39,7 +39,7 @@ extern UE_RRC_INST *UE_rrc_inst;
extern
uint8_t
DRB2LCHAN
[
8
];
extern
LogicalChannelConfig_t
SRB1_logicalChannelConfig_defaultValue
;
extern
NR_
LogicalChannelConfig_t
SRB1_logicalChannelConfig_defaultValue
;
extern
LogicalChannelConfig_t
SRB2_logicalChannelConfig_defaultValue
;
...
...
targets/RT/USER/nr-gnb.c
View file @
2b05aba1
...
...
@@ -33,8 +33,6 @@
#define _GNU_SOURCE
#include <pthread.h>
#include "time_utils.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "rt_wrapper.h"
...
...
targets/RT/USER/nr-softmodem.c
View file @
2b05aba1
...
...
@@ -936,7 +936,7 @@ int main( int argc, char **argv )
start_background_system
();
///static configuration for NR at the moment
if
(
load_configmodule
(
argc
,
argv
)
==
NULL
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
NULL
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\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