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
zzha zzha
OpenXG-RAN
Commits
40279ddd
Commit
40279ddd
authored
Apr 13, 2022
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get cri_bitlen, ri_bitlen, pmi_bitlen and cqi_bitlen at UE
parent
04b234c8
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
596 additions
and
521 deletions
+596
-521
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+31
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+481
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+31
-1
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+2
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+6
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+43
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+0
-485
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+0
-2
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+0
-30
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
View file @
40279ddd
...
...
@@ -39,6 +39,7 @@
#include <stdbool.h>
#include "NR_SubcarrierSpacing.h"
#include "NR_CSI-ReportConfig.h"
#include "openair1/SCHED_NR_UE/harq_nr.h"
#define NR_SHORT_BSR_TABLE_SIZE 32
...
...
@@ -63,6 +64,7 @@
#define CCCH_PAYLOAD_SIZE_MAX 512
#define RAR_PAYLOAD_SIZE_MAX 128
#define MAX_BWP_SIZE 275
#define MAX_CSI_REPORTCONFIG 48
typedef
enum
frequency_range_e
{
FR1
=
0
,
...
...
@@ -496,5 +498,34 @@ typedef struct Type0_PDCCH_CSS_config_s {
bool
active
;
}
NR_Type0_PDCCH_CSS_config_t
;
typedef
struct
{
uint8_t
nb_ssbri_cri
;
uint8_t
cri_ssbri_bitlen
;
uint8_t
rsrp_bitlen
;
uint8_t
diff_rsrp_bitlen
;
}
L1_RSRP_bitlen_t
;
typedef
struct
{
uint8_t
ri_restriction
;
uint8_t
cri_bitlen
;
uint8_t
ri_bitlen
;
uint8_t
li_bitlen
[
8
];
uint8_t
pmi_x1_bitlen
[
8
];
uint8_t
pmi_x2_bitlen
[
8
];
uint8_t
cqi_bitlen
[
8
];
}
CSI_Meas_bitlen_t
;
typedef
struct
nr_csi_report
{
NR_CSI_ReportConfig__reportQuantity_PR
reportQuantity_type
;
long
periodicity
;
uint16_t
offset
;
long
**
SSB_Index_list
;
long
**
CSI_Index_list
;
// uint8_t nb_of_nzp_csi_report;
uint8_t
nb_of_csi_ssb_report
;
L1_RSRP_bitlen_t
CSI_report_bitlen
;
CSI_Meas_bitlen_t
csi_meas_bitlen
;
}
nr_csi_report_t
;
#endif
/*__LAYER2_MAC_H__ */
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
40279ddd
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
40279ddd
...
...
@@ -102,7 +102,7 @@ uint8_t get_pusch_mcs_table(long *mcs_Table,
uint8_t
compute_nr_root_seq
(
NR_RACH_ConfigCommon_t
*
rach_config
,
uint8_t
nb_preambles
,
uint8_t
unpaired
,
frequency_range_t
);
frequency_range_t
);
int
ul_ant_bits
(
NR_DMRS_UplinkConfig_t
*
NR_DMRS_UplinkConfig
,
long
transformPrecoder
);
...
...
@@ -203,4 +203,34 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
const
frame_t
frameP
,
const
sub_frame_t
subframeP
,
const
rnti_t
rntiP
);
uint8_t
number_of_bits_set
(
uint8_t
buf
);
void
compute_rsrp_bitlen
(
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
uint8_t
nb_resources
,
nr_csi_report_t
*
csi_report
);
uint8_t
compute_ri_bitlen
(
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
nr_csi_report_t
*
csi_report
);
void
compute_li_bitlen
(
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
uint8_t
ri_restriction
,
nr_csi_report_t
*
csi_report
);
void
get_n1n2_o1o2_singlepanel
(
int
*
n1
,
int
*
n2
,
int
*
o1
,
int
*
o2
,
struct
NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo
*
morethantwo
);
void
get_x1x2_bitlen_singlepanel
(
int
n1
,
int
n2
,
int
o1
,
int
o2
,
int
*
x1
,
int
*
x2
,
int
rank
,
int
codebook_mode
);
void
compute_pmi_bitlen
(
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
uint8_t
ri_restriction
,
nr_csi_report_t
*
csi_report
);
void
compute_cqi_bitlen
(
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
uint8_t
ri_restriction
,
nr_csi_report_t
*
csi_report
);
void
compute_csi_bitlen
(
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
nr_csi_report_t
*
csi_report_template
);
#endif
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
40279ddd
...
...
@@ -399,6 +399,8 @@ typedef struct {
/// measured SSB RSRP in dBm
short
ssb_rsrp_dBm
;
nr_csi_report_t
csi_report_template
[
MAX_CSI_REPORTCONFIG
];
/// measurements from CSI-RS
fapi_nr_csirs_measurements_t
csirs_measurements
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
40279ddd
...
...
@@ -213,6 +213,12 @@ uint8_t get_ssb_rsrp_payload(NR_UE_MAC_INST_t *mac,
NR_CSI_ResourceConfigId_t
csi_ResourceConfigId
,
NR_CSI_MeasConfig_t
*
csi_MeasConfig
);
uint8_t
get_csirs_RI_PMI_CQI_payload
(
NR_UE_MAC_INST_t
*
mac
,
PUCCH_sched_t
*
pucch
,
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
NR_CSI_ResourceConfigId_t
csi_ResourceConfigId
,
NR_CSI_MeasConfig_t
*
csi_MeasConfig
);
uint8_t
nr_get_csi_payload
(
NR_UE_MAC_INST_t
*
mac
,
PUCCH_sched_t
*
pucch
,
int
csi_report_id
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
40279ddd
...
...
@@ -2486,8 +2486,10 @@ uint8_t nr_get_csi_payload(NR_UE_MAC_INST_t *mac,
case
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
:
n_csi_bits
=
get_ssb_rsrp_payload
(
mac
,
pucch
,
csi_reportconfig
,
csi_ResourceConfigId
,
csi_MeasConfig
);
break
;
case
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
:
case
NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_PMI_CQI
:
n_csi_bits
=
get_csirs_RI_PMI_CQI_payload
(
mac
,
pucch
,
csi_reportconfig
,
csi_ResourceConfigId
,
csi_MeasConfig
);
break
;
case
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
:
case
NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_i1
:
case
NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_i1_CQI
:
case
NR_CSI_ReportConfig__reportQuantity_PR_cri_RI_CQI
:
...
...
@@ -2580,6 +2582,46 @@ uint8_t get_ssb_rsrp_payload(NR_UE_MAC_INST_t *mac,
return
bits
;
}
uint8_t
get_csirs_RI_PMI_CQI_payload
(
NR_UE_MAC_INST_t
*
mac
,
PUCCH_sched_t
*
pucch
,
struct
NR_CSI_ReportConfig
*
csi_reportconfig
,
NR_CSI_ResourceConfigId_t
csi_ResourceConfigId
,
NR_CSI_MeasConfig_t
*
csi_MeasConfig
)
{
int
bits
=
0
;
uint32_t
temp_payload
=
0
;
for
(
int
csi_resourceidx
=
0
;
csi_resourceidx
<
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
count
;
csi_resourceidx
++
)
{
struct
NR_CSI_ResourceConfig
*
csi_resourceconfig
=
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
csi_resourceidx
];
if
(
csi_resourceconfig
->
csi_ResourceConfigId
==
csi_ResourceConfigId
)
{
for
(
int
csi_idx
=
0
;
csi_idx
<
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
->
list
.
count
;
csi_idx
++
)
{
if
(
csi_MeasConfig
->
nzp_CSI_RS_ResourceSetToAddModList
->
list
.
array
[
csi_idx
]
->
nzp_CSI_ResourceSetId
==
*
(
csi_resourceconfig
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
.
array
[
0
]))
{
nr_csi_report_t
*
csi_report
=
&
mac
->
csi_report_template
[
csi_reportconfig
->
reportConfigId
];
compute_csi_bitlen
(
csi_MeasConfig
,
mac
->
csi_report_template
);
int
cri_bitlen
=
csi_report
->
csi_meas_bitlen
.
cri_bitlen
;
int
ri_bitlen
=
csi_report
->
csi_meas_bitlen
.
ri_bitlen
;
int
pmi_bitlen
=
csi_report
->
csi_meas_bitlen
.
pmi_x1_bitlen
[
*
mac
->
csirs_measurements
.
rank_indicator
]
+
csi_report
->
csi_meas_bitlen
.
pmi_x2_bitlen
[
*
mac
->
csirs_measurements
.
rank_indicator
];
int
cqi_bitlen
=
csi_report
->
csi_meas_bitlen
.
cqi_bitlen
[
*
mac
->
csirs_measurements
.
rank_indicator
];
LOG_I
(
NR_MAC
,
"cri_bitlen = %d
\n
"
,
cri_bitlen
);
LOG_I
(
NR_MAC
,
"ri_bitlen = %d
\n
"
,
ri_bitlen
);
LOG_I
(
NR_MAC
,
"pmi_bitlen = %d
\n
"
,
pmi_bitlen
);
LOG_I
(
NR_MAC
,
"cqi_bitlen = %d
\n
"
,
cqi_bitlen
);
break
;
}
}
}
}
pucch
->
csi_part1_payload
=
temp_payload
;
return
bits
;
}
// returns index from RSRP
// according to Table 10.1.6.1-1 in 38.133
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
40279ddd
...
...
@@ -687,7 +687,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
)
{
compute_csi_bitlen
(
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_info
,
UE_id
,
Mod_idP
);
compute_csi_bitlen
(
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_info
->
csi_report_template
[
UE_id
]
);
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
40279ddd
...
...
@@ -2296,7 +2296,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
)
{
compute_csi_bitlen
(
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_info
,
UE_id
,
mod_idP
);
compute_csi_bitlen
(
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_info
->
csi_report_template
[
UE_id
]
);
}
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
memset
(
sched_ctrl
,
0
,
sizeof
(
*
sched_ctrl
));
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
40279ddd
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
40279ddd
...
...
@@ -416,8 +416,6 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
int
nr_get_default_pucch_res
(
int
pucch_ResourceCommon
);
void
compute_csi_bitlen
(
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
NR_UE_info_t
*
UE_info
,
int
UE_id
,
module_id_t
Mod_idP
);
int
get_dlscs
(
nfapi_nr_config_request_t
*
cfg
);
int
get_ulscs
(
nfapi_nr_config_request_t
*
cfg
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
40279ddd
...
...
@@ -502,35 +502,6 @@ struct CSI_Report {
#define MAX_SR_BITLEN 8
typedef
struct
{
uint8_t
nb_ssbri_cri
;
uint8_t
cri_ssbri_bitlen
;
uint8_t
rsrp_bitlen
;
uint8_t
diff_rsrp_bitlen
;
}
L1_RSRP_bitlen_t
;
typedef
struct
{
uint8_t
ri_restriction
;
uint8_t
cri_bitlen
;
uint8_t
ri_bitlen
;
uint8_t
li_bitlen
[
8
];
uint8_t
pmi_x1_bitlen
[
8
];
uint8_t
pmi_x2_bitlen
[
8
];
uint8_t
cqi_bitlen
[
8
];
}
CSI_Meas_bitlen_t
;
typedef
struct
nr_csi_report
{
NR_CSI_ReportConfig__reportQuantity_PR
reportQuantity_type
;
long
periodicity
;
uint16_t
offset
;
long
**
SSB_Index_list
;
long
**
CSI_Index_list
;
// uint8_t nb_of_nzp_csi_report;
uint8_t
nb_of_csi_ssb_report
;
L1_RSRP_bitlen_t
CSI_report_bitlen
;
CSI_Meas_bitlen_t
csi_meas_bitlen
;
}
nr_csi_report_t
;
/*! 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
...
...
@@ -679,7 +650,6 @@ typedef struct {
/*! \brief UE list used by gNB to order UEs/CC for scheduling*/
#define MAX_CSI_REPORTCONFIG 48
typedef
struct
{
/// scheduling control info
nr_csi_report_t
csi_report_template
[
MAX_MOBILES_PER_GNB
][
MAX_CSI_REPORTCONFIG
];
...
...
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