Commit b835f639 authored by Elena_Lukashova's avatar Elena_Lukashova

1. There is probably a bug in generate_ue_dlsch_from_dci

for DCI format 2. Temporaryly going back to the previous
version of code.
2. Enabling rate adaptation with multiple HARQ rounds.
(no change inside the rounds).
parent a92ed319
...@@ -1966,7 +1966,6 @@ target_link_libraries (oaisim_nos1 forms) ...@@ -1966,7 +1966,6 @@ target_link_libraries (oaisim_nos1 forms)
target_link_libraries (oaisim_nos1 ${T_LIB}) target_link_libraries (oaisim_nos1 ${T_LIB})
# Unitary tests for each piece of L1: example, mbmssim is MBMS L1 simulator # Unitary tests for each piece of L1: example, mbmssim is MBMS L1 simulator
##################################### #####################################
...@@ -2063,9 +2062,9 @@ if (${T_TRACER}) ...@@ -2063,9 +2062,9 @@ if (${T_TRACER})
add_dependencies(lte-softmodem-nos1 generate_T) add_dependencies(lte-softmodem-nos1 generate_T)
add_dependencies(rrh_gw generate_T) add_dependencies(rrh_gw generate_T)
add_dependencies(oaisim generate_T) add_dependencies(oaisim generate_T)
add_dependencies(oaisim_nos1 generate_T)
add_dependencies(dlsim generate_T) add_dependencies(dlsim generate_T)
add_dependencies(dlsim_tm4 generate_T) add_dependencies(dlsim_tm4 generate_T)
add_dependencies(dlsim_tm4_feedback generate_T)
add_dependencies(dlsim_tm7 generate_T) add_dependencies(dlsim_tm7 generate_T)
add_dependencies(ulsim generate_T) add_dependencies(ulsim generate_T)
add_dependencies(pbchsim generate_T) add_dependencies(pbchsim generate_T)
......
...@@ -189,6 +189,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue, ...@@ -189,6 +189,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue,
unsigned int subframe_offset, unsigned int subframe_offset,
unsigned char N0_symbol, unsigned char N0_symbol,
unsigned char abstraction_flag, unsigned char abstraction_flag,
unsigned char rank_adaptation,
uint8_t subframe); uint8_t subframe);
//! \brief This function performance RSRP/RSCP measurements //! \brief This function performance RSRP/RSCP measurements
......
...@@ -459,6 +459,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -459,6 +459,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
unsigned int subframe_offset, unsigned int subframe_offset,
unsigned char N0_symbol, unsigned char N0_symbol,
unsigned char abstraction_flag, unsigned char abstraction_flag,
unsigned char rank_adaptation,
uint8_t subframe) uint8_t subframe)
{ {
...@@ -484,12 +485,6 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -484,12 +485,6 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
ue->measurements.nb_antennas_rx = frame_parms->nb_antennas_rx; ue->measurements.nb_antennas_rx = frame_parms->nb_antennas_rx;
if (ue->transmission_mode[eNB_id]!=4)
ue->measurements.rank[eNB_id] = 0;
else
ue->measurements.rank[eNB_id] = 1;
// printf ("tx mode %d\n", ue->transmission_mode[eNB_id]);
// printf ("rank %d\n", ue->PHY_measurements.rank[eNB_id]);
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: case 6:
...@@ -552,17 +547,26 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -552,17 +547,26 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
eNB_id=0; eNB_id=0;
if (ue->transmission_mode[0]==4 || ue->transmission_mode[0]==3){ if (ue->transmission_mode[0]==4 || ue->transmission_mode[0]==3){
if (rank_adaptation == 1)
rank_tm3_tm4 = rank_estimation_tm3_tm4(&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][0][4], rank_tm3_tm4 = rank_estimation_tm3_tm4(&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][0][4],
&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2][4], &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2][4],
&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][1][4], &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][1][4],
&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][3][4], &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][3][4],
N_RB_DL); N_RB_DL);
else
rank_tm3_tm4=1;
#ifdef DEBUG_RANK_EST #ifdef DEBUG_RANK_EST
printf("rank tm3 or tm4 %d\n", rank_tm3_tm4); printf("rank tm3 or tm4 %d\n", rank_tm3_tm4);
#endif #endif
} }
if (ue->transmission_mode[eNB_id]!=4 && ue->transmission_mode[eNB_id]!=3)
ue->measurements.rank[eNB_id] = 0;
else
ue->measurements.rank[eNB_id] = rank_tm3_tm4;
// printf ("tx mode %d\n", ue->transmission_mode[eNB_id]);
// printf ("rank %d\n", ue->PHY_measurements.rank[eNB_id]);
// filter to remove jitter // filter to remove jitter
if (ue->init_averaging == 0) { if (ue->init_averaging == 0) {
for (eNB_id = 0; eNB_id < ue->n_connected_eNB; eNB_id++) for (eNB_id = 0; eNB_id < ue->n_connected_eNB; eNB_id++)
......
This diff is collapsed.
...@@ -156,6 +156,9 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -156,6 +156,9 @@ int rx_pdsch(PHY_VARS_UE *ue,
codeword_TB1 = dlsch[1]->harq_processes[harq_pid]->codeword; codeword_TB1 = dlsch[1]->harq_processes[harq_pid]->codeword;
dlsch0_harq = dlsch[codeword_TB0]->harq_processes[harq_pid]; dlsch0_harq = dlsch[codeword_TB0]->harq_processes[harq_pid];
dlsch1_harq = dlsch[codeword_TB1]->harq_processes[harq_pid]; dlsch1_harq = dlsch[codeword_TB1]->harq_processes[harq_pid];
#ifdef DEBUG_HARQ
printf("[DEMOD] I am assuming both TBs are active\n");
#endif
} }
else if ((dlsch[0]->harq_processes[harq_pid]->status == ACTIVE) && else if ((dlsch[0]->harq_processes[harq_pid]->status == ACTIVE) &&
(dlsch[1]->harq_processes[harq_pid]->status != ACTIVE) ) { (dlsch[1]->harq_processes[harq_pid]->status != ACTIVE) ) {
...@@ -163,6 +166,9 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -163,6 +166,9 @@ int rx_pdsch(PHY_VARS_UE *ue,
dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
dlsch1_harq = NULL; dlsch1_harq = NULL;
codeword_TB1 = -1; codeword_TB1 = -1;
#ifdef DEBUG_HARQ
printf("[DEMOD] I am assuming only TB0 is active\n");
#endif
} }
else if ((dlsch[0]->harq_processes[harq_pid]->status != ACTIVE) && else if ((dlsch[0]->harq_processes[harq_pid]->status != ACTIVE) &&
(dlsch[1]->harq_processes[harq_pid]->status == ACTIVE) ){ (dlsch[1]->harq_processes[harq_pid]->status == ACTIVE) ){
...@@ -170,6 +176,9 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -170,6 +176,9 @@ int rx_pdsch(PHY_VARS_UE *ue,
dlsch0_harq = dlsch[1]->harq_processes[harq_pid]; dlsch0_harq = dlsch[1]->harq_processes[harq_pid];
dlsch1_harq = NULL; dlsch1_harq = NULL;
codeword_TB0 = -1; codeword_TB0 = -1;
#ifdef DEBUG_HARQ
printf("[DEMOD] I am assuming only TB1 is active\n");
#endif
} }
else { else {
LOG_E(PHY,"[UE][FATAL] Frame %d subframe %d: no active DLSCH\n",ue->proc.proc_rxtx[0].frame_rx,subframe); LOG_E(PHY,"[UE][FATAL] Frame %d subframe %d: no active DLSCH\n",ue->proc.proc_rxtx[0].frame_rx,subframe);
...@@ -229,14 +238,16 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -229,14 +238,16 @@ int rx_pdsch(PHY_VARS_UE *ue,
} }
if ((dlsch0_harq->mimo_mode==LARGE_CDD) || ((dlsch0_harq->mimo_mode>=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode<=DUALSTREAM_PUSCH_PRECODING))) { if ((dlsch0_harq->mimo_mode==LARGE_CDD) || ((dlsch0_harq->mimo_mode>=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode<=DUALSTREAM_PUSCH_PRECODING))) {
DevAssert(dlsch1_harq); // DevAssert(dlsch1_harq);
if (eNB_id!=eNB_id_i) { if (eNB_id!=eNB_id_i) {
LOG_E(PHY,"TM3/TM4 requires to set eNB_id==eNB_id_i!\n"); LOG_E(PHY,"TM3/TM4 requires to set eNB_id==eNB_id_i!\n");
return(-1); return(-1);
} }
} }
#ifdef DEBUG_HARQ
printf("Demod dlsch0_harq->pmi_alloc %d\n", dlsch0_harq->pmi_alloc);
#endif
if (frame_parms->nb_antenna_ports_eNB>1 && beamforming_mode==0) { if (frame_parms->nb_antenna_ports_eNB>1 && beamforming_mode==0) {
#ifdef DEBUG_DLSCH_MOD #ifdef DEBUG_DLSCH_MOD
......
...@@ -83,7 +83,9 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) ...@@ -83,7 +83,9 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
lte_ue_measurements(ue, lte_ue_measurements(ue,
ue->rx_offset, ue->rx_offset,
0, 0,
0,0); 0,
0,
0);
if (ue->frame_parms.frame_type == TDD) { if (ue->frame_parms.frame_type == TDD) {
......
...@@ -797,4 +797,10 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -797,4 +797,10 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
for (arx=0;arx<nb_antennas_rx;arx++) { for (arx=0;arx<nb_antennas_rx;arx++) {
free(chest_t_abs[arx]); free(chest_t_abs[arx]);
} }
for (int i = 0; i<8; ++i)
for (int j = 0; j < 7*2*frame_parms->N_RB_DL*12+4; ++j )
phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp1[0][0][i][j]=0;
for (int m=0; m<coded_bits_per_codeword0; ++m)
phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->llr[1][m]=0;
} }
...@@ -1453,13 +1453,10 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ...@@ -1453,13 +1453,10 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue->ulsch[eNB_id]->o_ACK,1); ue->ulsch[eNB_id]->o_ACK,1);
Nbundled = ack_status_cw0; Nbundled = ack_status_cw0;
first_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb; first_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb;
nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb; nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb;
if (ack_status_cw0 > 0) { if (ack_status_cw0 > 0) {
// check if we received a PDSCH at subframe_tx - 4 // check if we received a PDSCH at subframe_tx - 4
...@@ -1948,8 +1945,8 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -1948,8 +1945,8 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
&len); &len);
LOG_D(PHY,"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d \n", LOG_D(PHY,"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d \n",
frame_tx%1024, subframe_tx, SR_payload, nb_cw, pucch_ack_payload[0], pucch_ack_payload[1], cqi_status, ri_status, format, pucch_resource,pucch_payload[0],pucch_payload[1]);
frame_tx%1024, subframe_tx, SR_payload, nb_cw, pucch_ack_payload[0], pucch_ack_payload[1], cqi_status, ri_status, format, pucch_resource,pucch_payload[0],pucch_payload[1]);
// Part - IV // Part - IV
// Generate PUCCH signal // Generate PUCCH signal
...@@ -2320,12 +2317,15 @@ void ue_measurement_procedures( ...@@ -2320,12 +2317,15 @@ void ue_measurement_procedures(
lte_ue_measurements(ue, lte_ue_measurements(ue,
(subframe_rx*frame_parms->samples_per_tti+ue->rx_offset)%(frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME), (subframe_rx*frame_parms->samples_per_tti+ue->rx_offset)%(frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME),
(subframe_rx == 1) ? 1 : 0, (subframe_rx == 1) ? 1 : 0,
0,subframe_rx); 0,
0,
subframe_rx);
} else { } else {
lte_ue_measurements(ue, lte_ue_measurements(ue,
0, 0,
0, 0,
1, 1,
0,
subframe_rx); subframe_rx);
} }
#if T_TRACER #if T_TRACER
...@@ -2964,8 +2964,6 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -2964,8 +2964,6 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
0)==0) { 0)==0) {
ue->dlsch_p_received[eNB_id]++; ue->dlsch_p_received[eNB_id]++;
LOG_D(PHY,"[UE %d] Frame %d, subframe %d : Generate UE DLSCH P_RNTI format 1%s\n",ue->Mod_id,frame_rx,subframe_rx,dci_alloc_rx[i].format==format1A?"A":"C"); LOG_D(PHY,"[UE %d] Frame %d, subframe %d : Generate UE DLSCH P_RNTI format 1%s\n",ue->Mod_id,frame_rx,subframe_rx,dci_alloc_rx[i].format==format1A?"A":"C");
//dump_dci(&ue->frame_parms, &dci_alloc_rx[i]); //dump_dci(&ue->frame_parms, &dci_alloc_rx[i]);
...@@ -3262,7 +3260,6 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC ...@@ -3262,7 +3260,6 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
if (dlsch0 && (!dlsch1)) { if (dlsch0 && (!dlsch1)) {
harq_pid = dlsch0->current_harq_pid; harq_pid = dlsch0->current_harq_pid;
LOG_D(PHY,"[UE %d] PDSCH active in subframe %d, harq_pid %d\n",ue->Mod_id,subframe_rx,harq_pid); LOG_D(PHY,"[UE %d] PDSCH active in subframe %d, harq_pid %d\n",ue->Mod_id,subframe_rx,harq_pid);
if ((pdsch==PDSCH) && if ((pdsch==PDSCH) &&
(ue->transmission_mode[eNB_id] == 5) && (ue->transmission_mode[eNB_id] == 5) &&
(dlsch0->harq_processes[harq_pid]->dl_power_off==0) && (dlsch0->harq_processes[harq_pid]->dl_power_off==0) &&
...@@ -3469,7 +3466,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -3469,7 +3466,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
break; break;
} }
if (frame_rx < *dlsch_errors) if (frame_rx < *dlsch_errors)
*dlsch_errors=0; *dlsch_errors=0;
...@@ -3590,12 +3586,12 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -3590,12 +3586,12 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
#endif #endif
} }
// Check CRC for CW 0
if (ret == (1+dlsch0->max_turbo_iterations)) { if (ret == (1+dlsch0->max_turbo_iterations)) {
*dlsch_errors=*dlsch_errors+1; *dlsch_errors=*dlsch_errors+1;
if(dlsch0->rnti != 0xffff) if(dlsch0->rnti != 0xffff)
{ {
LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n", LOG_D(PHY,"[UE %d][PDSCH %x/%d] AbsSubframe %d.%d : DLSCH CW0 in error (rv %d,mcs %d,TBS %d)\n",
ue->Mod_id,dlsch0->rnti, ue->Mod_id,dlsch0->rnti,
harq_pid,frame_rx,subframe_rx, harq_pid,frame_rx,subframe_rx,
...@@ -3672,7 +3668,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -3672,7 +3668,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
ue->total_received_bits[eNB_id] = ue->total_TBS[eNB_id] + ue->total_received_bits[eNB_id] = ue->total_TBS[eNB_id] +
dlsch0->harq_processes[dlsch0->current_harq_pid]->TBS; dlsch0->harq_processes[dlsch0->current_harq_pid]->TBS;
} }
// Check CRC for CW 1 // Check CRC for CW 1
if(is_cw1_active) if(is_cw1_active)
{ {
...@@ -3717,7 +3712,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -3717,7 +3712,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
} }
} }
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: PDSCH/DLSCH decoding iter %d (mcs %d, rv %d, TBS %d)\n", LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: PDSCH/DLSCH decoding iter %d (mcs %d, rv %d, TBS %d)\n",
ue->Mod_id, ue->Mod_id,
...@@ -3865,6 +3859,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3865,6 +3859,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
//printf("[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0)); //printf("[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
start_meas(&ue->generic_stat); start_meas(&ue->generic_stat);
// do procedures for C-RNTI // do procedures for C-RNTI
if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
...@@ -3965,6 +3960,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3965,6 +3960,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag); ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag);
} }
// do procedures for C-RNTI // do procedures for C-RNTI
if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) { if (ue->dlsch[subframe_rx&0x1][eNB_id][0]->active == 1) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
......
This diff is collapsed.
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