Commit 36699c45 authored by Robert Schmidt's avatar Robert Schmidt Committed by laurent

fixes

parent 1bd4edfd
...@@ -274,8 +274,8 @@ void nr_idft(int32_t *z, uint32_t Msc_PUSCH) ...@@ -274,8 +274,8 @@ void nr_idft(int32_t *z, uint32_t Msc_PUSCH)
} }
} }
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
} }
...@@ -398,7 +398,7 @@ void nr_ulsch_scale_channel(int **ul_ch_estimates_ext, ...@@ -398,7 +398,7 @@ void nr_ulsch_scale_channel(int **ul_ch_estimates_ext,
} else { } else {
b -= shift_ch_ext; b -= shift_ch_ext;
} }
__m128i ch_amp128 = _mm_set1_epi16(ch_amp); // Q3.13 __m128i ch_amp128 = simde_mm_set1_epi16(ch_amp); // Q3.13
LOG_D(PHY, "Scaling PUSCH Chest in OFDM symbol %d by %d, pilots %d nb_rb %d NCP %d symbol %d\n", symbol, ch_amp, is_dmrs_symbol, nb_rb, frame_parms->Ncp, symbol); LOG_D(PHY, "Scaling PUSCH Chest in OFDM symbol %d by %d, pilots %d nb_rb %d NCP %d symbol %d\n", symbol, ch_amp, is_dmrs_symbol, nb_rb, frame_parms->Ncp, symbol);
uint32_t nb_rb_0 = len / 12 + ((len % 12) ? 1 : 0); uint32_t nb_rb_0 = len / 12 + ((len % 12) ? 1 : 0);
...@@ -465,8 +465,8 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext, ...@@ -465,8 +465,8 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
} }
} }
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
} }
...@@ -760,8 +760,8 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext, ...@@ -760,8 +760,8 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
} }
} }
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
#ifdef DEBUG_CH_COMP #ifdef DEBUG_CH_COMP
...@@ -837,7 +837,7 @@ void nr_ulsch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms, ...@@ -837,7 +837,7 @@ void nr_ulsch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms,
} }
} }
_mm_empty(); simde_mm_empty();
_m_empty(); _m_empty();
} }
...@@ -872,20 +872,20 @@ void nr_ulsch_det_HhH(int32_t *after_mf_00,//a ...@@ -872,20 +872,20 @@ void nr_ulsch_det_HhH(int32_t *after_mf_00,//a
//The imag part is often zero, we compute only the real part //The imag part is often zero, we compute only the real part
ad_re_128 = simde_mm_sign_epi16(after_mf_00_128[0],*(simde__m128i*)&nr_conjug2[0]); ad_re_128 = simde_mm_sign_epi16(after_mf_00_128[0],*(simde__m128i*)&nr_conjug2[0]);
ad_re_128 = simde_mm_madd_epi16(ad_re_128,after_mf_11_128[0]); //Re: I_a0*I_d0 - Q_a1*Q_d1 ad_re_128 = simde_mm_madd_epi16(ad_re_128,after_mf_11_128[0]); //Re: I_a0*I_d0 - Q_a1*Q_d1
//ad_im_128 = _mm_shufflelo_epi16(after_mf_00_128[0], SIMDE_MM_SHUFFLE(2,3,0,1));//permutes IQs for the low 64 bits as [I_a0 Q_a1 I_a2 Q_a3]_64bits to [Q_a1 I_a0 Q_a3 I_a2]_64bits //ad_im_128 = simde_mm_shufflelo_epi16(after_mf_00_128[0], SIMDE_MM_SHUFFLE(2,3,0,1));//permutes IQs for the low 64 bits as [I_a0 Q_a1 I_a2 Q_a3]_64bits to [Q_a1 I_a0 Q_a3 I_a2]_64bits
//ad_im_128 = _mm_shufflehi_epi16(ad_im_128, SIMDE_MM_SHUFFLE(2,3,0,1));//permutes IQs for the high 64 bits as [I_a0 Q_a1 I_a2 Q_a3]_64bits to [Q_a1 I_a0 Q_a3 I_a2]_64bits //ad_im_128 = simde_mm_shufflehi_epi16(ad_im_128, SIMDE_MM_SHUFFLE(2,3,0,1));//permutes IQs for the high 64 bits as [I_a0 Q_a1 I_a2 Q_a3]_64bits to [Q_a1 I_a0 Q_a3 I_a2]_64bits
//ad_im_128 = _mm_madd_epi16(ad_im_128,after_mf_11_128[0]);//Im: (Q_aI_d + I_aQ_d) //ad_im_128 = simde_mm_madd_epi16(ad_im_128,after_mf_11_128[0]);//Im: (Q_aI_d + I_aQ_d)
//complex multiplication (I_b+jQ_b)(I_c+jQ_c) = (I_bI_c - Q_bQ_c) + j(Q_bI_c + I_bQ_c) //complex multiplication (I_b+jQ_b)(I_c+jQ_c) = (I_bI_c - Q_bQ_c) + j(Q_bI_c + I_bQ_c)
//The imag part is often zero, we compute only the real part //The imag part is often zero, we compute only the real part
bc_re_128 = simde_mm_sign_epi16(after_mf_01_128[0],*(simde__m128i*)&nr_conjug2[0]); bc_re_128 = simde_mm_sign_epi16(after_mf_01_128[0],*(simde__m128i*)&nr_conjug2[0]);
bc_re_128 = simde_mm_madd_epi16(bc_re_128,after_mf_10_128[0]); //Re: I_b0*I_c0 - Q_b1*Q_c1 bc_re_128 = simde_mm_madd_epi16(bc_re_128,after_mf_10_128[0]); //Re: I_b0*I_c0 - Q_b1*Q_c1
//bc_im_128 = _mm_shufflelo_epi16(after_mf_01_128[0], SIMDE_MM_SHUFFLE(2,3,0,1));//permutes IQs for the low 64 bits as [I_b0 Q_b1 I_b2 Q_b3]_64bits to [Q_b1 I_b0 Q_b3 I_b2]_64bits //bc_im_128 = simde_mm_shufflelo_epi16(after_mf_01_128[0], SIMDE_MM_SHUFFLE(2,3,0,1));//permutes IQs for the low 64 bits as [I_b0 Q_b1 I_b2 Q_b3]_64bits to [Q_b1 I_b0 Q_b3 I_b2]_64bits
//bc_im_128 = _mm_shufflehi_epi16(bc_im_128, SIMDE_MM_SHUFFLE(2,3,0,1));//permutes IQs for the high 64 bits as [I_b0 Q_b1 I_b2 Q_b3]_64bits to [Q_b1 I_b0 Q_b3 I_b2]_64bits //bc_im_128 = simde_mm_shufflehi_epi16(bc_im_128, SIMDE_MM_SHUFFLE(2,3,0,1));//permutes IQs for the high 64 bits as [I_b0 Q_b1 I_b2 Q_b3]_64bits to [Q_b1 I_b0 Q_b3 I_b2]_64bits
//bc_im_128 = _mm_madd_epi16(bc_im_128,after_mf_10_128[0]);//Im: (Q_bI_c + I_bQ_c) //bc_im_128 = simde_mm_madd_epi16(bc_im_128,after_mf_10_128[0]);//Im: (Q_bI_c + I_bQ_c)
det_re_128 = simde_mm_sub_epi32(ad_re_128, bc_re_128); det_re_128 = simde_mm_sub_epi32(ad_re_128, bc_re_128);
//det_im_128 = _mm_sub_epi32(ad_im_128, bc_im_128); //det_im_128 = simde_mm_sub_epi32(ad_im_128, bc_im_128);
//det in Q30 format //det in Q30 format
det_fin_128[0] = simde_mm_abs_epi32(det_re_128); det_fin_128[0] = simde_mm_abs_epi32(det_re_128);
...@@ -903,8 +903,8 @@ void nr_ulsch_det_HhH(int32_t *after_mf_00,//a ...@@ -903,8 +903,8 @@ void nr_ulsch_det_HhH(int32_t *after_mf_00,//a
after_mf_10_128+=1; after_mf_10_128+=1;
after_mf_11_128+=1; after_mf_11_128+=1;
} }
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
} }
/* Zero Forcing Rx function: nr_inv_comp_muli /* Zero Forcing Rx function: nr_inv_comp_muli
...@@ -940,8 +940,8 @@ simde__m128i nr_ulsch_inv_comp_muli(simde__m128i input_x, ...@@ -940,8 +940,8 @@ simde__m128i nr_ulsch_inv_comp_muli(simde__m128i input_x,
//print_ints("unpack hi:",&tmp_z1[0]); //print_ints("unpack hi:",&tmp_z1[0]);
output_z = simde_mm_packs_epi32(tmp_z0,tmp_z1); output_z = simde_mm_packs_epi32(tmp_z0,tmp_z1);
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
return(output_z); return(output_z);
} }
...@@ -988,8 +988,8 @@ void nr_ulsch_conjch0_mult_ch1(int *ch0, ...@@ -988,8 +988,8 @@ void nr_ulsch_conjch0_mult_ch1(int *ch0,
dl_ch1_128+=1; dl_ch1_128+=1;
ch0conj_ch1_128+=1; ch0conj_ch1_128+=1;
} }
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
} }
simde__m128i nr_ulsch_comp_muli_sum(simde__m128i input_x, simde__m128i nr_ulsch_comp_muli_sum(simde__m128i input_x,
simde__m128i input_y, simde__m128i input_y,
...@@ -1049,8 +1049,8 @@ simde__m128i nr_ulsch_comp_muli_sum(simde__m128i input_x, ...@@ -1049,8 +1049,8 @@ simde__m128i nr_ulsch_comp_muli_sum(simde__m128i input_x,
//print_ints("unpack hi:",&tmp_z1[0]); //print_ints("unpack hi:",&tmp_z1[0]);
output = simde_mm_packs_epi32(tmp_z0,tmp_z1); output = simde_mm_packs_epi32(tmp_z0,tmp_z1);
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
return(output); return(output);
} }
/* Zero Forcing Rx function: nr_construct_HhH_elements() /* Zero Forcing Rx function: nr_construct_HhH_elements()
...@@ -1166,8 +1166,8 @@ void nr_ulsch_construct_HhH_elements(int *conjch00_ch00, ...@@ -1166,8 +1166,8 @@ void nr_ulsch_construct_HhH_elements(int *conjch00_ch00,
after_mf_10_128 += 1; after_mf_10_128 += 1;
after_mf_11_128 += 1; after_mf_11_128 += 1;
} }
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
} }
/* Zero Forcing Rx function: nr_ulsch_zero_forcing_rx_2layers() /* Zero Forcing Rx function: nr_ulsch_zero_forcing_rx_2layers()
...@@ -1478,10 +1478,10 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(NR_DL_FRAME_PARMS *frame_parms, ...@@ -1478,10 +1478,10 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(NR_DL_FRAME_PARMS *frame_parms,
// Layer 0 // Layer 0
ul_ch_mag128_0[0] = mmtmpD2; ul_ch_mag128_0[0] = mmtmpD2;
ul_ch_mag128b_0[0] = mmtmpD2; ul_ch_mag128b_0[0] = mmtmpD2;
ul_ch_mag128_0[0] = _mm_mulhi_epi16(ul_ch_mag128_0[0], QAM_amp128); ul_ch_mag128_0[0] = simde_mm_mulhi_epi16(ul_ch_mag128_0[0], QAM_amp128);
ul_ch_mag128_0[0] = _mm_slli_epi16(ul_ch_mag128_0[0], 1); ul_ch_mag128_0[0] = simde_mm_slli_epi16(ul_ch_mag128_0[0], 1);
ul_ch_mag128b_0[0] = _mm_mulhi_epi16(ul_ch_mag128b_0[0], QAM_amp128b); ul_ch_mag128b_0[0] = simde_mm_mulhi_epi16(ul_ch_mag128b_0[0], QAM_amp128b);
ul_ch_mag128b_0[0] = _mm_slli_epi16(ul_ch_mag128b_0[0], 1); ul_ch_mag128b_0[0] = simde_mm_slli_epi16(ul_ch_mag128b_0[0], 1);
// Layer 1 // Layer 1
ul_ch_mag128_1[0] = mmtmpD2; ul_ch_mag128_1[0] = mmtmpD2;
...@@ -1529,8 +1529,8 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(NR_DL_FRAME_PARMS *frame_parms, ...@@ -1529,8 +1529,8 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(NR_DL_FRAME_PARMS *frame_parms,
after_mf_c_128 += 1; after_mf_c_128 += 1;
after_mf_d_128 += 1; after_mf_d_128 += 1;
} }
_mm_empty(); simde_mm_empty();
_m_empty(); simde_m_empty();
return(0); return(0);
} }
......
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