Commit 6a8a551e authored by Xiwen JIANG's avatar Xiwen JIANG

add beamforming_mode into generate eNB and UE dlsch parameters from DCI

parent 4fa0810c
......@@ -872,7 +872,8 @@ int generate_eNB_dlsch_params_from_dci(int frame,
uint16_t si_rnti,
uint16_t ra_rnti,
uint16_t p_rnti,
uint16_t DL_pmi_single)
uint16_t DL_pmi_single,
uint8_t beamforming_mode)
{
uint8_t harq_pid = UINT8_MAX;
......@@ -1244,7 +1245,13 @@ int generate_eNB_dlsch_params_from_dci(int frame,
dlsch0_harq->Nl = 1;
// dlsch[0]->layer_index = 0;
dlsch0_harq->mimo_mode = (frame_parms->mode1_flag == 1) ? SISO : ALAMOUTI;
if (beamforming_mode == 0)
dlsch0_harq->mimo_mode = (frame_parms->mode1_flag == 1) ? SISO : ALAMOUTI;
else if (beamforming_mode == 7)
dlsch0_harq->mimo_mode = TM7;
else
LOG_E(PHY,"Invalid beamforming mode %dL\n", beamforming_mode);
dlsch0_harq->dl_power_off = 1;
/*
if (dlsch[0]->harq_processes[harq_pid]->first_tx == 1) {
......@@ -3854,7 +3861,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
uint16_t si_rnti,
uint16_t ra_rnti,
uint16_t p_rnti)
uint16_t p_rnti,
uint8_t beamforming_mode)
{
uint8_t harq_pid=0;
......@@ -4171,6 +4179,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
dlsch0_harq->rvidx = rv;
dlsch0_harq->Nl = 1;
// dlsch[0]->layer_index = 0;
dlsch0_harq->mimo_mode = frame_parms->mode1_flag == 1 ?SISO : ALAMOUTI;
dlsch0_harq->dl_power_off = 1; //no power offset
......@@ -4521,7 +4530,13 @@ int generate_ue_dlsch_params_from_dci(int frame,
dlsch[0]->rnti = rnti;
dlsch0_harq->mimo_mode = (frame_parms->mode1_flag == 1) ? SISO : ALAMOUTI;
if (beamforming_mode == 0)
dlsch0_harq->mimo_mode = (frame_parms->mode1_flag == 1) ? SISO : ALAMOUTI;
else if (beamforming_mode == 7)
dlsch0_harq->mimo_mode = TM7;
else
LOG_E(PHY,"Not supported beamforming mode %d\n",beamforming_mode);
dlsch0 = dlsch[0];
......
......@@ -1424,7 +1424,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
uint16_t si_rnti,
uint16_t ra_rnti,
uint16_t p_rnti);
uint16_t p_rnti,
uint8_t beamforming_mode);
int32_t generate_eNB_dlsch_params_from_dci(int frame,
uint8_t subframe,
......@@ -1437,7 +1438,8 @@ int32_t generate_eNB_dlsch_params_from_dci(int frame,
uint16_t si_rnti,
uint16_t ra_rnti,
uint16_t p_rnti,
uint16_t DL_pmi_single);
uint16_t DL_pmi_single,
uint8_t beamforming_mode);
int32_t generate_eNB_ulsch_params_from_rar(uint8_t *rar_pdu,
frame_t frame,
......
......@@ -1094,7 +1094,8 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
SI_RNTI,
0,
P_RNTI,
phy_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
phy_vars_eNB->eNB_UE_stats[0].DL_pmi_single,
0);
phy_vars_eNB->dlsch_eNB_SI->nCCE[subframe] = DCI_pdu->dci_alloc[i].firstCCE;
......@@ -1129,7 +1130,8 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
SI_RNTI,
DCI_pdu->dci_alloc[i].rnti,
P_RNTI,
phy_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
phy_vars_eNB->eNB_UE_stats[0].DL_pmi_single,
0);
// mac_xface->macphy_exit("Transmitted RAR, exiting\n");
......@@ -1187,7 +1189,8 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
SI_RNTI,
0,
P_RNTI,
phy_vars_eNB->eNB_UE_stats[(uint8_t)UE_id].DL_pmi_single);
phy_vars_eNB->eNB_UE_stats[(uint8_t)UE_id].DL_pmi_single,
phy_vars_eNB->transmission_mode[(uint8_t)UE_id]>7?0:phy_vars_eNB->transmission_mode[(uint8_t)UE_id]);
LOG_D(PHY,"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d subframe %d: Generated dlsch params\n",
phy_vars_eNB->Mod_id,DCI_pdu->dci_alloc[i].rnti,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->current_harq_pid,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe);
......
......@@ -132,7 +132,7 @@ void dump_dlsch(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe,uint8_t
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
phy_vars_ue->frame_rx,
subframe,
phy_vars_ue->transmission_mode[eNB_id]);
phy_vars_ue->transmission_mode[eNB_id]);
write_output("rxsigF0.m","rxsF0", phy_vars_ue->lte_ue_common_vars.rxdataF[0],2*nsymb*phy_vars_ue->lte_frame_parms.ofdm_symbol_size,2,1);
write_output("rxsigF0_ext.m","rxsF0_ext", phy_vars_ue->lte_ue_pdsch_vars[0]->rxdataF_ext[0],2*nsymb*phy_vars_ue->lte_frame_parms.ofdm_symbol_size,1,1);
......@@ -2143,7 +2143,8 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
phy_vars_ue->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI)==0)) {
P_RNTI,
phy_vars_ue->transmission_mode[eNB_id]>7?0:phy_vars_ue->transmission_mode[eNB_id])==0)) {
#ifdef DIAG_PHY
......@@ -2211,7 +2212,8 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
phy_vars_ue->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI)==0) {
P_RNTI,
0)==0) {
phy_vars_ue->dlsch_SI_received[eNB_id]++;
......@@ -2255,7 +2257,8 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
phy_vars_ue->pdsch_config_dedicated,
SI_RNTI,
phy_vars_ue->prach_resources[eNB_id]->ra_RNTI,
P_RNTI)==0) {
P_RNTI,
0)==0) {
phy_vars_ue->dlsch_ra_received[eNB_id]++;
......@@ -2790,7 +2793,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols,
frame_rx,
subframe_prev,
phy_vars_ue->transmission_mode[eNB_id]);
0);
#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"Decoding DLSCH_SI : rb_alloc %x : nb_rb %d G %d TBS %d, num_pdcch_sym %d\n",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc_even[0],
......@@ -2853,8 +2856,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc_even[2],
phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc_even[3]);
#endif
// dump_dlsch_SI(phy_vars_ue,eNB_id,subframe_prev);
// dump_dlsch_SI(phy_vars_ue,eNB_id,subframe_prev);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
stop_meas(&phy_vars_ue->phy_proc_rx);
return(-1);
......
......@@ -1149,10 +1149,11 @@ int main(int argc, char **argv)
SI_RNTI,
0,
P_RNTI,
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single,
transmission_mode<7?0:transmission_mode);
if (transmission_mode == 7)
PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->mimo_mode = TM7; //Xiwen: to check about harq_pid
/*if (transmission_mode == 7)
PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->mimo_mode = TM7; //Xiwen: to check about harq_pid*/
num_dci++;
num_ue_spec_dci++;
......@@ -1292,7 +1293,8 @@ int main(int argc, char **argv)
SI_RNTI,
0,
P_RNTI,
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single,
0);
num_common_dci++;
num_dci++;
......@@ -1459,7 +1461,8 @@ int main(int argc, char **argv)
SI_RNTI,
0,
P_RNTI,
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single,
0);
num_dci++;
num_ue_spec_dci++;
......@@ -1599,7 +1602,8 @@ int main(int argc, char **argv)
SI_RNTI,
0,
P_RNTI,
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single,
0);
num_common_dci++;
num_dci++;
......@@ -1767,7 +1771,8 @@ int main(int argc, char **argv)
SI_RNTI,
0,
P_RNTI,
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single,
0);
num_dci++;
num_ue_spec_dci++;
......@@ -1907,7 +1912,8 @@ int main(int argc, char **argv)
SI_RNTI,
0,
P_RNTI,
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single);
PHY_vars_eNB->eNB_UE_stats[0].DL_pmi_single,
0);
num_common_dci++;
num_dci++;
......@@ -1936,7 +1942,8 @@ int main(int argc, char **argv)
SI_RNTI,
0,
P_RNTI,
PHY_vars_eNB->eNB_UE_stats[k].DL_pmi_single);
PHY_vars_eNB->eNB_UE_stats[k].DL_pmi_single,
0);
dump_dci(&PHY_vars_eNB->lte_frame_parms,&dci_alloc[num_dci]);
num_ue_spec_dci++;
......@@ -3226,7 +3233,8 @@ PMI_FEEDBACK:
PHY_vars_UE->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI)==0)) {
P_RNTI==0,
transmission_mode<7?0:transmission_mode))) {
//dump_dci(&PHY_vars_UE->lte_frame_parms,&dci_alloc_rx[i]);
coded_bits_per_codeword = get_G(&PHY_vars_eNB->lte_frame_parms,
PHY_vars_UE->dlsch_ue[0][0]->harq_processes[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid]->nb_rb,
......@@ -3237,8 +3245,8 @@ PMI_FEEDBACK:
0,
subframe,
(transmission_mode<7?0:transmission_mode));
if (transmission_mode==7 && common_flag==0)
PHY_vars_UE->dlsch_ue[0][0]->harq_processes[0]->mimo_mode = TM7;
/*if (transmission_mode==7 && common_flag==0)
PHY_vars_UE->dlsch_ue[0][0]->harq_processes[0]->mimo_mode = TM7; */
/*
rate = (double)dlsch_tbs25[get_I_TBS(PHY_vars_UE->dlsch_ue[0][0]->harq_processes[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid]->mcs)][PHY_vars_UE->dlsch_ue[0][0]->nb_rb-1]/(coded_bits_per_codeword);
......@@ -3289,9 +3297,10 @@ PMI_FEEDBACK:
PHY_vars_UE->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI);
if(transmission_mode==7 && common_flag==0)
PHY_vars_UE->dlsch_ue[0][0]->harq_processes[0]->mimo_mode = TM7;
P_RNTI,
transmission_mode<7?0:transmission_mode);
/*if(transmission_mode==7 && common_flag==0)
PHY_vars_UE->dlsch_ue[0][0]->harq_processes[0]->mimo_mode = TM7;*/
break;
case 3:
......@@ -3306,7 +3315,8 @@ PMI_FEEDBACK:
PHY_vars_UE->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI);
P_RNTI,
0);
// printf("Rate: TM3 (after) round %d (%d) first_tx %d\n",round,PHY_vars_UE->dlsch_ue[0][0]->harq_processes[0]->round,PHY_vars_UE->dlsch_ue[0][0]->harq_processes[0]->first_tx);
break;
......@@ -3321,7 +3331,8 @@ PMI_FEEDBACK:
PHY_vars_UE->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI);
P_RNTI,
0);
break;
case 5:
......@@ -3336,7 +3347,8 @@ PMI_FEEDBACK:
PHY_vars_UE->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI);
P_RNTI,
0);
break;
}
......
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