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
lizhongxiao
OpenXG-RAN
Commits
3367cc93
Commit
3367cc93
authored
Aug 27, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lte-softmodem compiles
parent
bf407e6c
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
217 additions
and
173 deletions
+217
-173
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+3
-3
common/utils/T/T_messages.txt
common/utils/T/T_messages.txt
+63
-0
openair1/PHY/defs_RU.h
openair1/PHY/defs_RU.h
+1
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+18
-2
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+2
-1
openair2/LAYER2/MAC/main.c
openair2/LAYER2/MAC/main.c
+19
-63
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+4
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+2
-2
openair2/RRC/LTE/L2_interface.c
openair2/RRC/LTE/L2_interface.c
+52
-73
openair2/RRC/NR/L2_nr_interface.c
openair2/RRC/NR/L2_nr_interface.c
+4
-1
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+24
-1
openair2/RRC/NR/nr_rrc_common.c
openair2/RRC/NR/nr_rrc_common.c
+3
-3
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+2
-2
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+12
-12
No files found.
cmake_targets/CMakeLists.txt
View file @
3367cc93
...
...
@@ -397,7 +397,7 @@ endif (NOT ${ret} STREQUAL 0)
file
(
GLOB nr_rrc_source
${
NR_RRC_FULL_DIR
}
/*.c
)
file
(
GLOB nr_rrc_h
${
NR_RRC_FULL_DIR
}
/*.h
)
set
(
nr_rrc_h
${
nr_rrc_h
}
${
NR_RRC_FULL_DIR
}
/asn_constant.h
)
set
(
nr_rrc_h
${
nr_rrc_h
}
${
NR_RRC_FULL_DIR
}
/
NR_
asn_constant.h
)
set_source_files_properties
(
${
nr_rrc_source
}
PROPERTIES COMPILE_FLAGS -w
)
# suppress warnings from generated code
add_library
(
NR_RRC_LIB
${
nr_rrc_h
}
...
...
@@ -2208,7 +2208,7 @@ add_executable(lte-softmodem
target_link_libraries
(
lte-softmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
RRC_LIB
NR_RRC_LIB
S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
FLPT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
FLEXRAN_AGENT_LIB
}
LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl
)
...
...
@@ -2245,7 +2245,7 @@ add_executable(lte-softmodem-nos1
)
target_link_libraries
(
lte-softmodem-nos1
-Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
ITTI_LIB
}
RRC_LIB
NR_RRC_LIB
SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
ITTI_LIB
}
${
MIH_LIB
}
${
FLPT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
FLEXRAN_AGENT_LIB
}
LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl
)
...
...
common/utils/T/T_messages.txt
View file @
3367cc93
...
...
@@ -309,6 +309,27 @@ ID = LEGACY_PHY_TRACE
GROUP = ALL:LEGACY_PHY:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_NR_PHY_INFO
DESC = NR_PHY legacy logs - info level
GROUP = ALL:LEGACY_NR_PHY:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_NR_PHY_ERROR
DESC = NR_PHY legacy logs - error level
GROUP = ALL:LEGACY_NR_PHY:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_NR_PHY_WARNING
DESC = NR_PHY legacy logs - warning level
GROUP = ALL:LEGACY_NR_PHY:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_NR_PHY_DEBUG
DESC = NR_PHY legacy logs - debug level
GROUP = ALL:LEGACY_NR_PHY:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_NR_PHY_TRACE
DESC = NR_PHY legacy logs - trace level
GROUP = ALL:LEGACY_NR_PHY:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_S1AP_INFO
DESC = S1AP legacy logs - info level
GROUP = ALL:LEGACY_S1AP:LEGACY_GROUP_INFO:LEGACY
...
...
@@ -372,6 +393,27 @@ ID = LEGACY_RRC_TRACE
GROUP = ALL:LEGACY_RRC:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_NR_RRC_INFO
DESC = NR_RRC legacy logs - info level
GROUP = ALL:LEGACY_NR_RRC:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_NR_RRC_ERROR
DESC = NR_RRC legacy logs - error level
GROUP = ALL:LEGACY_NR_RRC:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_NR_RRC_WARNING
DESC = NR_RRC legacy logs - warning level
GROUP = ALL:LEGACY_NR_RRC:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_NR_RRC_DEBUG
DESC = NR_RRC legacy logs - debug level
GROUP = ALL:LEGACY_NR_RRC:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_NR_RRC_TRACE
DESC = NR_RRC legacy logs - trace level
GROUP = ALL:LEGACY_NR_RRC:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_RLC_INFO
DESC = RLC legacy logs - info level
GROUP = ALL:LEGACY_RLC:LEGACY_GROUP_INFO:LEGACY
...
...
@@ -435,6 +477,27 @@ ID = LEGACY_ENB_APP_TRACE
GROUP = ALL:LEGACY_ENB_APP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_GNB_APP_INFO
DESC = GNB_APP legacy logs - info level
GROUP = ALL:LEGACY_GNB_APP:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_GNB_APP_ERROR
DESC = GNB_APP legacy logs - error level
GROUP = ALL:LEGACY_GNB_APP:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_GNB_APP_WARNING
DESC = GNB_APP legacy logs - warning level
GROUP = ALL:LEGACY_GNB_APP:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_GNB_APP_DEBUG
DESC = GNB_APP legacy logs - debug level
GROUP = ALL:LEGACY_GNB_APP:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_GNB_APP_TRACE
DESC = GNB_APP legacy logs - trace level
GROUP = ALL:LEGACY_GNB_APP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_FLEXRAN_AGENT_INFO
DESC = FLEXRAN_AGENT legacy logs - info level
GROUP = ALL:LEGACY_FLEXRAN_AGENT:LEGACY_GROUP_INFO:LEGACY
...
...
openair1/PHY/defs_RU.h
View file @
3367cc93
...
...
@@ -307,6 +307,7 @@ typedef struct RU_proc_t_s {
/// pipeline ready state
int
ru_rx_ready
;
int
ru_tx_ready
;
int
emulate_rf_busy
;
}
RU_proc_t
;
...
...
openair2/GNB_APP/gnb_config.c
View file @
3367cc93
...
...
@@ -30,8 +30,8 @@
#include <string.h>
#include <inttypes.h>
#include "log.h"
#include "log_extern.h"
#include "
common/utils/LOG/
log.h"
#include "
common/utils/LOG/
log_extern.h"
#include "assertions.h"
#include "gnb_config.h"
#include "UTIL/OTG/otg.h"
...
...
@@ -60,6 +60,22 @@
#include "gnb_paramdef.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "NR_SCS-SpecificCarrier.h"
#include "NR_TDD-UL-DL-ConfigCommon.h"
#include "NR_FrequencyInfoUL.h"
#include "NR_RACH-ConfigGeneric.h"
#include "NR_RACH-ConfigCommon.h"
#include "NR_PUSCH-TimeDomainResourceAllocation.h"
#include "NR_PUSCH-ConfigCommon.h"
#include "NR_PUCCH-ConfigCommon.h"
#include "NR_PDSCH-TimeDomainResourceAllocation.h"
#include "NR_PDSCH-ConfigCommon.h"
#include "NR_RateMatchPattern.h"
#include "NR_RateMatchPatternLTE-CRS.h"
#include "NR_SearchSpace.h"
#include "NR_ControlResourceSet.h"
#include "NR_EUTRA-MBSFN-SubframeConfig.h"
extern
uint16_t
sf_ahead
;
void
RCconfig_nr_flexran
()
...
...
openair2/GNB_APP/gnb_paramdef.h
View file @
3367cc93
...
...
@@ -1057,4 +1057,5 @@ typedef enum {
#define MACRLC_REMOTE_S_PORTC_IDX 14
#define MACRLC_LOCAL_S_PORTD_IDX 15
#define MACRLC_REMOTE_S_PORTD_IDX 16
#define MACRLC_PHY_TEST_IDX 17
\ No newline at end of file
#define MACRLC_SCHED_MODE_IDX 17
#define MACRLC_PHY_TEST_IDX 18
openair2/LAYER2/MAC/main.c
View file @
3367cc93
...
...
@@ -111,71 +111,27 @@ void mac_top_init_eNB(void)
RC
.
mac
=
NULL
;
}
// Initialize Linked-List for Active UEs
// Initialize Linked-List for Active UEs
for
(
i
=
0
;
i
<
RC
.
nb_macrlc_inst
;
i
++
)
{
RC
.
mac
[
i
]
=
(
eNB_MAC_INST
*
)
malloc16
(
sizeof
(
eNB_MAC_INST
));
AssertFatal
(
RC
.
mac
!=
NULL
,
"can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu
\n
"
,
RC
.
nb_macrlc_inst
*
sizeof
(
eNB_MAC_INST
*
),
RC
.
nb_macrlc_inst
,
sizeof
(
eNB_MAC_INST
));
LOG_D
(
MAC
,
"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p
\n
"
,
sizeof
(
eNB_MAC_INST
),
RC
.
nb_macrlc_inst
,
RC
.
mac
);
bzero
(
RC
.
mac
[
i
],
sizeof
(
eNB_MAC_INST
));
RC
.
mac
[
i
]
->
Mod_id
=
i
;
for
(
j
=
0
;
j
<
MAX_NUM_CCs
;
j
++
)
{
RC
.
mac
[
i
]
->
DL_req
[
j
].
dl_config_request_body
.
dl_config_pdu_list
=
RC
.
mac
[
i
]
->
dl_config_pdu_list
[
j
];
RC
.
mac
[
i
]
->
UL_req
[
j
].
ul_config_request_body
.
ul_config_pdu_list
=
RC
.
mac
[
i
]
->
ul_config_pdu_list
[
j
];
for
(
int
k
=
0
;
k
<
10
;
k
++
)
RC
.
mac
[
i
]
->
UL_req_tmp
[
j
][
k
].
ul_config_request_body
.
ul_config_pdu_list
=
RC
.
mac
[
i
]
->
ul_config_pdu_list_tmp
[
j
][
k
];
RC
.
mac
[
i
]
->
HI_DCI0_req
[
j
].
hi_dci0_request_body
.
hi_dci0_pdu_list
=
RC
.
mac
[
i
]
->
hi_dci0_pdu_list
[
j
];
RC
.
mac
[
i
]
->
TX_req
[
j
].
tx_request_body
.
tx_pdu_list
=
RC
.
mac
[
i
]
->
tx_request_pdu
[
j
];
RC
.
mac
[
i
]
->
ul_handle
=
0
;
}
}
//END for (i = 0; i < RC.nb_macrlc_inst; i++)
AssertFatal
(
rlc_module_init
()
==
0
,
"Could not initialize RLC layer
\n
"
);
// These should be out of here later
pdcp_layer_init
();
rrc_init_global_param
();
}
else
{
RC
.
mac
=
NULL
;
}
// Initialize Linked-List for Active UEs
for
(
i
=
0
;
i
<
RC
.
nb_macrlc_inst
;
i
++
)
{
mac
=
RC
.
mac
[
i
];
mac
->
if_inst
=
IF_Module_init
(
i
);
UE_list
=
&
mac
->
UE_list
;
UE_list
->
num_UEs
=
0
;
UE_list
->
head
=
-
1
;
UE_list
->
head_ul
=
-
1
;
UE_list
->
avail
=
0
;
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_ENB
-
1
;
list_el
++
)
{
UE_list
->
next
[
list_el
]
=
list_el
+
1
;
UE_list
->
next_ul
[
list_el
]
=
list_el
+
1
;
mac
=
RC
.
mac
[
i
];
mac
->
if_inst
=
IF_Module_init
(
i
);
UE_list
=
&
mac
->
UE_list
;
UE_list
->
num_UEs
=
0
;
UE_list
->
head
=
-
1
;
UE_list
->
head_ul
=
-
1
;
UE_list
->
avail
=
0
;
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_ENB
-
1
;
list_el
++
)
{
UE_list
->
next
[
list_el
]
=
list_el
+
1
;
UE_list
->
next_ul
[
list_el
]
=
list_el
+
1
;
}
UE_list
->
next
[
list_el
]
=
-
1
;
UE_list
->
next_ul
[
list_el
]
=
-
1
;
}
UE_list
->
next
[
list_el
]
=
-
1
;
UE_list
->
next_ul
[
list_el
]
=
-
1
;
}
}
void
mac_init_cell_params
(
int
Mod_idP
,
int
CC_idP
)
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
3367cc93
...
...
@@ -2,14 +2,16 @@
#include "COMMON/platform_constants.h"
#include "common/ran_context.h"
#include "
UTIL
/LOG/log.h"
#include "
UTIL
/LOG/vcd_signal_dumper.h"
#include "
common/utils
/LOG/log.h"
#include "
common/utils
/LOG/vcd_signal_dumper.h"
#include "NR_BCCH-BCH-Message.h"
#include "NR_ServingCellConfigCommon.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "NR_MIB.h"
extern
RAN_CONTEXT_t
RC
;
//extern int l2_init_gNB(void);
extern
void
mac_top_init_gNB
(
void
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
3367cc93
...
...
@@ -35,8 +35,8 @@
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "
UTIL
/LOG/log.h"
#include "
UTIL
/LOG/vcd_signal_dumper.h"
#include "
common/utils
/LOG/log.h"
#include "
common/utils
/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
...
...
@@ -456,4 +456,4 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
*/
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER
,
VCD_FUNCTION_OUT
);
}
\ No newline at end of file
}
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
3367cc93
...
...
@@ -33,8 +33,8 @@
#include "LAYER2/NR_MAC_gNB/mac.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "
UTIL
/LOG/log.h"
#include "
UTIL
/LOG/vcd_signal_dumper.h"
#include "
common/utils
/LOG/log.h"
#include "
common/utils
/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
3367cc93
...
...
@@ -36,8 +36,8 @@
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "
UTIL
/LOG/log.h"
#include "
UTIL
/LOG/vcd_signal_dumper.h"
#include "
common/utils
/LOG/log.h"
#include "
common/utils
/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
...
...
@@ -119,4 +119,4 @@ int is_nr_UL_sf(NR_COMMON_channels_t * ccP, sub_frame_t subframeP){
subframeP
,
(
int
)
ccP
->
tdd_Config
->
subframeAssignment
);
break
;
}
}
\ No newline at end of file
}
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
3367cc93
...
...
@@ -35,7 +35,7 @@
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "RRC/NR/nr_rrc_defs.h"
#include "
UTIL
/LOG/log.h"
#include "
common/utils
/LOG/log.h"
//#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "common/ran_context.h"
...
...
@@ -121,4 +121,4 @@ void mac_top_init_gNB(void)
UE_list
->
next_ul
[
list_el
]
=
-
1
;
}
}
\ No newline at end of file
}
openair2/RRC/LTE/L2_interface.c
View file @
3367cc93
...
...
@@ -86,31 +86,27 @@ mac_rrc_data_req(
AssertFatal
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB1
!=
255
,
"[eNB %d] MAC Request for SIB1 and SIB1 not initialized
\n
"
,
Mod_idP
);
#ifdef DEBUG_RRC
LOG_T
(
RRC
,
"[eNB %d] Frame %d : BCCH request => SIB 1
\n
"
,
Mod_idP
,
frameP
);
if
(
sib1_size
>
sdu_size
)
{
LOG_E
(
RRC
,
"SIB1 SDU larger than BCCH SDU buffer size (%d, %d)"
,
sib1_size
,
sdu_size
);
sib1_size
=
sdu_size
;
}
message_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
RRC_MAC_BCCH_DATA_REQ
);
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
frame
=
frameP
;
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
sdu_size
=
sib1_size
;
memset
(
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
sdu
,
0
,
BCCH_SDU_SIZE
);
memcpy
(
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
sdu
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
SIB1
,
sib1_size
);
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
enb_index
=
eNB_index
;
itti_send_msg_to_task
(
TASK_MAC_ENB
,
ENB_MODULE_ID_TO_INSTANCE
(
Mod_idP
),
message_p
);
}
#endif
if
((
frameP
%
2
)
==
0
)
{
memcpy
(
&
buffer_pP
[
0
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
SIB1
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB1
);
#ifdef DEBUG_RRC
LOG_T
(
RRC
,
"[eNB %d] Frame %d : BCCH request => SIB 1
\n
"
,
Mod_idP
,
frameP
);
for
(
i
=
0
;
i
<
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB1
;
i
++
)
{
LOG_T
(
RRC
,
"%x."
,
buffer_pP
[
i
]);
LOG_T
(
RRC
,
"%x."
,
buffer_pP
[
i
]);
}
LOG_T
(
RRC
,
"
\n
"
);
#endif
return
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB1
);
}
// All RFN mod 8 transmit SIB2-3 in SF 5
else
if
((
frameP
%
8
)
==
1
)
{
memcpy
(
&
buffer_pP
[
0
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
SIB23
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB23
);
#ifdef DEBUG_RRC
LOG_T
(
RRC
,
"[eNB %d] Frame %d BCCH request => SIB 2-3
\n
"
,
Mod_idP
,
frameP
);
...
...
@@ -119,17 +115,14 @@ mac_rrc_data_req(
LOG_T
(
RRC
,
"%x."
,
buffer_pP
[
i
]);
}
message_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
RRC_MAC_BCCH_DATA_REQ
);
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
frame
=
frameP
;
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
sdu_size
=
sib23_size
;
memset
(
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
sdu
,
0
,
BCCH_SDU_SIZE
);
memcpy
(
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
sdu
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
SIB23
,
sib23_size
);
RRC_MAC_BCCH_DATA_REQ
(
message_p
).
enb_index
=
eNB_index
;
itti_send_msg_to_task
(
TASK_MAC_ENB
,
ENB_MODULE_ID_TO_INSTANCE
(
Mod_idP
),
message_p
);
LOG_T
(
RRC
,
"
\n
"
);
#endif
return
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB23
);
}
else
{
return
(
0
);
}
}
if
(
(
Srb_id
&
RAB_OFFSET
)
==
MIBCH
)
{
mib
->
message
.
systemFrameNumber
.
buf
=
&
sfn
;
...
...
@@ -150,47 +143,38 @@ mac_rrc_data_req(
if
(
(
Srb_id
&
RAB_OFFSET
)
==
CCCH
)
{
LOG_T
(
RRC
,
"[eNB %d] Frame %d CCCH request (Srb_id %d)
\n
"
,
Mod_idP
,
frameP
,
Srb_id
);
for
(
i
=
0
;
i
<
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB23
;
i
++
)
{
LOG_T
(
RRC
,
"%x."
,
buffer_pP
[
i
]);
if
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
Srb0
.
Active
==
0
)
{
LOG_E
(
RRC
,
"[eNB %d] CCCH Not active
\n
"
,
Mod_idP
);
return
-
1
;
}
Srb_info
=&
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
Srb0
;
// check if data is there for MAC
if
(
Srb_info
->
Tx_buffer
.
payload_size
>
0
)
{
//Fill buffer
LOG_D
(
RRC
,
"[eNB %d] CCCH (%p) has %d bytes (dest: %p, src %p)
\n
"
,
Mod_idP
,
Srb_info
,
Srb_info
->
Tx_buffer
.
payload_size
,
buffer_pP
,
Srb_info
->
Tx_buffer
.
Payload
);
memcpy
(
buffer_pP
,
Srb_info
->
Tx_buffer
.
Payload
,
Srb_info
->
Tx_buffer
.
payload_size
);
Sdu_size
=
Srb_info
->
Tx_buffer
.
payload_size
;
Srb_info
->
Tx_buffer
.
payload_size
=
0
;
LOG_D
(
RRC
,
"[eNB %d] CCCH (%p) has %d bytes (dest: %p, src %p)
\n
"
,
Mod_idP
,
Srb_info
,
Srb_info
->
Tx_buffer
.
payload_size
,
buffer_pP
,
Srb_info
->
Tx_buffer
.
Payload
);
memcpy
(
buffer_pP
,
Srb_info
->
Tx_buffer
.
Payload
,
Srb_info
->
Tx_buffer
.
payload_size
);
Sdu_size
=
Srb_info
->
Tx_buffer
.
payload_size
;
Srb_info
->
Tx_buffer
.
payload_size
=
0
;
}
if
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
Srb0
.
Active
==
0
)
{
LOG_E
(
RRC
,
"[eNB %d] CCCH Not active
\n
"
,
Mod_idP
);
return
-
1
;
return
(
Sdu_size
);
}
Srb_info
=&
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
Srb0
;
if
(
(
Srb_id
&
RAB_OFFSET
)
==
PCCH
)
{
LOG_T
(
RRC
,
"[eNB %d] Frame %d PCCH request (Srb_id %d)
\n
"
,
Mod_idP
,
frameP
,
Srb_id
);
// check if data is there for MAC
if
(
Srb_info
->
Tx_buffer
.
payload_size
>
0
)
{
//Fill buffer
LOG_D
(
RRC
,
"[eNB %d] CCCH (%p) has %d bytes (dest: %p, src %p)
\n
"
,
Mod_idP
,
Srb_info
,
Srb_info
->
Tx_buffer
.
payload_size
,
buffer_pP
,
Srb_info
->
Tx_buffer
.
Payload
);
#if 0 // defined(ENABLE_ITTI)
{
MessageDef *message_p;
int ccch_size = Srb_info->Tx_buffer.payload_size;
int sdu_size = sizeof(RRC_MAC_CCCH_DATA_REQ (message_p).sdu);
// check if data is there for MAC
if
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_paging
[
mbsfn_sync_area
]
>
0
)
{
//Fill buffer
LOG_D
(
RRC
,
"[eNB %d] PCCH (%p) has %d bytes
\n
"
,
Mod_idP
,
&
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
paging
[
mbsfn_sync_area
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_paging
[
mbsfn_sync_area
]);
memcpy
(
buffer_pP
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
paging
[
mbsfn_sync_area
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_paging
[
mbsfn_sync_area
]);
Sdu_size
=
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_paging
[
mbsfn_sync_area
];
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_paging
[
mbsfn_sync_area
]
=
0
;
}
#endif
memcpy
(
buffer_pP
,
Srb_info
->
Tx_buffer
.
Payload
,
Srb_info
->
Tx_buffer
.
payload_size
);
Sdu_size
=
Srb_info
->
Tx_buffer
.
payload_size
;
Srb_info
->
Tx_buffer
.
payload_size
=
0
;
}
return
(
Sdu_size
);
}
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if
((
Srb_id
&
RAB_OFFSET
)
==
MCCH
)
{
...
...
@@ -202,14 +186,21 @@ mac_rrc_data_req(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
MCCH_MESSAGE
[
mbsfn_sync_area
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_MCCH_MESSAGE
[
mbsfn_sync_area
]);
#ifdef DEBUG_RRC
LOG_D
(
RRC
,
"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE
\n
"
,
Mod_idP
,
frameP
);
LOG_D
(
RRC
,
"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE
\n
"
,
Mod_idP
,
frameP
);
for
(
i
=
0
;
i
<
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_MCCH_MESSAGE
[
mbsfn_sync_area
];
i
++
)
{
LOG_T
(
RRC
,
"%x."
,
buffer_pP
[
i
]);
}
for
(
i
=
0
;
i
<
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_MCCH_MESSAGE
[
mbsfn_sync_area
];
i
++
)
{
LOG_T
(
RRC
,
"%x."
,
buffer_pP
[
i
]);
}
LOG_T
(
RRC
,
"
\n
"
);
#endif
return
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_MCCH_MESSAGE
[
mbsfn_sync_area
]);
// }
//else
//return(0);
}
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
...
...
@@ -227,21 +218,9 @@ mac_rrc_data_req(
return
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB23_BR
);
}
if
((
Srb_id
&
RAB_OFFSET
)
==
BCCH_SIB1_BR
)
{
memcpy
(
&
buffer_pP
[
0
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
SIB1_BR
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB1_BR
);
return
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB1_BR
);
}
#endif
if
((
Srb_id
&
RAB_OFFSET
)
==
BCCH_SI_BR
)
{
// First SI message with SIB2/3
memcpy
(
&
buffer_pP
[
0
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
SIB23_BR
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB23_BR
);
return
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB23_BR
);
}
#endif
return
(
0
);
}
...
...
openair2/RRC/NR/L2_nr_interface.c
View file @
3367cc93
#include "platform_types.h"
#include "rrc_defs.h"
#include "rrc_extern.h"
#include "
UTIL
/LOG/log.h"
#include "
common/utils
/LOG/log.h"
#include "pdcp.h"
#include "msc.h"
#include "common/ran_context.h"
...
...
@@ -10,6 +10,9 @@
# include "intertask_interface.h"
#endif
#include "NR_MIB.h"
#include "NR_BCCH-BCH-Message.h"
extern
RAN_CONTEXT_t
RC
;
int8_t
mac_rrc_nr_data_req
(
const
module_id_t
Mod_idP
,
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
3367cc93
...
...
@@ -35,7 +35,7 @@
#include <string.h>
/* for strerror(3) */
#include <sysexits.h>
/* for EX_* exit codes */
#include <errno.h>
/* for errno */
#include "
UTIL
/LOG/log.h"
#include "
common/utils
/LOG/log.h"
#include <asn_application.h>
#include <asn_internal.h>
/* for _ASN_DEFAULT_STACK_MAX */
#include <per_encoder.h>
...
...
@@ -45,6 +45,29 @@
#include "RRC/NR/nr_rrc_extern.h"
#if defined(NR_Rel15)
#include "NR_SCS-SpecificCarrier.h"
#include "NR_TDD-UL-DL-ConfigCommon.h"
#include "NR_FrequencyInfoUL.h"
#include "NR_FrequencyInfoDL.h"
#include "NR_RACH-ConfigGeneric.h"
#include "NR_RACH-ConfigCommon.h"
#include "NR_PUSCH-TimeDomainResourceAllocation.h"
#include "NR_PUSCH-ConfigCommon.h"
#include "NR_PUCCH-ConfigCommon.h"
#include "NR_PDSCH-TimeDomainResourceAllocation.h"
#include "NR_PDSCH-ConfigCommon.h"
#include "NR_RateMatchPattern.h"
#include "NR_RateMatchPatternLTE-CRS.h"
#include "NR_SearchSpace.h"
#include "NR_ControlResourceSet.h"
#include "NR_EUTRA-MBSFN-SubframeConfig.h"
#include "NR_BWP-DownlinkCommon.h"
#include "NR_BWP-DownlinkDedicated.h"
#include "NR_UplinkConfigCommon.h"
#include "NR_SetupRelease.h"
#include "NR_PDCCH-ConfigCommon.h"
#include "NR_BWP-UplinkCommon.h"
#include "assertions.h"
//#include "RRCConnectionRequest.h"
//#include "UL-CCCH-Message.h"
...
...
openair2/RRC/NR/nr_rrc_common.c
View file @
3367cc93
...
...
@@ -35,10 +35,10 @@
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "LAYER2/RLC/rlc.h"
#include "COMMON/mac_rrc_primitives.h"
#include "
UTIL
/LOG/log.h"
#include "
common/utils
/LOG/log.h"
#include "asn1_msg.h"
#include "pdcp.h"
#include "
UTIL
/LOG/vcd_signal_dumper.h"
#include "
common/utils
/LOG/vcd_signal_dumper.h"
#include "rrc_eNB_UE_context.h"
#include "common/ran_context.h"
...
...
@@ -95,4 +95,4 @@ rrc_config_nr_buffer(
}
//-----------------------------------------------------------------------------
\ No newline at end of file
//-----------------------------------------------------------------------------
openair2/RRC/NR/rrc_gNB.c
View file @
3367cc93
...
...
@@ -39,7 +39,7 @@
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "LAYER2/RLC/rlc.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "
UTIL
/LOG/log.h"
#include "
common/utils
/LOG/log.h"
#include "COMMON/mac_rrc_primitives.h"
#include "RRC/NR/MESSAGES/asn1_msg.h"
...
...
@@ -54,7 +54,7 @@
#include "rrc_eNB_UE_context.h"
#include "platform_types.h"
#include "msc.h"
#include "
UTIL
/LOG/vcd_signal_dumper.h"
#include "
common/utils
/LOG/vcd_signal_dumper.h"
#include "T.h"
...
...
targets/RT/USER/lte-ru.c
View file @
3367cc93
...
...
@@ -2445,16 +2445,16 @@ void configure_rru(int idx,
RRU_config_t
*
config
=
(
RRU_config_t
*
)
arg
;
RU_t
*
ru
=
RC
.
ru
[
idx
];
ru
->
frame_parms
.
eutra_band
=
config
->
band_list
[
0
];
ru
->
frame_parms
.
dl_CarrierFreq
=
config
->
tx_freq
[
0
];
ru
->
frame_parms
.
ul_CarrierFreq
=
config
->
rx_freq
[
0
];
if
(
ru
->
frame_parms
.
dl_CarrierFreq
==
ru
->
frame_parms
.
ul_CarrierFreq
)
{
ru
->
frame_parms
->
eutra_band
=
config
->
band_list
[
0
];
ru
->
frame_parms
->
dl_CarrierFreq
=
config
->
tx_freq
[
0
];
ru
->
frame_parms
->
ul_CarrierFreq
=
config
->
rx_freq
[
0
];
if
(
ru
->
frame_parms
->
dl_CarrierFreq
==
ru
->
frame_parms
->
ul_CarrierFreq
)
{
LOG_I
(
PHY
,
"Setting RRU to TDD frame type
\n
"
);
ru
->
frame_parms
.
frame_type
=
TDD
;
ru
->
frame_parms
.
tdd_config
=
config
->
tdd_config
[
0
];
ru
->
frame_parms
.
tdd_config_S
=
config
->
tdd_config_S
[
0
];
ru
->
frame_parms
->
frame_type
=
TDD
;
ru
->
frame_parms
->
tdd_config
=
config
->
tdd_config
[
0
];
ru
->
frame_parms
->
tdd_config_S
=
config
->
tdd_config_S
[
0
];
}
else
ru
->
frame_parms
.
frame_type
=
FDD
;
else
ru
->
frame_parms
->
frame_type
=
FDD
;
ru
->
att_tx
=
config
->
att_tx
[
0
];
ru
->
att_rx
=
config
->
att_rx
[
0
];
ru
->
frame_parms
->
N_RB_DL
=
config
->
N_RB_DL
[
0
];
...
...
@@ -2462,13 +2462,13 @@ void configure_rru(int idx,
ru
->
frame_parms
->
threequarter_fs
=
config
->
threequarter_fs
[
0
];
ru
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
=
ru
->
max_pdschReferenceSignalPower
-
config
->
att_tx
[
0
];
if
(
ru
->
function
==
NGFI_RRU_IF4p5
)
{
ru
->
frame_parms
.
att_rx
=
ru
->
att_rx
;
ru
->
frame_parms
.
att_tx
=
ru
->
att_tx
;
ru
->
frame_parms
->
att_rx
=
ru
->
att_rx
;
ru
->
frame_parms
->
att_tx
=
ru
->
att_tx
;
LOG_I
(
PHY
,
"Setting ru->function to NGFI_RRU_IF4p5, prach_FrequOffset %d, prach_ConfigIndex %d, att (%d,%d)
\n
"
,
config
->
prach_FreqOffset
[
0
],
config
->
prach_ConfigIndex
[
0
],
ru
->
att_tx
,
ru
->
att_rx
);
ru
->
frame_parms
.
prach_config_common
.
prach_ConfigInfo
.
prach_FreqOffset
=
config
->
prach_FreqOffset
[
0
];
ru
->
frame_parms
.
prach_config_common
.
prach_ConfigInfo
.
prach_ConfigIndex
=
config
->
prach_ConfigIndex
[
0
];
ru
->
frame_parms
->
prach_config_common
.
prach_ConfigInfo
.
prach_FreqOffset
=
config
->
prach_FreqOffset
[
0
];
ru
->
frame_parms
->
prach_config_common
.
prach_ConfigInfo
.
prach_ConfigIndex
=
config
->
prach_ConfigIndex
[
0
];
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
ru
->
frame_parms
->
prach_emtc_config_common
.
prach_ConfigInfo
.
prach_CElevel_enable
[
i
]
=
config
->
emtc_prach_CElevel_enable
[
0
][
i
];
...
...
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