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
Michael Black
OpenXG-RAN
Commits
1f75a978
Commit
1f75a978
authored
Nov 22, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scheduling of csi for im
parent
79be6685
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
22 deletions
+109
-22
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h
+2
-1
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+17
-0
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+4
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+16
-16
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+1
-1
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+1
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+67
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-1
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h
View file @
1f75a978
...
...
@@ -47,7 +47,8 @@
#define FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH 0x04
#define FAPI_NR_DL_CONFIG_TYPE_P_DLSCH 0x05
#define FAPI_NR_DL_CONFIG_TYPE_CSI_RS 0x06
#define FAPI_NR_DL_CONFIG_TYPES 0x06
#define FAPI_NR_DL_CONFIG_TYPE_CSI_IM 0x07
#define FAPI_NR_DL_CONFIG_TYPES 0x07
#define FAPI_NR_CCE_REG_MAPPING_TYPE_INTERLEAVED 0x01
#define FAPI_NR_CCE_REG_MAPPING_TYPE_NON_INTERLEAVED 0x02
...
...
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
1f75a978
...
...
@@ -452,17 +452,34 @@ typedef struct {
}
fapi_nr_dl_config_csirs_pdu_rel15_t
;
typedef
struct
{
uint16_t
bwp_size
;
uint16_t
bwp_start
;
uint8_t
subcarrier_spacing
;
uint16_t
start_rb
;
uint16_t
nr_of_rbs
;
uint8_t
k_csiim
[
4
];
uint8_t
l_csiim
[
4
];
}
fapi_nr_dl_config_csiim_pdu_rel15_t
;
typedef
struct
{
fapi_nr_dl_config_csirs_pdu_rel15_t
csirs_config_rel15
;
}
fapi_nr_dl_config_csirs_pdu
;
typedef
struct
{
fapi_nr_dl_config_csiim_pdu_rel15_t
csiim_config_rel15
;
}
fapi_nr_dl_config_csiim_pdu
;
typedef
struct
{
uint8_t
pdu_type
;
union
{
fapi_nr_dl_config_dci_pdu
dci_config_pdu
;
fapi_nr_dl_config_dlsch_pdu
dlsch_config_pdu
;
fapi_nr_dl_config_csirs_pdu
csirs_config_pdu
;
fapi_nr_dl_config_csiim_pdu
csiim_config_pdu
;
};
}
fapi_nr_dl_config_request_pdu_t
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
1f75a978
...
...
@@ -132,8 +132,11 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
pdcch_vars
->
slot
=
slot
;
LOG_D
(
PHY
,
"Number of DCI SearchSpaces %d
\n
"
,
pdcch_vars
->
nb_search_space
);
break
;
case
FAPI_NR_DL_CONFIG_TYPE_CSI_IM
:
LOG_I
(
PHY
,
"Received CSI-IM PDU at FAPI
\n
"
);
break
;
case
FAPI_NR_DL_CONFIG_TYPE_CSI_RS
:
LOG_
D
(
PHY
,
"Received CSI-RS PDU at FAPI
\n
"
);
LOG_
I
(
PHY
,
"Received CSI-RS PDU at FAPI
\n
"
);
break
;
case
FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH
:
dlsch_config_pdu
=
&
dl_config
->
dl_config_list
[
i
].
dlsch_config_pdu
.
dlsch_config_rel15
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
1f75a978
...
...
@@ -3282,65 +3282,65 @@ uint16_t get_ssb_start_symbol(const long band, NR_SubcarrierSpacing_t scs, int i
void
csi_period_offset
(
NR_CSI_ReportConfig_t
*
csirep
,
NR_NZP_CSI_RS_Resource_t
*
nzpcsi
,
struct
NR_CSI_ResourcePeriodicityAndOffset
*
periodicityAndOffset
,
int
*
period
,
int
*
offset
)
{
if
(
nzpcsi
!=
NULL
)
{
if
(
periodicityAndOffset
!=
NULL
)
{
NR_CSI_ResourcePeriodicityAndOffset_PR
p_and_o
=
nzpcsi
->
periodicityAndOffset
->
present
;
NR_CSI_ResourcePeriodicityAndOffset_PR
p_and_o
=
periodicityAndOffset
->
present
;
switch
(
p_and_o
){
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots4
:
*
period
=
4
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots4
;
*
offset
=
periodicityAndOffset
->
choice
.
slots4
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots5
:
*
period
=
5
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots5
;
*
offset
=
periodicityAndOffset
->
choice
.
slots5
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots8
:
*
period
=
8
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots8
;
*
offset
=
periodicityAndOffset
->
choice
.
slots8
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots10
:
*
period
=
10
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots10
;
*
offset
=
periodicityAndOffset
->
choice
.
slots10
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots16
:
*
period
=
16
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots16
;
*
offset
=
periodicityAndOffset
->
choice
.
slots16
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots20
:
*
period
=
20
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots20
;
*
offset
=
periodicityAndOffset
->
choice
.
slots20
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots32
:
*
period
=
32
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots32
;
*
offset
=
periodicityAndOffset
->
choice
.
slots32
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots40
:
*
period
=
40
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots40
;
*
offset
=
periodicityAndOffset
->
choice
.
slots40
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots64
:
*
period
=
64
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots64
;
*
offset
=
periodicityAndOffset
->
choice
.
slots64
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots80
:
*
period
=
80
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots80
;
*
offset
=
periodicityAndOffset
->
choice
.
slots80
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots160
:
*
period
=
160
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots160
;
*
offset
=
periodicityAndOffset
->
choice
.
slots160
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots320
:
*
period
=
320
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots320
;
*
offset
=
periodicityAndOffset
->
choice
.
slots320
;
break
;
case
NR_CSI_ResourcePeriodicityAndOffset_PR_slots640
:
*
period
=
640
;
*
offset
=
nzpcsi
->
periodicityAndOffset
->
choice
.
slots640
;
*
offset
=
periodicityAndOffset
->
choice
.
slots640
;
break
;
default:
AssertFatal
(
1
==
0
,
"No periodicity and offset found in CSI resource"
);
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
1f75a978
...
...
@@ -158,7 +158,7 @@ int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH);
void
find_period_offest_SR
(
NR_SchedulingRequestResourceConfig_t
*
SchedulingReqRec
,
int
*
period
,
int
*
offset
);
void
csi_period_offset
(
NR_CSI_ReportConfig_t
*
csirep
,
NR_NZP_CSI_RS_Resource_t
*
nzpcsi
,
struct
NR_CSI_ResourcePeriodicityAndOffset
*
periodicityAndOffset
,
int
*
period
,
int
*
offset
);
void
reverse_n_bits
(
uint8_t
*
value
,
uint16_t
bitlen
);
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
1f75a978
...
...
@@ -354,6 +354,7 @@ and fills the PRACH PDU per each FD occasion.
void
nr_ue_prach_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
int
thread_id
);
void
nr_ue_pucch_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
int
slotP
,
int
thread_id
);
void
nr_schedule_csirs_reception
(
NR_UE_MAC_INST_t
*
mac
,
int
frame
,
int
slot
);
void
nr_schedule_csi_for_im
(
NR_UE_MAC_INST_t
*
mac
,
int
frame
,
int
slot
);
/* \brief This function schedules the Msg3 transmission
@param
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
1f75a978
...
...
@@ -901,6 +901,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
if
(
mac
->
cg
!=
NULL
){
// we have a cg
nr_schedule_csirs_reception
(
mac
,
rx_frame
,
rx_slot
);
nr_schedule_csi_for_im
(
mac
,
rx_frame
,
rx_slot
);
dcireq
.
module_id
=
mod_id
;
dcireq
.
gNB_index
=
gNB_index
;
...
...
@@ -2166,6 +2167,70 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, in
}
void
nr_schedule_csi_for_im
(
NR_UE_MAC_INST_t
*
mac
,
int
frame
,
int
slot
)
{
if
(
mac
->
ra
.
ra_state
==
RA_SUCCEEDED
||
get_softmodem_params
()
->
phy_test
==
1
)
{
NR_CellGroupConfig_t
*
CellGroup
=
mac
->
cg
;
if
(
!
CellGroup
||
!
CellGroup
->
spCellConfig
||
!
CellGroup
->
spCellConfig
->
spCellConfigDedicated
||
!
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
)
return
;
NR_CSI_MeasConfig_t
*
csi_measconfig
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
if
(
csi_measconfig
->
csi_IM_ResourceToAddModList
==
NULL
)
return
;
fapi_nr_dl_config_request_t
*
dl_config
=
&
mac
->
dl_config_request
;
NR_CSI_IM_Resource_t
*
imcsi
;
int
period
,
offset
;
NR_BWP_Id_t
dl_bwp_id
=
mac
->
DL_BWP_Id
;
int
mu
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
?
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
:
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
.
subcarrierSpacing
;
for
(
int
id
=
0
;
id
<
csi_measconfig
->
csi_IM_ResourceToAddModList
->
list
.
count
;
id
++
){
imcsi
=
csi_measconfig
->
csi_IM_ResourceToAddModList
->
list
.
array
[
id
];
csi_period_offset
(
NULL
,
imcsi
->
periodicityAndOffset
,
&
period
,
&
offset
);
if
((
frame
*
nr_slots_per_frame
[
mu
]
+
slot
-
offset
)
%
period
==
0
)
{
fapi_nr_dl_config_csiim_pdu_rel15_t
*
csiim_config_pdu
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
csiim_config_pdu
.
csiim_config_rel15
;
if
(
mac
->
DLbwp
[
dl_bwp_id
-
1
]){
csiim_config_pdu
->
bwp_size
=
NRRIV2BW
(
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
csiim_config_pdu
->
bwp_start
=
NRRIV2PRBOFFSET
(
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
}
else
{
csiim_config_pdu
->
bwp_size
=
NRRIV2BW
(
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
csiim_config_pdu
->
bwp_start
=
NRRIV2PRBOFFSET
(
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
}
csiim_config_pdu
->
subcarrier_spacing
=
mu
;
csiim_config_pdu
->
start_rb
=
imcsi
->
freqBand
->
startingRB
;
csiim_config_pdu
->
nr_of_rbs
=
imcsi
->
freqBand
->
nrofRBs
;
// As specified in 5.2.2.4 of 38.214
switch
(
imcsi
->
csi_IM_ResourceElementPattern
->
present
)
{
case
NR_CSI_IM_Resource__csi_IM_ResourceElementPattern_PR_pattern0
:
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
csiim_config_pdu
->
k_csiim
[
i
]
=
(
imcsi
->
csi_IM_ResourceElementPattern
->
choice
.
pattern0
->
subcarrierLocation_p0
<<
1
)
+
(
i
>>
1
);
csiim_config_pdu
->
l_csiim
[
i
]
=
imcsi
->
csi_IM_ResourceElementPattern
->
choice
.
pattern0
->
symbolLocation_p0
+
(
i
%
2
);
}
break
;
case
NR_CSI_IM_Resource__csi_IM_ResourceElementPattern_PR_pattern1
:
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
csiim_config_pdu
->
k_csiim
[
i
]
=
(
imcsi
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
->
subcarrierLocation_p1
<<
2
)
+
i
;
csiim_config_pdu
->
l_csiim
[
i
]
=
imcsi
->
csi_IM_ResourceElementPattern
->
choice
.
pattern1
->
symbolLocation_p1
;
}
break
;
default:
AssertFatal
(
1
==
0
,
"Invalid CSI-IM pattern
\n
"
);
}
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
pdu_type
=
FAPI_NR_DL_CONFIG_TYPE_CSI_IM
;
dl_config
->
number_pdus
=
dl_config
->
number_pdus
+
1
;
}
}
}
}
void
nr_schedule_csirs_reception
(
NR_UE_MAC_INST_t
*
mac
,
int
frame
,
int
slot
)
{
if
(
mac
->
ra
.
ra_state
==
RA_SUCCEEDED
||
...
...
@@ -2192,9 +2257,9 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
for
(
int
id
=
0
;
id
<
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
;
id
++
){
nzpcsi
=
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
array
[
id
];
csi_period_offset
(
NULL
,
nzpcsi
,
&
period
,
&
offset
);
csi_period_offset
(
NULL
,
nzpcsi
->
periodicityAndOffset
,
&
period
,
&
offset
);
if
((
frame
*
nr_slots_per_frame
[
mu
]
+
slot
-
offset
)
%
period
==
0
)
{
LOG_
I
(
MAC
,
"Scheduling reception of CSI-RS in frame %d slot %d
\n
"
,
frame
,
slot
);
LOG_
D
(
MAC
,
"Scheduling reception of CSI-RS in frame %d slot %d
\n
"
,
frame
,
slot
);
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
csirs_config_pdu
.
csirs_config_rel15
;
NR_CSI_RS_ResourceMapping_t
resourceMapping
=
nzpcsi
->
resourceMapping
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
1f75a978
...
...
@@ -2225,7 +2225,7 @@ void nr_csirs_scheduling(int Mod_idP,
for
(
int
id
=
0
;
id
<
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
count
;
id
++
){
nzpcsi
=
csi_measconfig
->
nzp_CSI_RS_ResourceToAddModList
->
list
.
array
[
id
];
NR_CSI_RS_ResourceMapping_t
resourceMapping
=
nzpcsi
->
resourceMapping
;
csi_period_offset
(
NULL
,
nzpcsi
,
&
period
,
&
offset
);
csi_period_offset
(
NULL
,
nzpcsi
->
periodicityAndOffset
,
&
period
,
&
offset
);
if
((
frame
*
n_slots_frame
+
slot
-
offset
)
%
period
==
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