dft/idft in shared lib
This commit is contained in:
@@ -1373,7 +1373,7 @@ set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_parms.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
|
||||
# ${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/dfts_load.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cmult_sv.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cmult_vv.c
|
||||
|
||||
@@ -38,7 +38,7 @@ int phy_init_RU(RU_t *ru) {
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int i,j,p,re;
|
||||
init_dfts();
|
||||
//load_dftslib();
|
||||
LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d\n",ru_if_types[ru->if_south],ru->nb_tx);
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
@@ -76,7 +76,7 @@ int phy_init_RU(RU_t *ru) {
|
||||
}
|
||||
|
||||
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
|
||||
init_dfts();
|
||||
load_dftslib();
|
||||
init_7_5KHz();
|
||||
LOG_I(PHY,"nb_tx %d\n",ru->nb_tx);
|
||||
ru->common.rxdata_7_5kHz = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
|
||||
|
||||
@@ -625,7 +625,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
|
||||
int th_id;
|
||||
LOG_D(PHY,"Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
|
||||
crcTableInit();
|
||||
init_dfts();
|
||||
load_dftslib();
|
||||
init_frame_parms(&ue->frame_parms,1);
|
||||
lte_sync_time_init(&ue->frame_parms);
|
||||
init_lte_top(&ue->frame_parms);
|
||||
|
||||
@@ -96,7 +96,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
|
||||
while(gNB->configured == 0) usleep(10000);
|
||||
|
||||
init_dfts();
|
||||
load_dftslib();
|
||||
/*
|
||||
LOG_I(PHY,"[gNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
|
||||
gNB->Mod_id,
|
||||
@@ -112,7 +112,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
);*/
|
||||
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_gNB][MOD %02"PRIu8"][]\n", gNB->Mod_id);
|
||||
crcTableInit();
|
||||
init_dfts();
|
||||
load_nrLDPClib();
|
||||
// PBCH DMRS gold sequences generation
|
||||
nr_init_pbch_dmrs(gNB);
|
||||
|
||||
@@ -988,7 +988,7 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
|
||||
void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
crcTableInit();
|
||||
init_dfts();
|
||||
load_dftslib();
|
||||
init_context_synchro_nr(frame_parms);
|
||||
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||
// Polar encoder init for PBCH
|
||||
|
||||
@@ -657,35 +657,35 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
|
||||
}
|
||||
}
|
||||
|
||||
void (*idft)(int16_t *,int16_t *, int);
|
||||
idft_size_idx_t idftsizeidx;
|
||||
|
||||
switch (ue->frame_parms.ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft = idft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idft = idft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idft = idft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idft = idft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idft = idft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idft = idft2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
idft = idft512;
|
||||
idftsizeidx = IDFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idftsizeidx = IDFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idftsizeidx = IDFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idftsizeidx = IDFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idftsizeidx = IDFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idftsizeidx = IDFT_2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
idftsizeidx = IDFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -695,7 +695,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
|
||||
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx]) {
|
||||
//LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
|
||||
idft((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
|
||||
idft(idftsizeidx,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,31 +724,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa]) {
|
||||
switch (ue->frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
idft128((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_128,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
idft512((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_512,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
idft1024((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_1024,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 75:
|
||||
idft1536((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_1536,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
idft2048((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_2048,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
@@ -80,7 +80,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
while (1) {
|
||||
|
||||
//compute frequency-domain representation of 6144-sample chunk
|
||||
dft6144((int16_t *)rxp,
|
||||
dft(DFT_6144,(int16_t *)rxp,
|
||||
sp,1);
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
}
|
||||
|
||||
// ifft, accumulate energy over two half-frames
|
||||
idft256((int16_t*)autocorr0,(int16_t*)tmp_t,1);
|
||||
idft(IDFT_256,(int16_t*)autocorr0,(int16_t*)tmp_t,1);
|
||||
/*
|
||||
if (i==12288) {
|
||||
sprintf(fname,"corr256F_%d.m",abs(f));
|
||||
@@ -285,12 +285,12 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
for (re=0; re<(256/4); re++)
|
||||
autocorr0_t[re] = _mm_add_epi32(autocorr0_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
|
||||
|
||||
idft256((int16_t*)autocorr1,(int16_t*)tmp_t,1);
|
||||
idft(IDFT_256,(int16_t*)autocorr1,(int16_t*)tmp_t,1);
|
||||
|
||||
for (re=0; re<(256/4); re++)
|
||||
autocorr1_t[re] = _mm_add_epi32(autocorr1_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
|
||||
|
||||
idft256((int16_t*)autocorr2,(int16_t*)tmp_t,1);
|
||||
idft(IDFT_256,(int16_t*)autocorr2,(int16_t*)tmp_t,1);
|
||||
|
||||
for (re=0; re<(256/4); re++)
|
||||
autocorr2_t[re] = _mm_add_epi32(autocorr2_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
|
||||
|
||||
@@ -338,11 +338,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
switch (ue->frame_parms.N_RB_UL) {
|
||||
case 6:
|
||||
if (prach_fmt == 4) {
|
||||
idft256(prachF,prach2,1);
|
||||
idft(IDFT_256,prachF,prach2,1);
|
||||
memmove( prach, prach+512, Ncp<<2 );
|
||||
prach_len = 256+Ncp;
|
||||
} else {
|
||||
idft1536(prachF,prach2,1);
|
||||
idft(IDFT_1536,prachF,prach2,1);
|
||||
memmove( prach, prach+3072, Ncp<<2 );
|
||||
prach_len = 1536+Ncp;
|
||||
|
||||
@@ -356,12 +356,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
|
||||
case 15:
|
||||
if (prach_fmt == 4) {
|
||||
idft512(prachF,prach2,1);
|
||||
idft(IDFT_512,prachF,prach2,1);
|
||||
//TODO: account for repeated format in dft output
|
||||
memmove( prach, prach+1024, Ncp<<2 );
|
||||
prach_len = 512+Ncp;
|
||||
} else {
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
memmove( prach, prach+6144, Ncp<<2 );
|
||||
prach_len = 3072+Ncp;
|
||||
|
||||
@@ -376,11 +376,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
case 25:
|
||||
default:
|
||||
if (prach_fmt == 4) {
|
||||
idft1024(prachF,prach2,1);
|
||||
idft(IDFT_1024,prachF,prach2,1);
|
||||
memmove( prach, prach+2048, Ncp<<2 );
|
||||
prach_len = 1024+Ncp;
|
||||
} else {
|
||||
idft6144(prachF,prach2,1);
|
||||
idft(IDFT_6144,prachF,prach2,1);
|
||||
/*for (i=0;i<6144*2;i++)
|
||||
prach2[i]<<=1;*/
|
||||
memmove( prach, prach+12288, Ncp<<2 );
|
||||
@@ -396,11 +396,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
|
||||
case 50:
|
||||
if (prach_fmt == 4) {
|
||||
idft2048(prachF,prach2,1);
|
||||
idft(IDFT_2048,prachF,prach2,1);
|
||||
memmove( prach, prach+4096, Ncp<<2 );
|
||||
prach_len = 2048+Ncp;
|
||||
} else {
|
||||
idft12288(prachF,prach2,1);
|
||||
idft(IDFT_12288,prachF,prach2,1);
|
||||
memmove( prach, prach+24576, Ncp<<2 );
|
||||
prach_len = 12288+Ncp;
|
||||
|
||||
@@ -414,12 +414,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
|
||||
case 75:
|
||||
if (prach_fmt == 4) {
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
//TODO: account for repeated format in dft output
|
||||
memmove( prach, prach+6144, Ncp<<2 );
|
||||
prach_len = 3072+Ncp;
|
||||
} else {
|
||||
idft18432(prachF,prach2,1);
|
||||
idft(IDFT_18432,prachF,prach2,1);
|
||||
memmove( prach, prach+36864, Ncp<<2 );
|
||||
prach_len = 18432+Ncp;
|
||||
|
||||
@@ -434,11 +434,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
case 100:
|
||||
if (ue->frame_parms.threequarter_fs == 0) {
|
||||
if (prach_fmt == 4) {
|
||||
idft4096(prachF,prach2,1);
|
||||
idft(IDFT_4096,prachF,prach2,1);
|
||||
memmove( prach, prach+8192, Ncp<<2 );
|
||||
prach_len = 4096+Ncp;
|
||||
} else {
|
||||
idft24576(prachF,prach2,1);
|
||||
idft(IDFT_24576,prachF,prach2,1);
|
||||
memmove( prach, prach+49152, Ncp<<2 );
|
||||
prach_len = 24576+Ncp;
|
||||
|
||||
@@ -449,12 +449,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
}
|
||||
} else {
|
||||
if (prach_fmt == 4) {
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
//TODO: account for repeated format in dft output
|
||||
memmove( prach, prach+6144, Ncp<<2 );
|
||||
prach_len = 3072+Ncp;
|
||||
} else {
|
||||
idft18432(prachF,prach2,1);
|
||||
idft(IDFT_18432,prachF,prach2,1);
|
||||
memmove( prach, prach+36864, Ncp<<2 );
|
||||
prach_len = 18432+Ncp;
|
||||
printf("Generated prach for 100 PRB, 3/4 sampling\n");
|
||||
|
||||
@@ -104,9 +104,9 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
||||
|
||||
switch (Msc_PUSCH) {
|
||||
case 12:
|
||||
dft12((int16_t *)dft_in0,(int16_t *)dft_out0);
|
||||
dft12((int16_t *)dft_in1,(int16_t *)dft_out1);
|
||||
dft12((int16_t *)dft_in2,(int16_t *)dft_out2);
|
||||
dft(DFT_12,(int16_t *)dft_in0,(int16_t *)dft_out0,0);
|
||||
dft(DFT_12,(int16_t *)dft_in1,(int16_t *)dft_out1,0);
|
||||
dft(DFT_12,(int16_t *)dft_in2,(int16_t *)dft_out2,0);
|
||||
|
||||
/*
|
||||
dft12f(&((__m128i *)dft_in0)[0],&((__m128i *)dft_in0)[1],&((__m128i *)dft_in0)[2],&((__m128i *)dft_in0)[3],&((__m128i *)dft_in0)[4],&((__m128i *)dft_in0)[5],&((__m128i *)dft_in0)[6],&((__m128i *)dft_in0)[7],&((__m128i *)dft_in0)[8],&((__m128i *)dft_in0)[9],&((__m128i *)dft_in0)[10],&((__m128i *)dft_in0)[11],
|
||||
@@ -138,201 +138,201 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
||||
break;
|
||||
|
||||
case 24:
|
||||
dft24((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft24((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft24((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_24,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_24,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_24,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 36:
|
||||
dft36((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft36((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft36((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_36,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_36,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_36,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 48:
|
||||
dft48((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft48((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft48((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_48,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_48,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_48,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 60:
|
||||
dft60((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft60((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft60((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_60,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_60,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_60,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 72:
|
||||
dft72((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft72((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft72((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_72,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_72,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_72,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 96:
|
||||
dft96((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft96((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft96((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_96,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_96,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_96,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 108:
|
||||
dft108((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft108((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft108((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_108,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_108,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_108,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 120:
|
||||
dft120((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft120((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft120((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_120,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_120,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_120,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 144:
|
||||
dft144((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft144((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft144((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_144,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_144,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_144,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 180:
|
||||
dft180((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft180((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft180((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_180,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_180,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_180,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 192:
|
||||
dft192((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft192((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft192((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_192,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_192,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_192,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 216:
|
||||
dft216((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft216((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft216((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_216,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_216,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_216,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 240:
|
||||
dft240((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft240((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft240((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_240,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_240,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_240,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 288:
|
||||
dft288((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft288((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft288((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_288,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_288,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_288,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 300:
|
||||
dft300((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft300((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft300((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_300,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_300,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_300,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 324:
|
||||
dft324((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft324((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft324((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_324,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_324,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_324,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 360:
|
||||
dft360((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft360((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft360((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_360,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_360,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_360,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 384:
|
||||
dft384((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft384((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft384((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_384,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_384,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_384,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 432:
|
||||
dft432((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft432((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft432((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_432,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_432,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_432,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 480:
|
||||
dft480((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft480((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft480((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_480,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_480,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_480,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 540:
|
||||
dft540((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft540((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft540((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_540,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_540,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_540,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 576:
|
||||
dft576((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft576((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft576((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_576,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_576,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_576,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 600:
|
||||
dft600((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft600((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft600((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_600,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_600,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_600,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 648:
|
||||
dft648((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft648((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft648((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_648,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_648,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_648,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 720:
|
||||
dft720((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft720((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft720((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_720,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_720,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_720,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 768:
|
||||
dft768((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft768((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft768((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_768,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_768,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_768,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 864:
|
||||
dft864((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft864((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft864((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_864,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_864,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_864,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 900:
|
||||
dft900((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft900((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft900((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_900,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_900,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_900,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 960:
|
||||
dft960((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft960((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft960((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_960,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_960,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_960,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 972:
|
||||
dft972((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft972((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft972((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_972,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_972,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_972,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 1080:
|
||||
dft1080((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft1080((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft1080((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_1080,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_1080,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_1080,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 1152:
|
||||
dft1152((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft1152((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft1152((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_1152,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_1152,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_1152,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 1200:
|
||||
dft1200((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft1200((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft1200((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_1200,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_1200,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_1200,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ void nr_dft(int32_t *z, int32_t *d, uint32_t Msc_PUSCH)
|
||||
|
||||
switch (Msc_PUSCH) {
|
||||
case 12:
|
||||
dft12((int16_t *)dft_in0, (int16_t *)dft_out0);
|
||||
dft(DFT_12,(int16_t *)dft_in0, (int16_t *)dft_out0,0);
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
norm128 = _mm_set1_epi16(9459);
|
||||
@@ -260,135 +260,135 @@ void nr_dft(int32_t *z, int32_t *d, uint32_t Msc_PUSCH)
|
||||
break;
|
||||
|
||||
case 24:
|
||||
dft24((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_24,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 36:
|
||||
dft36((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_36,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 48:
|
||||
dft48((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_48,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 60:
|
||||
dft60((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_60,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 72:
|
||||
dft72((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_72,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 96:
|
||||
dft96((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_96,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 108:
|
||||
dft108((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_108,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 120:
|
||||
dft120((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_120,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 144:
|
||||
dft144((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_144,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 180:
|
||||
dft180((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_180,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 192:
|
||||
dft192((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_192,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 216:
|
||||
dft216((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_216,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 240:
|
||||
dft240((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_240,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 288:
|
||||
dft288((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_288,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 300:
|
||||
dft300((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_300,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 324:
|
||||
dft324((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_324,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 360:
|
||||
dft360((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_360,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 384:
|
||||
dft384((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_384,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 432:
|
||||
dft432((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_432,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 480:
|
||||
dft480((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_480,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 540:
|
||||
dft540((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_540,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 576:
|
||||
dft576((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_576,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 600:
|
||||
dft600((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_600,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 648:
|
||||
dft648((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_648,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 720:
|
||||
dft720((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_720,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 768:
|
||||
dft768((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_768,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 864:
|
||||
dft864((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_864,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 900:
|
||||
dft900((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_900,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 960:
|
||||
dft960((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_960,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 972:
|
||||
dft972((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_960,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1080:
|
||||
dft1080((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_1080,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1152:
|
||||
dft1152((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_1152,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1200:
|
||||
dft1200((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_1200,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,36 +49,36 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
|
||||
int uespec_pilot[9][1200];*/
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsizeidx;
|
||||
int tmp_dft_in[2048] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
dftsizeidx = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dftsizeidx = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dftsizeidx = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dftsizeidx = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dftsizeidx = DFT_2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -118,13 +118,13 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][rx_offset % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsizeidx,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
@@ -153,10 +153,10 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsizeidx,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
}
|
||||
|
||||
@@ -247,36 +247,36 @@ int front_end_fft(PHY_VARS_UE *ue,
|
||||
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
|
||||
int uespec_pilot[9][1200];*/
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsizeidx;
|
||||
int tmp_dft_in[2048] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
dftsizeidx = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dftsizeidx = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dftsizeidx = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dftsizeidx = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dftsizeidx = DFT_2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -319,11 +319,11 @@ int front_end_fft(PHY_VARS_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][rx_offset % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsizeidx,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
}
|
||||
@@ -349,10 +349,10 @@ int front_end_fft(PHY_VARS_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsizeidx,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,35 +42,35 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
unsigned int subframe_offset;
|
||||
// int i;
|
||||
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsizeidx;
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
dftsizeidx = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dftsizeidx = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dftsizeidx = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dftsizeidx = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dftsizeidx = DFT_2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
nb_prefix_samples0 +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
@@ -131,7 +131,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
|
||||
subframe_offset-
|
||||
@@ -208,43 +208,43 @@ int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
|
||||
int ofdm_symbol_size;
|
||||
unsigned int subframe_offset;
|
||||
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsizeidx;
|
||||
AssertFatal(frame_parms->frame_type == FDD, "Frame is TDD!\n");
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft1536;
|
||||
dftsizeidx = DFT_1536;
|
||||
ofdm_symbol_size=1536;
|
||||
nb_prefix_samples=384;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
AssertFatal(1==0,"FeMBMS dft3072 not implemented\n");
|
||||
dft = dft3072;
|
||||
dftsizeidx = DFT_3072;
|
||||
ofdm_symbol_size=3072;
|
||||
nb_prefix_samples=768;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft6144;
|
||||
dftsizeidx = DFT_6144;
|
||||
nb_prefix_samples=1536;
|
||||
ofdm_symbol_size=6144;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft12288;
|
||||
dftsizeidx = DFT_12288;
|
||||
nb_prefix_samples=3072;
|
||||
ofdm_symbol_size=12288;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft18432;
|
||||
dftsizeidx = DFT_18432;
|
||||
nb_prefix_samples=4608;
|
||||
ofdm_symbol_size=18432;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft24576;
|
||||
dftsizeidx = DFT_24576;
|
||||
nb_prefix_samples=6144;
|
||||
ofdm_symbol_size=24576;
|
||||
break;
|
||||
@@ -265,7 +265,7 @@ int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
nb_prefix_samples +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
|
||||
@@ -237,44 +237,44 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
unsigned int rx_offset;
|
||||
|
||||
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsize;
|
||||
int tmp_dft_in[8192] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
dftsize = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
dftsize = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
dftsize = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
dftsize = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
dftsize = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
dftsize = DFT_2048;
|
||||
break;
|
||||
|
||||
case 3072:
|
||||
dft = dft3072;
|
||||
dftsize = DFT_3072;
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
dft = dft4096;
|
||||
dftsize = DFT_4096;
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
dft = dft8192;
|
||||
dftsize = DFT_8192;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -330,14 +330,15 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *) &common_vars->rxdata[aa][rx_offset],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsize,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
dft((int16_t *) &common_vars->rxdata[aa][rx_offset],
|
||||
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
@@ -358,11 +359,10 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *) &common_vars->rxdata[aa][rx_offset],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsize,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
|
||||
dft((int16_t *) &common_vars->rxdata[aa][rx_offset],
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
}
|
||||
#if UE_TIMING_TRACE
|
||||
|
||||
@@ -430,55 +430,55 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
switch (gNB->frame_parms.ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft128((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_128,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idft256((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_256,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idft512((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_512,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idft1024((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_1024,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idft1536((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_1536,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idft2048((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_2048,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
idft4096((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_4096,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
idft8192((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_8192,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
default:
|
||||
idft512((int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
idft(IDFT_512,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
1);
|
||||
break;
|
||||
|
||||
@@ -127,8 +127,8 @@ time_stats_t generic_time[TIME_LAST];
|
||||
|
||||
/************** FUNCTION ******************************************/
|
||||
|
||||
void *get_idft(int ofdm_symbol_size);
|
||||
void *get_dft(int ofdm_symbol_size);
|
||||
idft_size_idx_t get_idft(int ofdm_symbol_size);
|
||||
dft_size_idx_t get_dft(int ofdm_symbol_size);
|
||||
void init_context_synchro_nr(NR_DL_FRAME_PARMS *frame_parms_ue);
|
||||
void free_context_synchro_nr(void);
|
||||
void init_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue);
|
||||
|
||||
@@ -175,39 +175,39 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
//50 MHz @ 61.44 Ms/s
|
||||
prach2 = prach[aa] + (Ncp<<2);
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2)
|
||||
dft49152(prach2,rxsigF[aa],1);
|
||||
dft(DFT_49152,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft49152(prach2+98304,rxsigF[aa]+98304,1);
|
||||
dft(DFT_49152,prach2+98304,rxsigF[aa]+98304,1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 2) {
|
||||
dft49152(prach2+(98304*2),rxsigF[aa]+(98304*2),1);
|
||||
dft49152(prach2+(98304*3),rxsigF[aa]+(98304*3),1);
|
||||
dft(DFT_49152,prach2+(98304*2),rxsigF[aa]+(98304*2),1);
|
||||
dft(DFT_49152,prach2+(98304*3),rxsigF[aa]+(98304*3),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 3) {
|
||||
for (int i=0;i<4;i++) dft12288(prach2+(i*12288*2),rxsigF[aa]+(i*12288*2),1);
|
||||
for (int i=0;i<4;i++) dft(DFT_12288,prach2+(i*12288*2),rxsigF[aa]+(i*12288*2),1);
|
||||
reps=4;
|
||||
}
|
||||
if (prach_fmt >3) {
|
||||
dft2048(prach2,rxsigF[aa],1);
|
||||
dft(DFT_2048,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt != 0xc0) {
|
||||
dft2048(prach2+4096,rxsigF[aa]+4096,1);
|
||||
dft(DFT_2048,prach2+4096,rxsigF[aa]+4096,1);
|
||||
reps++;
|
||||
}
|
||||
}
|
||||
if (prach_fmt == 0xa2 || prach_fmt == 0xa3 || prach_fmt == 0xb2 || prach_fmt == 0xb3 || prach_fmt == 0xb4 || prach_fmt == 0xc2) {
|
||||
dft2048(prach2+4096*2,rxsigF[aa]+4096*2,1);
|
||||
dft2048(prach2+4096*3,rxsigF[aa]+4096*3,1);
|
||||
dft(DFT_2048,prach2+4096*2,rxsigF[aa]+4096*2,1);
|
||||
dft(DFT_2048,prach2+4096*3,rxsigF[aa]+4096*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xa3 || prach_fmt == 0xb3 || prach_fmt == 0xc2) {
|
||||
dft2048(prach2+4096*4,rxsigF[aa]+4096*4,1);
|
||||
dft2048(prach2+4096*5,rxsigF[aa]+4096*5,1);
|
||||
dft(DFT_2048,prach2+4096*4,rxsigF[aa]+4096*4,1);
|
||||
dft(DFT_2048,prach2+4096*5,rxsigF[aa]+4096*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xc2) {
|
||||
for (int i=6;i<11;i++) dft2048(prach2+(3072*i),rxsigF[aa]+(3072*i),1);
|
||||
for (int i=6;i<11;i++) dft(DFT_2048,prach2+(3072*i),rxsigF[aa]+(3072*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
} else {
|
||||
@@ -215,41 +215,41 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
prach2 = prach[aa] + (3*Ncp);
|
||||
AssertFatal(fp->N_RB_UL <= 107,"cannot do 108..136 PRBs with 3/4 sampling\n");
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft36864(prach2,rxsigF[aa],1);
|
||||
dft(DFT_36864,prach2,rxsigF[aa],1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft36864(prach2+73728,rxsigF[aa]+73728,1);
|
||||
dft(DFT_36864,prach2+73728,rxsigF[aa]+73728,1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 2) {
|
||||
dft36864(prach2+(98304*2),rxsigF[aa]+(98304*2),1);
|
||||
dft36864(prach2+(98304*3),rxsigF[aa]+(98304*3),1);
|
||||
dft(DFT_36864,prach2+(98304*2),rxsigF[aa]+(98304*2),1);
|
||||
dft(DFT_36864,prach2+(98304*3),rxsigF[aa]+(98304*3),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 3) {
|
||||
for (int i=0;i<4;i++) dft9216(prach2+(i*9216*2),rxsigF[aa]+(i*9216*2),1);
|
||||
for (int i=0;i<4;i++) dft(DFT_9216,prach2+(i*9216*2),rxsigF[aa]+(i*9216*2),1);
|
||||
reps=4;
|
||||
}
|
||||
if (prach_fmt >3) {
|
||||
dft1536(prach2,rxsigF[aa],1);
|
||||
dft(DFT_1536,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt != 0xc0) {
|
||||
dft1536(prach2+3072,rxsigF[aa]+3072,1);
|
||||
dft(DFT_1536,prach2+3072,rxsigF[aa]+3072,1);
|
||||
reps++;
|
||||
}
|
||||
}
|
||||
if (prach_fmt == 0xa2 || prach_fmt == 0xa3 || prach_fmt == 0xb2 || prach_fmt == 0xb3 || prach_fmt == 0xb4 || prach_fmt == 0xc2) {
|
||||
dft1536(prach2+3072*2,rxsigF[aa]+3072*2,1);
|
||||
dft1536(prach2+3072*3,rxsigF[aa]+3072*3,1);
|
||||
dft(DFT_1536,prach2+3072*2,rxsigF[aa]+3072*2,1);
|
||||
dft(DFT_1536,prach2+3072*3,rxsigF[aa]+3072*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xa3 || prach_fmt == 0xb3 || prach_fmt == 0xc2) {
|
||||
dft1536(prach2+3072*4,rxsigF[aa]+3072*4,1);
|
||||
dft1536(prach2+3072*5,rxsigF[aa]+3072*5,1);
|
||||
dft(DFT_1536,prach2+3072*4,rxsigF[aa]+3072*4,1);
|
||||
dft(DFT_1536,prach2+3072*5,rxsigF[aa]+3072*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xc2) {
|
||||
for (int i=6;i<11;i++) dft1536(prach2+(3072*i),rxsigF[aa]+(3072*i),1);
|
||||
for (int i=6;i<11;i++) dft(DFT_1536,prach2+(3072*i),rxsigF[aa]+(3072*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
}
|
||||
@@ -260,41 +260,41 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
dftlen=98304;
|
||||
//80,90,100 MHz @ 61.44 Ms/s
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2)
|
||||
dft98304(prach2,rxsigF[aa],1);
|
||||
dft(DFT_98304,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft98304(prach2+196608,rxsigF[aa]+196608,1);
|
||||
dft(DFT_98304,prach2+196608,rxsigF[aa]+196608,1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft98304(prach2+196608,rxsigF[aa]+196608,1);
|
||||
dft98304(prach2+(196608*2),rxsigF[aa]+(196608*2),1);
|
||||
dft(DFT_98304,prach2+196608,rxsigF[aa]+196608,1);
|
||||
dft(DFT_98304,prach2+(196608*2),rxsigF[aa]+(196608*2),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 3) {
|
||||
dft24576(prach2+(2*49152),rxsigF[aa]+(2*49152),1);
|
||||
dft(DFT_24576,prach2+(2*49152),rxsigF[aa]+(2*49152),1);
|
||||
reps=4;
|
||||
dftlen=24576;
|
||||
}
|
||||
if (prach_fmt >3) {
|
||||
dftlen=4096;
|
||||
dft4096(prach2,rxsigF[aa],1);
|
||||
dft(DFT_4096,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt != 0xc0) {
|
||||
dft4096(prach2+8192,rxsigF[aa]+8192,1);
|
||||
dft(DFT_4096,prach2+8192,rxsigF[aa]+8192,1);
|
||||
reps++;
|
||||
}
|
||||
}
|
||||
if (prach_fmt == 0xa2 || prach_fmt == 0xa3 || prach_fmt == 0xb2 || prach_fmt == 0xb3 || prach_fmt == 0xb4 || prach_fmt == 0xc2) {
|
||||
dft4096(prach2+8192*2,rxsigF[aa]+8192*2,1);
|
||||
dft4096(prach2+8192*3,rxsigF[aa]+8192*3,1);
|
||||
dft(DFT_4096,prach2+8192*2,rxsigF[aa]+8192*2,1);
|
||||
dft(DFT_4096,prach2+8192*3,rxsigF[aa]+8192*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xa3 || prach_fmt == 0xb3 || prach_fmt == 0xc2) {
|
||||
dft4096(prach2+8192*4,rxsigF[aa]+8192*4,1);
|
||||
dft4096(prach2+8192*5,rxsigF[aa]+8192*5,1);
|
||||
dft(DFT_4096,prach2+8192*4,rxsigF[aa]+8192*4,1);
|
||||
dft(DFT_4096,prach2+8192*5,rxsigF[aa]+8192*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xc2) {
|
||||
for (int i=6;i<11;i++) dft4096(prach2+(8192*i),rxsigF[aa]+(8192*i),1);
|
||||
for (int i=6;i<11;i++) dft(DFT_4096,prach2+(8192*i),rxsigF[aa]+(8192*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
} else {
|
||||
@@ -303,39 +303,39 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
// 80 MHz @ 46.08 Ms/s
|
||||
dftlen=73728;
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft73728(prach2,rxsigF[aa],1);
|
||||
dft(DFT_73728,prach2,rxsigF[aa],1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft73728(prach2+(2*73728),rxsigF[aa]+(2*73728),1);
|
||||
dft(DFT_73728,prach2+(2*73728),rxsigF[aa]+(2*73728),1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 3) {
|
||||
dft73728(prach2+(4*73728),rxsigF[aa]+(4*73728),1);
|
||||
dft(DFT_73728,prach2+(4*73728),rxsigF[aa]+(4*73728),1);
|
||||
reps=4;
|
||||
dftlen=18432;
|
||||
}
|
||||
|
||||
if (prach_fmt >3) {
|
||||
dftlen=3072;
|
||||
dft3072(prach2,rxsigF[aa],1);
|
||||
dft(DFT_3072,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt != 0xc0) {
|
||||
dft3072(prach2+6144,rxsigF[aa]+6144,1);
|
||||
dft(DFT_3072,prach2+6144,rxsigF[aa]+6144,1);
|
||||
reps++;
|
||||
}
|
||||
}
|
||||
if (prach_fmt == 0xa2 || prach_fmt == 0xa3 || prach_fmt == 0xb2 || prach_fmt == 0xb3 || prach_fmt == 0xb4 || prach_fmt == 0xc2) {
|
||||
dft3072(prach2+6144*2,rxsigF[aa]+6144*2,1);
|
||||
dft3072(prach2+6144*3,rxsigF[aa]+6144*3,1);
|
||||
dft(DFT_3072,prach2+6144*2,rxsigF[aa]+6144*2,1);
|
||||
dft(DFT_3072,prach2+6144*3,rxsigF[aa]+6144*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xa3 || prach_fmt == 0xb3 || prach_fmt == 0xc2) {
|
||||
dft3072(prach2+6144*4,rxsigF[aa]+6144*4,1);
|
||||
dft3072(prach2+6144*5,rxsigF[aa]+6144*5,1);
|
||||
dft(DFT_3072,prach2+6144*4,rxsigF[aa]+6144*4,1);
|
||||
dft(DFT_3072,prach2+6144*5,rxsigF[aa]+6144*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xc2) {
|
||||
for (int i=6;i<11;i++) dft3072(prach2+(6144*i),rxsigF[aa]+(6144*i),1);
|
||||
for (int i=6;i<11;i++) dft(DFT_3072,prach2+(6144*i),rxsigF[aa]+(6144*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
}
|
||||
@@ -590,12 +590,12 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
|
||||
if (N_ZC == 839) {
|
||||
log2_ifft_size = 10;
|
||||
idft1024(prachF,prach_ifft_tmp,1);
|
||||
idft(IDFT_1024,prachF,prach_ifft_tmp,1);
|
||||
// compute energy and accumulate over receive antennas
|
||||
for (i=0;i<2048;i++)
|
||||
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[i<<1] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>10;
|
||||
} else {
|
||||
idft256(prachF,prach_ifft_tmp,1);
|
||||
idft(IDFT_256,prachF,prach_ifft_tmp,1);
|
||||
log2_ifft_size = 8;
|
||||
// compute energy and accumulate over receive antennas and repetitions for BR
|
||||
for (i=0;i<256;i++)
|
||||
|
||||
@@ -44,7 +44,7 @@ void nr_idft(uint32_t *z, uint32_t Msc_PUSCH)
|
||||
|
||||
switch (Msc_PUSCH) {
|
||||
case 12:
|
||||
dft12((int16_t *)idft_in0, (int16_t *)idft_out0);
|
||||
dft(DFT_12,(int16_t *)idft_in0, (int16_t *)idft_out0,0);
|
||||
|
||||
#if defined(__x86_64__)||defined(__i386__)
|
||||
norm128 = _mm_set1_epi16(9459);
|
||||
@@ -63,135 +63,135 @@ void nr_idft(uint32_t *z, uint32_t Msc_PUSCH)
|
||||
break;
|
||||
|
||||
case 24:
|
||||
dft24(idft_in0, idft_out0, 1);
|
||||
dft(DFT_24,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 36:
|
||||
dft36(idft_in0, idft_out0, 1);
|
||||
dft(DFT_36,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 48:
|
||||
dft48(idft_in0, idft_out0, 1);
|
||||
dft(DFT_48,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 60:
|
||||
dft60(idft_in0, idft_out0, 1);
|
||||
dft(DFT_60,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 72:
|
||||
dft72(idft_in0, idft_out0, 1);
|
||||
dft(DFT_72,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 96:
|
||||
dft96(idft_in0, idft_out0, 1);
|
||||
dft(DFT_96,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 108:
|
||||
dft108(idft_in0, idft_out0, 1);
|
||||
dft(DFT_108,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 120:
|
||||
dft120(idft_in0, idft_out0, 1);
|
||||
dft(DFT_120,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 144:
|
||||
dft144(idft_in0, idft_out0, 1);
|
||||
dft(DFT_144,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 180:
|
||||
dft180(idft_in0, idft_out0, 1);
|
||||
dft(DFT_180,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 192:
|
||||
dft192(idft_in0, idft_out0, 1);
|
||||
dft(DFT_192,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 216:
|
||||
dft216(idft_in0, idft_out0, 1);
|
||||
dft(DFT_216,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 240:
|
||||
dft240(idft_in0, idft_out0, 1);
|
||||
dft(DFT_240,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 288:
|
||||
dft288(idft_in0, idft_out0, 1);
|
||||
dft(DFT_288,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 300:
|
||||
dft300(idft_in0, idft_out0, 1);
|
||||
dft(DFT_300,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 324:
|
||||
dft324((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_324,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 360:
|
||||
dft360((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_360,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 384:
|
||||
dft384((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_384,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 432:
|
||||
dft432((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_432,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 480:
|
||||
dft480((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_480,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 540:
|
||||
dft540((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_540,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 576:
|
||||
dft576((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_576,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 600:
|
||||
dft600((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_600,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 648:
|
||||
dft648((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_648,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 720:
|
||||
dft720((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_720,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 768:
|
||||
dft768((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_768,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 864:
|
||||
dft864((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_864,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 900:
|
||||
dft900((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_900,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 960:
|
||||
dft960((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_960,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 972:
|
||||
dft972((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_972,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1080:
|
||||
dft1080((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_1080,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1152:
|
||||
dft1152((int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
dft(DFT_1152,(int16_t*)idft_in0, (int16_t*)idft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1200:
|
||||
dft1200(idft_in0, idft_out0, 1);
|
||||
dft(DFT_1200,idft_in0, idft_out0, 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -405,39 +405,39 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
|
||||
}
|
||||
|
||||
void (*idft)(int16_t *,int16_t *, int);
|
||||
idft_size_idx_t idftsizeidx;
|
||||
|
||||
switch (ue->frame_parms.ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft = idft128;
|
||||
idftsizeidx = IDFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idft = idft256;
|
||||
idftsizeidx = IDFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idft = idft512;
|
||||
idftsizeidx = IDFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idft = idft1024;
|
||||
idftsizeidx = IDFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idft = idft1536;
|
||||
idftsizeidx = IDFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idft = idft2048;
|
||||
idftsizeidx = IDFT_2048;
|
||||
break;
|
||||
|
||||
case 3072:
|
||||
idft = idft3072;
|
||||
idftsizeidx = IDFT_3072;
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
idft = idft4096;
|
||||
idftsizeidx = IDFT_4096;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -453,7 +453,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
if (ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p<<1)+aarx])
|
||||
{
|
||||
LOG_D(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d ch_offset %d\n", Ns, ue->current_thread_id[Ns], symbol, ch_offset);
|
||||
idft((int16_t*) &ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p<<1)+aarx][ch_offset],
|
||||
idft(idftsizeidx,
|
||||
(int16_t*) &ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p<<1)+aarx][ch_offset],
|
||||
(int16_t*) ue->pbch_vars[eNB_offset]->dl_ch_estimates_time[(p<<1)+aarx],1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
// This is after cyclic prefix (Ncp<<1 samples for 30.72 Ms/s, Ncp<<2 samples for 61.44 Ms/s
|
||||
prach2 = prach+(Ncp<<1);
|
||||
if (prach_fmt == 0) { //24576 samples @ 30.72 Ms/s, 49152 samples @ 61.44 Ms/s
|
||||
idft49152(prachF,prach2,1);
|
||||
idft(IDFT_49152,prachF,prach2,1);
|
||||
// here we have |empty | Prach49152|
|
||||
memmove(prach,prach+(49152<<1),(Ncp<<3));
|
||||
// here we have |Prefix | Prach49152|
|
||||
@@ -406,7 +406,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
dftlen=49152;
|
||||
}
|
||||
else if (prach_fmt == 1) { //24576 samples @ 30.72 Ms/s, 49152 samples @ 61.44 Ms/s
|
||||
idft49152(prachF,prach2,1);
|
||||
idft(IDFT_49152,prachF,prach2,1);
|
||||
memmove(prach2+(49152<<1),prach2,(49152<<2));
|
||||
// here we have |empty | Prach49152 | Prach49152|
|
||||
memmove(prach,prach+(49152<<2),(Ncp<<3));
|
||||
@@ -415,7 +415,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
dftlen=49152;
|
||||
}
|
||||
else if (prach_fmt == 2) { //24576 samples @ 30.72 Ms/s, 49152 samples @ 61.44 Ms/s
|
||||
idft49152(prachF,prach2,1);
|
||||
idft(IDFT_49152,prachF,prach2,1);
|
||||
memmove(prach2+(49152<<1),prach2,(49152<<2));
|
||||
// here we have |empty | Prach49152 | Prach49152| empty49152 | empty49152
|
||||
memmove(prach2+(49152<<2),prach2,(49152<<3));
|
||||
@@ -426,7 +426,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
dftlen=49152;
|
||||
}
|
||||
else if (prach_fmt == 3) { // //6144 samples @ 30.72 Ms/s, 12288 samples @ 61.44 Ms/s
|
||||
idft12288(prachF,prach2,1);
|
||||
idft(IDFT_12288,prachF,prach2,1);
|
||||
memmove(prach2+(12288<<1),prach2,(12288<<2));
|
||||
// here we have |empty | Prach12288 | Prach12288| empty12288 | empty12288
|
||||
memmove(prach2+(12288<<2),prach2,(12288<<3));
|
||||
@@ -438,7 +438,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
}
|
||||
else if (prach_fmt == 0xa1 || prach_fmt == 0xb1 || prach_fmt == 0xc0) {
|
||||
prach2 = prach+(Ncp<<1);
|
||||
idft2048(prachF,prach2,1);
|
||||
idft(IDFT_2048,prachF,prach2,1);
|
||||
dftlen=2048;
|
||||
// here we have |empty | Prach2048 |
|
||||
if (prach_fmt != 0xc0) {
|
||||
@@ -450,7 +450,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
// here we have |Prefix | Prach2048 | Prach2048 (if ! 0xc0) |
|
||||
}
|
||||
else if (prach_fmt == 0xa2 || prach_fmt == 0xb2) { // 6x2048
|
||||
idft2048(prachF,prach2,1);
|
||||
idft(IDFT_2048,prachF,prach2,1);
|
||||
dftlen=2048;
|
||||
// here we have |empty | Prach2048 |
|
||||
memmove(prach2+(2048<<1),prach2,(2048<<2));
|
||||
@@ -463,7 +463,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
}
|
||||
else if (prach_fmt == 0xa3 || prach_fmt == 0xb3) { // 6x2048
|
||||
prach2 = prach+(Ncp<<1);
|
||||
idft2048(prachF,prach2,1);
|
||||
idft(IDFT_2048,prachF,prach2,1);
|
||||
dftlen=2048;
|
||||
// here we have |empty | Prach2048 |
|
||||
memmove(prach2+(2048<<1),prach2,(2048<<2));
|
||||
@@ -477,7 +477,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (2048*6)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xb4) { // 12x2048
|
||||
idft2048(prachF,prach2,1);
|
||||
idft(IDFT_2048,prachF,prach2,1);
|
||||
dftlen=2048;
|
||||
// here we have |empty | Prach2048 |
|
||||
memmove(prach2+(2048<<1),prach2,(2048<<2));
|
||||
@@ -498,7 +498,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
Ncp = (Ncp*3)/2;
|
||||
prach2 = prach+(Ncp<<1);
|
||||
if (prach_fmt == 0) {
|
||||
idft36864(prachF,prach2,1);
|
||||
idft(IDFT_36864,prachF,prach2,1);
|
||||
dftlen=36864;
|
||||
// here we have |empty | Prach73728|
|
||||
memmove(prach,prach+(36864<<1),(Ncp<<2));
|
||||
@@ -506,7 +506,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (36864*1)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 1) {
|
||||
idft36864(prachF,prach2,1);
|
||||
idft(IDFT_36864,prachF,prach2,1);
|
||||
dftlen=36864;
|
||||
memmove(prach2+(36864<<1),prach2,(36864<<2));
|
||||
// here we have |empty | Prach73728 | Prach73728|
|
||||
@@ -515,7 +515,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (36864*2)+Ncp;
|
||||
}
|
||||
if (prach_fmt == 2) {
|
||||
idft36864(prachF,prach2,1);
|
||||
idft(IDFT_36864,prachF,prach2,1);
|
||||
dftlen=36864;
|
||||
memmove(prach2+(36864<<1),prach2,(36864<<2));
|
||||
// here we have |empty | Prach73728 | Prach73728| empty73728 | empty73728
|
||||
@@ -526,7 +526,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (36864*4)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 3) {
|
||||
idft9216(prachF,prach2,1);
|
||||
idft(IDFT_9216,prachF,prach2,1);
|
||||
dftlen=36864;
|
||||
memmove(prach2+(9216<<1),prach2,(9216<<2));
|
||||
// here we have |empty | Prach9216 | Prach9216| empty9216 | empty9216
|
||||
@@ -537,7 +537,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (9216*4)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xa1 || prach_fmt == 0xb1 || prach_fmt == 0xc0) {
|
||||
idft1536(prachF,prach2,1);
|
||||
idft(IDFT_1536,prachF,prach2,1);
|
||||
dftlen=1536;
|
||||
// here we have |empty | Prach1536 |
|
||||
if (prach_fmt != 0xc0)
|
||||
@@ -547,7 +547,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (1536*2)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xa2 || prach_fmt == 0xb2) { // 6x1536
|
||||
idft1536(prachF,prach2,1);
|
||||
idft(IDFT_1536,prachF,prach2,1);
|
||||
dftlen=1536;
|
||||
// here we have |empty | Prach1536 |
|
||||
memmove(prach2+(1536<<1),prach2,(1536<<2));
|
||||
@@ -559,7 +559,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (1536*4)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xa3 || prach_fmt == 0xb3) { // 6x1536
|
||||
idft1536(prachF,prach2,1);
|
||||
idft(IDFT_1536,prachF,prach2,1);
|
||||
dftlen=1536;
|
||||
// here we have |empty | Prach1536 |
|
||||
memmove(prach2+(1536<<1),prach2,(1536<<2));
|
||||
@@ -573,7 +573,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (1536*6)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xb4) { // 12x1536
|
||||
idft1536(prachF,prach2,1);
|
||||
idft(IDFT_1536,prachF,prach2,1);
|
||||
dftlen=1536;
|
||||
// here we have |empty | Prach1536 |
|
||||
memmove(prach2+(1536<<1),prach2,(1536<<2));
|
||||
@@ -595,7 +595,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
Ncp<<=2;
|
||||
prach2 = prach+(Ncp<<1);
|
||||
if (prach_fmt == 0) { //24576 samples @ 30.72 Ms/s, 98304 samples @ 122.88 Ms/s
|
||||
idft98304(prachF,prach2,1);
|
||||
idft(IDFT_98304,prachF,prach2,1);
|
||||
dftlen=98304;
|
||||
// here we have |empty | Prach98304|
|
||||
memmove(prach,prach+(98304<<1),(Ncp<<2));
|
||||
@@ -603,7 +603,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (98304*1)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 1) {
|
||||
idft98304(prachF,prach2,1);
|
||||
idft(IDFT_98304,prachF,prach2,1);
|
||||
dftlen=98304;
|
||||
memmove(prach2+(98304<<1),prach2,(98304<<2));
|
||||
// here we have |empty | Prach98304 | Prach98304|
|
||||
@@ -612,7 +612,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (98304*2)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 2) {
|
||||
idft98304(prachF,prach2,1);
|
||||
idft(IDFT_98304,prachF,prach2,1);
|
||||
dftlen=98304;
|
||||
memmove(prach2+(98304<<1),prach2,(98304<<2));
|
||||
// here we have |empty | Prach98304 | Prach98304| empty98304 | empty98304
|
||||
@@ -623,7 +623,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (98304*4)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 3) { // 4x6144, Ncp 3168
|
||||
idft24576(prachF,prach2,1);
|
||||
idft(IDFT_24576,prachF,prach2,1);
|
||||
dftlen=24576;
|
||||
memmove(prach2+(24576<<1),prach2,(24576<<2));
|
||||
// here we have |empty | Prach24576 | Prach24576| empty24576 | empty24576
|
||||
@@ -634,7 +634,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (24576*4)+(Ncp<<1);
|
||||
}
|
||||
else if (prach_fmt == 0xa1 || prach_fmt == 0xb1 || prach_fmt == 0xc0) {
|
||||
idft4096(prachF,prach2,1);
|
||||
idft(IDFT_4096,prachF,prach2,1);
|
||||
dftlen=4096;
|
||||
// here we have |empty | Prach4096 |
|
||||
if (prach_fmt != 0xc0) {
|
||||
@@ -647,7 +647,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
|
||||
}
|
||||
else if (prach_fmt == 0xa2 || prach_fmt == 0xb2) { // 4x4096
|
||||
idft4096(prachF,prach2,1);
|
||||
idft(IDFT_4096,prachF,prach2,1);
|
||||
dftlen=4096;
|
||||
// here we have |empty | Prach4096 |
|
||||
memmove(prach2+(4096<<1),prach2,(4096<<2));
|
||||
@@ -659,7 +659,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (4096*4)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xa3 || prach_fmt == 0xb3) { // 6x4096
|
||||
idft4096(prachF,prach2,1);
|
||||
idft(IDFT_4096,prachF,prach2,1);
|
||||
dftlen=4096;
|
||||
// here we have |empty | Prach4096 |
|
||||
memmove(prach2+(4096<<1),prach2,(4096<<2));
|
||||
@@ -673,7 +673,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (4096*6)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xb4) { // 12x4096
|
||||
idft4096(prachF,prach2,1);
|
||||
idft(IDFT_4096,prachF,prach2,1);
|
||||
dftlen=4096;
|
||||
// here we have |empty | Prach4096 |
|
||||
memmove(prach2+(4096<<1),prach2,(4096<<2));
|
||||
@@ -693,7 +693,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
Ncp = (Ncp*3);
|
||||
prach2 = prach+(Ncp<<1);
|
||||
if (prach_fmt == 0) {
|
||||
idft73728(prachF,prach2,1);
|
||||
idft(IDFT_73728,prachF,prach2,1);
|
||||
dftlen=73728;
|
||||
// here we have |empty | Prach73728|
|
||||
memmove(prach,prach+(73728<<1),(Ncp<<4));
|
||||
@@ -701,7 +701,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (73728*1)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 1) {
|
||||
idft73728(prachF,prach2,1);
|
||||
idft(IDFT_73728,prachF,prach2,1);
|
||||
dftlen=73728;
|
||||
memmove(prach2+(73728<<1),prach2,(73728<<2));
|
||||
// here we have |empty | Prach73728 | Prach73728|
|
||||
@@ -710,7 +710,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (73728*2)+Ncp;
|
||||
}
|
||||
if (prach_fmt == 2) {
|
||||
idft73728(prachF,prach2,1);
|
||||
idft(IDFT_73728,prachF,prach2,1);
|
||||
dftlen=73728;
|
||||
memmove(prach2+(73728<<1),prach2,(73728<<2));
|
||||
// here we have |empty | Prach73728 | Prach73728| empty73728 | empty73728
|
||||
@@ -721,7 +721,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (73728*4)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 3) {
|
||||
idft18432(prachF,prach2,1);
|
||||
idft(IDFT_18432,prachF,prach2,1);
|
||||
dftlen=18432;
|
||||
memmove(prach2+(18432<<1),prach2,(18432<<2));
|
||||
// here we have |empty | Prach18432 | Prach18432| empty18432 | empty18432
|
||||
@@ -732,7 +732,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (18432*4)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xa1 || prach_fmt == 0xb1 || prach_fmt == 0xc0) {
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
dftlen=3072;
|
||||
// here we have |empty | Prach3072 |
|
||||
if (prach_fmt != 0xc0) {
|
||||
@@ -744,7 +744,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
// here we have |Prefix | Prach3072 | Prach3072 (if ! 0xc0) |
|
||||
}
|
||||
else if (prach_fmt == 0xa3 || prach_fmt == 0xb3) { // 6x3072
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
dftlen=3072;
|
||||
// here we have |empty | Prach3072 |
|
||||
memmove(prach2+(3072<<1),prach2,(3072<<2));
|
||||
@@ -758,7 +758,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (3072*6)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xa2 || prach_fmt == 0xb2) { // 4x3072
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
dftlen=3072;
|
||||
// here we have |empty | Prach3072 |
|
||||
memmove(prach2+(3072<<1),prach2,(3072<<2));
|
||||
@@ -770,7 +770,7 @@ int32_t generate_nr_prach( PHY_VARS_NR_UE *ue, uint8_t eNB_id, uint8_t subframe,
|
||||
prach_len = (3072*4)+Ncp;
|
||||
}
|
||||
else if (prach_fmt == 0xb4) { // 12x3072
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
dftlen=3072;
|
||||
// here we have |empty | Prach3072 |
|
||||
memmove(prach2+(3072<<1),prach2,(3072<<2));
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
*
|
||||
* PARAMETERS : size of ofdm symbol
|
||||
*
|
||||
* RETURN : function idft
|
||||
* RETURN : index pointing to the dft func in the dft library
|
||||
*
|
||||
* DESCRIPTION : get idft function depending of ofdm size
|
||||
*
|
||||
@@ -60,45 +60,45 @@
|
||||
|
||||
//#define DBG_PSS_NR
|
||||
|
||||
void *get_idft(int ofdm_symbol_size)
|
||||
idft_size_idx_t get_idft(int ofdm_symbol_size)
|
||||
{
|
||||
void (*idft)(int16_t *,int16_t *, int);
|
||||
|
||||
|
||||
|
||||
switch (ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft = idft128;
|
||||
return IDFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idft = idft256;
|
||||
return IDFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idft = idft512;
|
||||
return IDFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idft = idft1024;
|
||||
return IDFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idft = idft1536;
|
||||
return IDFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idft = idft2048;
|
||||
return IDFT_2048;
|
||||
break;
|
||||
|
||||
case 3072:
|
||||
idft = idft3072;
|
||||
return IDFT_3072;
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
idft = idft4096;
|
||||
return IDFT_4096;
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
idft = idft8192;
|
||||
return IDFT_8192;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -106,7 +106,7 @@ void *get_idft(int ofdm_symbol_size)
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
return idft;
|
||||
return IDFT_SIZE_IDXTABLESIZE; // never reached and will trigger assertion in idft function
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
@@ -121,41 +121,41 @@ void *get_idft(int ofdm_symbol_size)
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
void *get_dft(int ofdm_symbol_size)
|
||||
dft_size_idx_t get_dft(int ofdm_symbol_size)
|
||||
{
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
|
||||
|
||||
switch (ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
return DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
return DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
return DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
return DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
return DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
return DFT_2048;
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
dft = dft4096;
|
||||
return DFT_4096;
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
dft = dft8192;
|
||||
return DFT_8192;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -163,7 +163,7 @@ void *get_dft(int ofdm_symbol_size)
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
return dft;
|
||||
return DFT_SIZE_IDXTABLESIZE; // never reached and will trigger assertion in idft function;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
@@ -191,7 +191,7 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp,int N_ID_2)
|
||||
unsigned int size = length * IQ_SIZE; /* i & q */
|
||||
int16_t *primary_synchro = primary_synchro_nr[N_ID_2]; /* pss in complex with alternatively i then q */
|
||||
int16_t *primary_synchro2 = primary_synchro_nr2[N_ID_2]; /* pss in complex with alternatively i then q */
|
||||
void (*idft)(int16_t *,int16_t *, int);
|
||||
|
||||
|
||||
#define INITIAL_PSS_NR (7)
|
||||
const int x_initial[INITIAL_PSS_NR] = {0, 1, 1 , 0, 1, 1, 1};
|
||||
@@ -282,9 +282,10 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp,int N_ID_2)
|
||||
|
||||
/* IFFT will give temporal signal of Pss */
|
||||
|
||||
idft = get_idft(length);
|
||||
|
||||
idft(synchroF_tmp, /* complex input */
|
||||
|
||||
|
||||
idft((int16_t)get_idft(length),
|
||||
synchroF_tmp, /* complex input */
|
||||
synchro_tmp, /* complex output */
|
||||
1); /* scaling factor */
|
||||
|
||||
@@ -312,6 +313,7 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp,int N_ID_2)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
/* it allows checking that process of idft on a signal and then dft gives same signal with limited errors */
|
||||
@@ -323,10 +325,11 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp,int N_ID_2)
|
||||
|
||||
bzero(synchroF_tmp, size);
|
||||
|
||||
void (*dft)(int16_t *,int16_t *, int) = get_dft(length);
|
||||
|
||||
|
||||
/* get pss in the time domain by applying an inverse FFT */
|
||||
dft(synchro_tmp, /* complex input */
|
||||
dft((int16_t)get_dft(length),
|
||||
synchro_tmp, /* complex input */
|
||||
synchroF_tmp, /* complex output */
|
||||
1); /* scaling factor */
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ void insert_sss_nr(int16_t *sss_time,
|
||||
}
|
||||
|
||||
/* get sss in the frequency domain by applying an inverse FFT */
|
||||
idft2048(synchroF_tmp, /* complex input */
|
||||
idft(IDFT_2048,synchroF_tmp, /* complex input */
|
||||
synchro_tmp, /* complex output */
|
||||
1); /* scaling factor */
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file openair1/PHY/CODING/coding_nr_load.c
|
||||
* \brief: load library implementing coding/decoding algorithms
|
||||
* \author Francois TABURET
|
||||
* \date 2020
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#define OAIDFTS_LOADER
|
||||
#include "tools_defs.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
|
||||
|
||||
/* function description array, to be used when loading the dfts/idfts lib */
|
||||
static loader_shlibfunc_t shlib_fdesc[2];
|
||||
static char *arg[64]={"phytest","-O","cmdlineonly::dbgl0"};
|
||||
|
||||
|
||||
int load_dftslib(void) {
|
||||
|
||||
char *ptr = (char*)config_get_if();
|
||||
if ( ptr==NULL ) {// phy simulators, config module possibly not loaded
|
||||
load_configmodule(3,(char **)arg,CONFIG_ENABLECMDLINEONLY) ;
|
||||
logInit();
|
||||
}
|
||||
shlib_fdesc[0].fname = "dft";
|
||||
shlib_fdesc[1].fname = "idft";
|
||||
int ret=load_module_shlib("dfts",shlib_fdesc,sizeof(shlib_fdesc)/sizeof(loader_shlibfunc_t),NULL);
|
||||
AssertFatal( (ret >= 0),"Error loading dftsc decoder");
|
||||
dft = (dftfunc_t)shlib_fdesc[0].fptr;
|
||||
idft = (idftfunc_t)shlib_fdesc[1].fptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
#define OAIDFTS
|
||||
#define OAIDFTS_MAIN
|
||||
#ifndef MR_MAIN
|
||||
#include "PHY/defs_common.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
@@ -5697,12 +5697,12 @@ void dft6144(int16_t *input, int16_t *output,unsigned char scale)
|
||||
int16_t twa9216[6144] __attribute__((aligned(32)));
|
||||
int16_t twb9216[6144] __attribute__((aligned(32)));
|
||||
// 3072 x 3
|
||||
void dft9216(int16_t *input, int16_t *output,int scale) {
|
||||
void dft9216(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
|
||||
void idft9216(int16_t *input, int16_t *output,int scale) {
|
||||
void idft9216(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
@@ -6059,11 +6059,11 @@ void idft24576(int16_t *input, int16_t *output,unsigned char scale)
|
||||
int16_t twa36864[24576] __attribute__((aligned(32)));
|
||||
int16_t twb36884[24576] __attribute__((aligned(32)));
|
||||
// 12288 x 3
|
||||
void dft36864(int16_t *input, int16_t *output,int scale) {
|
||||
void dft36864(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
void idft36864(int16_t *input, int16_t *output,int scale) {
|
||||
void idft36864(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
@@ -6071,12 +6071,12 @@ void idft36864(int16_t *input, int16_t *output,int scale) {
|
||||
int16_t twa49152[32768] __attribute__((aligned(32)));
|
||||
int16_t twb49152[32768] __attribute__((aligned(32)));
|
||||
// 16384 x 3
|
||||
void dft49152(int16_t *input, int16_t *output,int scale) {
|
||||
void dft49152(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
|
||||
void idft49152(int16_t *input, int16_t *output,int scale) {
|
||||
void idft49152(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
@@ -6084,12 +6084,12 @@ void idft49152(int16_t *input, int16_t *output,int scale) {
|
||||
int16_t twa73728[49152] __attribute__((aligned(32)));
|
||||
int16_t twb73728[49152] __attribute__((aligned(32)));
|
||||
// 24576 x 3
|
||||
void dft73728(int16_t *input, int16_t *output,int scale) {
|
||||
void dft73728(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
|
||||
void idft73728(int16_t *input, int16_t *output,int scale) {
|
||||
void idft73728(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
@@ -6098,12 +6098,12 @@ void idft73728(int16_t *input, int16_t *output,int scale) {
|
||||
int16_t twa98304[49152] __attribute__((aligned(32)));
|
||||
int16_t twb98304[49152] __attribute__((aligned(32)));
|
||||
// 32768 x 3
|
||||
void dft98304(int16_t *input, int16_t *output,int scale) {
|
||||
void dft98304(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
|
||||
void idft98304(int16_t *input, int16_t *output,int scale) {
|
||||
void idft98304(int16_t *input, int16_t *output,uint8_t scale) {
|
||||
|
||||
AssertFatal(1==0,"Need to do this ..\n");
|
||||
}
|
||||
@@ -8593,8 +8593,6 @@ void dft1200(int16_t *x,int16_t *y,unsigned char scale_flag)
|
||||
|
||||
}
|
||||
|
||||
//#define round trunc
|
||||
|
||||
void init_rad4(int N,int16_t *tw) {
|
||||
|
||||
int16_t *twa = tw;
|
||||
@@ -8710,13 +8708,13 @@ void init_rad5_rep(int N,int16_t *twa,int16_t *twb,int16_t *twc,int16_t *twd) {
|
||||
twa+=8;
|
||||
twb+=8;
|
||||
twc+=8;
|
||||
twd+=8;
|
||||
twd+=8;
|
||||
}
|
||||
}
|
||||
/*----------------------------------------------------------------*/
|
||||
/* dft library entry points: */
|
||||
|
||||
void init_dfts(void)
|
||||
int dfts_autoinit(void)
|
||||
{
|
||||
init_rad4(1024,tw1024);
|
||||
init_rad2(2048,tw2048);
|
||||
@@ -8763,10 +8761,12 @@ void init_dfts(void)
|
||||
init_rad3_rep(1080,twa1080,twb1080);
|
||||
init_rad4_rep(1152,twa1152,twb1152,twc1152);
|
||||
init_rad4_rep(1200,twa1200,twb1200,twc1200);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void dft(uint8_t sizeidx, int16_t *sigF,int16_t *sig,unsigned char scale_flag){
|
||||
AssertFatal((sizeidx>=0 && sizeidx<(int)DFT_SIZE_IDXTABLESIZE),"Invalid dft size index %i\n",sizeidx);
|
||||
dft_ftab[sizeidx](sigF,sig,scale_flag);
|
||||
@@ -8779,7 +8779,6 @@ void idft(uint8_t sizeidx, int16_t *sigF,int16_t *sig,unsigned char scale_flag){
|
||||
|
||||
/*---------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifdef MR_MAIN
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@@ -8949,12 +8948,12 @@ int main(int argc, char**argv)
|
||||
#ifdef __AVX2__
|
||||
simd256_q15_t x[4096],x2[4096],y[4096],tw0,tw1,tw2,tw3;
|
||||
#else
|
||||
simd_q15_t x[8192],x2[8192],y[8192],tw0,tw1,tw2,tw3;
|
||||
simd_q15_t x[8192],y[8192],tw0,tw1,tw2,tw3;
|
||||
#endif
|
||||
int i;
|
||||
simd_q15_t *x128=(simd_q15_t*)x,*y128=(simd_q15_t*)y;
|
||||
|
||||
init_dfts();
|
||||
dfts_autoinit();
|
||||
|
||||
set_taus_seed(0);
|
||||
opp_enabled = 1;
|
||||
|
||||
+66
-168
@@ -36,6 +36,8 @@ extern "C" {
|
||||
#include <stdint.h>
|
||||
#include "PHY/sse_intrin.h"
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
struct complex {
|
||||
double x;
|
||||
@@ -186,7 +188,7 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
|
||||
|
||||
|
||||
|
||||
#ifdef OAIDFTS
|
||||
#ifdef OAIDFTS_MAIN
|
||||
typedef void(*adftfunc_t)(int16_t *sigF,int16_t *sig,unsigned char scale_flag);
|
||||
typedef void(*aidftfunc_t)(int16_t *sigF,int16_t *sig,unsigned char scale_flag);
|
||||
|
||||
@@ -195,15 +197,18 @@ void dft24(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft36(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft48(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft60(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft64(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft72(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft96(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft108(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft120(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft128(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft144(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft180(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft192(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft216(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft240(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft256(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft288(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft300(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft324(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
@@ -211,6 +216,7 @@ void dft360(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft384(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft432(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft480(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft512(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft540(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft576(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft600(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
@@ -221,208 +227,100 @@ void dft864(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft900(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft960(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft972(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft1024(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft1080(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft1152(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft1200(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
|
||||
void dft64(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft128(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft256(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft512(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft1024(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft1536(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void dft2048(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft3072(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void dft4096(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft6144(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void dft8192(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft9216(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft12288(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft18432(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft24576(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft36864(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft49152(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft73728(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void dft98304(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
|
||||
|
||||
void idft64(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft128(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft256(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft512(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft1024(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft2048(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft4096(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft8192(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
|
||||
void idft1536(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft2048(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft3072(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft4096(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft6144(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft8192(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft9216(int16_t *x,int16_t *y,uint8_t scale_flag);
|
||||
void idft12288(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft18432(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft3072(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft24576(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft36864(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft49152(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft73728(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void idft98304(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
|
||||
|
||||
|
||||
|
||||
void dft1536(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void dft3072(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void dft6144(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void dft12288(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void dft18432(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
void dft24576(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
|
||||
#else
|
||||
typedef void(*dftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
|
||||
typedef void(*idftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
|
||||
extern dftfunc_t dft;
|
||||
extern idftfunc_t idft;
|
||||
typedef void(*dftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
|
||||
typedef void(*idftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
|
||||
# ifdef OAIDFTS_LOADER
|
||||
dftfunc_t dft;
|
||||
idftfunc_t idft;
|
||||
# else
|
||||
extern dftfunc_t dft;
|
||||
extern idftfunc_t idft;
|
||||
extern int load_dftslib(void);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef enum DFT_size_idx {
|
||||
DFT_12,
|
||||
DFT_24,
|
||||
DFT_36,
|
||||
DFT_48,
|
||||
DFT_60,
|
||||
DFT_72,
|
||||
DFT_96,
|
||||
DFT_108,
|
||||
DFT_120,
|
||||
DFT_128,
|
||||
DFT_144,
|
||||
DFT_180,
|
||||
DFT_192,
|
||||
DFT_216,
|
||||
DFT_240,
|
||||
DFT_256,
|
||||
DFT_288,
|
||||
DFT_300,
|
||||
DFT_324,
|
||||
DFT_360,
|
||||
DFT_384,
|
||||
DFT_432,
|
||||
DFT_480,
|
||||
DFT_512,
|
||||
DFT_540,
|
||||
DFT_576,
|
||||
DFT_600,
|
||||
DFT_648,
|
||||
DFT_720,
|
||||
DFT_768,
|
||||
DFT_864,
|
||||
DFT_900,
|
||||
DFT_960,
|
||||
DFT_972,
|
||||
DFT_1024,
|
||||
DFT_1080,
|
||||
DFT_1152,
|
||||
DFT_1200,
|
||||
DFT_1536,
|
||||
DFT_2048,
|
||||
DFT_3072,
|
||||
DFT_4096,
|
||||
DFT_6144,
|
||||
DFT_8192,
|
||||
DFT_12288,
|
||||
DFT_18432,
|
||||
DFT_24576,
|
||||
DFT_SIZE_IDXTABLESIZE,
|
||||
DFT_12, DFT_24, DFT_36, DFT_48, DFT_60, DFT_72, DFT_96,
|
||||
DFT_108, DFT_120, DFT_128, DFT_144, DFT_180, DFT_192, DFT_216, DFT_240,
|
||||
DFT_256, DFT_288, DFT_300, DFT_324, DFT_360, DFT_384, DFT_432, DFT_480,
|
||||
DFT_512, DFT_540, DFT_576, DFT_600, DFT_648, DFT_720, DFT_768, DFT_864,
|
||||
DFT_900, DFT_960, DFT_972, DFT_1024, DFT_1080, DFT_1152, DFT_1200, DFT_1536,
|
||||
DFT_2048, DFT_3072, DFT_4096, DFT_6144, DFT_8192, DFT_9216, DFT_12288, DFT_18432,
|
||||
DFT_24576, DFT_36864, DFT_49152, DFT_73728, DFT_98304,
|
||||
DFT_SIZE_IDXTABLESIZE
|
||||
} dft_size_idx_t;
|
||||
|
||||
#ifdef OAIDFTS
|
||||
#ifdef OAIDFTS_MAIN
|
||||
adftfunc_t dft_ftab[]={
|
||||
dft12,
|
||||
dft24,
|
||||
dft36,
|
||||
dft48,
|
||||
dft60,
|
||||
dft72,
|
||||
dft96,
|
||||
dft108,
|
||||
dft120,
|
||||
dft128,
|
||||
dft144,
|
||||
dft180,
|
||||
dft192,
|
||||
dft216,
|
||||
dft240,
|
||||
dft256,
|
||||
dft288,
|
||||
dft300,
|
||||
dft324,
|
||||
dft360,
|
||||
dft384,
|
||||
dft432,
|
||||
dft480,
|
||||
dft512,
|
||||
dft540,
|
||||
dft576,
|
||||
dft600,
|
||||
dft648,
|
||||
dft720,
|
||||
dft768,
|
||||
dft864,
|
||||
dft900,
|
||||
dft960,
|
||||
dft972,
|
||||
dft1024,
|
||||
dft1080,
|
||||
dft1152,
|
||||
dft1200,
|
||||
dft1536,
|
||||
dft2048,
|
||||
dft3072,
|
||||
dft4096,
|
||||
dft6144,
|
||||
dft8192,
|
||||
dft12288,
|
||||
dft18432,
|
||||
dft24576,
|
||||
dft12, dft24, dft36, dft48, dft60, dft72, dft96,
|
||||
dft108, dft120, dft128, dft144, dft180, dft192, dft216, dft240,
|
||||
dft256, dft288, dft300, dft324, dft360, dft384, dft432, dft480,
|
||||
dft512, dft540, dft576, dft600, dft648, dft720, dft768, dft864,
|
||||
dft900, dft960, dft972, dft1024, dft1080, dft1152, dft1200, dft1536,
|
||||
dft2048, dft3072, dft4096, dft6144, dft8192, dft9216, dft12288, dft18432,
|
||||
dft24576, dft36864, dft49152, dft73728, dft98304
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef enum idft_size_idx {
|
||||
IDFT_128,
|
||||
IDFT_256,
|
||||
IDFT_288,
|
||||
IDFT_300,
|
||||
IDFT_324,
|
||||
IDFT_360,
|
||||
IDFT_384,
|
||||
IDFT_432,
|
||||
IDFT_480,
|
||||
IDFT_512,
|
||||
IDFT_1024,
|
||||
IDFT_1536,
|
||||
IDFT_2048,
|
||||
IDFT_3072,
|
||||
IDFT_4096,
|
||||
IDFT_6144,
|
||||
IDFT_8192,
|
||||
IDFT_12288,
|
||||
IDFT_18432,
|
||||
IDFT_24576,
|
||||
IDFT_SIZE_IDXTABLESIZE,
|
||||
IDFT_128, IDFT_256, IDFT_512, IDFT_1024, IDFT_1536, IDFT_2048, IDFT_3072, IDFT_4096,
|
||||
IDFT_6144, IDFT_8192, IDFT_9216, IDFT_12288, IDFT_18432, IDFT_24576, IDFT_36864, IDFT_49152,
|
||||
IDFT_73728, IDFT_98304,
|
||||
IDFT_SIZE_IDXTABLESIZE
|
||||
} idft_size_idx_t;
|
||||
#ifdef OAIDFTS
|
||||
#ifdef OAIDFTS_MAIN
|
||||
aidftfunc_t idft_ftab[]={
|
||||
idft128,
|
||||
idft256,
|
||||
idft512,
|
||||
idft1024,
|
||||
idft1536,
|
||||
idft2048,
|
||||
idft3072,
|
||||
idft4096,
|
||||
idft6144,
|
||||
idft8192,
|
||||
idft12288,
|
||||
idft18432,
|
||||
idft24576,
|
||||
idft128, idft256, idft512, idft1024, idft1536, idft2048, idft3072, idft4096,
|
||||
idft6144, idft8192, idft9216, idft12288, idft18432, idft24576, idft36864, idft49152,
|
||||
idft73728, idft98304
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
void dft49152(int16_t *sigF,int16_t *sig,int scale);
|
||||
void idft49152(int16_t *sigF,int16_t *sig,int scale);
|
||||
|
||||
void dft9216(int16_t *sigF,int16_t *sig,int scale);
|
||||
void idft9216(int16_t *sigF,int16_t *sig,int scale);
|
||||
|
||||
void dft36864(int16_t *sigF,int16_t *sig,int scale);
|
||||
void idft36864(int16_t *sigF,int16_t *sig,int scale);
|
||||
|
||||
void dft98304(int16_t *sigF,int16_t *sig,int scale);
|
||||
void idft98304(int16_t *sigF,int16_t *sig,int scale);
|
||||
|
||||
void dft73728(int16_t *sigF,int16_t *sig,int scale);
|
||||
void idft73728(int16_t *sigF,int16_t *sig,int scale);
|
||||
|
||||
|
||||
/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
|
||||
This function performs componentwise multiplication of a vector with a complex scalar.
|
||||
|
||||
@@ -1917,6 +1917,7 @@ int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_in
|
||||
|
||||
nr_extract_dci_info(mac,dci->dci_format,dci->payloadSize,dci->rnti,(uint64_t *)dci->payloadBits,&dci_pdu_rel15);
|
||||
nr_ue_process_dci(module_id, cc_id, gNB_index, &dci_pdu_rel15, dci->rnti, dci->dci_format);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, nr_dci_pdu_rel15_t *dci, uint16_t rnti, uint32_t dci_format){
|
||||
|
||||
@@ -570,8 +570,8 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id,
|
||||
|
||||
void do_SpCellConfig(gNB_RRC_INST *rrc,
|
||||
struct NR_SpCellConfig *spconfig){
|
||||
gNB_RrcConfigurationReq *common_configuration;
|
||||
common_configuration = CALLOC(1,sizeof(gNB_RrcConfigurationReq));
|
||||
//gNB_RrcConfigurationReq *common_configuration;
|
||||
//common_configuration = CALLOC(1,sizeof(gNB_RrcConfigurationReq));
|
||||
//Fill servingcellconfigcommon config value
|
||||
//Fill common config to structure
|
||||
// rrc->configuration = common_configuration;
|
||||
|
||||
@@ -1691,11 +1691,11 @@ int x2ap_gNB_generate_ENDC_x2_SgNB_addition_request_ACK( x2ap_eNB_instance_t *in
|
||||
|
||||
// Currently hardcoded (dummy) values filling the fields of SgNB_addition_request message. To be substituted
|
||||
// with values coming from RRC.
|
||||
uint16_t nRencryptionAlgorithms = 0;
|
||||
uint16_t nRintegrityProtectionAlgorithms = 0;
|
||||
uint8_t SgNBSecurityKey[32] = { 0 };
|
||||
int uEaggregateMaximumBitRateDownlink = 100000000;
|
||||
int uEaggregateMaximumBitRateUplink = 100000000;
|
||||
//uint16_t nRencryptionAlgorithms = 0;
|
||||
//uint16_t nRintegrityProtectionAlgorithms = 0;
|
||||
//uint8_t SgNBSecurityKey[32] = { 0 };
|
||||
//int uEaggregateMaximumBitRateDownlink = 100000000;
|
||||
//int uEaggregateMaximumBitRateUplink = 100000000;
|
||||
int e_rabs_admitted_tobeadded = 1;
|
||||
int e_RAB_ID = 1;
|
||||
long int pDCPatSgNB = X2AP_EN_DC_ResourceConfiguration__pDCPatSgNB_present;
|
||||
|
||||
@@ -1773,7 +1773,7 @@ int x2ap_gNB_handle_ENDC_sGNB_addition_request (instance_t instance,
|
||||
|
||||
X2AP_MeNBtoSgNBContainer_t *container = &ie->value.choice.MeNBtoSgNBContainer;
|
||||
|
||||
if (ie->value.choice.MeNBtoSgNBContainer.size > 8192 ) // TODO: this is the size of rrc_buffer in struct x2ap_handover_req_s
|
||||
if (container->size > 8192 ) // TODO: this is the size of rrc_buffer in struct x2ap_handover_req_s
|
||||
{ printf("%s:%d: fatal: buffer too big\n", __FILE__, __LINE__); abort(); }
|
||||
|
||||
memcpy(X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer, ie->value.choice.MeNBtoSgNBContainer.buf, ie->value.choice.MeNBtoSgNBContainer.size);
|
||||
@@ -1943,7 +1943,6 @@ int x2ap_gNB_handle_ENDC_sGNB_reconfiguration_complete (instance_t instance,
|
||||
x2ap_eNB_instance_t *instance_p;
|
||||
x2ap_eNB_data_t *x2ap_eNB_data;
|
||||
MessageDef *msg;
|
||||
int ue_id;
|
||||
|
||||
DevAssert (pdu != NULL);
|
||||
x2SgNBReconfigurationComplete = &pdu->choice.initiatingMessage.value.choice.SgNBReconfigurationComplete;
|
||||
|
||||
@@ -589,7 +589,7 @@ static void *UE_thread_synch(void *arg)
|
||||
LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
|
||||
|
||||
if (initial_sync( UE, UE->mode ) == 0) {
|
||||
LOG_I( HW, "Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %u, UL %u), UE_scan_carrier %d\n",
|
||||
LOG_I( HW, "Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %lu, UL %lu), UE_scan_carrier %d\n",
|
||||
(UE->rx_offset<<1) / UE->frame_parms.samples_per_tti,
|
||||
freq_offset,
|
||||
UE->rx_total_gain_dB,
|
||||
@@ -714,7 +714,7 @@ static void *UE_thread_synch(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
LOG_I(PHY, "[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)\n",
|
||||
LOG_I(PHY, "[initial_sync] trying carrier off %d Hz, rxgain %d (DL %lu, UL %lu)\n",
|
||||
freq_offset,
|
||||
UE->rx_total_gain_dB,
|
||||
downlink_frequency[0][0]+freq_offset,
|
||||
@@ -2071,7 +2071,7 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue,
|
||||
txdata = (int32_t **)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t *) );
|
||||
|
||||
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
|
||||
LOG_I(PHY, "Mapping UE CC_id %d, rx_ant %d, freq %u on card %d, chain %d\n",
|
||||
LOG_I(PHY, "Mapping UE CC_id %d, rx_ant %d, freq %lu on card %d, chain %d\n",
|
||||
CC_id, i, downlink_frequency[CC_id][i], phy_vars_ue[CC_id]->rf_map.card, (phy_vars_ue[CC_id]->rf_map.chain)+i );
|
||||
free( phy_vars_ue[CC_id]->common_vars.rxdata[i] );
|
||||
rxdata[i] = (int32_t *)malloc16_clear( 307200*sizeof(int32_t) );
|
||||
@@ -2079,7 +2079,7 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue,
|
||||
}
|
||||
|
||||
for (i=0; i<frame_parms->nb_antennas_tx; i++) {
|
||||
LOG_I(PHY, "Mapping UE CC_id %d, tx_ant %d, freq %u on card %d, chain %d\n",
|
||||
LOG_I(PHY, "Mapping UE CC_id %d, tx_ant %d, freq %lu on card %d, chain %d\n",
|
||||
CC_id, i, downlink_frequency[CC_id][i], phy_vars_ue[CC_id]->rf_map.card, (phy_vars_ue[CC_id]->rf_map.chain)+i );
|
||||
free( phy_vars_ue[CC_id]->common_vars.txdata[i] );
|
||||
txdata[i] = (int32_t *)malloc16_clear( 307200*sizeof(int32_t) );
|
||||
|
||||
Reference in New Issue
Block a user