diff --git a/openair1/PHY/CODING/nr_rate_matching.c b/openair1/PHY/CODING/nr_rate_matching.c index 5294e79b9f..f315365127 100644 --- a/openair1/PHY/CODING/nr_rate_matching.c +++ b/openair1/PHY/CODING/nr_rate_matching.c @@ -310,15 +310,68 @@ void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e,uint8_t *f) void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e,int16_t *f) { - uint32_t EQm; - - EQm = E/Qm; - - for (int j = 0; j< EQm; j++){ - for (int i = 0; i< Qm; i++){ - e[(i*EQm + j)] = f[(i+j*Qm)]; - } + int j2; + int16_t *e1,*e2,*e3,*e4,*e5,*e6,*e7; + switch(Qm) { + case 2: + e1=e+(E/2); + for (int j = 0,j2=0; j< E/2; j+=2,j2+=4){ + e[j] = f[j2]; + e1[j] = f[j2+1]; + e[j+1] = f[j2+2]; + e1[j+1] = f[j2+3]; + } + break; + case 4: + e1=e+(E/4); + e2=e1+(E/4); + e3=e2+(E/4); + for (int j = 0,j2=0; j< E/4; j++,j2+=4){ + e[j] = f[j2]; + e1[j] = f[j2+1]; + e2[j] = f[j2+2]; + e3[j] = f[j2+3]; + } + break; + case 6: + e1=e+(E/6); + e2=e1+(E/6); + e3=e2+(E/6); + e4=e3+(E/6); + e5=e4+(E/6); + for (int j = 0,j2=0; j< E/6; j++,j2+=6){ + e[j] = f[j2]; + e1[j] = f[j2+1]; + e2[j] = f[j2+2]; + e3[j] = f[j2+3]; + e4[j] = f[j2+4]; + e5[j] = f[j2+5]; + } + break; + case 8: + e1=e+(E/6); + e2=e1+(E/6); + e3=e2+(E/6); + e4=e3+(E/6); + e5=e4+(E/6); + e6=e5+(E/6); + e7=e6+(E/6); + for (int j = 0,j2=0; j< E/8; j++,j2+=8){ + e[j] = f[j2]; + e1[j] = f[j2+1]; + e2[j] = f[j2+2]; + e3[j] = f[j2+3]; + e4[j] = f[j2+4]; + e5[j] = f[j2+5]; + e6[j] = f[j2+6]; + e7[j] = f[j2+7]; + } + break; + default: + AssertFatal(1==0,"Should not get here : Qm %d\n",Qm); + break; } + } diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c index 233ecd8de7..28a1db2c0a 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c @@ -185,10 +185,11 @@ void nr_ulsch_64qam_llr(int32_t *rxdataF_comp, #if defined(__x86_64__) || defined(__i386__) __m128i *rxF = (__m128i*)rxdataF_comp; __m128i *ch_mag,*ch_magb; + register __m128i xmm0,xmm1,xmm2; #elif defined(__arm__) int16x8_t *rxF = (int16x8_t*)&rxdataF_comp; int16x8_t *ch_mag,*ch_magb; // [hna] This should be uncommented once channel estimation is implemented - int16x8_t xmm1,xmm2; + int16x8_t xmm0,xmm1,xmm2; #endif int i; @@ -208,14 +209,14 @@ void nr_ulsch_64qam_llr(int32_t *rxdataF_comp, for (i=0; iulsch_pdu.start_symbol_index; uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1); + start_meas(&gNB->rx_pusch_stats); for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) { no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid); if (no_sig) { @@ -546,6 +547,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) return; } } + stop_meas(&gNB->rx_pusch_stats); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0); //LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1); //LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1); diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 68ae03e6cb..3d7b0871c2 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -655,6 +655,7 @@ int main(int argc, char **argv) gNB->ulsch[0][0]->harq_processes[harq_pid]->round = round; rv_index = nr_rv_round_map[round]; reset_meas(&gNB->phy_proc_rx); + reset_meas(&gNB->rx_pusch_stats); reset_meas(&gNB->ulsch_decoding_stats); reset_meas(&gNB->ulsch_deinterleaving_stats); reset_meas(&gNB->ulsch_rate_unmatching_stats); @@ -993,10 +994,11 @@ int main(int argc, char **argv) if (print_perf==1) { printDistribution(&gNB->phy_proc_rx,table_rx,"Total PHY proc rx"); - printStatIndent(&gNB->ulsch_channel_estimation_stats,"ULSCH channel estimation time"); - printStatIndent(&gNB->ulsch_rbs_extraction_stats,"ULSCH rbs extraction time"); - printStatIndent(&gNB->ulsch_channel_compensation_stats,"ULSCH channel compensation time"); - printStatIndent(&gNB->ulsch_llr_stats,"ULSCH llr computation"); + printStatIndent(&gNB->rx_pusch_stats,"RX PUSCH time"); + printStatIndent2(&gNB->ulsch_channel_estimation_stats,"ULSCH channel estimation time"); + printStatIndent2(&gNB->ulsch_rbs_extraction_stats,"ULSCH rbs extraction time"); + printStatIndent2(&gNB->ulsch_channel_compensation_stats,"ULSCH channel compensation time"); + printStatIndent2(&gNB->ulsch_llr_stats,"ULSCH llr computation"); printStatIndent(&gNB->ulsch_unscrambling_stats,"ULSCH unscrambling"); printStatIndent(&gNB->ulsch_decoding_stats,"ULSCH total decoding time"); printStatIndent2(&gNB->ulsch_deinterleaving_stats,"ULSCH deinterleaving");