Commit 4ae259b1 authored by Khodr Saaifan's avatar Khodr Saaifan Committed by Thomas Schlichter

1- dci_tools.c:

parent f52f4bab
......@@ -7144,6 +7144,7 @@ void fill_CQI(LTE_UE_ULSCH_t *ulsch,PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_
case 25:
switch (uci_format) {
case wideband_cqi_rank1_2A:
//sfn: we enable this
((wideband_cqi_rank1_2A_5MHz *)o)->cqi1 = sinr2cqi(sinr_tmp,trans_mode);
((wideband_cqi_rank1_2A_5MHz *)o)->pmi = quantize_subband_pmi(meas,eNB_id,25);
break;
......@@ -7666,17 +7667,20 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
// ulsch->harq_processes[harq_pid]->status = ACTIVE;
if (cqi_req == 1) {
if( (AntennaInfoDedicated__transmissionMode_tm3 == transmission_mode) || (AntennaInfoDedicated__transmissionMode_tm4 == transmission_mode) )
{
/*SFN: enable PMI feedback and remove dependency on transmission_mode flag
* Hardcode for testing TM4
*
* */
//if( (AntennaInfoDedicated__transmissionMode_tm3 == transmission_mode) || (AntennaInfoDedicated__transmissionMode_tm4 == transmission_mode) )
//{
ulsch->O_RI = 1;
}
else
{
ulsch->O_RI = 0;
}
//}
//else
//{
// ulsch->O_RI = 0;
//}
//sudas_LOG_PHY(debug_sudas_LOG_PHY,"[UE][UCI--->PUSCH] transmission_mode %d ulsch->O_RI %d\n",transmission_mode,ulsch->O_RI);
//fflush(debug_sudas_LOG_PHY);
//ulsch->O_RI = 0; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table
......@@ -7773,28 +7777,35 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
ulsch->uci_format = HLC_subband_cqi_mcs_CBA;
ulsch->o_RI[0] = 0;
} else if(meas->rank[eNB_id] == 0) {
} else //if(meas->rank[eNB_id] == 0)
{
/*Enable PMI reporting for TM2
* remove dependency on RI
*
* */
switch (ue->frame_parms.N_RB_DL) {
case 6:
ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz;
break;
case 25:
ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz;
break;
//ulsch->O = sizeof_HLC_subband_cqi_nopmi_5MHz;
ulsch->O = sizeof_wideband_cqi_rank1_2A_5MHz;
break;
case 50:
ulsch->O = sizeof_HLC_subband_cqi_nopmi_10MHz;
break;
case 100:
ulsch->O = sizeof_HLC_subband_cqi_nopmi_20MHz;
break;
}
ulsch->uci_format = HLC_subband_cqi_nopmi;
ulsch->o_RI[0] = 0;
} else {
//ulsch->uci_format = HLC_subband_cqi_nopmi;
//ulsch->o_RI[0]= 0;
ulsch->uci_format = wideband_cqi_rank1_2A;
if(meas->rank[eNB_id] == 0) ulsch->o_RI[0] = 0;
else ulsch->o_RI[0] = 1;
}
/*else {
switch (ue->frame_parms.N_RB_DL) {
case 6:
ulsch->O = sizeof_HLC_subband_cqi_nopmi_1_5MHz;
......@@ -7815,7 +7826,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
ulsch->uci_format = HLC_subband_cqi_nopmi;
ulsch->o_RI[0] = 1;
}
}*/
break;
......
......@@ -1432,10 +1432,9 @@ void rx_phich(PHY_VARS_UE *ue,
ulsch->harq_processes[harq_pid]->rvidx = rv_table[ulsch->harq_processes[harq_pid]->round&3];
ulsch->O_RI = 0;
ulsch->O = 0;
ulsch->uci_format = HLC_subband_cqi_nopmi;
//sfn
//sudas_LOG_PHY(debug_sudas_LOG_PHY,"last ret: format HLC_subband_cqi_nopmi\n");
// fflush(debug_sudas_LOG_PHY);
//sfn: TM4 reporting
//ulsch->uci_format = HLC_subband_cqi_nopmi;
ulsch->uci_format = wideband_cqi_rank1_2A;
// disable phich decoding since it is the last retransmission
ulsch->harq_processes[harq_pid]->status = IDLE;
......@@ -1456,7 +1455,9 @@ void rx_phich(PHY_VARS_UE *ue,
ulsch->harq_processes[harq_pid]->rvidx = rv_table[ulsch->harq_processes[harq_pid]->round&3];
ulsch->O_RI = 0;
ulsch->O = 0;
ulsch->uci_format = HLC_subband_cqi_nopmi;
//sfn: TM4 reporting
//ulsch->uci_format = HLC_subband_cqi_nopmi;
ulsch->uci_format = wideband_cqi_rank1_2A;
//LOG_I(PHY,"[HARQ-UL harqId: %d] PHICH NACK ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag,ulsch->harq_processes[harq_pid]->round);
}
}
......@@ -1617,11 +1618,10 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
ulsch[UE_id]->harq_processes[harq_pid]->O_RI = 0;
ulsch[UE_id]->harq_processes[harq_pid]->Or2 = 0;
ulsch[UE_id]->harq_processes[harq_pid]->Or1 = 0;
ulsch[UE_id]->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
//sfn
//sudas_LOG_PHY(debug_sudas_LOG_PHY,"ACK : format HLC_subband_cqi_nopmi\n");
// fflush(debug_sudas_LOG_PHY);
//sfn: TM4 reporting at eNB
ulsch[UE_id]->harq_processes[harq_pid]->uci_format = wideband_cqi_rank1_2A;
//ulsch[UE_id]->harq_processes[harq_pid]->uci_format = HLC_subband_cqi_nopmi;
} else {
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d PHICH ACK (no format0 DCI) Clearing subframe_scheduling_flag, setting round to 0\n",
......
......@@ -242,6 +242,9 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length
ue->measurements.subband_cqi_dB[eNB][1][6]);
//we are here sfn
len += sprintf(&buffer[len], "[UE PROC] Quantized CQI %d*********************************************\n",
sinr2cqi((double) ue->measurements.wideband_cqi_avg[eNB],2));
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%f +j%f) (%f +j%f) (%f +j%f) (%f +j%f) (%f +j%f) (%f +j%f) (%f +j%f)]\n",
eNB,
(double)ue->measurements.subband_pmi_re[eNB][0][0],
......@@ -698,7 +701,8 @@ int dump_eNB_stats(PHY_VARS_eNB *eNB, char* buffer, int length)
len += sprintf(&buffer[len],"\n");
*/
len += sprintf(&buffer[len],"DL TM %d, DL_cqi %d, DL_pmi_single %jx ",
len += sprintf(&buffer[len],"DL TM %d,DL_cqi %d, DL_pmi_single %jx ",
eNB->transmission_mode[UE_id],
eNB->UE_stats[UE_id].DL_cqi[0],
pmi2hex_2Ar1(eNB->UE_stats[UE_id].DL_pmi_single));
......
......@@ -268,30 +268,28 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *ue,
ulsch->harq_processes[harq_pid]->status = ACTIVE;
if (cqireq==1) {
/*SFN: enable PMI reporting
* remove dependency on RI
* */
ulsch->O_RI = 1;
if (meas->rank[eNB_id] == 1) {
//SFN
// sudas_LOG_PHY(debug_sudas_LOG_PHY,"Rank 2, format wideband_cqi_rank2_2A\n");
// fflush(debug_sudas_LOG_PHY);
ulsch->uci_format = wideband_cqi_rank1_2A;
ulsch->O = sizeof_wideband_cqi_rank1_2A_5MHz;
if (meas->rank[eNB_id] == 0) ulsch->o_RI[0] = 0;
else ulsch->o_RI[0] = 1;
ulsch->uci_format = wideband_cqi_rank1_2A;
/*if (meas->rank[eNB_id] == 1){
ulsch->uci_format = wideband_cqi_rank2_2A;
ulsch->O = sizeof_wideband_cqi_rank2_2A_5MHz;
ulsch->o_RI[0] = 1;
} else {
//SFN
// sudas_LOG_PHY(debug_sudas_LOG_PHY,"Rank 1, format wideband_cqi_rank1_2A\n");
// fflush(debug_sudas_LOG_PHY);
ulsch->uci_format = wideband_cqi_rank1_2A;
ulsch->O = sizeof_wideband_cqi_rank1_2A_5MHz;
ulsch->o_RI[0] = 0;
}
}*/
ulsch->uci_format = HLC_subband_cqi_nopmi;
//sfn
// sudas_LOG_PHY(debug_sudas_LOG_PHY,"default, format HLC_subband_cqi_nopmi\n");
// fflush(debug_sudas_LOG_PHY);
//ulsch->uci_format = HLC_subband_cqi_nopmi;
fill_CQI(ulsch,meas,eNB_id,0,ue->frame_parms.N_RB_DL,0, transmission_mode,ue->sinr_eff);
......
......@@ -623,14 +623,12 @@ uint32_t ulsch_encoding(uint8_t *a,
i=0;
//SFN
/*SFN: Enable ulsch->O_RI = 1 in dci_tools
*DO RI coding
*PUSCH_y: means repeat ucoded bit
* */
// Do RI coding
if (ulsch->O_RI == 1) {
//sudas_LOG_PHY(debug_sudas_LOG_PHY,"[UE][UCI--->PUSCH] ulsch->O_RI= %d, ulsch->o_RI[0]=%d meas->rank[eNB_id]%d\n", ulsch->O_RI, ulsch->o_RI[0],meas->rank[0]);
//fflush(debug_sudas_LOG_PHY);
switch (Q_m) {
case 2:
ulsch->q_RI[0] = ulsch->o_RI[0];
......@@ -780,6 +778,7 @@ uint32_t ulsch_encoding(uint8_t *a,
// printf("Qprime_CQI = %d\n",Qprime_CQI);
// RI BITS
memset(y,LTE_NULL,Q_m*Hpp);
......@@ -806,26 +805,6 @@ uint32_t ulsch_encoding(uint8_t *a,
// CQI and Data bits
j=0;
/*
for (i=0,iprime=-Qprime_CQI;i<Hprime;i++,iprime++) {
while (y[Q_m*j] != LTE_NULL) j++;
if (i<Qprime_CQI) {
for (q=0;q<Q_m;q++) {
y[q+(Q_m*j)] = ulsch->q[q+(Q_m*i)];
//printf("cqi[%d] %d => y[%d]\n",q+(Q_m*i),ulsch->q[q+(Q_m*i)],q+(Q_m*j));
}
}
else {
for (q=0;q<Q_m;q++) {
y[q+(Q_m*j)] = ulsch->e[q+(Q_m*iprime)];
// printf("e[%d] %d => y[%d]\n",q+(Q_m*iprime),ulsch->e[q+(Q_m*iprime)],q+(Q_m*j));
}
}
j++;
}
*/
for (i=0; i<Qprime_CQI; i++) {
......
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