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
canghaiwuhen
OpenXG-RAN
Commits
7f7bad3c
Commit
7f7bad3c
authored
Aug 15, 2020
by
r.karey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more logs and fixed assertion
parent
1aa7a605
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
9 deletions
+29
-9
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
+25
-9
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
7f7bad3c
...
...
@@ -805,6 +805,8 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
n_set
=
pucch_Config
->
resourceSetToAddModList
->
list
.
count
;
AssertFatal
(
n_set
>
0
,
"PUCCH resourceSetToAddModList is empty
\n
"
);
LOG_I
(
MAC
,
"UCI n_set= %d
\n
"
,
n_set
);
N2
=
2
;
// procedure to select pucch resource id from resource sets according to
// number of uci bits and pucch resource indicator pucch_resource
...
...
@@ -828,6 +830,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
}
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"
);
...
...
@@ -866,6 +869,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
pucch_pdu
->
sr_flag
=
O_sr
;
break
;
case
NR_PUCCH_Resource__format_PR_format2
:
LOG_I
(
MAC
,
"UCI format2 is being scheduled
\n
"
);
pucch_pdu
->
format_type
=
2
;
pucch_pdu
->
nr_of_symbols
=
pucchres
->
format
.
choice
.
format2
->
nrofSymbols
;
pucch_pdu
->
start_symbol_index
=
pucchres
->
format
.
choice
.
format2
->
startingSymbolIndex
;
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
7f7bad3c
...
...
@@ -81,20 +81,32 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
//!TODO : smae function can be written to handle csi_resources
uint8_t
get_ssb_resources
(
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
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 csi_ssb_idx =0;
uint8_t
csi_ssb_idx
=
0
;
for
(
idx
=
0
;
idx
<
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
count
;
idx
++
)
{
if
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_ResourceConfigId
==
csi_ResourceConfigId
)
{
//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
(
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
);
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
){
*
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
)
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
{
//TODO: find the CSI_RS IM resources
...
...
@@ -145,15 +157,17 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
AssertFatal
(
reportQuantity_type
,
"reportQuantity is not configured"
);
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
,
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
ssb_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
;
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
* 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
...
...
@@ -190,6 +204,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
;
*
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
++
)
{
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
diff_RSRP
[
diff_rsrp_idx
]
=
(
*
payload
)
&
0x0f
;
...
...
@@ -206,6 +221,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
;
*
payload
>>=
7
;
/** 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
;
*
payload
>>=
4
;
...
...
@@ -324,7 +340,7 @@ void handle_nr_uci(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl, NR_mac_
int
bwp_id
=
1
;
NR_BWP_Uplink_t
*
ubwp
=
RC
.
nrmac
[
Mod_idP
]
->
UE_list
.
secondaryCellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_id
-
1
];
NR_SubcarrierSpacing_t
scs
=
ubwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
LOG_I
(
PHY
,
"SFN/SF:%d%d scs %d
\n
"
,
LOG_I
(
PHY
,
"SFN/SF:%d%d scs %
l
d
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
);
//API to parse the csi report and store it into sched_ctrl
...
...
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