diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index a4aa081bec2648f9748434326a394943519cd787..83b9eb7c2f02646e663d232f7efed57f78bb8678 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1915,6 +1915,7 @@ target_link_libraries (oaisim_nos1 forms) target_link_libraries (oaisim_nos1 ${T_LIB}) + # Unitary tests for each piece of L1: example, mbmssim is MBMS L1 simulator ##################################### diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c index c47a64ae36c92515771ca25f6c006b096e730816..a836754c8fc30180a464a8f06a1b665a31943928 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c @@ -32,8 +32,8 @@ #define k1 ((long long int) 1000) #define k2 ((long long int) (1024-k1)) -#define DEBUG_MEAS_RRC -#define DEBUG_MEAS_UE +//#define DEBUG_MEAS_RRC +//#define DEBUG_MEAS_UE //#define DEBUG_RANK_EST int16_t cond_num_threshold = 0; diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 9d63ac6ca7d0811ae0aab84653861de8ca62cf77..56093dfa95bc89183560af113f4e33b2aecf9cd8 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -4997,19 +4997,19 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, long long RIV_max = 0; #ifdef DEBUG_DCI - printf("extarcted dci - dci_format %d \n", dci_format); - printf("extarcted dci - rah %d \n", rah); - printf("extarcted dci - mcs1 %d \n", mcs1); - printf("extarcted dci - mcs2 %d \n", mcs2); - printf("extarcted dci - rv1 %d \n", rv1); - printf("extarcted dci - rv2 %d \n", rv2); - //printf("extarcted dci - ndi1 %d \n", ndi1); - // printf("extarcted dci - ndi2 %d \n", ndi2); - printf("extarcted dci - rballoc %x \n", rballoc); - printf("extarcted dci - harq pif %d \n", harq_pid); - printf("extarcted dci - round0 %d \n", pdlsch0_harq->round); - printf("extarcted dci - round1 %d \n", pdlsch1_harq->round); - + LOG_I(PHY, "extarcted dci - dci_format %d \n", dci_format); + LOG_I(PHY, "extarcted dci - rnti %d \n", rnti); + LOG_I(PHY, "extarcted dci - rah %d \n", rah); + LOG_I(PHY, "extarcted dci - mcs1 %d \n", mcs1); + LOG_I(PHY, "extarcted dci - mcs2 %d \n", mcs2); + LOG_I(PHY, "extarcted dci - rv1 %d \n", rv1); + LOG_I(PHY, "extarcted dci - rv2 %d \n", rv2); + //LOG_I(PHY, "extarcted dci - ndi1 %d \n", ndi1); + //LOG_I(PHY, "extarcted dci - ndi2 %d \n", ndi2); + LOG_I(PHY, "extarcted dci - rballoc %x \n", rballoc); + LOG_I(PHY, "extarcted dci - harq pid %d \n", harq_pid); + LOG_I(PHY, "extarcted dci - round0 %d \n", pdlsch0_harq->round); + LOG_I(PHY, "extarcted dci - round1 %d \n", pdlsch1_harq->round); #endif // I- check dci content minimum coherency @@ -5528,6 +5528,7 @@ switch (tpmi) { dlsch_harq->pmi_alloc = pmi_extend(frame_parms,3, 0); break; case 5: + dlsch_harq->mimo_mode = PUSCH_PRECODING0; dlsch_harq->pmi_alloc = pmi_alloc;//pmi_convert(frame_parms,dlsch0->pmi_alloc,0); break; case 6: diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index 4733abdce151358d296ef001bcfb3edfc43a3369..e2e0d9acb92f2ccce13ee9cf6d92cd5f512134c8 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -48,6 +48,7 @@ * default value: 0 */ int16_t dlsch_demod_shift = 0; +int16_t interf_unaw_shift = 13; //#define DEBUG_HARQ @@ -418,19 +419,20 @@ int rx_pdsch(PHY_VARS_UE *ue, nb_rb, dlsch0_harq->mimo_mode); - LOG_D(PHY,"Channel Level TM34 avg_0 %d, avg_1 %d, rx_type %d, rx_standard %d, interf_unaw_shift %d \n", avg_0[0], + LOG_D(PHY,"Channel Level TM34 avg_0 %d, avg_1 %d, rx_type %d, rx_standard %d, dlsch_demod_shift %d \n", avg_0[0], avg_1[0], rx_type, rx_standard, dlsch_demod_shift); if (rx_type>rx_standard) { - avg_0[0] = (log2_approx(avg_0[0])/2) -13 + dlsch_demod_shift;// + 2 ;//+ 4; - avg_1[0] = (log2_approx(avg_1[0])/2) -13 + dlsch_demod_shift;// + 2 ;//+ 4; + avg_0[0] = (log2_approx(avg_0[0])/2) + dlsch_demod_shift;// + 2 ;//+ 4; + avg_1[0] = (log2_approx(avg_1[0])/2) + dlsch_demod_shift;// + 2 ;//+ 4; pdsch_vars[eNB_id]->log2_maxh0 = cmax(avg_0[0],0); pdsch_vars[eNB_id]->log2_maxh1 = cmax(avg_1[0],0); // printf("dlsch_demod_shift %d\n", dlsch_demod_shift); } else { - avg_0[0] = (log2_approx(avg_0[0])/2) - 13 + dlsch_demod_shift; - avg_1[0] = (log2_approx(avg_1[0])/2) - 13 + dlsch_demod_shift; + avg_0[0] = (log2_approx(avg_0[0])/2) - 13 + interf_unaw_shift; + avg_1[0] = (log2_approx(avg_1[0])/2) - 13 + interf_unaw_shift; pdsch_vars[eNB_id]->log2_maxh0 = cmax(avg_0[0],0); + pdsch_vars[eNB_id]->log2_maxh1 = cmax(avg_1[0],0); } } else if (dlsch0_harq->mimo_mode<DUALSTREAM_UNIFORM_PRECODING1) {// single-layer precoding (TM5, TM6) diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 41c72ec0e6b6a81be19016d68068129200d3dc46..b045af747d8d4e09ef78bcf5dc033eb918cc80f7 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -3694,7 +3694,7 @@ void process_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, runmode_t mo dlsch0->harq_processes[0]->b, &ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti, ue->prach_resources[eNB_id]->ra_PreambleIndex, - dlsch0->harq_processes[0]->b); // alter the 'b' buffer so it contains only + dlsch0->harq_processes[0]->b); // alter the 'b' buffer so it contains only the selected RAR header and RAR payload ue->pdcch_vars[(subframe_rx+1) & 0x1][eNB_id]->crnti = ue->pdcch_vars[subframe_rx & 0x1][eNB_id]->crnti; @@ -3978,6 +3978,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, #endif } + // Check CRC for CW 0 if (ret == (1+dlsch0->max_turbo_iterations)) { *dlsch_errors=*dlsch_errors+1; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c index 64ddd9ac3163f89ad25d4a4aa91b46b1b82699b7..ee333ac74fecb9d2fed9a2692e0e878c31005d1d 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c @@ -625,10 +625,10 @@ int main(int argc, char **argv) rank_adapt=1; break; case 'V': - cond_num_threshold = atof(optarg); + cond_num_threshold = atoi(optarg); break; case 'J': - dlsch_demod_shift = atof(optarg); + dlsch_demod_shift = atoi(optarg); break; case 'K': tpmi_retr = atoi(optarg); @@ -672,6 +672,16 @@ int main(int argc, char **argv) } } + if (dlsch_demod_shift==0) { + if ((transmission_mode==3 || transmission_mode==4) && (rx_type>rx_standard)) { + if (mcs1<17) + dlsch_demod_shift=0; + else + dlsch_demod_shift=-2; + } + } + + logInit(); // enable these lines if you need debug info set_comp_log(PHY,LOG_DEBUG,LOG_HIGH,1); @@ -719,10 +729,11 @@ int main(int argc, char **argv) if (transmission_mode==4 && rx_type == rx_SIC_dual_stream ) use_sic_receiver = 1; - else if (transmission_mode==4 && rx_type == rx_IC_dual_stream ) + else if (transmission_mode==4 && rx_type < rx_SIC_dual_stream ) use_sic_receiver = 0; + if (xforms==1) { fl_initialize (&argc, argv, NULL, 0, 0); form_ue = create_lte_phy_scope_ue(); @@ -3908,12 +3919,12 @@ int main(int argc, char **argv) #endif if (transmission_mode==4 && use_sic_receiver==1){ - rx_type=rx_SIC_dual_stream; - //printf("I am using SIC!\n"); + if (rx_type>rx_IC_single_stream) + rx_type=rx_SIC_dual_stream; } else if (transmission_mode==4 && use_sic_receiver==0){ - rx_type=rx_IC_dual_stream; - //printf("I am using PIA!\n"); + if (rx_type>rx_IC_single_stream) + rx_type=rx_IC_dual_stream; } switch (transmission_mode) {