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
e9099146
Commit
e9099146
authored
Jun 30, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_MAC_UE_further_improvements_dci' into integration_2023_w26
parents
8f07050c
c08b4b9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
94 deletions
+91
-94
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+68
-67
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+18
-11
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+5
-16
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
e9099146
...
...
@@ -96,9 +96,6 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac,
const
NR_SearchSpace_t
*
ss
)
{
uint16_t
monitoringSymbolsWithinSlot
=
0
;
int
sps
=
0
;
const
NR_UE_DL_BWP_t
*
current_DL_BWP
=
&
mac
->
current_DL_BWP
;
const
NR_UE_UL_BWP_t
*
current_UL_BWP
=
&
mac
->
current_UL_BWP
;
NR_BWP_Id_t
dl_bwp_id
=
current_DL_BWP
?
current_DL_BWP
->
bwp_id
:
0
;
...
...
@@ -187,70 +184,72 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac,
mac
->
cg
,
&
mac
->
def_dci_pdu_rel15
[
dl_config
->
slot
][
dci_format
],
dci_format
,
NR_RNTI_TC
,
rnti_type
,
coreset
,
dl_bwp_id
,
ss
->
searchSpaceType
->
present
,
mac
->
type0_PDCCH_CSS_config
.
num_rbs
,
alt_size
);
}
rel15
->
BWPStart
=
coreset_id
==
0
?
mac
->
type0_PDCCH_CSS_config
.
cset_start_rb
:
current_DL_BWP
->
BWPStart
;
rel15
->
BWPSize
=
coreset_id
==
0
?
mac
->
type0_PDCCH_CSS_config
.
num_rbs
:
current_DL_BWP
->
BWPSize
;
switch
(
rnti_type
)
{
case
NR_RNTI_C
:
// we use DL BWP dedicated
sps
=
current_DL_BWP
->
cyclicprefix
?
12
:
14
;
// for SPS=14 8 MSBs in positions 13 down to 6
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
crnti
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
break
;
case
NR_RNTI_RA
:
// we use the initial DL BWP
sps
=
current_DL_BWP
->
cyclicprefix
==
NULL
?
14
:
12
;
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
ra
.
ra_rnti
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
break
;
case
NR_RNTI_P
:
break
;
case
NR_RNTI_CS
:
break
;
case
NR_RNTI_TC
:
// we use the initial DL BWP
sps
=
current_DL_BWP
->
cyclicprefix
==
NULL
?
14
:
12
;
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
ra
.
t_crnti
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
break
;
case
NR_RNTI_SP_CSI
:
break
;
case
NR_RNTI_SI
:
sps
=
14
;
// for SPS=14 8 MSBs in positions 13 down to 6
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
BWPStart
=
coreset_id
==
0
?
mac
->
type0_PDCCH_CSS_config
.
cset_start_rb
:
current_DL_BWP
->
BWPStart
;
rel15
->
BWPSize
=
coreset_id
==
0
?
mac
->
type0_PDCCH_CSS_config
.
num_rbs
:
current_DL_BWP
->
BWPSize
;
rel15
->
rnti
=
SI_RNTI
;
// SI-RNTI - 3GPP TS 38.321 Table 7.1-1: RNTI values
uint16_t
monitoringSymbolsWithinSlot
=
0
;
int
sps
=
0
;
rel15
->
SubcarrierSpacing
=
mac
->
mib
->
subCarrierSpacingCommon
;
if
(
mac
->
frequency_range
==
FR2
)
rel15
->
SubcarrierSpacing
=
mac
->
mib
->
subCarrierSpacingCommon
+
2
;
break
;
case
NR_RNTI_SFI
:
break
;
case
NR_RNTI_INT
:
break
;
case
NR_RNTI_TPC_PUSCH
:
break
;
case
NR_RNTI_TPC_PUCCH
:
break
;
case
NR_RNTI_TPC_SRS
:
break
;
default:
break
;
}
switch
(
rnti_type
)
{
case
NR_RNTI_C
:
// we use DL BWP dedicated
sps
=
current_DL_BWP
->
cyclicprefix
?
12
:
14
;
// for SPS=14 8 MSBs in positions 13 down to 6
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
crnti
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
break
;
case
NR_RNTI_RA
:
// we use the initial DL BWP
sps
=
current_DL_BWP
->
cyclicprefix
==
NULL
?
14
:
12
;
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
ra
.
ra_rnti
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
break
;
case
NR_RNTI_P
:
break
;
case
NR_RNTI_CS
:
break
;
case
NR_RNTI_TC
:
// we use the initial DL BWP
sps
=
current_DL_BWP
->
cyclicprefix
==
NULL
?
14
:
12
;
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
ra
.
t_crnti
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
break
;
case
NR_RNTI_SP_CSI
:
break
;
case
NR_RNTI_SI
:
sps
=
14
;
// for SPS=14 8 MSBs in positions 13 down to 6
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
SI_RNTI
;
// SI-RNTI - 3GPP TS 38.321 Table 7.1-1: RNTI values
rel15
->
SubcarrierSpacing
=
mac
->
mib
->
subCarrierSpacingCommon
;
if
(
mac
->
frequency_range
==
FR2
)
rel15
->
SubcarrierSpacing
=
mac
->
mib
->
subCarrierSpacingCommon
+
2
;
break
;
case
NR_RNTI_SFI
:
break
;
case
NR_RNTI_INT
:
break
;
case
NR_RNTI_TPC_PUSCH
:
break
;
case
NR_RNTI_TPC_PUCCH
:
break
;
case
NR_RNTI_TPC_SRS
:
break
;
default:
break
;
}
for
(
int
i
=
0
;
i
<
sps
;
i
++
)
{
if
((
monitoringSymbolsWithinSlot
>>
(
sps
-
1
-
i
))
&
1
)
{
rel15
->
coreset
.
StartSymbolIndex
=
i
;
...
...
@@ -263,15 +262,17 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac,
fill_dci_search_candidates
(
ss
,
rel15
,
Y
);
#ifdef DEBUG_DCI
LOG_D
(
MAC
,
"[DCI_CONFIG] Configure DCI PDU: rnti_type %d BWPSize %d BWPStart %d rel15->SubcarrierSpacing %d rel15->dci_format %d rel15->dci_length %d sps %d monitoringSymbolsWithinSlot %d
\n
"
,
rnti_type
,
rel15
->
BWPSize
,
rel15
->
BWPStart
,
rel15
->
SubcarrierSpacing
,
rel15
->
dci_format_options
[
0
],
rel15
->
dci_length_options
[
0
],
sps
,
monitoringSymbolsWithinSlot
);
for
(
int
i
=
0
;
i
<
rel15
->
num_dci_options
;
i
++
)
{
LOG_D
(
MAC
,
"[DCI_CONFIG] Configure DCI PDU: rnti_type %d BWPSize %d BWPStart %d rel15->SubcarrierSpacing %d rel15->dci_format %d rel15->dci_length %d sps %d monitoringSymbolsWithinSlot %d
\n
"
,
rnti_type
,
rel15
->
BWPSize
,
rel15
->
BWPStart
,
rel15
->
SubcarrierSpacing
,
rel15
->
dci_format_options
[
i
],
rel15
->
dci_length_options
[
i
],
sps
,
monitoringSymbolsWithinSlot
);
}
#endif
// add DCI
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
pdu_type
=
FAPI_NR_DL_CONFIG_TYPE_DCI
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
e9099146
...
...
@@ -443,14 +443,14 @@ int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_in
LOG_D
(
MAC
,
"Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)
\n
"
,
dci
->
rnti
,
dci
->
dci_format
,
dci
->
n_CCE
,
dci
->
payloadSize
,
*
(
unsigned
long
long
*
)
dci
->
payloadBits
);
int8_t
ret
=
nr_extract_dci_info
(
mac
,
dci
->
dci_format
,
dci
->
payloadSize
,
dci
->
rnti
,
dci
->
ss_type
,
(
uint64_t
*
)
dci
->
payloadBits
,
def_dci_pdu_rel15
,
slot
);
if
((
ret
&
1
)
==
1
)
return
-
1
;
const
int
ret
=
nr_extract_dci_info
(
mac
,
dci
->
dci_format
,
dci
->
payloadSize
,
dci
->
rnti
,
dci
->
ss_type
,
(
uint64_t
*
)
dci
->
payloadBits
,
def_dci_pdu_rel15
,
slot
);
if
((
ret
&
1
)
==
1
)
return
-
1
;
else
if
(
ret
==
2
)
{
dci
->
dci_format
=
NR_UL_DCI_FORMAT_0_0
;
dci
->
dci_format
=
(
dci
->
dci_format
==
NR_UL_DCI_FORMAT_0_0
)
?
NR_DL_DCI_FORMAT_1_0
:
NR_UL_DCI_FORMAT_0_0
;
def_dci_pdu_rel15
=
&
mac
->
def_dci_pdu_rel15
[
slot
][
dci
->
dci_format
];
}
int8_t
ret_proc
=
nr_ue_process_dci
(
module_id
,
cc_id
,
gNB_index
,
frame
,
slot
,
def_dci_pdu_rel15
,
dci
);
return
ret_proc
;
return
nr_ue_process_dci
(
module_id
,
cc_id
,
gNB_index
,
frame
,
slot
,
def_dci_pdu_rel15
,
dci
);
}
int8_t
nr_ue_process_dci
(
module_id_t
module_id
,
int
cc_id
,
uint8_t
gNB_index
,
frame_t
frame
,
int
slot
,
dci_pdu_rel15_t
*
dci
,
fapi_nr_dci_indication_pdu_t
*
dci_ind
)
{
...
...
@@ -653,6 +653,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
dlsch_config_pdu
.
rnti
=
rnti
;
fapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_config_pdu_1_0
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
dlsch_config_pdu
.
dlsch_config_rel15
;
dlsch_config_pdu_1_0
->
pduBitmap
=
0
;
NR_PDSCH_Config_t
*
pdsch_config
=
current_DL_BWP
?
current_DL_BWP
->
pdsch_Config
:
NULL
;
if
(
dci_ind
->
ss_type
==
NR_SearchSpace__searchSpaceType_PR_common
)
{
dlsch_config_pdu_1_0
->
BWPSize
=
mac
->
type0_PDCCH_CSS_config
.
num_rbs
?
mac
->
type0_PDCCH_CSS_config
.
num_rbs
:
current_DL_BWP
->
initial_BWPSize
;
...
...
@@ -2847,7 +2849,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
dci_pdu_rel15_t
*
dci_pdu_rel15
,
int
slot
)
{
LOG_D
(
MAC
,
"nr_extract_dci_info : dci_pdu %lx, size %d, format %d
\n
"
,
*
dci_pdu
,
dci_size
,
dci_format
);
int
pos
=
0
;
int
fsize
=
0
;
int
rnti_type
=
get_rnti_type
(
mac
,
rnti
);
...
...
@@ -2864,7 +2866,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
current_DL_BWP
->
initial_BWPSize
);
else
N_RB
=
mac
->
type0_PDCCH_CSS_config
.
num_rbs
;
LOG_D
(
MAC
,
"nr_extract_dci_info : dci_pdu %lx, size %d
\n
"
,
*
dci_pdu
,
dci_size
);
switch
(
dci_format
)
{
case
NR_DL_DCI_FORMAT_1_0
:
...
...
@@ -2914,7 +2916,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
//switch to DCI_0_0
if
(
dci_pdu_rel15
->
format_indicator
==
0
)
{
dci_pdu_rel15
=
&
mac
->
def_dci_pdu_rel15
[
slot
][
NR_UL_DCI_FORMAT_0_0
];
return
2
+
nr_extract_dci_info
(
mac
,
NR_UL_DCI_FORMAT_0_0
,
dci_size
,
rnti
,
ss_type
,
dci_pdu
,
dci_pdu_rel15
,
slot
);
return
2
+
nr_extract_dci_info
(
mac
,
NR_UL_DCI_FORMAT_0_0
,
dci_size
,
rnti
,
ss_type
,
dci_pdu
,
dci_pdu_rel15
,
slot
);
}
#ifdef DEBUG_EXTRACT_DCI
LOG_D
(
MAC
,
"Format indicator %d (%d bits) N_RB_BWP %d => %d (0x%lx)
\n
"
,
dci_pdu_rel15
->
format_indicator
,
1
,
N_RB
,
dci_size
-
pos
,
*
dci_pdu
);
...
...
@@ -3105,7 +3107,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
//switch to DCI_0_0
if
(
dci_pdu_rel15
->
format_indicator
==
0
)
{
dci_pdu_rel15
=
&
mac
->
def_dci_pdu_rel15
[
slot
][
NR_UL_DCI_FORMAT_0_0
];
return
2
+
nr_extract_dci_info
(
mac
,
NR_UL_DCI_FORMAT_0_0
,
dci_size
,
rnti
,
ss_type
,
dci_pdu
,
dci_pdu_rel15
,
slot
);
return
2
+
nr_extract_dci_info
(
mac
,
NR_UL_DCI_FORMAT_0_0
,
dci_size
,
rnti
,
ss_type
,
dci_pdu
,
dci_pdu_rel15
,
slot
);
}
// Freq domain assignment 0-16 bit
...
...
@@ -3246,8 +3248,13 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
#ifdef DEBUG_EXTRACT_DCI
LOG_I
(
MAC
,
"Format indicator %d (%d bits)=> %d (0x%lx)
\n
"
,
dci_pdu_rel15
->
format_indicator
,
1
,
dci_size
-
pos
,
*
dci_pdu
);
#endif
if
(
dci_pdu_rel15
->
format_indicator
==
1
)
return
1
;
// discard dci, format indicator not corresponding to dci_format
//switch to DCI_1_0
if
(
dci_pdu_rel15
->
format_indicator
==
1
)
{
dci_pdu_rel15
=
&
mac
->
def_dci_pdu_rel15
[
slot
][
NR_DL_DCI_FORMAT_1_0
];
return
2
+
nr_extract_dci_info
(
mac
,
NR_DL_DCI_FORMAT_1_0
,
dci_size
,
rnti
,
ss_type
,
dci_pdu
,
dci_pdu_rel15
,
slot
);
}
fsize
=
dci_pdu_rel15
->
frequency_domain_assignment
.
nbits
;
pos
+=
fsize
;
dci_pdu_rel15
->
frequency_domain_assignment
.
val
=
(
*
dci_pdu
>>
(
dci_size
-
pos
))
&
((
1
<<
fsize
)
-
1
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
e9099146
...
...
@@ -951,7 +951,7 @@ void nr_ue_dl_scheduler(nr_downlink_indication_t *dl_info)
nr_scheduled_response_t
scheduled_response
;
nr_dcireq_t
dcireq
;
if
(
mac
->
state
==
UE_CONNECTED
)
{
if
(
mac
->
state
>
UE_NOT_SYNC
)
{
dcireq
.
module_id
=
mod_id
;
dcireq
.
gNB_index
=
gNB_index
;
...
...
@@ -964,8 +964,10 @@ void nr_ue_dl_scheduler(nr_downlink_indication_t *dl_info)
if
(
mac
->
ul_time_alignment
.
ta_apply
)
schedule_ta_command
(
dl_config
,
&
mac
->
ul_time_alignment
);
nr_schedule_csirs_reception
(
mac
,
rx_frame
,
rx_slot
);
nr_schedule_csi_for_im
(
mac
,
rx_frame
,
rx_slot
);
if
(
mac
->
state
==
UE_CONNECTED
)
{
nr_schedule_csirs_reception
(
mac
,
rx_frame
,
rx_slot
);
nr_schedule_csi_for_im
(
mac
,
rx_frame
,
rx_slot
);
}
dcireq
.
dl_config_req
=
*
dl_config
;
fill_scheduled_response
(
&
scheduled_response
,
&
dcireq
.
dl_config_req
,
NULL
,
NULL
,
mod_id
,
cc_id
,
rx_frame
,
rx_slot
,
dl_info
->
phy_data
);
...
...
@@ -974,19 +976,6 @@ void nr_ue_dl_scheduler(nr_downlink_indication_t *dl_info)
mac
->
if_module
->
scheduled_response
(
&
scheduled_response
);
}
}
else
if
(
mac
->
state
==
UE_PERFORMING_RA
)
{
// this is for Msg2/Msg4
if
(
mac
->
ra
.
ra_state
>=
WAIT_RAR
)
{
if
(
mac
->
ul_time_alignment
.
ta_apply
)
schedule_ta_command
(
dl_config
,
&
mac
->
ul_time_alignment
);
config_dci_pdu
(
mac
,
dl_config
,
mac
->
ra
.
ra_state
==
WAIT_RAR
?
NR_RNTI_RA
:
NR_RNTI_TC
,
rx_slot
,
mac
->
ra_SS
);
dl_config
->
number_pdus
=
1
;
LOG_D
(
MAC
,
"mac->cg %p: Calling fill_scheduled_response for type0_pdcch, num_pdus %d
\n
"
,
mac
->
cg
,
dl_config
->
number_pdus
);
fill_scheduled_response
(
&
scheduled_response
,
dl_config
,
NULL
,
NULL
,
mod_id
,
cc_id
,
rx_frame
,
rx_slot
,
dl_info
->
phy_data
);
if
(
mac
->
if_module
!=
NULL
&&
mac
->
if_module
->
scheduled_response
!=
NULL
)
mac
->
if_module
->
scheduled_response
(
&
scheduled_response
);
}
}
else
dl_config
->
number_pdus
=
0
;
}
...
...
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