Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
openairinterface5G
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
16
Merge Requests
16
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
oai
openairinterface5G
Commits
3fe90157
Commit
3fe90157
authored
Mar 19, 2018
by
Cedric Roux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bugfixes-2018-w11' into develop
parents
89201888
d3938147
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
189 additions
and
47 deletions
+189
-47
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+54
-34
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+102
-12
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+32
-0
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+1
-1
No files found.
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
3fe90157
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
3fe90157
...
...
@@ -3268,8 +3268,13 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
if
(
pdu
[
0
]
==
1
)
{
// ACK
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
=
8
;
// release HARQ process
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
=
0
;
}
else
if
(
pdu
[
0
]
==
2
||
pdu
[
0
]
==
4
)
// NAK (treat DTX as NAK)
}
else
if
(
pdu
[
0
]
==
2
||
pdu
[
0
]
==
4
)
{
// NAK (treat DTX as NAK)
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
++
;
// increment round
if
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
=
8
;
// release HARQ process
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
=
0
;
}
}
}
else
{
// one or two ACK/NAK bits
AssertFatal
(
num_ack_nak
<=
2
,
...
...
@@ -3285,8 +3290,13 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
if
((
num_ack_nak
==
2
)
&&
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
<
8
)
&&
(
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
==
1
)
&&
(
pdu
[
0
]
==
2
)
&&
(
pdu
[
1
]
==
2
))
&&
(
pdu
[
0
]
==
2
)
&&
(
pdu
[
1
]
==
2
))
{
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
=
8
;
// release HARQ process
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
=
0
;
}
}
else
if
(((
num_ack_nak
==
2
)
&&
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
<
8
)
&&
(
sched_ctl
->
tbcnt
[
0
][
harq_pid
]
==
2
)
...
...
@@ -3297,11 +3307,20 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
&&
(
pdu
[
0
]
==
2
)
&&
(
pdu
[
1
]
==
1
)))
{
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
++
;
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
=
1
;
if
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
=
8
;
// release HARQ process
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
=
0
;
/* TODO: do we have to set it to 0? */
}
}
else
if
((
num_ack_nak
==
2
)
&&
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
<
8
)
&&
(
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
==
2
)
&&
(
pdu
[
0
]
==
2
)
&&
(
pdu
[
1
]
==
2
))
&&
(
pdu
[
0
]
==
2
)
&&
(
pdu
[
1
]
==
2
))
{
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
=
8
;
// release HARQ process
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
=
0
;
}
}
else
AssertFatal
(
1
==
0
,
"Illegal ACK/NAK/round combination (%d,%d,%d,%d,%d) for harq_pid %d, UE %d/%x
\n
"
,
...
...
@@ -3327,12 +3346,18 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
pdu
[
1
]);
if
(
pdu
[
0
]
==
1
)
sched_ctl
->
round
[
pCCid
][
harq_pid
]
=
8
;
else
else
{
sched_ctl
->
round
[
pCCid
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
pCCid
][
harq_pid
]
==
4
)
sched_ctl
->
round
[
pCCid
][
harq_pid
]
=
8
;
}
if
(
pdu
[
1
]
==
1
)
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
=
8
;
else
else
{
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
==
4
)
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
=
8
;
}
}
// A=2
else
if
((
num_ack_nak
==
3
)
&&
(
sched_ctl
->
round
[
pCCid
][
harq_pid
]
<
8
)
...
...
@@ -3358,13 +3383,26 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
((
pdu
[
0
]
==
1
)
&&
(
pdu
[
1
]
==
2
)))
{
sched_ctl
->
round
[
pCCid
][
harq_pid
]
++
;
sched_ctl
->
tbcnt
[
pCCid
][
harq_pid
]
=
1
;
}
else
if
(
sched_ctl
->
round
[
pCCid
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
pCCid
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
pCCid
][
harq_pid
]
=
0
;
/* TODO: do we have to set it to 0? */
}
}
else
{
sched_ctl
->
round
[
pCCid
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
pCCid
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
pCCid
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
pCCid
][
harq_pid
]
=
0
;
}
}
if
(
pdu
[
2
]
==
1
)
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
=
8
;
else
else
{
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
=
8
;
}
}
}
// A=3 primary cell has 2 TBs
else
if
((
num_ack_nak
==
3
)
&&
(
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
<
8
)
...
...
@@ -3390,13 +3428,26 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
||
((
pdu
[
0
]
==
1
)
&&
(
pdu
[
1
]
>=
2
)))
{
// one ACK
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
++
;
sched_ctl
->
tbcnt
[
1
-
pCCid
][
harq_pid
]
=
1
;
}
else
// both NAK/DTX
if
(
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
1
-
pCCid
][
harq_pid
]
=
0
;
}
}
else
{
// both NAK/DTX
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
1
-
pCCid
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
1
-
pCCid
][
harq_pid
]
=
0
;
}
}
if
(
pdu
[
2
]
==
1
)
sched_ctl
->
round
[
pCCid
][
harq_pid
]
=
8
;
else
else
{
sched_ctl
->
round
[
pCCid
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
pCCid
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
pCCid
][
harq_pid
]
=
8
;
}
}
}
// A=3 secondary cell has 2 TBs
#if MAX_NUM_CCs>1
else
if
((
num_ack_nak
==
4
)
...
...
@@ -3425,8 +3476,17 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
||
((
pdu
[
0
]
==
1
)
&&
(
pdu
[
1
]
>=
2
)))
{
// one ACK
sched_ctl
->
round
[
0
][
harq_pid
]
++
;
sched_ctl
->
tbcnt
[
0
][
harq_pid
]
=
1
;
}
else
// both NAK/DTX
if
(
sched_ctl
->
round
[
0
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
0
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
0
][
harq_pid
]
=
0
;
}
}
else
{
// both NAK/DTX
sched_ctl
->
round
[
0
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
0
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
0
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
0
][
harq_pid
]
=
0
;
}
}
if
((
pdu
[
2
]
==
1
)
&&
(
pdu
[
3
]
==
1
))
{
// both ACK
sched_ctl
->
round
[
1
][
harq_pid
]
=
8
;
...
...
@@ -3435,8 +3495,17 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
||
((
pdu
[
2
]
==
1
)
&&
(
pdu
[
3
]
>=
2
)))
{
// one ACK
sched_ctl
->
round
[
1
][
harq_pid
]
++
;
sched_ctl
->
tbcnt
[
1
][
harq_pid
]
=
1
;
}
else
// both NAK/DTX
if
(
sched_ctl
->
round
[
1
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
1
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
1
][
harq_pid
]
=
0
;
}
}
else
{
// both NAK/DTX
sched_ctl
->
round
[
1
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
1
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
1
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
1
][
harq_pid
]
=
0
;
}
}
}
// A=4 both serving cells have 2 TBs
#endif
break
;
...
...
@@ -3451,8 +3520,13 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
if
(
pdu
[
j
]
==
1
)
{
sched_ctl
->
round
[
i
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
0
;
}
else
if
(
pdu
[
j
]
==
2
)
}
else
if
(
pdu
[
j
]
==
2
)
{
sched_ctl
->
round
[
i
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
i
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
i
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
0
;
}
}
else
AssertFatal
(
1
==
0
,
"Illegal harq_ack value for CC %d harq_pid %d (%d) UE %d/%x
\n
"
,
...
...
@@ -3467,13 +3541,25 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
&&
(
pdu
[
j
]
==
1
)
&&
(
pdu
[
j
+
1
]
==
2
))
{
sched_ctl
->
round
[
i
][
harq_pid
]
++
;
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
1
;
if
(
sched_ctl
->
round
[
i
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
i
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
0
;
}
}
else
if
((
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
==
2
)
&&
(
pdu
[
j
]
==
2
)
&&
(
pdu
[
j
+
1
]
==
1
))
{
sched_ctl
->
round
[
i
][
harq_pid
]
++
;
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
1
;
if
(
sched_ctl
->
round
[
i
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
i
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
0
;
}
}
else
if
((
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
==
2
)
&&
(
pdu
[
j
]
==
2
)
&&
(
pdu
[
j
+
1
]
==
2
))
{
sched_ctl
->
round
[
i
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
i
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
i
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
0
;
}
}
else
AssertFatal
(
1
==
0
,
"Illegal combination for CC %d harq_pid %d (%d,%d,%d) UE %d/%x
\n
"
,
...
...
@@ -3487,6 +3573,10 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
0
;
}
else
if
(
pdu
[
j
]
==
2
)
{
sched_ctl
->
round
[
i
][
harq_pid
]
++
;
if
(
sched_ctl
->
round
[
i
][
harq_pid
]
==
4
)
{
sched_ctl
->
round
[
i
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
i
][
harq_pid
]
=
0
;
}
}
else
AssertFatal
(
1
==
0
,
"Illegal hack_nak value %d for CC %d harq_pid %d UE %d/%x
\n
"
,
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
3fe90157
...
...
@@ -212,6 +212,30 @@ rx_sdu(const module_id_t enb_mod_idP,
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
scheduled_ul_bytes
=
0
;
}
else
UE_list
->
UE_sched_ctrl
[
UE_id
].
round_UL
[
CC_idP
][
harq_pid
]
++
;
first_rb
=
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
first_rb_ul
[
harq_pid
];
// Program NACK for PHICH
LOG_D
(
MAC
,
"Programming PHICH NACK for rnti %x harq_pid %d (first_rb %d)
\n
"
,
current_rnti
,
harq_pid
,
first_rb
);
nfapi_hi_dci0_request_t
*
hi_dci0_req
=
&
mac
->
HI_DCI0_req
[
CC_idP
];
nfapi_hi_dci0_request_body_t
*
hi_dci0_req_body
=
&
hi_dci0_req
->
hi_dci0_request_body
;
nfapi_hi_dci0_request_pdu_t
*
hi_dci0_pdu
=
&
hi_dci0_req_body
->
hi_dci0_pdu_list
[
hi_dci0_req_body
->
number_of_dci
+
hi_dci0_req_body
->
number_of_hi
];
memset
((
void
*
)
hi_dci0_pdu
,
0
,
sizeof
(
nfapi_hi_dci0_request_pdu_t
));
hi_dci0_pdu
->
pdu_type
=
NFAPI_HI_DCI0_HI_PDU_TYPE
;
hi_dci0_pdu
->
pdu_size
=
2
+
sizeof
(
nfapi_hi_dci0_hi_pdu
);
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
tl
.
tag
=
NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG
;
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
resource_block_start
=
first_rb
;
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
cyclic_shift_2_for_drms
=
0
;
hi_dci0_pdu
->
hi_pdu
.
hi_pdu_rel8
.
hi_value
=
0
;
hi_dci0_req_body
->
number_of_hi
++
;
hi_dci0_req_body
->
sfnsf
=
sfnsf_add_subframe
(
frameP
,
subframeP
,
0
);
hi_dci0_req_body
->
tl
.
tag
=
NFAPI_HI_DCI0_REQUEST_BODY_TAG
;
hi_dci0_req
->
sfn_sf
=
sfnsf_add_subframe
(
frameP
,
subframeP
,
4
);
hi_dci0_req
->
header
.
message_id
=
NFAPI_HI_DCI0_REQUEST
;
return
;
}
...
...
@@ -251,6 +275,9 @@ rx_sdu(const module_id_t enb_mod_idP,
ra
[
RA_id
].
Msg3_subframe
=
(
ra
[
RA_id
].
Msg3_subframe
+
8
)
%
10
;
add_msg3
(
enb_mod_idP
,
CC_idP
,
&
ra
[
RA_id
],
frameP
,
subframeP
);
}
/* TODO: program NACK for PHICH? */
return
;
}
}
else
{
...
...
@@ -1448,6 +1475,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
T_INT
(
first_rb
[
CC_id
]),
T_INT
(
rb_table
[
rb_table_index
]),
T_INT
(
round
));
#if 0
/* This is done in rx_sdu, as it has to.
* Since the code is a bit different, let's keep this version here for review, in case of problem.
*/
// fill in NAK information
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
...
...
@@ -1471,6 +1502,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_template->first_rb_ul[harq_pid],
UE_template->nb_rb_ul[harq_pid],
UE_template->TBS_UL[harq_pid], round);
#endif
// Add UL_config PDUs
LOG_D
(
MAC
,
"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d
\n
"
,
...
...
openair2/LAYER2/MAC/pre_processor.c
View file @
3fe90157
...
...
@@ -734,7 +734,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
// control channel or retransmission
/* TODO: do we have to check for retransmission? */
if
(
mac_eNB_get_rrc_status
(
Mod_id
,
rnti
)
<
RRC_RECONFIGURED
||
round
>
0
)
{
if
(
mac_eNB_get_rrc_status
(
Mod_id
,
rnti
)
<
RRC_RECONFIGURED
||
round
!=
8
)
{
nb_rbs_required_remaining_1
[
CC_id
][
UE_id
]
=
nb_rbs_required
[
CC_id
][
UE_id
];
}
else
{
...
...
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