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
lizhongxiao
OpenXG-RAN
Commits
3a07b6bf
Commit
3a07b6bf
authored
Aug 23, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewriting downlink harq process function
parent
d78861db
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
56 deletions
+78
-56
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+22
-24
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+2
-2
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+1
-1
openair1/SCHED_NR_UE/harq_nr.c
openair1/SCHED_NR_UE/harq_nr.c
+52
-28
openair1/SCHED_NR_UE/harq_nr.h
openair1/SCHED_NR_UE/harq_nr.h
+1
-1
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
3a07b6bf
...
@@ -155,7 +155,7 @@ NR_UE_DLSCH_t *new_nr_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint
...
@@ -155,7 +155,7 @@ NR_UE_DLSCH_t *new_nr_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint
if
(
dlsch
->
harq_processes
[
i
])
{
if
(
dlsch
->
harq_processes
[
i
])
{
memset
(
dlsch
->
harq_processes
[
i
],
0
,
sizeof
(
NR_DL_UE_HARQ_t
));
memset
(
dlsch
->
harq_processes
[
i
],
0
,
sizeof
(
NR_DL_UE_HARQ_t
));
init_downlink_harq_status
(
dlsch
->
harq_processes
[
i
]);
init_downlink_harq_status
(
dlsch
->
harq_processes
[
i
]);
dlsch
->
harq_processes
[
i
]
->
first_
t
x
=
1
;
dlsch
->
harq_processes
[
i
]
->
first_
r
x
=
1
;
dlsch
->
harq_processes
[
i
]
->
b
=
(
uint8_t
*
)
malloc16
(
dlsch_bytes
);
dlsch
->
harq_processes
[
i
]
->
b
=
(
uint8_t
*
)
malloc16
(
dlsch_bytes
);
if
(
dlsch
->
harq_processes
[
i
]
->
b
)
if
(
dlsch
->
harq_processes
[
i
]
->
b
)
...
@@ -358,7 +358,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -358,7 +358,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
}
}
}
}
if
(
harq_process
->
round
==
0
)
{
if
(
harq_process
->
first_rx
==
1
)
{
// This is a new packet, so compute quantities regarding segmentation
// This is a new packet, so compute quantities regarding segmentation
if
(
A
>
NR_MAX_PDSCH_TBS
)
if
(
A
>
NR_MAX_PDSCH_TBS
)
harq_process
->
B
=
A
+
24
;
harq_process
->
B
=
A
+
24
;
...
@@ -448,7 +448,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -448,7 +448,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process
->
w
[
r
],
harq_process
->
w
[
r
],
harq_process
->
C
,
harq_process
->
C
,
harq_process
->
rvidx
,
harq_process
->
rvidx
,
(
harq_process
->
round
==
0
)
?
1
:
0
,
(
harq_process
->
first_rx
==
1
)
?
1
:
0
,
E
,
E
,
harq_process
->
F
,
harq_process
->
F
,
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
...
@@ -771,7 +771,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -771,7 +771,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
}
}
}
}
if
(
harq_process
->
round
==
0
)
{
if
(
harq_process
->
first_rx
==
1
)
{
// This is a new packet, so compute quantities regarding segmentation
// This is a new packet, so compute quantities regarding segmentation
if
(
A
>
NR_MAX_PDSCH_TBS
)
if
(
A
>
NR_MAX_PDSCH_TBS
)
harq_process
->
B
=
A
+
24
;
harq_process
->
B
=
A
+
24
;
...
@@ -909,7 +909,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -909,7 +909,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
harq_process
->
w
[
r
],
harq_process
->
w
[
r
],
harq_process
->
C
,
harq_process
->
C
,
harq_process
->
rvidx
,
harq_process
->
rvidx
,
(
harq_process
->
round
==
0
)
?
1
:
0
,
(
harq_process
->
first_rx
==
1
)
?
1
:
0
,
E
,
E
,
harq_process
->
F
,
harq_process
->
F
,
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
...
@@ -1229,9 +1229,7 @@ void nr_dlsch_decoding_process(void *arg) {
...
@@ -1229,9 +1229,7 @@ void nr_dlsch_decoding_process(void *arg) {
}
}
}
}
harq_process
->
round
=
0
;
if
(
harq_process
->
first_rx
==
1
)
{
// if (harq_process->round == 0) {
// This is a new packet, so compute quantities regarding segmentation
// This is a new packet, so compute quantities regarding segmentation
if
(
A
>
NR_MAX_PDSCH_TBS
)
if
(
A
>
NR_MAX_PDSCH_TBS
)
harq_process
->
B
=
A
+
24
;
harq_process
->
B
=
A
+
24
;
...
@@ -1247,7 +1245,7 @@ void nr_dlsch_decoding_process(void *arg) {
...
@@ -1247,7 +1245,7 @@ void nr_dlsch_decoding_process(void *arg) {
&
harq_process
->
F
,
&
harq_process
->
F
,
p_decParams
->
BG
);
p_decParams
->
BG
);
p_decParams
->
Z
=
harq_process
->
Z
;
p_decParams
->
Z
=
harq_process
->
Z
;
//
}
}
LOG_D
(
PHY
,
"round %d Z %d K %d BG %d
\n
"
,
harq_process
->
round
,
p_decParams
->
Z
,
harq_process
->
K
,
p_decParams
->
BG
);
LOG_D
(
PHY
,
"round %d Z %d K %d BG %d
\n
"
,
harq_process
->
round
,
p_decParams
->
Z
,
harq_process
->
K
,
p_decParams
->
BG
);
p_decParams
->
numMaxIter
=
dlsch
->
max_ldpc_iterations
;
p_decParams
->
numMaxIter
=
dlsch
->
max_ldpc_iterations
;
p_decParams
->
outMode
=
0
;
p_decParams
->
outMode
=
0
;
...
@@ -1314,7 +1312,7 @@ void nr_dlsch_decoding_process(void *arg) {
...
@@ -1314,7 +1312,7 @@ void nr_dlsch_decoding_process(void *arg) {
harq_process
->
w
[
r
],
harq_process
->
w
[
r
],
harq_process
->
C
,
harq_process
->
C
,
harq_process
->
rvidx
,
harq_process
->
rvidx
,
(
harq_process
->
round
==
0
)
?
1
:
0
,
(
harq_process
->
first_rx
==
1
)
?
1
:
0
,
E
,
E
,
harq_process
->
F
,
harq_process
->
F
,
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
View file @
3a07b6bf
...
@@ -206,8 +206,8 @@ typedef struct {
...
@@ -206,8 +206,8 @@ typedef struct {
}
NR_UE_ULSCH_t
;
}
NR_UE_ULSCH_t
;
typedef
struct
{
typedef
struct
{
/// Indicator of first
transmiss
ion
/// Indicator of first
recept
ion
uint8_t
first_
t
x
;
uint8_t
first_
r
x
;
/// Last Ndi received for this process on DCI (used for C-RNTI only)
/// Last Ndi received for this process on DCI (used for C-RNTI only)
uint8_t
DCINdi
;
uint8_t
DCINdi
;
/// DLSCH status flag indicating
/// DLSCH status flag indicating
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
3a07b6bf
...
@@ -126,7 +126,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
...
@@ -126,7 +126,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
}
}
dlsch0_harq
->
Nl
=
Nl
;
dlsch0_harq
->
Nl
=
Nl
;
dlsch0_harq
->
mcs_table
=
dlsch_config_pdu
->
mcs_table
;
dlsch0_harq
->
mcs_table
=
dlsch_config_pdu
->
mcs_table
;
downlink_harq_process
(
dlsch0_harq
,
dlsch0
->
current_harq_pid
,
dlsch_config_pdu
->
ndi
,
dlsch0
->
rnti_type
);
downlink_harq_process
(
dlsch0_harq
,
dlsch0
->
current_harq_pid
,
dlsch_config_pdu
->
ndi
,
dlsch
_config_pdu
->
rv
,
dlsch
0
->
rnti_type
);
if
(
dlsch0_harq
->
status
!=
ACTIVE
)
{
if
(
dlsch0_harq
->
status
!=
ACTIVE
)
{
// dlsch0_harq->status not ACTIVE may be due to false retransmission. Reset the
// dlsch0_harq->status not ACTIVE may be due to false retransmission. Reset the
// following flag to skip PDSCH procedures in that case.
// following flag to skip PDSCH procedures in that case.
...
...
openair1/SCHED_NR_UE/harq_nr.c
View file @
3a07b6bf
...
@@ -306,7 +306,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
...
@@ -306,7 +306,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
void
init_downlink_harq_status
(
NR_DL_UE_HARQ_t
*
dl_harq
)
void
init_downlink_harq_status
(
NR_DL_UE_HARQ_t
*
dl_harq
)
{
{
dl_harq
->
status
=
SCH_IDLE
;
dl_harq
->
status
=
SCH_IDLE
;
dl_harq
->
first_
t
x
=
1
;
dl_harq
->
first_
r
x
=
1
;
dl_harq
->
round
=
0
;
dl_harq
->
round
=
0
;
dl_harq
->
ack
=
DL_ACKNACK_NO_SET
;
dl_harq
->
ack
=
DL_ACKNACK_NO_SET
;
}
}
...
@@ -328,39 +328,63 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq)
...
@@ -328,39 +328,63 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq)
*
*
*********************************************************************/
*********************************************************************/
void
downlink_harq_process
(
NR_DL_UE_HARQ_t
*
dl_harq
,
int
harq_pid
,
int
ndi
,
uint8_t
rnti_type
)
{
void
downlink_harq_process
(
NR_DL_UE_HARQ_t
*
dl_harq
,
int
harq_pid
,
int
ndi
,
int
rv
,
uint8_t
rnti_type
)
{
if
(
rnti_type
==
_CS_RNTI_
)
{
LOG_E
(
PHY
,
"Fatal error in HARQ entity due to not supported CS_RNTI at line %d in function %s of file %s
\n
"
,
__LINE__
,
__func__
,
__FILE__
);
return
;
}
else
if
((
rnti_type
!=
_C_RNTI_
)
&&
(
rnti_type
!=
_TC_RNTI_
))
{
/* harq mechanism is not relevant for other rnti */
return
;
}
if
(
dl_harq
->
first_tx
==
1
)
{
if
(
rnti_type
==
_SI_RNTI_
||
rnti_type
==
_P_RNTI_
||
rnti_type
==
_RA_RNTI_
)
{
dl_harq
->
round
=
0
;
dl_harq
->
round
=
0
;
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
DCINdi
=
ndi
;
dl_harq
->
first_rx
=
1
;
dl_harq
->
first_tx
=
0
;
LOG_D
(
PHY
,
"[HARQ-DL-PDSCH harqId : %d] first new reception
\n
"
,
harq_pid
);
}
}
else
if
(
dl_harq
->
DCINdi
!=
ndi
)
{
else
{
switch
(
rv
){
case
0
:
dl_harq
->
round
=
0
;
dl_harq
->
round
=
0
;
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
first_rx
=
1
;
if
(
dl_harq
->
DCINdi
==
ndi
)
LOG_E
(
PHY
,
"Warning! rv %d indicates new transmission but new ndi %d is the same as old ndi %d
\n
"
,
rv
,
ndi
,
dl_harq
->
DCINdi
);
dl_harq
->
DCINdi
=
ndi
;
break
;
case
1
:
dl_harq
->
round
=
2
;
if
(
dl_harq
->
DCINdi
!=
ndi
)
{
LOG_E
(
PHY
,
"Missed previous DCI detections. NDI toggled but rv %d does not correspond to first reception
\n
"
,
rv
);
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
first_rx
=
1
;
dl_harq
->
DCINdi
=
ndi
;
dl_harq
->
DCINdi
=
ndi
;
LOG_D
(
PHY
,
"[HARQ-DL-PDSCH harqId : %d] new reception due to toogle of ndi
\n
"
,
harq_pid
);
}
}
else
{
else
if
(
dl_harq
->
ack
)
dl_harq
->
status
=
SCH_IDLE
;
dl_harq
->
round
++
;
break
;
case
2
:
if
(
dl_harq
->
ack
)
dl_harq
->
status
=
SCH_IDLE
;
dl_harq
->
round
=
1
;
if
(
dl_harq
->
DCINdi
!=
ndi
)
{
LOG_D
(
PHY
,
"[HARQ-DL-PDSCH harqId : %d] reception of a retransmission
\n
"
,
harq_pid
);
LOG_E
(
PHY
,
"Missed previous DCI detections. NDI toggled but rv %d does not correspond to first reception
\n
"
,
rv
);
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
first_rx
=
1
;
dl_harq
->
DCINdi
=
ndi
;
}
}
else
if
(
dl_harq
->
ack
)
dl_harq
->
status
=
SCH_IDLE
;
break
;
case
3
:
dl_harq
->
round
=
3
;
if
(
dl_harq
->
DCINdi
!=
ndi
)
{
LOG_E
(
PHY
,
"Missed previous DCI detections. NDI toggled but rv %d does not correspond to first reception
\n
"
,
rv
);
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
first_rx
=
1
;
dl_harq
->
DCINdi
=
ndi
;
}
else
if
(
dl_harq
->
ack
)
dl_harq
->
status
=
SCH_IDLE
;
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid value for rv %d
\n
"
,
rv
);
}
}
}
}
openair1/SCHED_NR_UE/harq_nr.h
View file @
3a07b6bf
...
@@ -120,7 +120,7 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq);
...
@@ -120,7 +120,7 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq);
@param rnti_type type of rnti
@param rnti_type type of rnti
@returns retransmission or new transmission */
@returns retransmission or new transmission */
void
downlink_harq_process
(
NR_DL_UE_HARQ_t
*
dlsch
,
int
harq_pid
,
int
ndi
,
uint8_t
rnti_type
);
void
downlink_harq_process
(
NR_DL_UE_HARQ_t
*
dlsch
,
int
harq_pid
,
int
ndi
,
int
rv
,
uint8_t
rnti_type
);
#undef EXTERN
#undef EXTERN
#undef INIT_VARIABLES_HARQ_NR_H
#undef INIT_VARIABLES_HARQ_NR_H
...
...
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