Commit efcd4210 authored by Rangaswami's avatar Rangaswami Committed by guhan

Initial commits for TCI and CSI reporting changes

parent 06d0f863
......@@ -292,6 +292,11 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
uci_01->ul_cqi,
30);
if ( uci_01->sr->sr_indication && !(uci_01->sr->sr_confidence_level)) {
sched_ctrl->sr_req.nr_of_srs =1;
sched_ctrl->sr_req.ul_SR[0] = 1;
}
// TODO
int max_harq_rounds = 4; // TODO define macro
if (((uci_01->pduBitmap >> 1) & 0x01)) {
......@@ -358,6 +363,20 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
uci_234->ul_cqi,
30);
if ( uci_234 -> pduBitmap & 0x01 ) {
///Handle SR PDU
uint8_t sr_id = 0;
uint8_t payload_size = ceil(uci_234->sr.sr_bit_len/8);
uint8_t *payload = calloc (payload_size, sizeof (uint8_t));
memcpy (payload, uci_234->sr.sr_payload, payload_size);
for (sr_id = 0; sr_id < uci_234->sr.sr_bit_len; sr_id++) {
sched_ctrl->sr_req.ul_SR[sr_id] = *payload & 1;
*payload >>= 1;
}
sched_ctrl->sr_req.nr_of_srs = uci_234->sr.sr_bit_len;
}
// TODO
int max_harq_rounds = 4; // TODO define macro
if ((uci_234->pduBitmap >> 1) & 0x01) {
......
......@@ -346,6 +346,58 @@ typedef struct NR_UE_harq {
uint16_t feedback_slot;
} NR_UE_harq_t;
//! fixme : need to enhace for the multiple TB CQI report
//
/*! As per spec 38.214 section 5.2.1.4.2
* - if the UE is configured with the higher layer parameter groupBasedBeamReporting set to 'disabled', the UE shall report in
a single report nrofReportedRS (higher layer configured) different CRI or SSBRI for each report setting.
* - if the UE is configured with the higher layer parameter groupBasedBeamReporting set to 'enabled', the UE shall report in a
single reporting instance two different CRI or SSBRI for each report setting, where CSI-RS and/or SSB
resources can be received simultaneously by the UE either with a single spatial domain receive filter, or with
multiple simultaneous spatial domain receive filter
*/
#define MAX_NR_OF_REPORTED_RS 4
typedef enum NR_CSI_Report_Config {
CSI_Report_PR_cri_ri_li_pmi_cqi_report,
CSI_Report_PR_ssb_cri_report
} NR_CSI_Report_Config_PR;
struct CRI_RI_LI_PMI_CQI {
uint8_t cri;
uint8_t ri;
uint8_t li;
uint8_t pmi_x1;
uint8_t pmi_x2;
uint8_t cqi;
};
typedef struct CRI_SSB_RSRP {
uint8_t nr_ssbri_cri;
uint8_t CRI_SSBRI[MAX_NR_OF_REPORTED_RS];
uint8_t RSRP;
uint8_t diff_RSRP[MAX_NR_OF_REPORTED_RS - 1];
} CRI_SSB_RSRP_t;
struct CSI_Report {
NR_CSI_Report_Config_PR present;
union Config_CSI_Report {
struct CRI_RI_LI_PMI_CQI cri_ri_li_pmi_cqi_report;
struct CRI_SSB_RSRP ssb_cri_report;
} choice;
};
#define MAX_SR_BITLEN 8
typedef struct NR_UE_sr {
uint8_t nr_of_srs;
bool ul_SR [MAX_SR_BITLEN];
} NR_UE_sr_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
From spec 38.214 section 5.2.1.2 For periodic and semi-persistent CSI Resource Settings, the number of CSI-RS Resource Sets configured is limited to S=1
*/
#define MAX_CSI_RESOURCE_SET_IN_CSI_RESOURCE_CONFIG 16
typedef struct NR_UE_old_sched {
uint16_t rbSize;
int time_domain_allocation;
......@@ -523,6 +575,7 @@ typedef struct {
uint8_t tpc0;
uint8_t tpc1;
uint16_t ul_rssi;
uint8_t current_harq_pid;
NR_UE_harq_t harq_processes[NR_MAX_NB_HARQ_PROCESSES];
NR_UE_ul_harq_t ul_harq_processes[NR_MAX_NB_HARQ_PROCESSES];
int dummy;
......@@ -547,7 +600,6 @@ typedef struct {
} NR_mac_stats_t;
/*! \brief UNR_E_list_t is a "list" of users within UE_info_t. Especial useful in
* the scheduler and to keep "classes" of users. */
typedef struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment