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
canghaiwuhen
OpenXG-RAN
Commits
3866ad41
Commit
3866ad41
authored
Oct 25, 2018
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize function for SIB size indication from RRC to MAC
parent
9e84ca4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
31 deletions
+39
-31
openair2/LAYER2/MAC/config_NB_IoT.c
openair2/LAYER2/MAC/config_NB_IoT.c
+3
-3
openair2/LAYER2/MAC/config_NB_IoT.h
openair2/LAYER2/MAC/config_NB_IoT.h
+17
-18
openair2/LAYER2/MAC/eNB_scheduler_bch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_bch_NB_IoT.c
+18
-9
openair2/LAYER2/MAC/proto_NB_IoT.h
openair2/LAYER2/MAC/proto_NB_IoT.h
+1
-1
No files found.
openair2/LAYER2/MAC/config_NB_IoT.c
View file @
3866ad41
...
@@ -524,7 +524,7 @@ void rrc_mac_config_req_NB_IoT(
...
@@ -524,7 +524,7 @@ void rrc_mac_config_req_NB_IoT(
mac_inst
->
npdcch_config_common
[
0
].
R_max
=
rmax
[
nprach_parameter
->
npdcch_NumRepetitions_RA_r13
];
mac_inst
->
npdcch_config_common
[
0
].
R_max
=
rmax
[
nprach_parameter
->
npdcch_NumRepetitions_RA_r13
];
mac_inst
->
npdcch_config_common
[
0
].
G
=
gvalue
[
nprach_parameter
->
npdcch_StartSF_CSS_RA_r13
];
mac_inst
->
npdcch_config_common
[
0
].
G
=
gvalue
[
nprach_parameter
->
npdcch_StartSF_CSS_RA_r13
];
mac_inst
->
npdcch_config_common
[
0
].
a_offset
=
pdcchoffset
[
nprach_parameter
->
npdcch_Offset_RA_r13
];
mac_inst
->
npdcch_config_common
[
0
].
a_offset
=
pdcchoffset
[
nprach_parameter
->
npdcch_Offset_RA_r13
];
LOG_I
(
MAC
,
"NPRACH 0 setting: Rmax: %l
d
G: %lf a: %lf
\n
"
,
mac_inst
->
npdcch_config_common
[
0
].
R_max
,
mac_inst
->
npdcch_config_common
[
0
].
G
,
mac_inst
->
npdcch_config_common
[
0
].
a_offset
);
LOG_I
(
MAC
,
"NPRACH 0 setting: Rmax: %l
u
G: %lf a: %lf
\n
"
,
mac_inst
->
npdcch_config_common
[
0
].
R_max
,
mac_inst
->
npdcch_config_common
[
0
].
G
,
mac_inst
->
npdcch_config_common
[
0
].
a_offset
);
}
}
///CE level 1
///CE level 1
...
@@ -538,7 +538,7 @@ void rrc_mac_config_req_NB_IoT(
...
@@ -538,7 +538,7 @@ void rrc_mac_config_req_NB_IoT(
mac_inst
->
npdcch_config_common
[
1
].
R_max
=
rmax
[
nprach_parameter
->
npdcch_NumRepetitions_RA_r13
];
mac_inst
->
npdcch_config_common
[
1
].
R_max
=
rmax
[
nprach_parameter
->
npdcch_NumRepetitions_RA_r13
];
mac_inst
->
npdcch_config_common
[
1
].
G
=
gvalue
[
nprach_parameter
->
npdcch_StartSF_CSS_RA_r13
];
mac_inst
->
npdcch_config_common
[
1
].
G
=
gvalue
[
nprach_parameter
->
npdcch_StartSF_CSS_RA_r13
];
mac_inst
->
npdcch_config_common
[
1
].
a_offset
=
pdcchoffset
[
nprach_parameter
->
npdcch_Offset_RA_r13
];
mac_inst
->
npdcch_config_common
[
1
].
a_offset
=
pdcchoffset
[
nprach_parameter
->
npdcch_Offset_RA_r13
];
LOG_I
(
MAC
,
"NPRACH 1 setting: Rmax: %l
d
G: %lf a: %lf
\n
"
,
mac_inst
->
npdcch_config_common
[
1
].
R_max
,
mac_inst
->
npdcch_config_common
[
1
].
G
,
mac_inst
->
npdcch_config_common
[
1
].
a_offset
);
LOG_I
(
MAC
,
"NPRACH 1 setting: Rmax: %l
u
G: %lf a: %lf
\n
"
,
mac_inst
->
npdcch_config_common
[
1
].
R_max
,
mac_inst
->
npdcch_config_common
[
1
].
G
,
mac_inst
->
npdcch_config_common
[
1
].
a_offset
);
}
}
///CE level 2
///CE level 2
if
(
radioResourceConfigCommon
->
nprach_Config_r13
.
nprach_ParametersList_r13
.
list
.
array
[
2
]
!=
NULL
)
{
if
(
radioResourceConfigCommon
->
nprach_Config_r13
.
nprach_ParametersList_r13
.
list
.
array
[
2
]
!=
NULL
)
{
...
@@ -551,7 +551,7 @@ void rrc_mac_config_req_NB_IoT(
...
@@ -551,7 +551,7 @@ void rrc_mac_config_req_NB_IoT(
mac_inst
->
npdcch_config_common
[
2
].
R_max
=
rmax
[
nprach_parameter
->
npdcch_NumRepetitions_RA_r13
];
mac_inst
->
npdcch_config_common
[
2
].
R_max
=
rmax
[
nprach_parameter
->
npdcch_NumRepetitions_RA_r13
];
mac_inst
->
npdcch_config_common
[
2
].
G
=
gvalue
[
nprach_parameter
->
npdcch_StartSF_CSS_RA_r13
];
mac_inst
->
npdcch_config_common
[
2
].
G
=
gvalue
[
nprach_parameter
->
npdcch_StartSF_CSS_RA_r13
];
mac_inst
->
npdcch_config_common
[
2
].
a_offset
=
pdcchoffset
[
nprach_parameter
->
npdcch_Offset_RA_r13
];
mac_inst
->
npdcch_config_common
[
2
].
a_offset
=
pdcchoffset
[
nprach_parameter
->
npdcch_Offset_RA_r13
];
LOG_I
(
MAC
,
"NPRACH 2 setting: Rmax: %l
d
G: %lf a: %lf
\n
"
,
mac_inst
->
npdcch_config_common
[
2
].
R_max
,
mac_inst
->
npdcch_config_common
[
2
].
G
,
mac_inst
->
npdcch_config_common
[
2
].
a_offset
);
LOG_I
(
MAC
,
"NPRACH 2 setting: Rmax: %l
u
G: %lf a: %lf
\n
"
,
mac_inst
->
npdcch_config_common
[
2
].
R_max
,
mac_inst
->
npdcch_config_common
[
2
].
G
,
mac_inst
->
npdcch_config_common
[
2
].
a_offset
);
}
}
...
...
openair2/LAYER2/MAC/config_NB_IoT.h
View file @
3866ad41
...
@@ -51,14 +51,14 @@ typedef enum sib_MappingInfo{
...
@@ -51,14 +51,14 @@ typedef enum sib_MappingInfo{
}
sib_MappingInfo_NB_IoT
;
}
sib_MappingInfo_NB_IoT
;
typedef
enum
si_TB
{
typedef
enum
si_TB
{
si_TB_56
=
2
,
si_TB_56
=
0
,
si_TB_120
=
2
,
si_TB_120
,
si_TB_208
=
8
,
si_TB_208
,
si_TB_256
=
8
,
si_TB_256
,
si_TB_328
=
8
,
si_TB_328
,
si_TB_440
=
8
,
si_TB_440
,
si_TB_552
=
8
,
si_TB_552
,
si_TB_680
=
8
si_TB_680
}
si_TB_NB_IoT
;
}
si_TB_NB_IoT
;
///RACH_ConfigCommon configuration
///RACH_ConfigCommon configuration
...
@@ -215,14 +215,14 @@ typedef enum si_repetition_pattern_e{
...
@@ -215,14 +215,14 @@ typedef enum si_repetition_pattern_e{
}
si_repetition_pattern_t
;
}
si_repetition_pattern_t
;
typedef
enum
si_tb_e
{
typedef
enum
si_tb_e
{
b56
=
2
,
b56
=
0
,
b120
=
2
,
b120
,
b208
=
8
,
b208
,
b256
=
8
,
b256
,
b328
=
8
,
b328
,
b440
=
8
,
b440
,
b552
=
8
,
b552
,
b680
=
8
b680
}
si_tb_t
;
}
si_tb_t
;
...
@@ -230,8 +230,7 @@ typedef struct sibs_NB_IoT_sched_s{
...
@@ -230,8 +230,7 @@ typedef struct sibs_NB_IoT_sched_s{
si_periodicity_t
si_periodicity
;
si_periodicity_t
si_periodicity
;
si_repetition_pattern_t
si_repetition_pattern
;
si_repetition_pattern_t
si_repetition_pattern
;
sib_MappingInfo_NB_IoT
sib_mapping_info
;
//bit vector
sib_MappingInfo_NB_IoT
sib_mapping_info
;
//bit vector
si_tb_t
si_tb
;
si_TB_NB_IoT
si_tb
;
}
sibs_NB_IoT_sched_t
;
}
sibs_NB_IoT_sched_t
;
...
...
openair2/LAYER2/MAC/eNB_scheduler_bch_NB_IoT.c
View file @
3866ad41
...
@@ -19,10 +19,11 @@ char str[6][7] = { "SIBs_1", "SIBs_2", "SIBs_3", "SIBs_4", "SIBs_5", "SIBs_6" };
...
@@ -19,10 +19,11 @@ char str[6][7] = { "SIBs_1", "SIBs_2", "SIBs_3", "SIBs_4", "SIBs_5", "SIBs_6" };
extern
int
extend_space
[
num_flags
];
extern
int
extend_space
[
num_flags
];
extern
int
extend_alpha_offset
[
num_flags
];
extern
int
extend_alpha_offset
[
num_flags
];
uint
8
_t
get_SIB23_size
(
void
)
uint
32
_t
get_SIB23_size
(
void
)
{
{
rrc_config_NB_IoT_t
*
mac_config
=
&
mac_inst
->
rrc_config
;
rrc_config_NB_IoT_t
*
mac_config
=
&
mac_inst
->
rrc_config
;
uint8_t
size_SIB23_in_MAC
=
0
;
uint32_t
size_SIB23_in_MAC
=
0
;
switch
(
mac_config
->
sibs_NB_IoT_sched
[
0
].
si_tb
)
switch
(
mac_config
->
sibs_NB_IoT_sched
[
0
].
si_tb
)
{
{
case
si_TB_56
:
case
si_TB_56
:
...
@@ -43,17 +44,18 @@ uint8_t get_SIB23_size(void)
...
@@ -43,17 +44,18 @@ uint8_t get_SIB23_size(void)
case
si_TB_440
:
case
si_TB_440
:
size_SIB23_in_MAC
=
440
;
size_SIB23_in_MAC
=
440
;
break
;
break
;
case
si_TB_55
6
:
case
si_TB_55
2
:
size_SIB23_in_MAC
=
55
6
;
size_SIB23_in_MAC
=
55
2
;
break
;
break
;
case
SI
_TB_680
:
case
si
_TB_680
:
size_SIB23_in_MAC
=
680
;
size_SIB23_in_MAC
=
680
;
break
;
break
;
default:
default:
LOG_E
(
MAC
,
"No index for SIB23 size from SIB1!
\n
"
);
LOG_E
(
MAC
,
"No index for SIB23 size from SIB1!
\n
"
);
break
;
break
;
return
size_SIB23_in_MAC
;
}
}
return
size_SIB23_in_MAC
;
}
}
void
schedule_sibs
(
eNB_MAC_INST_NB_IoT
*
mac_inst
,
uint32_t
sibs_order
,
int
start_subframe1
){
void
schedule_sibs
(
eNB_MAC_INST_NB_IoT
*
mac_inst
,
uint32_t
sibs_order
,
int
start_subframe1
){
...
@@ -64,10 +66,18 @@ void schedule_sibs(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t sibs_order, int start
...
@@ -64,10 +66,18 @@ void schedule_sibs(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t sibs_order, int start
schedule_result_t
*
new_node
;
schedule_result_t
*
new_node
;
DCIFormatN1_t
*
sibs_dci
;
DCIFormatN1_t
*
sibs_dci
;
uint32_t
j
,
i
,
k
;
uint32_t
j
,
i
,
k
;
uint
8
_t
SIB23_size
=
0
;
uint
32
_t
SIB23_size
=
0
;
uint8_t
*
SIB23_pdu
=
get_NB_IoT_SIB23
();
uint8_t
*
SIB23_pdu
=
get_NB_IoT_SIB23
();
int
residual_subframe
,
num_subframe
,
last_subframe
;
int
residual_subframe
,
num_subframe
,
last_subframe
;
num_subframe
=
(
mac_inst
->
rrc_config
.
sibs_NB_IoT_sched
[
sibs_order
].
si_tb
)
*
8
;
uint8_t
num_subframe_per_SIB
=
0
;
SIB23_size
=
get_SIB23_size
();
if
(
SIB23_size
>
0
&&
SIB23_size
<=
120
)
num_subframe_per_SIB
=
2
;
else
if
(
SIB23_size
>
120
&&
SIB23_size
<=
680
)
num_subframe_per_SIB
=
8
;
else
LOG_E
(
MAC
,
"Invalid SIB size
\n
"
);
num_subframe
=
num_subframe_per_SIB
*
8
;
int
rmax
=
mac_inst
->
rrc_config
.
mac_NPRACH_ConfigSIB
[
0
].
mac_npdcch_NumRepetitions_RA_NB_IoT
;
int
rmax
=
mac_inst
->
rrc_config
.
mac_NPRACH_ConfigSIB
[
0
].
mac_npdcch_NumRepetitions_RA_NB_IoT
;
rmax
=
(
rmax
*
10
)
>>
3
;
// x1.25
rmax
=
(
rmax
*
10
)
>>
3
;
// x1.25
...
@@ -116,7 +126,6 @@ void schedule_sibs(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t sibs_order, int start
...
@@ -116,7 +126,6 @@ void schedule_sibs(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t sibs_order, int start
if
((
available_resource_DL_t
*
)
0
!=
pt
[
k
]){
if
((
available_resource_DL_t
*
)
0
!=
pt
[
k
]){
new_node
=
(
schedule_result_t
*
)
malloc
(
sizeof
(
schedule_result_t
));
new_node
=
(
schedule_result_t
*
)
malloc
(
sizeof
(
schedule_result_t
));
// fill new node
// fill new node
SIB23_size
=
get_SIB23_size
();
new_node
->
output_subframe
=
first_subframe
[
k
];
new_node
->
output_subframe
=
first_subframe
[
k
];
new_node
->
end_subframe
=
(
j
==
i
)
?
last_subframe
:
j
+
9
;
new_node
->
end_subframe
=
(
j
==
i
)
?
last_subframe
:
j
+
9
;
new_node
->
sdu_length
=
SIB23_size
;
new_node
->
sdu_length
=
SIB23_size
;
...
...
openair2/LAYER2/MAC/proto_NB_IoT.h
View file @
3866ad41
...
@@ -77,7 +77,7 @@ void rrc_mac_config_req_NB_IoT(
...
@@ -77,7 +77,7 @@ void rrc_mac_config_req_NB_IoT(
uint8_t
ded_flag
,
uint8_t
ded_flag
,
uint8_t
ue_list_ded_num
);
uint8_t
ue_list_ded_num
);
uint
8
_t
get_SIB23_size
(
void
);
uint
32
_t
get_SIB23_size
(
void
);
///system
///system
...
...
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