- Fix: avoid infinite loop on mulitcast read thread if no data to read
Pre-ci test passed git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4000 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
+297
@@ -0,0 +1,297 @@
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include <emmintrin.h>
|
||||
#include <xmmintrin.h>
|
||||
|
||||
// This is 512/(1:256) in __m128i format
|
||||
s16 inv_ch[256*8] = {512,512,512,512,512,512,512,512,
|
||||
256,256,256,256,256,256,256,256,
|
||||
170,170,170,170,170,170,170,170,
|
||||
128,128,128,128,128,128,128,128,
|
||||
102,102,102,102,102,102,102,102,
|
||||
85,85,85,85,85,85,85,85,
|
||||
73,73,73,73,73,73,73,73,
|
||||
64,64,64,64,64,64,64,64,
|
||||
56,56,56,56,56,56,56,56,
|
||||
51,51,51,51,51,51,51,51,
|
||||
46,46,46,46,46,46,46,46,
|
||||
42,42,42,42,42,42,42,42,
|
||||
39,39,39,39,39,39,39,39,
|
||||
36,36,36,36,36,36,36,36,
|
||||
34,34,34,34,34,34,34,34,
|
||||
32,32,32,32,32,32,32,32,
|
||||
30,30,30,30,30,30,30,30,
|
||||
28,28,28,28,28,28,28,28,
|
||||
26,26,26,26,26,26,26,26,
|
||||
25,25,25,25,25,25,25,25,
|
||||
24,24,24,24,24,24,24,24,
|
||||
23,23,23,23,23,23,23,23,
|
||||
22,22,22,22,22,22,22,22,
|
||||
21,21,21,21,21,21,21,21,
|
||||
20,20,20,20,20,20,20,20,
|
||||
19,19,19,19,19,19,19,19,
|
||||
18,18,18,18,18,18,18,18,
|
||||
18,18,18,18,18,18,18,18,
|
||||
17,17,17,17,17,17,17,17,
|
||||
17,17,17,17,17,17,17,17,
|
||||
16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,
|
||||
15,15,15,15,15,15,15,15,
|
||||
15,15,15,15,15,15,15,15,
|
||||
14,14,14,14,14,14,14,14,
|
||||
14,14,14,14,14,14,14,14,
|
||||
13,13,13,13,13,13,13,13,
|
||||
13,13,13,13,13,13,13,13,
|
||||
13,13,13,13,13,13,13,13,
|
||||
12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,
|
||||
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2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
2,2,2,2,2,2,2,2,
|
||||
};
|
||||
|
||||
void freq_equalization(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
s32 **rxdataF_comp,
|
||||
s32 **ul_ch_mag,
|
||||
s32 **ul_ch_magb,
|
||||
u8 symbol,
|
||||
u16 Msc_RS,
|
||||
u8 Qm) {
|
||||
u16 re;
|
||||
s16 amp;
|
||||
__m128i *ul_ch_mag128,*ul_ch_magb128,*rxdataF_comp128;
|
||||
|
||||
rxdataF_comp128 = (__m128i *)&rxdataF_comp[0][symbol*frame_parms->N_RB_DL*12];
|
||||
ul_ch_mag128 = (__m128i *)&ul_ch_mag[0][symbol*frame_parms->N_RB_DL*12];
|
||||
ul_ch_magb128 = (__m128i *)&ul_ch_magb[0][symbol*frame_parms->N_RB_DL*12];
|
||||
|
||||
for (re=0;re<(Msc_RS>>2);re++) {
|
||||
|
||||
amp=(*((s16*)&ul_ch_mag128[re]));
|
||||
if (amp>255)
|
||||
amp=255;
|
||||
|
||||
// printf("freq_eq: symbol %d re %d => %d,%d,%d, (%d) (%d,%d) => ",symbol,re,*((s16*)(&ul_ch_mag128[re])),amp,inv_ch[8*amp],*((s16*)(&ul_ch_mag128[re]))*inv_ch[8*amp],*(s16*)&(rxdataF_comp128[re]),*(1+(s16*)&(rxdataF_comp128[re])));
|
||||
rxdataF_comp128[re] = _mm_mullo_epi16(rxdataF_comp128[re],*((__m128i *)&inv_ch[8*amp]));
|
||||
if (Qm==4)
|
||||
ul_ch_mag128[re] = _mm_set1_epi16(324); // this is 512*2/sqrt(10)
|
||||
else {
|
||||
ul_ch_mag128[re] = _mm_set1_epi16(316); // this is 512*4/sqrt(42)
|
||||
ul_ch_magb128[re] = _mm_set1_epi16(158); // this is 512*2/sqrt(42)
|
||||
}
|
||||
// printf("(%d,%d)\n",*(s16*)&(rxdataF_comp128[re]),*(1+(s16*)&(rxdataF_comp128[re])));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user