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
spbro
OpenXG-RAN
Commits
0e6431a7
Commit
0e6431a7
authored
Apr 18, 2019
by
Louis Adrien Dufrene
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved code for HARQ process from PHY layer to MAC layer
parent
fbcc7ad2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
28 deletions
+22
-28
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+0
-26
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+20
-1
openair2/PHY_INTERFACE/IF_Module.c
openair2/PHY_INTERFACE/IF_Module.c
+2
-1
No files found.
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
0e6431a7
...
...
@@ -1498,12 +1498,9 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
LTE_eNB_DLSCH_t
*
dlsch1
=
NULL
;
LTE_DL_eNB_HARQ_t
*
dlsch0_harq
=
NULL
;
LTE_DL_eNB_HARQ_t
*
dlsch1_harq
=
NULL
;
int
UE_id_mac
=
-
1
;
int
harq_pid
;
int
subframe_tx
;
int
frame_tx
;
UE_sched_ctrl
*
UE_scheduling_control
=
NULL
;
UE_list_t
*
UE_list
=
NULL
;
AssertFatal
(
UE_id
!=
-
1
,
"No existing dlsch context
\n
"
);
AssertFatal
(
UE_id
<
NUMBER_OF_UE_MAX
,
"Returned UE_id %d >= %d (NUMBER_OF_UE_MAX)
\n
"
,
UE_id
,
NUMBER_OF_UE_MAX
);
...
...
@@ -1511,24 +1508,6 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
dlsch0
=
eNB
->
dlsch
[
UE_id
][
0
];
dlsch1
=
eNB
->
dlsch
[
UE_id
][
1
];
if
(
RC
.
mac
!=
NULL
)
{
/* dlsim does not use RC.mac context */
UE_list
=
&
(
RC
.
mac
[
eNB
->
Mod_id
]
->
UE_list
);
/* Replicate "find_UE_id" from openair2/LAYER2/MAC/mac_proto.h */
for
(
int
UE_id_temp
=
0
;
UE_id_temp
<
MAX_MOBILES_PER_ENB
;
UE_id_temp
++
)
{
if
(
UE_list
->
active
[
UE_id_temp
]
==
TRUE
)
{
if
(
UE_list
->
UE_template
[
UE_list
->
pCC_id
[
UE_id_temp
]][
UE_id_temp
].
rnti
==
dlsch0
->
rnti
)
{
UE_id_mac
=
UE_id_temp
;
break
;
}
}
}
if
(
UE_id_mac
!=
-
1
)
{
UE_scheduling_control
=
&
(
UE_list
->
UE_sched_ctrl
[
UE_id_mac
]);
}
}
if
(
eNB
->
frame_parms
.
frame_type
==
FDD
)
{
subframe_tx
=
(
subframe
+
6
)
%
10
;
frame_tx
=
ul_ACK_subframe2_dl_frame
(
&
eNB
->
frame_parms
,
...
...
@@ -1568,11 +1547,6 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
if
(
dlsch0_harq
->
round
>=
after_rounds
)
{
dlsch0_harq
->
status
=
SCH_IDLE
;
dlsch0
->
harq_mask
&=
~
(
1
<<
harq_pid
);
if
(
UE_scheduling_control
!=
NULL
)
{
/* CDRX: PUCCH gives an ACK or no more repetitions, so reset corresponding HARQ RTT */
UE_scheduling_control
->
harq_rtt_timer
[
eNB
->
CC_id
][
harq_pid
]
=
0
;
}
}
}
else
{
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
0e6431a7
...
...
@@ -4153,18 +4153,25 @@ extract_harq(module_id_t mod_idP,
if
(
pdu
[
0
]
==
1
)
{
// ACK
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
=
8
;
// release HARQ process
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
=
0
;
/* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
sched_ctl
->
harq_rtt_timer
[
CC_idP
][
harq_pid
]
=
0
;
}
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
;
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
sched_ctl
->
harq_rtt_timer
[
CC_idP
][
harq_pid
]
=
0
;
}
if
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
==
8
)
{
for
(
uint8_t
ra_i
=
0
;
ra_i
<
NB_RA_PROC_MAX
;
ra_i
++
)
{
if
((
ra
[
ra_i
].
rnti
==
rnti
)
&&
(
ra
[
ra_i
].
state
==
WAITMSG4ACK
))
{
//Msg NACK num to MAC ,remove UE
//
Msg NACK num to MAC ,remove UE
// add UE info to freeList
LOG_I
(
RRC
,
"put UE %x into freeList
\n
"
,
rnti
);
...
...
@@ -4183,6 +4190,9 @@ extract_harq(module_id_t mod_idP,
if
(
num_ack_nak
==
2
&&
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
<
8
&&
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
==
1
&&
pdu
[
0
]
==
1
&&
pdu
[
1
]
==
1
)
{
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
=
8
;
sched_ctl
->
tbcnt
[
CC_idP
][
harq_pid
]
=
0
;
/* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
sched_ctl
->
harq_rtt_timer
[
CC_idP
][
harq_pid
]
=
0
;
}
if
((
num_ack_nak
==
2
)
...
...
@@ -4194,6 +4204,9 @@ extract_harq(module_id_t mod_idP,
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
;
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
sched_ctl
->
harq_rtt_timer
[
CC_idP
][
harq_pid
]
=
0
;
}
}
else
if
(((
num_ack_nak
==
2
)
&&
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
<
8
)
...
...
@@ -4209,6 +4222,9 @@ extract_harq(module_id_t mod_idP,
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? */
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
sched_ctl
->
harq_rtt_timer
[
CC_idP
][
harq_pid
]
=
0
;
}
}
else
if
((
num_ack_nak
==
2
)
&&
(
sched_ctl
->
round
[
CC_idP
][
harq_pid
]
<
8
)
...
...
@@ -4219,6 +4235,9 @@ extract_harq(module_id_t mod_idP,
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
;
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
sched_ctl
->
harq_rtt_timer
[
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
"
,
...
...
openair2/PHY_INTERFACE/IF_Module.c
View file @
0e6431a7
...
...
@@ -115,7 +115,7 @@ void handle_cqi(UL_IND_t *UL_info) {
void
handle_harq
(
UL_IND_t
*
UL_info
)
{
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
&&
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
>
0
)
{
// PNF
//LOG_D
(PHY, "UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Send to VNF\n", UL_info->harq_ind.harq_indication_body.number_of_harqs);
LOG_E
(
PHY
,
"UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Send to VNF
\n
"
,
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
);
int
retval
=
oai_nfapi_harq_indication
(
&
UL_info
->
harq_ind
);
if
(
retval
!=
0
)
{
...
...
@@ -125,6 +125,7 @@ void handle_harq(UL_IND_t *UL_info) {
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
=
0
;
}
else
{
LOG_E
(
PHY
,
"UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Received by VNF
\n
"
,
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
);
for
(
int
i
=
0
;
i
<
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
;
i
++
)
harq_indication
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
...
...
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