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
75be22c4
Commit
75be22c4
authored
Oct 11, 2017
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First step of configuration between MAC and RRC
parent
b25fc90a
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
552 additions
and
700 deletions
+552
-700
openair2/LAYER2/MAC/config_NB_IoT.c
openair2/LAYER2/MAC/config_NB_IoT.c
+490
-170
openair2/LAYER2/MAC/extern_NB_IoT.h
openair2/LAYER2/MAC/extern_NB_IoT.h
+1
-1
openair2/LAYER2/MAC/main_NB_IoT.c
openair2/LAYER2/MAC/main_NB_IoT.c
+2
-2
openair2/LAYER2/MAC/output_handler_NB_IoT.c
openair2/LAYER2/MAC/output_handler_NB_IoT.c
+1
-1
openair2/LAYER2/MAC/proto_NB_IoT.h
openair2/LAYER2/MAC/proto_NB_IoT.h
+33
-6
openair2/RRC/LITE/L2_interface_NB_IoT.c
openair2/RRC/LITE/L2_interface_NB_IoT.c
+0
-486
openair2/RRC/LITE/extern_NB_IoT.h
openair2/RRC/LITE/extern_NB_IoT.h
+3
-0
openair2/RRC/LITE/rrc_eNB_NB_IoT.c
openair2/RRC/LITE/rrc_eNB_NB_IoT.c
+19
-34
openair2/RRC/LITE/vars_NB_IoT.h
openair2/RRC/LITE/vars_NB_IoT.h
+3
-0
No files found.
openair2/LAYER2/MAC/config_NB_IoT.c
View file @
75be22c4
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/extern_NB_IoT.h
View file @
75be22c4
...
...
@@ -24,7 +24,7 @@
#include "openair2/PHY_INTERFACE/defs_NB_IoT.h"
//#include "RRC/LITE/defs_NB_IoT.h"
#include "LAYER2/MAC/def
s_NB_IoT.h"
//#include "LAYER2/MAC/var
s_NB_IoT.h"
//NB-IoT
extern
IF_Module_t
*
if_inst
;
...
...
openair2/LAYER2/MAC/main_NB_IoT.c
View file @
75be22c4
...
...
@@ -51,7 +51,7 @@ void init_mac_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst)
mac_inst
->
sib1_count
[
i
]
=
0
;
}
rrc_mac_config_req_NB_IoT
(
&
mac_inst
->
rrc_config
,
1
,
1
,
0
,
0
);
//
rrc_mac_config_req_NB_IoT(&mac_inst->rrc_config, 1, 1, 0, 0);
init_tool_sib1
(
mac_inst
);
// output handler
...
...
@@ -137,7 +137,7 @@ void init_mac_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst)
mac_inst
->
num_uss_list
=
NUM_USS_PP
;
for
(
i
=
0
;
i
<
NUM_USS_PP
;
++
i
)
{
rrc_mac_config_req_NB_IoT
(
&
mac_inst
->
rrc_config
,
0
,
0
,
1
,
i
);
//
rrc_mac_config_req_NB_IoT(&mac_inst->rrc_config, 0, 0, 1, i);
(
mac_inst
->
UE_list_spec
+
i
)
->
head
=
-
1
;
(
mac_inst
->
UE_list_spec
+
i
)
->
tail
=
-
1
;
(
mac_inst
->
UE_list_spec
+
i
)
->
NPDCCH_config_dedicated
.
R_max
=
mac_inst
->
rrc_config
.
npdcch_ConfigDedicated
[
i
].
R_max
;
...
...
openair2/LAYER2/MAC/output_handler_NB_IoT.c
View file @
75be22c4
...
...
@@ -232,7 +232,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
DCI_pdu
=
schedule_result_list_UL
->
DCI_pdu
;
// bug here
(
ul_config_pdu
+
i
)
->
nulsch_pdu
.
nulsch_pdu_rel13
.
nulsch_format
=
0
;
(
ul_config_pdu
+
i
)
->
nulsch_pdu
.
nulsch_pdu_rel13
.
size
=
UL_TBS_Table
[((
DCIFormatN0_t
*
)
DCI_pdu
)
->
mcs
][((
DCIFormatN0_t
*
)
DCI
)
->
ResAssign
];
(
ul_config_pdu
+
i
)
->
nulsch_pdu
.
nulsch_pdu_rel13
.
size
=
UL_TBS_Table
[((
DCIFormatN0_t
*
)
DCI_pdu
)
->
mcs
][((
DCIFormatN0_t
*
)
DCI
_pdu
)
->
ResAssign
];
//printf("test\n");
(
ul_config_pdu
+
i
)
->
nulsch_pdu
.
nulsch_pdu_rel13
.
rnti
=
schedule_result_list_UL
->
rnti
;
(
ul_config_pdu
+
i
)
->
nulsch_pdu
.
nulsch_pdu_rel13
.
subcarrier_indication
=
((
DCIFormatN0_t
*
)
DCI_pdu
)
->
scind
;
...
...
openair2/LAYER2/MAC/proto_NB_IoT.h
View file @
75be22c4
...
...
@@ -33,6 +33,7 @@
#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
#include "COMMON/platform_types.h"
#include "openair2/RRC/LITE/defs_NB_IoT.h"
/** \addtogroup _mac
* @{
*/
...
...
@@ -96,11 +97,37 @@ void convert_system_number(uint32_t source_sf,uint32_t *hyperSF, uint32_t *frame
uint32_t
convert_system_number_sf
(
uint32_t
hyperSF
,
uint32_t
frame
,
uint32_t
subframe
);
void
rrc_mac_config_req_NB_IoT
(
rrc_config_NB_IoT_t
*
mac_config
,
uint8_t
mib_flag
,
uint8_t
sib_flag
,
uint8_t
ded_flag
,
uint8_t
ue_list_ded_num
);
void
config_mib_fapi_NB_IoT
(
int
rntiP
,
int
physCellId
,
uint8_t
eutra_band
,
int
Ncp
,
int
Ncp_UL
,
int
p_eNB
,
int
p_rx_eNB
,
int
dl_CarrierFreq
,
int
ul_CarrierFreq
,
long
*
eutraControlRegionSize
,
BCCH_BCH_Message_NB_t
*
mib_NB_IoT
);
void
config_sib2_fapi_NB_IoT
(
int
physCellId
,
RadioResourceConfigCommonSIB_NB_r13_t
*
radioResourceConfigCommon
);
void
rrc_mac_config_req_NB_IoT
(
module_id_t
Mod_idP
,
int
CC_idP
,
int
rntiP
,
rrc_eNB_carrier_data_NB_IoT_t
*
carrier
,
SystemInformationBlockType1_NB_t
*
sib1_NB_IoT
,
RadioResourceConfigCommonSIB_NB_r13_t
*
radioResourceConfigCommon
,
PhysicalConfigDedicated_NB_r13_t
*
physicalConfigDedicated
,
LogicalChannelConfig_NB_r13_t
*
logicalChannelConfig
,
//FIXME: decide how to use it
rrc_config_NB_IoT_t
*
mac_config
,
uint8_t
ded_flag
,
uint8_t
ue_list_ded_num
);
// schedule helper functinons
...
...
@@ -125,7 +152,7 @@ void insert_schedule_result(schedule_result_t **list, int subframe, schedule_res
void
adjust_UL_resource_list
(
sched_temp_UL_NB_IoT_t
*
NPUSCH_info
);
void
generate_scheduling_result_UL
(
int32_t
DCI_subframe
,
int32_t
DCI_end_subframe
,
uint32_t
UL_subframe
,
uint32_t
UL_end_subframe
,
DCIFormatN0_t
*
DCI
,
rnti_t
rnti
,
uint8_t
*
ul_debug_str
,
uint8_t
*
dl_debug_str
);
void
generate_scheduling_result_UL
(
int32_t
DCI_subframe
,
int32_t
DCI_end_subframe
,
uint32_t
UL_subframe
,
uint32_t
UL_end_subframe
,
DCIFormatN0_t
*
DCI
_pdu
,
rnti_t
rnti
,
uint8_t
*
ul_debug_str
,
uint8_t
*
dl_debug_str
);
uint32_t
get_I_mcs_NB_IoT
(
int
CE_level
);
...
...
openair2/RRC/LITE/L2_interface_NB_IoT.c
View file @
75be22c4
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/extern_NB_IoT.h
View file @
75be22c4
...
...
@@ -37,8 +37,11 @@
//#include "LAYER2/MAC/extern.h"
#include "LAYER2/RLC/rlc.h"
#include "LogicalChannelConfig-NB-r13.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
extern
IF_Module_t
*
if_inst
;
extern
eNB_MAC_INST_NB_IoT
*
mac_inst
;
//MP: NOTE:XXX some of the parameters defined in vars_nb_iot are called by the extern.h file so not replicated here
...
...
openair2/RRC/LITE/rrc_eNB_NB_IoT.c
View file @
75be22c4
...
...
@@ -52,7 +52,7 @@
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "LAYER2/RLC/rlc.h"
//#include "LAYER2/MAC/proto.h"
//
#include "LAYER2/MAC/proto_NB_IoT.h"
#include "LAYER2/MAC/proto_NB_IoT.h"
#include "UTIL/LOG/log.h"
#include "COMMON/mac_rrc_primitives.h"
#include "rlc.h"
...
...
@@ -559,7 +559,7 @@ void rrc_eNB_generate_RRCConnectionSetup_NB_IoT(
//XXX: Maybe some problem if Connection Setup could be called also after security activation
//configure the MAC for SRB1bis/SRb1 (but in principle this configuration should be not LCID dependent)
rrc_mac_config_req_eNB_NB_IoT
(
/*
rrc_mac_config_req_eNB_NB_IoT(
ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
ue_context_pP->ue_context.rnti,
...
...
@@ -584,7 +584,7 @@ void rrc_eNB_generate_RRCConnectionSetup_NB_IoT(
ue_context_pP->ue_context.mac_MainConfig_NB_IoT, //XXX most probably is not needed since is only at UE side
DCCH0_NB_IoT, //LCID = 3 of SRB1bis
SRB1bis_logicalChannelConfig
);
);
*/
break
;
}
}
...
...
@@ -787,7 +787,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
}
//MP: for each DRB I send a rrc_mac_config_req--> what change is the DRB2LCHAN_NB_IoT and logicalChannelConfig_r13
rrc_mac_config_req_eNB_NB_IoT
(
/*
rrc_mac_config_req_eNB_NB_IoT(
ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
ue_context_pP->ue_context.rnti,
...
...
@@ -812,7 +812,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
ue_context_pP->ue_context.mac_MainConfig_NB_IoT,
DRB2LCHAN_NB_IoT[i], //over the logical channel id of the DRB (>=4)
DRB_configList2->list.array[i]->logicalChannelConfig_r13
);
);
*/
}
else
{
//ue_context_pP->ue_context.DRB_active[drb_id] == 1 (means that DRB has been modified)
...
...
@@ -831,7 +831,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
//MP: The only change w.r.t previous case is that we not put logicalChannelConfig
rrc_mac_config_req_eNB_NB_IoT
(
/*
rrc_mac_config_req_eNB_NB_IoT(
ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
ue_context_pP->ue_context.rnti,
...
...
@@ -856,7 +856,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
ue_context_pP->ue_context.mac_MainConfig_NB_IoT,
DRB2LCHAN_NB_IoT[i], //over the logical channel id of the DRB (>=4)
(LogicalChannelConfig_NB_r13_t*)NULL
);
);
*/
}
}
}
...
...
@@ -1709,33 +1709,18 @@ static void init_SI_NB_IoT(
PROTOCOL_RRC_CTXT_ARGS
(
ctxt_pP
));
//
rrc_mac_config_req_eNB_NB_IoT
(
ctxt_pP
->
module_id
,
CC_id
,
0
,
//rnti
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
physCellId
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
p_eNB
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
p_rx_eNB
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Ncp
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
Ncp_UL
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib1_NB_IoT
->
freqBandIndicator_r13
,
//eutra_band
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib1_NB_IoT
->
freqBandInfo_r13
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib1_NB_IoT
->
multiBandInfoList_r13
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib1_NB_IoT
->
downlinkBitmap_r13
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib1_NB_IoT
->
eutraControlRegionSize_r13
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib1_NB_IoT
->
nrs_CRS_PowerOffset_r13
,
// &SIwindowsize,
// &SIperiod,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
dl_CarrierFreq
,
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
ul_CarrierFreq
,
(
BCCH_BCH_Message_NB_t
*
)
&
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
mib_NB_IoT
,
(
RadioResourceConfigCommonSIB_NB_r13_t
*
)
&
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib2_NB_IoT
->
radioResourceConfigCommon_r13
,
(
struct
PhysicalConfigDedicated_NB_r13
*
)
NULL
,
(
MAC_MainConfig_NB_r13_t
*
)
NULL
,
0
,
// MP:logicalChannelID //TODO still have to be properly managed in the interface
(
struct
LogicalChannelConfig_NB_r13
*
)
NULL
);
rrc_mac_config_req_NB_IoT
(
ctxt_pP
->
module_id
,
CC_id
,
0
,
&
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
],
(
SystemInformationBlockType1_NB_t
*
)
&
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib1_NB_IoT
,
(
RadioResourceConfigCommonSIB_NB_r13_t
*
)
&
eNB_rrc_inst_NB_IoT
[
ctxt_pP
->
module_id
].
carrier
[
CC_id
].
sib2_NB_IoT
->
radioResourceConfigCommon_r13
,
(
struct
PhysicalConfigDedicated_NB_r13
*
)
NULL
,
(
struct
LogicalChannelConfig_NB_r13
*
)
NULL
,
&
mac_inst
->
rrc_config
,
0
,
0
);
}
else
{
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_FMT
" init_SI: FATAL, no memory for SIB2/3_NB allocated
\n
"
,
PROTOCOL_RRC_CTXT_ARGS
(
ctxt_pP
));
...
...
openair2/RRC/LITE/vars_NB_IoT.h
View file @
75be22c4
...
...
@@ -28,6 +28,8 @@
* \email: navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
*/
#ifndef __RRC_VARS_NB_IOT_H__
#define __RRC_VARS_NB_IOT_H__
#include "defs_NB_IoT.h"
#include "LAYER2/RLC/rlc.h"
...
...
@@ -106,3 +108,4 @@ uint16_t N311_NB_IoT[8] = {1,2,3,4,5,6,8,10};
/* MP: 36.133 Section 9.1.4 RSRP Measurement Report Mapping and RSRQ Mapping, Table: 9.1.4-1 --> not for NB-IoT*/
#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