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
ZhouShuya
OpenXG-RAN
Commits
57066055
Commit
57066055
authored
Jul 10, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop-nr' of
https://gitlab.eurecom.fr/oai/openairinterface5g
into develop-nr
parents
b0b11a92
1f439ef2
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
76 additions
and
69 deletions
+76
-69
.gitignore
.gitignore
+4
-0
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+13
-1
openair2/LAYER2/NR_MAC_UE/defs.h
openair2/LAYER2/NR_MAC_UE/defs.h
+12
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+30
-8
openair2/LAYER2/NR_MAC_UE/proto.h
openair2/LAYER2/NR_MAC_UE/proto.h
+2
-4
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+12
-36
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
+2
-17
openair2/RRC/NR_UE/L2_interface_ue.c
openair2/RRC/NR_UE/L2_interface_ue.c
+0
-1
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+1
-2
No files found.
.gitignore
0 → 100644
View file @
57066055
cmake_targets/log/
cmake_targets/ran_build/
targets/bin/
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
57066055
...
...
@@ -370,12 +370,17 @@ typedef struct {
}
fapi_nr_pucch_config_common_t
;
typedef
struct
{
uint8_t
subcarrier_spacing_common
;
uint8_t
ssb_subcarrier_offset
;
uint8_t
dmrs_type_a_position
;
uint8_t
pdcch_config_sib1
;
uint8_t
cell_barred
;
uint8_t
intra_frquency_reselection
;
uint16_t
system_frame_number
;
uint8_t
ssb_index
;
uint8_t
half_frame_bit
;
}
fapi_nr_pbch_config_t
;
typedef
struct
{
...
...
@@ -716,11 +721,18 @@ typedef struct {
}
fapi_nr_ul_bwp_dedicated_config_t
;
#define FAPI_NR_CONFIG_REQUEST_MASK_PBCH 0x01
#define FAPI_NR_CONFIG_REQUEST_MASK_DL_BWP_COMMON 0x02
#define FAPI_NR_CONFIG_REQUEST_MASK_UL_BWP_COMMON 0x04
#define FAPI_NR_CONFIG_REQUEST_MASK_DL_BWP_DEDICATED 0x08
#define FAPI_NR_CONFIG_REQUEST_MASK_UL_BWP_DEDICATED 0x10
typedef
struct
{
fapi_nr_p4_p5_message_header_t
header
;
uint8_t
num_tlv
;
uint32_t
config_mask
;
fapi_nr_pbch_config_t
pbch_config
_common
;
// MIB
fapi_nr_pbch_config_t
pbch_config
;
// MIB
fapi_nr_dl_bwp_common_config_t
dl_bwp_common
;
fapi_nr_dl_bwp_dedicated_config_t
dl_bwp_dedicated
;
...
...
openair2/LAYER2/NR_MAC_UE/defs.h
View file @
57066055
...
...
@@ -58,6 +58,8 @@
#include "NR_SpCellConfig.h"
#include "NR_ServingCellConfig.h"
#include "fapi_nr_ue_interface.h"
#include "NR_IF_Module.h"
#define NB_NR_UE_MAC_INST 1
...
...
@@ -75,6 +77,16 @@ typedef struct {
NR_MIB_t
*
mib
;
//// FAPI-like interface
fapi_nr_tx_request_t
tx_request
;
fapi_nr_ul_config_request_t
ul_config_request
;
fapi_nr_dl_config_request_t
dl_config_request
;
fapi_nr_dci_indication_t
dci_indication
;
fapi_nr_rx_indication_t
rx_indication
;
nr_ue_if_module_t
*
if_module
;
nr_scheduled_response_t
scheduled_response
;
nr_phy_config_t
phy_config
;
}
NR_UE_MAC_INST_t
;
/*@}*/
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
57066055
...
...
@@ -37,31 +37,53 @@ int8_t nr_ue_decode_mib(
uint8_t
gNB_index
,
uint8_t
extra_bits
,
// 8bits 38.212 c7.1.1
uint32_t
l_ssb_equal_64
,
uint32_t
*
ssb_index
,
// from decoded MIB
uint32_t
*
frameP
,
// 10 bits = 6(in decoded MIB)+4(in extra bits from L1)
//
uint32_t *ssb_index, // from decoded MIB
//
uint32_t *frameP, // 10 bits = 6(in decoded MIB)+4(in extra bits from L1)
void
*
pduP
,
// encoded MIB
uint16_t
pdu_len
){
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
nr_mac_rrc_data_ind_ue
(
module_id
,
CC_id
,
gNB_index
,
frameP
,
nr_mac_rrc_data_ind_ue
(
module_id
,
CC_id
,
gNB_index
,
NR_BCCH_BCH
,
(
uint8_t
*
)
pduP
,
pdu_len
);
uint32_t
frame
=
mac
->
mib
->
systemFrameNumber
.
buf
[
0
];
uint32_t
frame_number_4lsb
=
(
uint32_t
)(
extra_bits
&
0xf
);
uint32_t
ssb_subcarrier_offset_msb
=
(
uint32_t
)((
extra_bits
>>
4
)
&
0x1
);
uint32_t
frame_number_4lsb
=
(
uint32_t
)(
extra_bits
&
0xf
);
// extra bits[0:3]
uint32_t
half_frame_bit
=
(
uint32_t
)((
extra_bits
>>
4
)
&
0x1
);
// extra bits[4]
uint32_t
ssb_subcarrier_offset_msb
=
(
uint32_t
)((
extra_bits
>>
5
)
&
0x1
);
// extra bits[5]
uint32_t
ssb_subcarrier_offset
=
mac
->
mib
->
subCarrierSpacingCommon
;
uint32_t
ssb_index
;
frame
=
frame
<<
4
;
frame
=
frame
|
frame_number_4lsb
;
*
frameP
=
frame
;
if
(
l_ssb_equal_64
){
*
ssb_index
=
((
extra_bits
>>
4
)
&
0x7
);
ssb_index
=
((
extra_bits
>>
5
)
&
0x7
);
// extra bits[5:7]
mac
->
phy_config
.
config_req
.
pbch_config
.
ssb_index
=
ssb_index
;
}
else
{
if
(
ssb_subcarrier_offset_msb
){
ssb_subcarrier_offset
=
ssb_subcarrier_offset
|
0x10
;
}
}
// fill in the elements in config request inside P5 message
mac
->
phy_config
.
config_req
.
pbch_config
.
system_frame_number
=
frame
;
// after calculation
mac
->
phy_config
.
config_req
.
pbch_config
.
subcarrier_spacing_common
=
mac
->
mib
->
subCarrierSpacingCommon
;
mac
->
phy_config
.
config_req
.
pbch_config
.
ssb_subcarrier_offset
=
ssb_subcarrier_offset
;
// after calculation
mac
->
phy_config
.
config_req
.
pbch_config
.
dmrs_type_a_position
=
mac
->
mib
->
dmrs_TypeA_Position
;
mac
->
phy_config
.
config_req
.
pbch_config
.
pdcch_config_sib1
=
mac
->
mib
->
pdcch_ConfigSIB1
;
mac
->
phy_config
.
config_req
.
pbch_config
.
cell_barred
=
mac
->
mib
->
cellBarred
;
mac
->
phy_config
.
config_req
.
pbch_config
.
intra_frquency_reselection
=
mac
->
mib
->
intraFreqReselection
;
mac
->
phy_config
.
config_req
.
pbch_config
.
half_frame_bit
=
half_frame_bit
;
mac
->
phy_config
.
config_req
.
config_mask
|=
FAPI_NR_CONFIG_REQUEST_MASK_PBCH
;
if
(
mac
->
if_module
!=
NULL
&&
mac
->
if_module
->
phy_config_request
!=
NULL
){
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
}
return
0
;
}
openair2/LAYER2/NR_MAC_UE/proto.h
View file @
57066055
...
...
@@ -36,12 +36,10 @@
\param CC_id component carrier id
\param gNB_index gNB index
\param extra_bits extra bits for frame calculation
\param l_ssb_equal_64 check if ssb number of candicate is equal 64, 1=equal; 0=non equal. Reference 38.212 c7.1.1
\param ssb_index SSB index for frame calculation
\param frameP pointer to frame for revising after frame calculation
\param l_ssb_equal_64 check if ssb number of candicate is equal 64, 1=equal; 0=non equal. Reference 38.212 7.1.1
\param pduP pointer to pdu
\param pdu_length length of pdu*/
int8_t
nr_ue_decode_mib
(
module_id_t
module_id
,
int
CC_id
,
uint8_t
gNB_index
,
uint8_t
extra_bits
,
uint32_t
l_ssb_equal_64
,
uint32_t
*
ssb_index
,
uint32_t
*
frameP
,
void
*
pduP
,
uint16_t
pdu_len
);
int8_t
nr_ue_decode_mib
(
module_id_t
module_id
,
int
CC_id
,
uint8_t
gNB_index
,
uint8_t
extra_bits
,
uint32_t
l_ssb_equal_64
,
void
*
pduP
,
uint16_t
pdu_len
);
/**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config)
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
57066055
...
...
@@ -44,19 +44,16 @@ int8_t handle_bcch_bch(uint32_t pdu_len, uint8_t *pduP){
// pdu_len = 4, 32bits
uint8_t
extra_bits
=
pduP
[
3
];
uint32_t
ssb_index
;
uint32_t
frame
;
nr_ue_decode_mib
(
(
module_id_t
)
0
,
0
,
0
,
extra_bits
,
0
,
// Lssb = 64 is not support
&
ssb_index
,
&
frame
,
pduP
,
3
);
return
0
;
}
...
...
@@ -66,6 +63,12 @@ int8_t handle_bcch_dlsch(uint32_t pdu_len, uint8_t *pduP){
}
int8_t
nr_ue_dl_indication
(
nr_downlink_indication_t
*
dl_info
){
module_id_t
module_id
=
dl_info
->
module_id
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
// clean up scheduled_response structure
if
(
dl_info
->
rx_ind
!=
NULL
){
switch
(
dl_info
->
rx_ind
->
rx_request_body
.
pdu_index
){
case
FAPI_NR_RX_PDU_BCCH_BCH_TYPE
:
...
...
@@ -84,10 +87,13 @@ int8_t nr_ue_dl_indication(nr_downlink_indication_t *dl_info){
}
return
0
;
}
if
(
nr_ue_if_module_inst
[
module_id
]
!=
NULL
){
nr_ue_if_module_inst
[
module_id
]
->
scheduled_response
(
&
mac
->
scheduled_response
);
}
return
0
;
}
nr_ue_if_module_t
*
nr_ue_if_module_init
(
uint32_t
module_id
){
...
...
@@ -102,36 +108,6 @@ nr_ue_if_module_t *nr_ue_if_module_init(uint32_t module_id){
return
nr_ue_if_module_inst
[
module_id
];
}
int8_t
nr_ue_if_module_register_dl_indication
(
uint32_t
module_id
,
nr_ue_dl_indication_f
*
f
){
if
(
nr_ue_if_module_inst
[
module_id
]
==
NULL
)
{
nr_ue_if_module_inst
[
module_id
]
->
dl_indication
=
f
;
}
else
{
return
-
1
;
}
return
0
;
}
int8_t
nr_ue_if_module_register_phy_config_request
(
uint32_t
module_id
,
nr_ue_phy_config_request_f
*
f
){
if
(
nr_ue_if_module_inst
[
module_id
]
==
NULL
)
{
nr_ue_if_module_inst
[
module_id
]
->
phy_config_request
=
f
;
}
else
{
return
-
1
;
}
return
0
;
}
int8_t
nr_ue_if_module_register_scheduled_response
(
uint32_t
module_id
,
nr_ue_scheduled_response_f
*
f
){
if
(
nr_ue_if_module_inst
[
module_id
]
==
NULL
)
{
nr_ue_if_module_inst
[
module_id
]
->
scheduled_response
=
f
;
}
else
{
return
-
1
;
}
return
0
;
}
int8_t
nr_ue_if_module_kill
(
uint32_t
module_id
)
{
if
(
nr_ue_if_module_inst
[
module_id
]
!=
NULL
){
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
View file @
57066055
...
...
@@ -91,7 +91,7 @@ typedef struct {
/// NR UE FAPI-like P5 message
/// physical layer configuration request structure
fapi_nr_config_request_t
*
config_req
;
fapi_nr_config_request_t
config_req
;
}
nr_phy_config_t
;
...
...
@@ -127,7 +127,7 @@ typedef int8_t(nr_ue_dl_indication_f)(nr_downlink_indication_t *dl_info);
// TODO check this stuff can be reuse of need modification
typedef
struct
IF_M
odule_s
{
typedef
struct
nr_ue_if_m
odule_s
{
nr_ue_scheduled_response_f
*
scheduled_response
;
nr_ue_phy_config_request_f
*
phy_config_request
;
nr_ue_dl_indication_f
*
dl_indication
;
...
...
@@ -154,21 +154,6 @@ int8_t nr_ue_if_module_kill(uint32_t module_id);
int8_t
nr_ue_dl_indication
(
nr_downlink_indication_t
*
dl_info
);
/**\brief register dl_indication into certain if_module_inst by module_id
\param f function pointer to dl_indication*/
int8_t
nr_ue_if_module_register_dl_indication
(
uint32_t
module_id
,
nr_ue_dl_indication_f
*
f
);
/**\brief register phy_config_request into certain if_module_inst by module_id
\param f function pointer to phy_config_request*/
int8_t
nr_ue_if_module_register_phy_config_request
(
uint32_t
module_id
,
nr_ue_phy_config_request_f
*
f
);
/**\brief register scheduled_response into certain if_module_inst by module_id
\param f function pointer to scheduled_response*/
int8_t
nr_ue_if_module_register_scheduled_response
(
uint32_t
module_id
,
nr_ue_scheduled_response_f
*
f
);
/**\brief handle BCCH-BCH message from dl_indication
\param pdu_len length(bytes) of pdu
\param pduP pointer to pdu*/
...
...
openair2/RRC/NR_UE/L2_interface_ue.c
View file @
57066055
...
...
@@ -38,7 +38,6 @@ nr_mac_rrc_data_ind_ue(
const
module_id_t
module_id
,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
uint32_t
*
frameP
,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
){
...
...
openair2/RRC/NR_UE/rrc_proto.h
View file @
57066055
...
...
@@ -97,11 +97,10 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(const module_id_t module_id, const ui
\param module_id module id
\param CC_id component carrier id
\param gNB_index gNB index
\param frameP pointer to frame for calculation
\param channel indicator for channel of the pdu
\param pduP pointer to pdu
\param pdu_len data length of pdu*/
int8_t
nr_mac_rrc_data_ind_ue
(
const
module_id_t
module_id
,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
uint32_t
*
frameP
,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
);
int8_t
nr_mac_rrc_data_ind_ue
(
const
module_id_t
module_id
,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
);
/** @}*/
#endif
\ No newline at end of file
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