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
wangjie
OpenXG-RAN
Commits
143aaaa1
Commit
143aaaa1
authored
Mar 05, 2019
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
7 byte msg4 can be recieved by UE now
parent
2a9f54a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
18 deletions
+57
-18
openair1/PHY/LTE_TRANSPORT/dci_tools_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dci_tools_NB_IoT.c
+2
-2
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+11
-10
openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c
+36
-3
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
+7
-3
openair2/LAYER2/MAC/proto_NB_IoT.h
openair2/LAYER2/MAC/proto_NB_IoT.h
+1
-0
No files found.
openair1/PHY/LTE_TRANSPORT/dci_tools_NB_IoT.c
View file @
143aaaa1
...
@@ -414,8 +414,8 @@ int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB,
...
@@ -414,8 +414,8 @@ int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB,
DCI_flip
[
0
]
=
DCI_tmp
[
2
]
*
2
;
DCI_flip
[
0
]
=
DCI_tmp
[
2
]
*
2
;
DCI_flip
[
1
]
=
DCI_tmp
[
1
]
*
2
;
DCI_flip
[
1
]
=
DCI_tmp
[
1
]
*
2
;
DCI_flip
[
2
]
=
DCI_tmp
[
0
]
*
2
;
//
DCI_flip[2] = DCI_tmp[0]*2;
DCI_flip
[
2
]
=
4
;
ndlcch
->
pdu
[
ncce_index
]
=
DCI_flip
;
ndlcch
->
pdu
[
ncce_index
]
=
DCI_flip
;
printf
(
"DCI N1 PDU content:"
);
printf
(
"DCI N1 PDU content:"
);
...
...
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
View file @
143aaaa1
...
@@ -857,19 +857,20 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,n
...
@@ -857,19 +857,20 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,n
DCI_Content
->
DCIN1
.
ndi
=
dl_config_pdu
->
npdcch_pdu
.
npdcch_pdu_rel13
.
new_data_indicator
;
DCI_Content
->
DCIN1
.
ndi
=
dl_config_pdu
->
npdcch_pdu
.
npdcch_pdu_rel13
.
new_data_indicator
;
DCI_Content
->
DCIN1
.
HARQackRes
=
dl_config_pdu
->
npdcch_pdu
.
npdcch_pdu_rel13
.
harq_ack_resource
;
DCI_Content
->
DCIN1
.
HARQackRes
=
dl_config_pdu
->
npdcch_pdu
.
npdcch_pdu_rel13
.
harq_ack_resource
;
DCI_Content
->
DCIN1
.
DCIRep
=
dl_config_pdu
->
npdcch_pdu
.
npdcch_pdu_rel13
.
dci_subframe_repetition_number
;
DCI_Content
->
DCIN1
.
DCIRep
=
dl_config_pdu
->
npdcch_pdu
.
npdcch_pdu_rel13
.
dci_subframe_repetition_number
;
npdcch
=
eNB
->
npdcch_DCI
;
eNB
->
npdcch
[(
uint8_t
)
UE_id
]
=
(
NB_IoT_eNB_NPDCCH_t
*
)
malloc
(
sizeof
(
NB_IoT_eNB_NPDCCH_t
));
//
eNB->npdcch[(uint8_t)UE_id] = (NB_IoT_eNB_NPDCCH_t *) malloc(sizeof(NB_IoT_eNB_NPDCCH_t));
//set the NPDCCH UE-specific structure (calculate R)
//set the NPDCCH UE-specific structure (calculate R)
npdcch
=
eNB
->
npdcch
[(
uint8_t
)
UE_id
];
//
npdcch=eNB->npdcch[(uint8_t)UE_id];
AssertFatal
(
npdcch
!=
NULL
,
"NPDCCH structure for UE specific is not exist
\n
"
);
//
AssertFatal(npdcch != NULL, "NPDCCH structure for UE specific is not exist\n");
npdcch
->
repetition_idx
[(
uint8_t
)
UE_id
]
=
0
;
//this is used for the encoding mechanism to understand that is the first transmission
//
npdcch->repetition_idx[(uint8_t)UE_id] = 0; //this is used for the encoding mechanism to understand that is the first transmission
if
(
dl_config_pdu
->
npdcch_pdu
.
npdcch_pdu_rel13
.
aggregation_level
)
//whenever aggregation level is =1 we have only 1 repetition for USS
//
if(dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.aggregation_level) //whenever aggregation level is =1 we have only 1 repetition for USS
npdcch
->
repetition_number
[(
uint8_t
)
UE_id
]
=
1
;
//
npdcch->repetition_number[(uint8_t)UE_id] = 1;
else
//
else
{
//
{
//see TS 36.213 Table 16.1-1
//see TS 36.213 Table 16.1-1
}
//
}
//fill the ndlsch structure for UE and packed the DCI PD
//fill the ndlsch structure for UE and packed the DCI PD
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA_NB_IoT.c
View file @
143aaaa1
...
@@ -766,7 +766,7 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe){
...
@@ -766,7 +766,7 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe){
}
}
// check msg4 resource
// check msg4 resource
rep
=
dl_rep
[
msg4_nodes
->
ce_level
];
rep
=
dl_rep
[
msg4_nodes
->
ce_level
];
msg4_length
=
fill_msg4_NB_IoT
(
mac_inst
,
msg4_nodes
);
msg4_length
=
fill_msg4_NB_IoT
_fixed
(
mac_inst
,
msg4_nodes
);
I_mcs
=
get_I_mcs
(
msg4_nodes
->
ce_level
);
I_mcs
=
get_I_mcs
(
msg4_nodes
->
ce_level
);
I_tbs
=
I_mcs
;
I_tbs
=
I_mcs
;
TBS
=
get_max_tbs
(
I_tbs
);
TBS
=
get_max_tbs
(
I_tbs
);
...
@@ -865,8 +865,8 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe){
...
@@ -865,8 +865,8 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe){
harq_result
=
(
schedule_result_t
*
)
malloc
(
sizeof
(
schedule_result_t
));
harq_result
=
(
schedule_result_t
*
)
malloc
(
sizeof
(
schedule_result_t
));
harq_result
->
rnti
=
msg4_nodes
->
ue_rnti
;
harq_result
->
rnti
=
msg4_nodes
->
ue_rnti
;
harq_result
->
output_subframe
=
harq_subframe
;
harq_result
->
output_subframe
=
harq_subframe
+
3
;
harq_result
->
end_subframe
=
harq_end_subframe
;
harq_result
->
end_subframe
=
harq_end_subframe
+
3
;
harq_result
->
sdu_length
=
0
;
harq_result
->
sdu_length
=
0
;
harq_result
->
direction
=
UL
;
harq_result
->
direction
=
UL
;
harq_result
->
rnti_type
=
3
;
harq_result
->
rnti_type
=
3
;
...
@@ -1024,3 +1024,36 @@ int fill_msg4_NB_IoT(
...
@@ -1024,3 +1024,36 @@ int fill_msg4_NB_IoT(
*/
*/
return
length
;
return
length
;
}
}
// Generate MSG4 MAC PDU
int
fill_msg4_NB_IoT_fixed
(
eNB_MAC_INST_NB_IoT
*
inst
,
RA_TEMPLATE_NB_IoT
*
ra_template
)
{
int
length
=
0
;
uint8_t
*
dlsch_buffer
=
&
ra_template
->
msg4_buffer
[
0
];
// we have three subheader here: 1 for Control element of Contention resolution, 2 for CCCH
SCH_SUBHEADER_FIXED_NB_IoT
*
msg4_sub_1
=
(
SCH_SUBHEADER_FIXED_NB_IoT
*
)
dlsch_buffer
;
msg4_sub_1
->
R
=
0
;
msg4_sub_1
->
E
=
1
;
msg4_sub_1
->
LCID
=
UE_CONTENTION_RESOLUTION
;
length
+=
1
;
uint8_t
*
con_res
=
(
uint8_t
*
)(
dlsch_buffer
+
1
);
con_res
[
0
]
=
ra_template
->
ccch_buffer
[
0
];
con_res
[
1
]
=
ra_template
->
ccch_buffer
[
1
];
con_res
[
2
]
=
ra_template
->
ccch_buffer
[
2
];
con_res
[
3
]
=
ra_template
->
ccch_buffer
[
3
];
con_res
[
4
]
=
ra_template
->
ccch_buffer
[
4
];
con_res
[
5
]
=
ra_template
->
ccch_buffer
[
5
];
length
+=
6
;
/*
printf("MSG4 PDU = ");
for(int i=0; i<length;i++)
printf("%02x ",dlsch_buffer[i]);
printf("\n");
*/
return
length
;
}
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
View file @
143aaaa1
...
@@ -221,8 +221,12 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
...
@@ -221,8 +221,12 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
//mac_NB_IoT_t *mac_inst;
//mac_NB_IoT_t *mac_inst;
UE_TEMPLATE_NB_IoT
*
UE_info
;
UE_TEMPLATE_NB_IoT
*
UE_info
;
uint8_t
*
msg4_rrc_pdu
=
NULL
;
uint8_t
*
msg4_rrc_pdu
=
NULL
;
LOG_D
(
MAC
,
"RX_SDU_IN
\n
"
);
LOG_D
(
MAC
,
"RX_SDU_IN
\n
"
);
uint8_t
*
first_6
=
(
uint8_t
*
)
malloc
(
6
*
sizeof
(
uint8_t
));
for
(
int
a
=
0
;
a
<
6
;
a
++
)
first_6
[
a
]
=
sdu
[
a
];
//mac_inst = get_mac_inst(module_id);
//mac_inst = get_mac_inst(module_id);
// note: if lcid < 25 this is sdu, otherwise this is CE
// note: if lcid < 25 this is sdu, otherwise this is CE
...
@@ -271,8 +275,8 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
...
@@ -271,8 +275,8 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
rx_lengths
[
i
]
-=
1
;
rx_lengths
[
i
]
-=
1
;
LOG_D
(
MAC
,
"rx_lengths : %d
\n
"
,
rx_lengths
[
i
]);
LOG_D
(
MAC
,
"rx_lengths : %d
\n
"
,
rx_lengths
[
i
]);
msg4_rrc_pdu
=
mac_rrc_msg3_ind_NB_IoT
(
payload_ptr
,
rnti
,
rx_lengths
[
i
]);
msg4_rrc_pdu
=
mac_rrc_msg3_ind_NB_IoT
(
payload_ptr
,
rnti
,
rx_lengths
[
i
]);
receive_msg3_NB_IoT
(
mac_inst
,
rnti
,
PHR
,
DVI_index
,
payload_ptr
,
msg4_rrc_pdu
);
receive_msg3_NB_IoT
(
mac_inst
,
rnti
,
PHR
,
DVI_index
,
first_6
,
msg4_rrc_pdu
);
LOG_
D
(
MAC
,
"recieve msg3 Successfully at MAC!
\n
"
);
LOG_
I
(
MAC
,
"recieve msg3 Successfully at MAC!
\n
"
);
//NB_IoT_mac_rrc_data_ind(payload_ptr,mac_inst,rnti);
//NB_IoT_mac_rrc_data_ind(payload_ptr,mac_inst,rnti);
//NB_IoT_receive_msg3(mac_inst,rnti,PHR,ul_total_buffer);
//NB_IoT_receive_msg3(mac_inst,rnti,PHR,ul_total_buffer);
break
;
break
;
...
...
openair2/LAYER2/MAC/proto_NB_IoT.h
View file @
143aaaa1
...
@@ -127,6 +127,7 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe);
...
@@ -127,6 +127,7 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe);
void
fill_rar_NB_IoT
(
eNB_MAC_INST_NB_IoT
*
inst
,
RA_TEMPLATE_NB_IoT
*
ra_template
,
uint8_t
msg3_schedule_delay
,
uint8_t
msg3_rep
,
sched_temp_UL_NB_IoT_t
*
schedule_template
);
void
fill_rar_NB_IoT
(
eNB_MAC_INST_NB_IoT
*
inst
,
RA_TEMPLATE_NB_IoT
*
ra_template
,
uint8_t
msg3_schedule_delay
,
uint8_t
msg3_rep
,
sched_temp_UL_NB_IoT_t
*
schedule_template
);
void
receive_msg4_ack_NB_IoT
(
eNB_MAC_INST_NB_IoT
*
mac_inst
,
rnti_t
rnti
);
void
receive_msg4_ack_NB_IoT
(
eNB_MAC_INST_NB_IoT
*
mac_inst
,
rnti_t
rnti
);
int
fill_msg4_NB_IoT
(
eNB_MAC_INST_NB_IoT
*
inst
,
RA_TEMPLATE_NB_IoT
*
ra_template
);
int
fill_msg4_NB_IoT
(
eNB_MAC_INST_NB_IoT
*
inst
,
RA_TEMPLATE_NB_IoT
*
ra_template
);
int
fill_msg4_NB_IoT_fixed
(
eNB_MAC_INST_NB_IoT
*
inst
,
RA_TEMPLATE_NB_IoT
*
ra_template
);
//USS
//USS
void
schedule_uss_NB_IoT
(
module_id_t
module_id
,
eNB_MAC_INST_NB_IoT
*
mac_inst
,
uint32_t
subframe
,
uint32_t
frame
,
uint32_t
hypersfn
,
int
index_ss
);
void
schedule_uss_NB_IoT
(
module_id_t
module_id
,
eNB_MAC_INST_NB_IoT
*
mac_inst
,
uint32_t
subframe
,
uint32_t
frame
,
uint32_t
hypersfn
,
int
index_ss
);
...
...
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