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
ZhouShuya
OpenXG-RAN
Commits
73281a43
Commit
73281a43
authored
Sep 29, 2020
by
Hongzhi Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ue computing csi bit length from rrc
parent
4b4304b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
4 deletions
+48
-4
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+45
-3
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
+3
-1
No files found.
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
73281a43
...
...
@@ -282,7 +282,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
(
nr_is_ri_TXOp
(
ue
,
proc
,
gNB_id
)
==
1
));
//if (mac->csirc->reportQuantity.choice.ssb_Index_RSRP){
csi_status
=
get_csi_nr
(
ue
,
gNB_id
,
&
csi_payload
);
csi_status
=
get_csi_nr
(
mac
,
ue
,
gNB_id
,
&
csi_payload
);
//}
O_CSI
=
cqi_status
+
ri_status
+
csi_status
;
...
...
@@ -1299,15 +1299,57 @@ uint32_t dummy_csi_payload = 0;
/* FFS TODO_NR code that should be developed */
int
get_csi_nr
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
uint32_t
*
csi_payload
)
uint16_t
get_csi_bitlen
(
NR_UE_MAC_INST_t
*
mac
)
{
uint16_t
csi_bitlen
=
0
;
uint16_t
rsrp_bitlen
=
0
;
uint16_t
diff_rsrp_bitlen
=
0
;
uint16_t
nb_ssbri_cri
=
0
;
uint16_t
cri_ssbri_bitlen
=
0
;
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
mac
->
scg
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
struct
NR_CSI_ResourceConfig__csi_RS_ResourceSetList__nzp_CSI_RS_SSB
*
nzp_CSI_RS_SSB
=
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
0
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
;
uint16_t
nb_csi_ssb_report
=
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
!=
NULL
?
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
.
count
:
0
;
if
(
0
!=
nb_csi_ssb_report
){
uint8_t
nb_ssb_resources
=
0
;
if
(
NULL
!=
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
0
]
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
)
nb_ssbri_cri
=
*
(
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
0
]
->
groupBasedBeamReporting
.
choice
.
disabled
->
nrofReportedRS
)
+
1
;
else
nb_ssbri_cri
=
1
;
nb_ssb_resources
=
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
0
]
->
csi_SSB_ResourceList
.
list
.
count
;
if
(
nb_ssb_resources
){
cri_ssbri_bitlen
=
ceil
(
log2
(
nb_ssb_resources
));
rsrp_bitlen
=
7
;
diff_rsrp_bitlen
=
4
;
}
else
{
cri_ssbri_bitlen
=
0
;
rsrp_bitlen
=
0
;
diff_rsrp_bitlen
=
0
;
}
csi_bitlen
=
((
cri_ssbri_bitlen
*
nb_ssbri_cri
)
+
rsrp_bitlen
+
(
diff_rsrp_bitlen
*
(
nb_ssbri_cri
-
1
)))
*
nb_csi_ssb_report
;
printf
(
"get csi bitlen %d nb_ssbri_cri %d nb_csi_report %d nb_resources %d
\n
"
,
csi_bitlen
,
nb_ssbri_cri
,
nb_csi_ssb_report
,
nb_ssb_resources
);
}
return
csi_bitlen
;
}
int
get_csi_nr
(
NR_UE_MAC_INST_t
*
mac
,
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
uint32_t
*
csi_payload
)
{
VOID_PARAMETER
ue
;
VOID_PARAMETER
gNB_id
;
float
rsrp_db
[
7
];
int
nElem
=
98
;
int
rsrp_offset
=
17
;
int
csi_status
=
11
;
int
csi_status
=
0
;
csi_status
=
get_csi_bitlen
(
mac
);
rsrp_db
[
0
]
=
get_nr_RSRP
(
0
,
0
,
0
);
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
View file @
73281a43
...
...
@@ -331,13 +331,15 @@ int trigger_periodic_scheduling_request(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_n
@param csi_payload is updated with CSI
@returns number of bits of CSI */
int
get_csi_nr
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
uint32_t
*
csi_payload
);
int
get_csi_nr
(
NR_UE_MAC_INST_t
*
mac
,
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
uint32_t
*
csi_payload
);
/** \brief This dummy function sets current CSI for simulation
@param csi_status
@param csi_payload is updated with CSI
@returns none */
uint16_t
get_csi_bitlen
(
NR_UE_MAC_INST_t
*
mac
);
void
set_csi_nr
(
int
csi_status
,
uint32_t
csi_payload
);
uint8_t
get_nb_symbols_pucch
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
);
...
...
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