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
aaea7262
Commit
aaea7262
authored
Dec 15, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt NDI FAPI configuration to PUSCH and resetting TBS when new data
parent
77c585cd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
10 deletions
+59
-10
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+7
-0
openair1/SCHED_NR_UE/harq_nr.c
openair1/SCHED_NR_UE/harq_nr.c
+1
-2
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+1
-0
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+5
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+39
-5
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+6
-1
No files found.
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
aaea7262
...
...
@@ -311,6 +311,13 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
if
((
dlsch_config_pdu
->
dmrs_ports
>>
i
)
&
0x01
)
Nl
+=
1
;
}
dlsch0
->
Nl
=
Nl
;
if
(
dlsch_config_pdu
->
ndi
)
{
dlsch0_harq
->
first_rx
=
true
;
dlsch0_harq
->
DLround
=
0
;
}
else
{
dlsch0_harq
->
first_rx
=
false
;
dlsch0_harq
->
DLround
++
;
}
downlink_harq_process
(
dlsch0_harq
,
current_harq_pid
,
dlsch_config_pdu
->
ndi
,
dlsch_config_pdu
->
rv
,
dlsch0
->
rnti_type
);
if
(
dlsch0_harq
->
status
!=
ACTIVE
)
{
// dlsch0_harq->status not ACTIVE due to false retransmission
...
...
openair1/SCHED_NR_UE/harq_nr.c
View file @
aaea7262
...
...
@@ -177,7 +177,6 @@ void downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int dci_ndi,
dl_harq
->
status
=
ACTIVE
;
dl_harq
->
Ndi
=
dci_ndi
;
//dl_harq->status = SCH_IDLE;
}
}
}
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
aaea7262
...
...
@@ -500,6 +500,7 @@ typedef struct {
fapi_nr_csirs_measurements_t
csirs_measurements
;
/// Last NDI of UL HARQ processes
int
DL_ndi
[
NR_MAX_HARQ_PROCESSES
];
int
UL_ndi
[
NR_MAX_HARQ_PROCESSES
];
//// FAPI-like interface message
fapi_nr_ul_config_request_t
*
ul_config_request
;
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
aaea7262
...
...
@@ -106,8 +106,11 @@ void nr_ue_mac_default_configs(NR_UE_MAC_INST_t *mac)
mac
->
scheduling_info
.
lc_sched_info
[
i
].
LCGID
=
0
;
// defaults to 0 irrespective of SRB or DRB
mac
->
scheduling_info
.
lc_sched_info
[
i
].
LCID_status
=
LCID_EMPTY
;
mac
->
scheduling_info
.
lc_sched_info
[
i
].
LCID_buffer_remain
=
0
;
for
(
int
k
=
0
;
k
<
NR_MAX_HARQ_PROCESSES
;
k
++
)
mac
->
UL_ndi
[
k
]
=
-
1
;
// initialize to invalid value
}
for
(
int
k
=
0
;
k
<
NR_MAX_HARQ_PROCESSES
;
k
++
)
{
mac
->
UL_ndi
[
k
]
=
-
1
;
// initialize to invalid value
mac
->
DL_ndi
[
k
]
=
-
1
;
// initialize to invalid value
}
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
aaea7262
...
...
@@ -672,13 +672,30 @@ static int nr_ue_process_dci_dl_10(module_id_t module_id,
/* MCS */
dlsch_pdu
->
mcs
=
dci
->
mcs
;
NR_UE_HARQ_STATUS_t
*
current_harq
=
&
mac
->
dl_harq_info
[
dci
->
harq_pid
];
/* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/
if
(
dl_conf_req
->
pdu_type
==
FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH
||
dl_conf_req
->
pdu_type
==
FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH
||
dci
->
ndi
!=
mac
->
DL_ndi
[
dci
->
harq_pid
])
{
// new data
dlsch_pdu
->
ndi
=
1
;
current_harq
->
R
=
0
;
current_harq
->
TBS
=
0
;
}
else
dlsch_pdu
->
ndi
=
0
;
if
(
dl_conf_req
->
pdu_type
!=
FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH
&&
dl_conf_req
->
pdu_type
!=
FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH
)
{
mac
->
DL_ndi
[
dci
->
harq_pid
]
=
dci
->
ndi
;
}
dlsch_pdu
->
qamModOrder
=
nr_get_Qm_dl
(
dlsch_pdu
->
mcs
,
dlsch_pdu
->
mcs_table
);
if
(
dlsch_pdu
->
qamModOrder
==
0
)
{
LOG_W
(
MAC
,
"Invalid code rate or Mod order, likely due to unexpected DL DCI.
\n
"
);
return
-
1
;
}
NR_UE_HARQ_STATUS_t
*
current_harq
=
&
mac
->
dl_harq_info
[
dci
->
harq_pid
];
int
R
=
nr_get_code_rate_dl
(
dlsch_pdu
->
mcs
,
dlsch_pdu
->
mcs_table
);
if
(
R
>
0
)
{
dlsch_pdu
->
targetCodeRate
=
R
;
...
...
@@ -698,6 +715,11 @@ static int nr_ue_process_dci_dl_10(module_id_t module_id,
1
);
// storing for possible retransmissions
current_harq
->
R
=
dlsch_pdu
->
targetCodeRate
;
if
(
dlsch_pdu
->
ndi
==
0
&&
current_harq
->
TBS
!=
dlsch_pdu
->
TBS
)
{
LOG_W
(
NR_MAC
,
"NDI indicates re-transmission but computed TBS %d doesn't match with what previously stored %d
\n
"
,
dlsch_pdu
->
TBS
,
current_harq
->
TBS
);
dlsch_pdu
->
ndi
=
1
;
// treated as new data
}
current_harq
->
TBS
=
dlsch_pdu
->
TBS
;
}
else
{
...
...
@@ -715,8 +737,6 @@ static int nr_ue_process_dci_dl_10(module_id_t module_id,
int
bw_tbslbrm
=
current_DL_BWP
?
mac
->
sc_info
.
dl_bw_tbslbrm
:
dlsch_pdu
->
BWPSize
;
dlsch_pdu
->
tbslbrm
=
nr_compute_tbslbrm
(
dlsch_pdu
->
mcs_table
,
bw_tbslbrm
,
1
);
/* NDI (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/
dlsch_pdu
->
ndi
=
dci
->
ndi
;
/* RV (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/
dlsch_pdu
->
rv
=
dci
->
rv
;
/* HARQ_PROCESS_NUMBER (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI or TC-RNTI)*/
...
...
@@ -955,7 +975,17 @@ static int nr_ue_process_dci_dl_11(module_id_t module_id,
/* MCS (for transport block 1)*/
dlsch_pdu
->
mcs
=
dci
->
mcs
;
/* NDI (for transport block 1)*/
dlsch_pdu
->
ndi
=
dci
->
ndi
;
NR_UE_HARQ_STATUS_t
*
current_harq
=
&
mac
->
dl_harq_info
[
dci
->
harq_pid
];
if
(
dci
->
ndi
!=
mac
->
DL_ndi
[
dci
->
harq_pid
])
{
// new data
dlsch_pdu
->
ndi
=
1
;
current_harq
->
R
=
0
;
current_harq
->
TBS
=
0
;
}
else
{
dlsch_pdu
->
ndi
=
0
;
}
mac
->
DL_ndi
[
dci
->
harq_pid
]
=
dci
->
ndi
;
/* RV (for transport block 1)*/
dlsch_pdu
->
rv
=
dci
->
rv
;
/* MCS (for transport block 2)*/
...
...
@@ -1118,7 +1148,6 @@ static int nr_ue_process_dci_dl_11(module_id_t module_id,
nb_rb_oh
=
0
;
int
nb_re_dmrs
=
((
dmrs_type
==
NULL
)
?
6
:
4
)
*
dlsch_pdu
->
n_dmrs_cdm_groups
;
NR_UE_HARQ_STATUS_t
*
current_harq
=
&
mac
->
dl_harq_info
[
dci
->
harq_pid
];
int
R
=
nr_get_code_rate_dl
(
dlsch_pdu
->
mcs
,
dlsch_pdu
->
mcs_table
);
if
(
R
>
0
)
{
dlsch_pdu
->
targetCodeRate
=
R
;
...
...
@@ -1131,6 +1160,11 @@ static int nr_ue_process_dci_dl_11(module_id_t module_id,
0
,
Nl
);
// storing for possible retransmissions
if
(
dlsch_pdu
->
ndi
==
0
&&
current_harq
->
TBS
!=
dlsch_pdu
->
TBS
)
{
LOG_W
(
NR_MAC
,
"NDI indicates re-transmission but computed TBS %d doesn't match with what previously stored %d
\n
"
,
dlsch_pdu
->
TBS
,
current_harq
->
TBS
);
dlsch_pdu
->
ndi
=
1
;
// treated as new data
}
current_harq
->
R
=
dlsch_pdu
->
targetCodeRate
;
current_harq
->
TBS
=
dlsch_pdu
->
TBS
;
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
aaea7262
...
...
@@ -627,7 +627,12 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
}
/* NDI */
pusch_config_pdu
->
pusch_data
.
new_data_indicator
=
dci
->
ndi
!=
mac
->
UL_ndi
[
dci
->
harq_pid
]
?
1
:
0
;
pusch_config_pdu
->
pusch_data
.
new_data_indicator
=
0
;
if
(
dci
->
ndi
!=
mac
->
UL_ndi
[
dci
->
harq_pid
])
{
pusch_config_pdu
->
pusch_data
.
new_data_indicator
=
1
;
// if new data reset harq structure
memset
(
&
mac
->
ul_harq_info
[
dci
->
harq_pid
],
0
,
sizeof
(
mac
->
ul_harq_info
[
dci
->
harq_pid
]));
}
mac
->
UL_ndi
[
dci
->
harq_pid
]
=
dci
->
ndi
;
/* RV */
pusch_config_pdu
->
pusch_data
.
rv_index
=
dci
->
rv
;
...
...
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