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
ed39ad6a
Commit
ed39ad6a
authored
Aug 15, 2020
by
r.karey
Committed by
guhan
Feb 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more logs and fixed assertion
parent
6bff6966
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
8 deletions
+28
-8
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+4
-0
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+24
-8
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
ed39ad6a
...
@@ -698,6 +698,8 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
...
@@ -698,6 +698,8 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
n_set
=
pucch_Config
->
resourceSetToAddModList
->
list
.
count
;
n_set
=
pucch_Config
->
resourceSetToAddModList
->
list
.
count
;
AssertFatal
(
n_set
>
0
,
"PUCCH resourceSetToAddModList is empty
\n
"
);
AssertFatal
(
n_set
>
0
,
"PUCCH resourceSetToAddModList is empty
\n
"
);
LOG_I
(
MAC
,
"UCI n_set= %d
\n
"
,
n_set
);
N2
=
2
;
N2
=
2
;
// procedure to select pucch resource id from resource sets according to
// procedure to select pucch resource id from resource sets according to
// number of uci bits and pucch resource indicator pucch_resource
// number of uci bits and pucch resource indicator pucch_resource
...
@@ -725,6 +727,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
...
@@ -725,6 +727,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
}
}
else
N2
=
N3
;
else
N2
=
N3
;
}
}
LOG_I
(
MAC
,
"UCI resource id = %ld
\n
"
,
*
resource_id
);
}
}
AssertFatal
(
resource_id
!=
NULL
,
"Couldn-t find any matching PUCCH resource in the PUCCH resource sets"
);
AssertFatal
(
resource_id
!=
NULL
,
"Couldn-t find any matching PUCCH resource in the PUCCH resource sets"
);
...
@@ -763,6 +766,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
...
@@ -763,6 +766,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
pucch_pdu
->
sr_flag
=
O_sr
;
pucch_pdu
->
sr_flag
=
O_sr
;
break
;
break
;
case
NR_PUCCH_Resource__format_PR_format2
:
case
NR_PUCCH_Resource__format_PR_format2
:
LOG_I
(
MAC
,
"UCI format2 is being scheduled
\n
"
);
pucch_pdu
->
format_type
=
2
;
pucch_pdu
->
format_type
=
2
;
pucch_pdu
->
nr_of_symbols
=
pucchres
->
format
.
choice
.
format2
->
nrofSymbols
;
pucch_pdu
->
nr_of_symbols
=
pucchres
->
format
.
choice
.
format2
->
nrofSymbols
;
pucch_pdu
->
start_symbol_index
=
pucchres
->
format
.
choice
.
format2
->
startingSymbolIndex
;
pucch_pdu
->
start_symbol_index
=
pucchres
->
format
.
choice
.
format2
->
startingSymbolIndex
;
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
ed39ad6a
...
@@ -79,20 +79,32 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
...
@@ -79,20 +79,32 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
//!TODO : smae function can be written to handle csi_resources
//!TODO : smae function can be written to handle csi_resources
uint8_t
get_ssb_resources
(
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
uint8_t
get_ssb_resources
(
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
NR_CSI_ResourceConfigId_t
csi_ResourceConfigId
,
NR_CSI_ResourceConfigId_t
csi_ResourceConfigId
,
NR_CSI_ReportConfig__reportQuantity_PR
reportQuantity_type
)
{
NR_CSI_ReportConfig__reportQuantity_PR
reportQuantity_type
,
uint8_t
*
nb_resource_sets
)
{
uint8_t
idx
=
0
;
uint8_t
idx
=
0
;
//
uint8_t csi_ssb_idx =0;
uint8_t
csi_ssb_idx
=
0
;
for
(
idx
=
0
;
idx
<
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
count
;
idx
++
)
{
for
(
idx
=
0
;
idx
<
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
count
;
idx
++
)
{
if
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_ResourceConfigId
==
csi_ResourceConfigId
)
{
if
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_ResourceConfigId
==
csi_ResourceConfigId
)
{
//Finding the CSI_RS or SSB Resources
//Finding the CSI_RS or SSB Resources
if
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
present
==
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB
)
{
if
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
present
==
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB
)
{
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
){
return
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
.
count
);
*
nb_resource_sets
=
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
.
count
;
for
(
csi_ssb_idx
=
0
;
csi_ssb_idx
<
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
count
;
csi_ssb_idx
++
)
{
if
(
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceSetId
==
*
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
.
array
[
0
]))
{
return
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceList
.
list
.
count
;
}
else
{
//handle error condition
AssertFatal
(
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceSetId
,
"csi_SSB_ResourcesSetId is not configured"
);
}
}
}
else
if
(
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
==
reportQuantity_type
)
else
if
(
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
==
reportQuantity_type
)
return
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
.
count
)
;
*
nb_resource_sets
=
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
.
count
;
}
else
{
}
else
{
//TODO: find the CSI_RS IM resources
//TODO: find the CSI_RS IM resources
...
@@ -172,15 +184,17 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
...
@@ -172,15 +184,17 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
AssertFatal
(
reportQuantity_type
,
"reportQuantity is not configured"
);
AssertFatal
(
reportQuantity_type
,
"reportQuantity is not configured"
);
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
{
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
{
uint8_t
nb_ssb_resource_set
=
get_ssb_resources
(
csi_MeasConfig
,
uint8_t
nb_ssb_resource_set
=
0
;
uint8_t
nb_ssb_resources
=
get_ssb_resources
(
csi_MeasConfig
,
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
csi_report_id
]
->
resourcesForChannelMeasurement
,
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
csi_report_id
]
->
resourcesForChannelMeasurement
,
reportQuantity_type
);
//csi_MeasConfig->csi_SSB_ResourceSetToAddModList->list.array[0]->CSI_SSB_ResourceList.list.count;
reportQuantity_type
,
&
nb_ssb_resource_set
);
//csi_MeasConfig->csi_SSB_ResourceSetToAddModList->list.array[0]->CSI_SSB_ResourceList.list.count;
uint8_t
idx
=
0
;
uint8_t
idx
=
0
;
uint8_t
ssb_idx
=
0
;
uint8_t
ssb_idx
=
0
;
uint8_t
diff_rsrp_idx
=
0
;
uint8_t
diff_rsrp_idx
=
0
;
uint8_t
bitlen_ssbri
=
log
(
nb_ssb_resource
_set
)
/
log
(
2
);
uint8_t
bitlen_ssbri
=
log
(
nb_ssb_resource
s
)
/
log
(
2
);
sched_ctrl
->
nr_of_csi_report
[
UE_id
]
=
nb_ssb_resource_set
;
sched_ctrl
->
nr_of_csi_report
[
UE_id
]
=
nb_ssb_resource_set
;
LOG_I
(
MAC
,
"csi_payload = %d, bitlen_ssbri = %d, nb_ssb_resource_set = %d,nb_ssb_resources = %d
\n
"
,
payload_size
,
bitlen_ssbri
,
nb_ssb_resource_set
,
nb_ssb_resources
);
/*! As per the spec 38.212 and table: 6.3.1.1.2-12 in a single UCI sequence we can have multiple CSI_report
/*! As per the spec 38.212 and table: 6.3.1.1.2-12 in a single UCI sequence we can have multiple CSI_report
* the number of CSI_report will depend on number of CSI resource sets that are configured in CSI-ResourceConfig RRC IE
* the number of CSI_report will depend on number of CSI resource sets that are configured in CSI-ResourceConfig RRC IE
* From spec 38.331 from the IE CSI-ResourceConfig for SSB RSRP reporting we can configure only one resource set
* From spec 38.331 from the IE CSI-ResourceConfig for SSB RSRP reporting we can configure only one resource set
...
@@ -217,6 +231,7 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
...
@@ -217,6 +231,7 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
}
}
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
RSRP
=
(
*
payload
)
&
0x7f
;
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
RSRP
=
(
*
payload
)
&
0x7f
;
*
payload
>>=
7
;
for
(
diff_rsrp_idx
=
0
;
diff_rsrp_idx
<=
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
nr_ssbri_cri
-
1
;
diff_rsrp_idx
++
)
{
for
(
diff_rsrp_idx
=
0
;
diff_rsrp_idx
<=
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
nr_ssbri_cri
-
1
;
diff_rsrp_idx
++
)
{
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
diff_RSRP
[
diff_rsrp_idx
]
=
(
*
payload
)
&
0x0f
;
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
diff_RSRP
[
diff_rsrp_idx
]
=
(
*
payload
)
&
0x0f
;
...
@@ -233,6 +248,7 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
...
@@ -233,6 +248,7 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
}
}
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
RSRP
=
(
*
payload
)
&
0x7f
;
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
RSRP
=
(
*
payload
)
&
0x7f
;
*
payload
>>=
7
;
/** From Table 6.3.1.1.2-3: RI, LI, CQI, and CRI of codebookType=typeI-SinglePanel */
/** From Table 6.3.1.1.2-3: RI, LI, CQI, and CRI of codebookType=typeI-SinglePanel */
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
diff_RSRP
[
0
]
=
(
*
payload
)
&
0x0f
;
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
diff_RSRP
[
0
]
=
(
*
payload
)
&
0x0f
;
*
payload
>>=
4
;
*
payload
>>=
4
;
...
...
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