Commit 4dd35c65 authored by Cedric Roux's avatar Cedric Roux

DL CQI reporting

parent c21ac3b1
...@@ -3488,6 +3488,18 @@ printf("PHY RX f/sf %d/%d sched_sf %d\n", frame, subframe, sched_subframe); ...@@ -3488,6 +3488,18 @@ printf("PHY RX f/sf %d/%d sched_sf %d\n", frame, subframe, sched_subframe);
phy_vars_eNB->lte_frame_parms.N_RB_DL, phy_vars_eNB->lte_frame_parms.N_RB_DL,
&rnti, &access_mode); &rnti, &access_mode);
phy_vars_eNB->eNB_UE_stats[i].rank = phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->o_RI[0]; phy_vars_eNB->eNB_UE_stats[i].rank = phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->o_RI[0];
#if FAPI
{
/* TODO: 2 TBs, other reporting modes - we suppose 3-0 (see 36.213 7.2.1) */
/* 13 is MAX_HL_SB */
int cqi_subband[13];
int k;
for (k = 0; k < 13; k++)
cqi_subband[k] = phy_vars_eNB->eNB_UE_stats[i].DL_subband_cqi[0][k];
mac_xface->fapi_dl_cqi_report(phy_vars_eNB->Mod_id, phy_vars_eNB->ulsch_eNB[i]->rnti, frame, subframe,
phy_vars_eNB->eNB_UE_stats[i].DL_cqi[0], cqi_subband, phy_vars_eNB->eNB_UE_stats[i].rank);
}
#endif
} }
if (ret == (1+MAX_TURBO_ITERATIONS)) { if (ret == (1+MAX_TURBO_ITERATIONS)) {
...@@ -4234,6 +4246,18 @@ printf("PHY RX f/sf %d/%d sched_sf %d\n", frame, subframe, sched_subframe); ...@@ -4234,6 +4246,18 @@ printf("PHY RX f/sf %d/%d sched_sf %d\n", frame, subframe, sched_subframe);
phy_vars_eNB->lte_frame_parms.N_RB_DL, phy_vars_eNB->lte_frame_parms.N_RB_DL,
&rnti, &access_mode); &rnti, &access_mode);
phy_vars_eNB->eNB_UE_stats[i].rank = phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->o_RI[0]; phy_vars_eNB->eNB_UE_stats[i].rank = phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->o_RI[0];
#if FAPI
{
/* TODO: 2 TBs, other reporting modes - we suppose 3-0 (see 36.213 7.2.1) */
/* 13 is MAX_HL_SB */
int cqi_subband[13];
int k;
for (k = 0; k < 13; k++)
cqi_subband[k] = phy_vars_eNB->eNB_UE_stats[i].DL_subband_cqi[0][k];
mac_xface->fapi_dl_cqi_report(phy_vars_eNB->Mod_id, phy_vars_eNB->ulsch_eNB[i]->rnti, frame, subframe,
phy_vars_eNB->eNB_UE_stats[i].DL_cqi[0], cqi_subband, phy_vars_eNB->eNB_UE_stats[i].rank);
}
#endif
} }
/* LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d harq_pid %d resetting the sched_subframeuling_flag, total cba groups %d %d\n", /* LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d harq_pid %d resetting the sched_subframeuling_flag, total cba groups %d %d\n",
......
...@@ -264,6 +264,33 @@ printf("GOT lcid %d length %d (f/sf %d/%d)\n", lcid, length, frame, subframe); ...@@ -264,6 +264,33 @@ printf("GOT lcid %d length %d (f/sf %d/%d)\n", lcid, length, frame, subframe);
fapi_ul_ack_nack_data[subframe].ack[pos].length[lcid] = length; fapi_ul_ack_nack_data[subframe].ack[pos].length[lcid] = length;
} }
void fapi_dl_cqi_report(int module_id, int rnti, int frame, int subframe, int cqi_wideband, int *cqi_subband, int rank_indication)
{
/* TODO: 2 TBs, other reporting modes - we suppose 3-0 (see 36.213 7.2.1) */
fapi_interface_t *fapi;
struct SchedDlCqiInfoReqParameters params;
struct CqiListElement_s cqi;
int i;
fapi = eNB_mac_inst[module_id].fapi;
cqi.rnti = rnti;
cqi.csiReport.ri = rank_indication;
cqi.csiReport.mode = A30; /* TODO: get real value */
cqi.csiReport.report.A30Csi.wbCqi = cqi_wideband;
for (i = 0; i < MAX_HL_SB; i++)
cqi.csiReport.report.A30Csi.sbCqi[i] = cqi_subband[i];
cqi.servCellIndex = 0; /* TODO: get correct value */
params.sfnSf = frame * 16 + subframe;
params.nrcqiList = 1;
params.cqiList = &cqi;
params.nr_vendorSpecificList = 0;
params.vendorSpecificList = NULL;
SchedDlCqiInfoReq(fapi->sched, &params);
}
static void fapi_convert_dl_1A_5MHz_FDD(struct DlDciListElement_s *dci, DCI_ALLOC_t *a) static void fapi_convert_dl_1A_5MHz_FDD(struct DlDciListElement_s *dci, DCI_ALLOC_t *a)
{ {
DCI1A_5MHz_FDD_t *d = (DCI1A_5MHz_FDD_t *)a->dci_pdu; DCI1A_5MHz_FDD_t *d = (DCI1A_5MHz_FDD_t *)a->dci_pdu;
......
...@@ -51,6 +51,9 @@ void fapi_ul_lc_length(int frame, int subframe, int lcid, int length, int rnti); ...@@ -51,6 +51,9 @@ void fapi_ul_lc_length(int frame, int subframe, int lcid, int length, int rnti);
/* signal downlink ACKs/NACKs */ /* signal downlink ACKs/NACKs */
void fapi_dl_ack_nack(int rnti, int harq_pid, int transport_block, int ack); void fapi_dl_ack_nack(int rnti, int harq_pid, int transport_block, int ack);
/* signal DL CQI (mode 3-0 only, see 36.213 7.2.1) */
void fapi_dl_cqi_report(int module_id, int rnti, int frame, int subframe, int cqi_wideband, int *cqi_subband, int rank_indication);
/*@}*/ /*@}*/
#endif /* FF_MAC_H */ #endif /* FF_MAC_H */
...@@ -671,6 +671,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui ...@@ -671,6 +671,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
#if FAPI #if FAPI
mac_xface->fapi_ul_ack_nack = fapi_ul_ack_nack; mac_xface->fapi_ul_ack_nack = fapi_ul_ack_nack;
mac_xface->fapi_dl_ack_nack = fapi_dl_ack_nack; mac_xface->fapi_dl_ack_nack = fapi_dl_ack_nack;
mac_xface->fapi_dl_cqi_report = fapi_dl_cqi_report;
#endif #endif
return(1); return(1);
......
...@@ -339,6 +339,7 @@ typedef struct { ...@@ -339,6 +339,7 @@ typedef struct {
#if FAPI #if FAPI
void (*fapi_ul_ack_nack)(int frame, int subframe, int rnti, int ack); void (*fapi_ul_ack_nack)(int frame, int subframe, int rnti, int ack);
void (*fapi_dl_ack_nack)(int rnti, int harq_pid, int transport_block, int ack); void (*fapi_dl_ack_nack)(int rnti, int harq_pid, int transport_block, int ack);
void (*fapi_dl_cqi_report)(int module_id, int rnti, int frame, int subframe, int cqi_wideband, int *cqi_subband, int rank_indication);
#endif #endif
} MAC_xface; } MAC_xface;
......
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