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
promise
OpenXG-RAN
Commits
d280abce
Commit
d280abce
authored
Dec 28, 2019
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify NDI
parent
ac71394e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
3 deletions
+40
-3
openair2/LAYER2/MAC/defs_NB_IoT.h
openair2/LAYER2/MAC/defs_NB_IoT.h
+1
-0
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
+37
-3
openair2/RRC/LITE/L2_interface_NB_IoT.c
openair2/RRC/LITE/L2_interface_NB_IoT.c
+2
-0
No files found.
openair2/LAYER2/MAC/defs_NB_IoT.h
View file @
d280abce
...
@@ -184,6 +184,7 @@ typedef struct {
...
@@ -184,6 +184,7 @@ typedef struct {
DLSCH_PDU_NB_IoT
Security_pdu
;
DLSCH_PDU_NB_IoT
Security_pdu
;
DLSCH_PDU_NB_IoT
Attach_pdu
;
DLSCH_PDU_NB_IoT
Attach_pdu
;
DLSCH_PDU_NB_IoT
ping_pdu
;
DLSCH_PDU_NB_IoT
Attach2_pdu
;
DLSCH_PDU_NB_IoT
Attach2_pdu
;
/// DLSCH pdu
/// DLSCH pdu
DLSCH_PDU_NB_IoT
DLSCH_pdu
;
DLSCH_PDU_NB_IoT
DLSCH_pdu
;
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
View file @
d280abce
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
int
Security_flag
=
0
;
int
Security_flag
=
0
;
int
Attach_flag
=
0
;
int
Attach_flag
=
0
;
int
Attach_flag2
=
0
;
int
Attach_flag2
=
0
;
int
ping_flag
=
0
;
uint8_t
from_R_dl_to_idx
(
uint8_t
R
)
uint8_t
from_R_dl_to_idx
(
uint8_t
R
)
{
{
...
@@ -114,7 +114,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
...
@@ -114,7 +114,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
#if 1
#if 1
if
(
UE_info
->
HARQ_round
==
0
)
if
(
UE_info
->
HARQ_round
==
0
)
{
{
if
(
Security_flag
==
0
&
Attach_flag
==
0
&&
Attach_flag2
==
0
)
if
(
Security_flag
==
0
&
Attach_flag
==
0
&&
Attach_flag2
==
0
&&
ping_flag
==
0
)
{
{
//Get RLC status
//Get RLC status
rlc_status
=
mac_rlc_status_ind
(
rlc_status
=
mac_rlc_status_ind
(
...
@@ -280,6 +280,30 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
...
@@ -280,6 +280,30 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
printf
(
"%02x "
,
UE_info
->
DLSCH_pdu
.
payload
[
y
]);
printf
(
"%02x "
,
UE_info
->
DLSCH_pdu
.
payload
[
y
]);
}
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
else
if
(
ping_flag
==
1
)
{
memcpy
(
UE_info
->
DLSCH_pdu
.
payload
,
UE_info
->
ping_pdu
.
payload
,
UE_info
->
ping_pdu
.
pdu_size
);
UE_info
->
DLSCH_pdu_size
=
UE_info
->
ping_pdu
.
pdu_size
;
data_size
=
UE_info
->
DLSCH_pdu_size
;
if
(
data_size
==
0
)
{
LOG_D
(
MAC
,
"[%04d][DLSchedulerUSS][Fail] No data in DCCH0_NB_IoT
\n
"
,
mac_inst
->
current_subframe
);
return
-
1
;
}
if
(
TBS
>=
data_size
)
// control and data
{
TBS
=
get_tbs
(
data_size
,
I_tbs
,
&
I_sf
);
LOG_I
(
MAC
,
"[%04d][DLSchedulerUSS] TBS change to %d because data size is smaller than previous TBS
\n
"
,
mac_inst
->
current_subframe
,
TBS
);
}
printf
(
"print the MAC DATA PDU including length payload, we have header %d byte
\n
"
,
data_size
);
//int y;
for
(
y
=
0
;
y
<
TBS
;
y
++
)
{
//for (y=0;y<payload_offset+mac_sdu_size2;y++){
printf
(
"%02x "
,
UE_info
->
DLSCH_pdu
.
payload
[
y
]);
}
printf
(
"
\n
"
);
}
}
if
(
rlc_data_pdu_size
==
20
&&
Security_flag
==
0
)
if
(
rlc_data_pdu_size
==
20
&&
Security_flag
==
0
)
...
@@ -306,6 +330,13 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
...
@@ -306,6 +330,13 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
return
-
1
;
return
-
1
;
}
}
if
(
rlc_data_pdu_size
==
81
&&
ping_flag
==
0
)
{
memcpy
(
UE_info
->
ping_pdu
.
payload
,
UE_info
->
DLSCH_pdu
.
payload
,
TBS
);
UE_info
->
ping_pdu
.
pdu_size
=
TBS
;
ping_flag
=
1
;
return
-
1
;
}
}
}
/*Retransmission*/
/*Retransmission*/
...
@@ -377,7 +408,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
...
@@ -377,7 +408,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
//toggle NDI
//toggle NDI
if
(
flag_retransmission
==
0
)
if
(
flag_retransmission
==
0
)
{
{
if
(
TBS
==
26
)
if
(
TBS
==
26
||
ping_flag
==
1
)
{
{
UE_info
->
oldNDI_DL
=
1
;
UE_info
->
oldNDI_DL
=
1
;
}
else
}
else
...
@@ -429,6 +460,8 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
...
@@ -429,6 +460,8 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
Attach_flag
=
0
;
Attach_flag
=
0
;
if
(
Attach_flag2
==
1
)
if
(
Attach_flag2
==
1
)
Attach_flag2
=
0
;
Attach_flag2
=
0
;
if
(
ping_flag
==
1
)
ping_flag
=
0
;
LOG_I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Complete scheduling with data size %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
data_size
);
LOG_I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Complete scheduling with data size %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
data_size
);
//LOG_D(MAC,"[%04d][DLSchedulerUSS] RNTI %d\n", mac_inst->current_subframe, UE_info->rnti);
//LOG_D(MAC,"[%04d][DLSchedulerUSS] RNTI %d\n", mac_inst->current_subframe, UE_info->rnti);
LOG_I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Allocate NPDCCH subframe %d to subframe %d candidate index %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDCCH_info
->
sf_start
,
NPDCCH_info
->
sf_end
,
cdd_num
);
LOG_I
(
MAC
,
"[%04d][DLSchedulerUSS][%d][Success] Allocate NPDCCH subframe %d to subframe %d candidate index %d
\n
"
,
mac_inst
->
current_subframe
,
UE_info
->
rnti
,
NPDCCH_info
->
sf_start
,
NPDCCH_info
->
sf_end
,
cdd_num
);
...
@@ -737,6 +770,7 @@ void fill_DCI_N1(DCIFormatN1_t *DCI_N1, UE_TEMPLATE_NB_IoT *UE_info, UE_SCHED_CT
...
@@ -737,6 +770,7 @@ void fill_DCI_N1(DCIFormatN1_t *DCI_N1, UE_TEMPLATE_NB_IoT *UE_info, UE_SCHED_CT
DCI_N1
->
mcs
=
UE_sched_ctrl_info
->
dci_n1_index_mcs
;
DCI_N1
->
mcs
=
UE_sched_ctrl_info
->
dci_n1_index_mcs
;
DCI_N1
->
RepNum
=
UE_sched_ctrl_info
->
dci_n1_index_R_data
;
DCI_N1
->
RepNum
=
UE_sched_ctrl_info
->
dci_n1_index_R_data
;
DCI_N1
->
HARQackRes
=
UE_sched_ctrl_info
->
dci_n1_index_ack_nack
;
DCI_N1
->
HARQackRes
=
UE_sched_ctrl_info
->
dci_n1_index_ack_nack
;
DCI_N1
->
ndi
=
UE_info
->
oldNDI_DL
;
//DCI_N1->DCIRep = 3-UE_info->R_max/UE_info->R_dci/2;
//DCI_N1->DCIRep = 3-UE_info->R_max/UE_info->R_dci/2;
DCI_N1
->
DCIRep
=
get_DCI_REP
(
UE_sched_ctrl_info
->
R_dci
,
UE_info
->
R_max
);
DCI_N1
->
DCIRep
=
get_DCI_REP
(
UE_sched_ctrl_info
->
R_dci
,
UE_info
->
R_max
);
LOG_I
(
MAC
,
"[fill_DCI_N1] Type %d order %d I_delay %d I_SF %d I_mcs %d I_rep %d I_harq %d I_dci %d
\n
"
,
DCI_N1
->
type
,
DCI_N1
->
orderIndicator
,
DCI_N1
->
Scheddly
,
DCI_N1
->
ResAssign
,
DCI_N1
->
mcs
,
DCI_N1
->
RepNum
,
DCI_N1
->
HARQackRes
,
DCI_N1
->
DCIRep
);
LOG_I
(
MAC
,
"[fill_DCI_N1] Type %d order %d I_delay %d I_SF %d I_mcs %d I_rep %d I_harq %d I_dci %d
\n
"
,
DCI_N1
->
type
,
DCI_N1
->
orderIndicator
,
DCI_N1
->
Scheddly
,
DCI_N1
->
ResAssign
,
DCI_N1
->
mcs
,
DCI_N1
->
RepNum
,
DCI_N1
->
HARQackRes
,
DCI_N1
->
DCIRep
);
...
...
openair2/RRC/LITE/L2_interface_NB_IoT.c
View file @
d280abce
...
@@ -2621,6 +2621,8 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
...
@@ -2621,6 +2621,8 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
waiting_flag_from_RLC
=
1
;
waiting_flag_from_RLC
=
1
;
block_RLC
=
1
;
block_RLC
=
1
;
}
}
waiting_flag_from_RLC
=
1
;
return
RLC_OP_STATUS_OK
;
return
RLC_OP_STATUS_OK
;
}
else
{
}
else
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ
,
VCD_FUNCTION_OUT
);
...
...
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