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)
......
...@@ -161,7 +161,7 @@ int lte_est_freq_offset(int **dl_ch_estimates, ...@@ -161,7 +161,7 @@ int lte_est_freq_offset(int **dl_ch_estimates,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int l, int l,
int* freq_offset, int* freq_offset,
int reset); int reset);
int lte_mbsfn_est_freq_offset(int **dl_ch_estimates, int lte_mbsfn_est_freq_offset(int **dl_ch_estimates,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
...@@ -180,7 +180,7 @@ This function computes the time domain channel response, finds the peak and adju ...@@ -180,7 +180,7 @@ This function computes the time domain channel response, finds the peak and adju
void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_UE *phy_vars_ue, PHY_VARS_UE *phy_vars_ue,
module_id_t eNb_id, module_id_t eNb_id,
uint8_t subframe, uint8_t subframe,
unsigned char clear, unsigned char clear,
short coef); short coef);
...@@ -189,7 +189,8 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue, ...@@ -189,7 +189,8 @@ 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,
uint8_t subframe); unsigned char rank_adaptation,
uint8_t subframe);
//! \brief This function performance RSRP/RSCP measurements //! \brief This function performance RSRP/RSCP measurements
void ue_rrc_measurements(PHY_VARS_UE *phy_vars_ue, void ue_rrc_measurements(PHY_VARS_UE *phy_vars_ue,
...@@ -214,11 +215,11 @@ int8_t set_RSRQ_filtered(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,floa ...@@ -214,11 +215,11 @@ int8_t set_RSRQ_filtered(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,floa
//! Automatic gain control //! Automatic gain control
void phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, void phy_adjust_gain (PHY_VARS_UE *phy_vars_ue,
uint32_t rx_power_fil_dB, uint32_t rx_power_fil_dB,
unsigned char eNB_id); unsigned char eNB_id);
int lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB, int lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
eNB_rxtx_proc_t *proc, eNB_rxtx_proc_t *proc,
module_id_t eNB_id, module_id_t eNB_id,
module_id_t UE_id, module_id_t UE_id,
uint8_t l, uint8_t l,
...@@ -246,7 +247,7 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -246,7 +247,7 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,module_id_t UE_id); int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,module_id_t UE_id);
void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB, void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
int subframe, int subframe,
module_id_t eNB_id, module_id_t eNB_id,
unsigned char clear); unsigned char clear);
......
...@@ -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){
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], if (rank_adaptation == 1)
&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2][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][1][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][3][4], &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][1][4],
N_RB_DL); &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][3][4],
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
......
...@@ -43,13 +43,13 @@ extern openair0_config_t openair0_cfg[]; ...@@ -43,13 +43,13 @@ extern openair0_config_t openair0_cfg[];
//#define DEBUG_INITIAL_SYNCH //#define DEBUG_INITIAL_SYNCH
int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
{ {
uint8_t l,pbch_decoded,frame_mod4,pbch_tx_ant,dummy; uint8_t l,pbch_decoded,frame_mod4,pbch_tx_ant,dummy;
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
char phich_resource[6]; char phich_resource[6];
#ifdef DEBUG_INITIAL_SYNCH #ifdef DEBUG_INITIAL_SYNCH
LOG_I(PHY,"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)\n",ue->Mod_id, LOG_I(PHY,"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)\n",ue->Mod_id,
ue->rx_offset); ue->rx_offset);
...@@ -63,7 +63,7 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) ...@@ -63,7 +63,7 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
ue->rx_offset, ue->rx_offset,
0, 0,
1); 1);
} }
for (l=0; l<frame_parms->symbols_per_tti/2; l++) { for (l=0; l<frame_parms->symbols_per_tti/2; l++) {
slot_fep(ue, slot_fep(ue,
...@@ -72,7 +72,7 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) ...@@ -72,7 +72,7 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
ue->rx_offset, ue->rx_offset,
0, 0,
1); 1);
} }
slot_fep(ue, slot_fep(ue,
0, 0,
2, 2,
...@@ -83,9 +83,11 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) ...@@ -83,9 +83,11 @@ 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) {
ue_rrc_measurements(ue, ue_rrc_measurements(ue,
2, 2,
...@@ -511,8 +513,8 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -511,8 +513,8 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
ue->measurements.n0_power_tot_dBm, ue->measurements.n0_power_tot_dBm,
10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB, 10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB,
(10*log10(ue->measurements.rsrq[0]))); (10*log10(ue->measurements.rsrq[0])));
LOG_I(PHY,"[UE %d] Frame %d MIB Information => %s, %s, NidCell %d, N_RB_DL %d, PHICH DURATION %d, PHICH RESOURCE %s, TX_ANT %d\n", LOG_I(PHY,"[UE %d] Frame %d MIB Information => %s, %s, NidCell %d, N_RB_DL %d, PHICH DURATION %d, PHICH RESOURCE %s, TX_ANT %d\n",
ue->Mod_id, ue->Mod_id,
ue->proc.proc_rxtx[0].frame_rx, ue->proc.proc_rxtx[0].frame_rx,
...@@ -560,7 +562,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -560,7 +562,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++)
rx_power += signal_energy(&ue->common_vars.rxdata[aarx][sync_pos2], rx_power += signal_energy(&ue->common_vars.rxdata[aarx][sync_pos2],
frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples); frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples);
/* /*
// do a measurement on the full frame // do a measurement on the full frame
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++)
...@@ -569,7 +571,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -569,7 +571,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
*/ */
// we might add a low-pass filter here later // we might add a low-pass filter here later
ue->measurements.rx_power_avg[0] = rx_power/frame_parms->nb_antennas_rx; ue->measurements.rx_power_avg[0] = rx_power/frame_parms->nb_antennas_rx;
ue->measurements.rx_power_avg_dB[0] = dB_fixed(ue->measurements.rx_power_avg[0]); ue->measurements.rx_power_avg_dB[0] = dB_fixed(ue->measurements.rx_power_avg[0]);
...@@ -578,7 +580,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -578,7 +580,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
#endif #endif
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF #ifndef OAI_BLADERF
#ifndef OAI_LMSSDR #ifndef OAI_LMSSDR
phy_adjust_gain(ue,ue->measurements.rx_power_avg_dB[0],0); phy_adjust_gain(ue,ue->measurements.rx_power_avg_dB[0],0);
#endif #endif
...@@ -589,7 +591,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -589,7 +591,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
else { else {
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF #ifndef OAI_BLADERF
#ifndef OAI_LMSSDR #ifndef OAI_LMSSDR
phy_adjust_gain(ue,dB_fixed(ue->measurements.rssi),0); phy_adjust_gain(ue,dB_fixed(ue->measurements.rssi),0);
#endif #endif
......
...@@ -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;
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
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