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
9b6c2ca4
Commit
9b6c2ca4
authored
Jun 27, 2018
by
WEI-TAI CHEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init NR MAC instance
parent
7c770135
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
38 deletions
+40
-38
common/ran_context.h
common/ran_context.h
+2
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+35
-36
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+1
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+2
-1
No files found.
common/ran_context.h
View file @
9b6c2ca4
...
...
@@ -73,6 +73,8 @@ typedef struct {
int
nb_nr_macrlc_inst
;
/// Number of component carriers per instance in this node
int
*
nb_mac_CC
;
/// Number of component carriers per instance in this node
int
*
nb_nr_mac_CC
;
/// Number of L1 instances in this node
int
nb_L1_inst
;
/// Number of NB_IoT L1 instances in this node
...
...
openair2/GNB_APP/gnb_config.c
View file @
9b6c2ca4
...
...
@@ -346,57 +346,56 @@ void RCconfig_nr_macrlc() {
if
(
MacRLC_ParamList
.
numelt
>
0
)
{
RC
.
nb_macrlc_inst
=
MacRLC_ParamList
.
numelt
;
mac_top_init_
e
NB
();
RC
.
nb_
mac_CC
=
(
int
*
)
malloc
(
RC
.
nb
_macrlc_inst
*
sizeof
(
int
));
RC
.
nb_
nr_
macrlc_inst
=
MacRLC_ParamList
.
numelt
;
mac_top_init_
g
NB
();
RC
.
nb_
nr_mac_CC
=
(
int
*
)
malloc
(
RC
.
nb_nr
_macrlc_inst
*
sizeof
(
int
));
for
(
j
=
0
;
j
<
RC
.
nb_macrlc_inst
;
j
++
)
{
RC
.
nb_mac_CC
[
j
]
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_CC_IDX
].
iptr
);
//RC.mac[j]->phy_test = *(MacRLC_ParamList.paramarray[j][MACRLC_PHY_TEST_IDX].iptr);
//printf("PHY_TEST = %d,%d\n", RC.mac[j]->phy_test, j);
for
(
j
=
0
;
j
<
RC
.
nb_
nr_
macrlc_inst
;
j
++
)
{
RC
.
nb_
nr_
mac_CC
[
j
]
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_CC_IDX
].
iptr
);
//RC.
nr
mac[j]->phy_test = *(MacRLC_ParamList.paramarray[j][MACRLC_PHY_TEST_IDX].iptr);
//printf("PHY_TEST = %d,%d\n", RC.
nr
mac[j]->phy_test, j);
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"local_RRC"
)
==
0
)
{
// check number of instances is same as RRC/PDCP
}
else
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"cudu"
)
==
0
)
{
RC
.
mac
[
j
]
->
eth_params_n
.
local_if_name
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_N_IF_NAME_IDX
].
strptr
));
RC
.
mac
[
j
]
->
eth_params_n
.
my_addr
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_N_ADDRESS_IDX
].
strptr
));
RC
.
mac
[
j
]
->
eth_params_n
.
remote_addr
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_N_ADDRESS_IDX
].
strptr
));
RC
.
mac
[
j
]
->
eth_params_n
.
my_portc
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_N_PORTC_IDX
].
iptr
);
RC
.
mac
[
j
]
->
eth_params_n
.
remote_portc
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_N_PORTC_IDX
].
iptr
);
RC
.
mac
[
j
]
->
eth_params_n
.
my_portd
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_N_PORTD_IDX
].
iptr
);
RC
.
mac
[
j
]
->
eth_params_n
.
remote_portd
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_N_PORTD_IDX
].
iptr
);;
RC
.
mac
[
j
]
->
eth_params_n
.
transp_preference
=
ETH_UDP_MODE
;
}
else
{
// other midhaul
}
else
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"cudu"
)
==
0
)
{
RC
.
nr
mac
[
j
]
->
eth_params_n
.
local_if_name
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_N_IF_NAME_IDX
].
strptr
));
RC
.
nr
mac
[
j
]
->
eth_params_n
.
my_addr
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_N_ADDRESS_IDX
].
strptr
));
RC
.
nr
mac
[
j
]
->
eth_params_n
.
remote_addr
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_N_ADDRESS_IDX
].
strptr
));
RC
.
nr
mac
[
j
]
->
eth_params_n
.
my_portc
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_N_PORTC_IDX
].
iptr
);
RC
.
nr
mac
[
j
]
->
eth_params_n
.
remote_portc
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_N_PORTC_IDX
].
iptr
);
RC
.
nr
mac
[
j
]
->
eth_params_n
.
my_portd
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_N_PORTD_IDX
].
iptr
);
RC
.
nr
mac
[
j
]
->
eth_params_n
.
remote_portd
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_N_PORTD_IDX
].
iptr
);;
RC
.
nr
mac
[
j
]
->
eth_params_n
.
transp_preference
=
ETH_UDP_MODE
;
}
else
{
// other midhaul
AssertFatal
(
1
==
0
,
"MACRLC %d: %s unknown northbound midhaul
\n
"
,
j
,
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
));
}
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_S_PREFERENCE_IDX
].
strptr
),
"local_L1"
)
==
0
)
{
}
else
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_S_PREFERENCE_IDX
].
strptr
),
"nfapi"
)
==
0
)
{
RC
.
mac
[
j
]
->
eth_params_s
.
local_if_name
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_IF_NAME_IDX
].
strptr
));
RC
.
mac
[
j
]
->
eth_params_s
.
my_addr
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_ADDRESS_IDX
].
strptr
));
RC
.
mac
[
j
]
->
eth_params_s
.
remote_addr
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_S_ADDRESS_IDX
].
strptr
));
RC
.
mac
[
j
]
->
eth_params_s
.
my_portc
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_PORTC_IDX
].
iptr
);
RC
.
mac
[
j
]
->
eth_params_s
.
remote_portc
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_S_PORTC_IDX
].
iptr
);
RC
.
mac
[
j
]
->
eth_params_s
.
my_portd
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_PORTD_IDX
].
iptr
);
RC
.
mac
[
j
]
->
eth_params_s
.
remote_portd
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_S_PORTD_IDX
].
iptr
);
RC
.
mac
[
j
]
->
eth_params_s
.
transp_preference
=
ETH_UDP_MODE
;
}
else
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_S_PREFERENCE_IDX
].
strptr
),
"nfapi"
)
==
0
)
{
RC
.
nrmac
[
j
]
->
eth_params_s
.
local_if_name
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_IF_NAME_IDX
].
strptr
));
RC
.
nrmac
[
j
]
->
eth_params_s
.
my_addr
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_ADDRESS_IDX
].
strptr
));
RC
.
nrmac
[
j
]
->
eth_params_s
.
remote_addr
=
strdup
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_S_ADDRESS_IDX
].
strptr
));
RC
.
nrmac
[
j
]
->
eth_params_s
.
my_portc
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_PORTC_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
eth_params_s
.
remote_portc
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_S_PORTC_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
eth_params_s
.
my_portd
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_LOCAL_S_PORTD_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
eth_params_s
.
remote_portd
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_REMOTE_S_PORTD_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
eth_params_s
.
transp_preference
=
ETH_UDP_MODE
;
sf_ahead
=
2
;
// Cannot cope with 4 subframes betweem RX and TX - set it to 2
printf
(
"**************** vnf_port:%d
\n
"
,
RC
.
mac
[
j
]
->
eth_params_s
.
my_portc
);
configure_nfapi_vnf
(
RC
.
mac
[
j
]
->
eth_params_s
.
my_addr
,
RC
.
mac
[
j
]
->
eth_params_s
.
my_portc
);
printf
(
"**************** RETURNED FROM configure_nfapi_vnf() vnf_port:%d
\n
"
,
RC
.
mac
[
j
]
->
eth_params_s
.
my_portc
);
}
else
{
// other midhaul
configure_nfapi_vnf
(
RC
.
nrmac
[
j
]
->
eth_params_s
.
my_addr
,
RC
.
nr
mac
[
j
]
->
eth_params_s
.
my_portc
);
printf
(
"**************** RETURNED FROM configure_nfapi_vnf() vnf_port:%d
\n
"
,
RC
.
nr
mac
[
j
]
->
eth_params_s
.
my_portc
);
}
else
{
// other midhaul
AssertFatal
(
1
==
0
,
"MACRLC %d: %s unknown southbound midhaul
\n
"
,
j
,
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_S_PREFERENCE_IDX
].
strptr
));
}
}
// j=0..num_inst
}
else
{
// MacRLC_ParamList.numelt > 0
AssertFatal
(
0
,
"No "
CONFIG_STRING_MACRLC_LIST
" configuration found"
);
}
// for (j=0;j<RC.nb_nr_macrlc_inst;j++)
}
else
{
// MacRLC_ParamList.numelt > 0
AssertFatal
(
0
,
"No "
CONFIG_STRING_MACRLC_LIST
" configuration found"
);
}
}
int
RCconfig_NRRRC
(
MessageDef
*
msg_p
,
uint32_t
i
,
gNB_RRC_INST
*
rrc
)
{
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
9b6c2ca4
...
...
@@ -292,7 +292,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
(
*
servingcellconfigcommon
)
->
physCellId
=
CALLOC
(
1
,
sizeof
(
NR_PhysCellId_t
));
(
*
servingcellconfigcommon
)
->
frequencyInfoDL
=
CALLOC
(
1
,
sizeof
(
struct
NR_FrequencyInfoDL
));
(
*
servingcellconfigcommon
)
->
initialDownlinkBWP
=
CALLOC
(
1
,
sizeof
(
struct
NR_BWP_DownlinkCommon
));
(
*
servingcellconfigcommon
)
->
uplinkConfigCommon
=
CALLOC
(
1
,
sizeof
(
struct
NR_UplinkConfigCommon
_t
));
(
*
servingcellconfigcommon
)
->
uplinkConfigCommon
=
CALLOC
(
1
,
sizeof
(
struct
NR_UplinkConfigCommon
));
//(*servingcellconfigcommon)->supplementaryUplinkConfig = CALLOC(1,sizeof(struct NR_UplinkConfigCommon));
(
*
servingcellconfigcommon
)
->
ssb_PositionsInBurst
=
CALLOC
(
1
,
sizeof
(
struct
NR_ServingCellConfigCommon__ssb_PositionsInBurst
));
(
*
servingcellconfigcommon
)
->
ssb_periodicityServingCell
=
CALLOC
(
1
,
sizeof
(
long
));
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
9b6c2ca4
...
...
@@ -179,6 +179,7 @@ init_NR_SI(
#endif
);
LOG_I
(
NR_RRC
,
"Done init_NR_SI
\n
"
);
rrc_mac_config_req_gNB
(
ctxt_pP
->
module_id
,
...
...
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