testing with dlsim
This commit is contained in:
@@ -67,15 +67,12 @@ void generate_qpsk_table(void)
|
|||||||
void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms)
|
void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms)
|
||||||
{
|
{
|
||||||
|
|
||||||
ccodedot11_init();
|
|
||||||
ccodedot11_init_inv();
|
|
||||||
|
|
||||||
ccodelte_init();
|
ccodelte_init();
|
||||||
ccodelte_init_inv();
|
ccodelte_init_inv();
|
||||||
|
|
||||||
|
init_dfts();
|
||||||
|
|
||||||
|
|
||||||
phy_generate_viterbi_tables();
|
|
||||||
phy_generate_viterbi_tables_lte();
|
phy_generate_viterbi_tables_lte();
|
||||||
|
|
||||||
load_codinglib();
|
load_codinglib();
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
|||||||
|
|
||||||
//compute frequency-domain representation of 6144-sample chunk
|
//compute frequency-domain representation of 6144-sample chunk
|
||||||
dft6144((int16_t *)rxp,
|
dft6144((int16_t *)rxp,
|
||||||
sp);
|
sp,1);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -357,10 +357,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
if (prach_fmt == 4) {
|
if (prach_fmt == 4) {
|
||||||
dft256(prach2,rxsigF[aa],1);
|
dft256(prach2,rxsigF[aa],1);
|
||||||
} else {
|
} else {
|
||||||
dft3072(prach2,rxsigF[aa]);
|
dft3072(prach2,rxsigF[aa],1);
|
||||||
|
|
||||||
if (prach_fmt>1)
|
if (prach_fmt>1)
|
||||||
dft3072(prach2+6144,rxsigF[aa]+6144);
|
dft3072(prach2+6144,rxsigF[aa]+6144,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -371,10 +371,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
dft1024(prach2,rxsigF[aa],1);
|
dft1024(prach2,rxsigF[aa],1);
|
||||||
fft_size = 1024;
|
fft_size = 1024;
|
||||||
} else {
|
} else {
|
||||||
dft6144(prach2,rxsigF[aa]);
|
dft6144(prach2,rxsigF[aa],1);
|
||||||
|
|
||||||
if (prach_fmt>1)
|
if (prach_fmt>1)
|
||||||
dft6144(prach2+12288,rxsigF[aa]+12288);
|
dft6144(prach2+12288,rxsigF[aa]+12288,1);
|
||||||
|
|
||||||
fft_size = 6144;
|
fft_size = 6144;
|
||||||
}
|
}
|
||||||
@@ -385,22 +385,22 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
if (prach_fmt == 4) {
|
if (prach_fmt == 4) {
|
||||||
dft2048(prach2,rxsigF[aa],1);
|
dft2048(prach2,rxsigF[aa],1);
|
||||||
} else {
|
} else {
|
||||||
dft12288(prach2,rxsigF[aa]);
|
dft12288(prach2,rxsigF[aa],1);
|
||||||
|
|
||||||
if (prach_fmt>1)
|
if (prach_fmt>1)
|
||||||
dft12288(prach2+24576,rxsigF[aa]+24576);
|
dft12288(prach2+24576,rxsigF[aa]+24576,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 75:
|
case 75:
|
||||||
if (prach_fmt == 4) {
|
if (prach_fmt == 4) {
|
||||||
dft3072(prach2,rxsigF[aa]);
|
dft3072(prach2,rxsigF[aa],1);
|
||||||
} else {
|
} else {
|
||||||
dft18432(prach2,rxsigF[aa]);
|
dft18432(prach2,rxsigF[aa],1);
|
||||||
|
|
||||||
if (prach_fmt>1)
|
if (prach_fmt>1)
|
||||||
dft18432(prach2+36864,rxsigF[aa]+36864);
|
dft18432(prach2+36864,rxsigF[aa]+36864,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -410,19 +410,19 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
if (prach_fmt == 4) {
|
if (prach_fmt == 4) {
|
||||||
dft4096(prach2,rxsigF[aa],1);
|
dft4096(prach2,rxsigF[aa],1);
|
||||||
} else {
|
} else {
|
||||||
dft24576(prach2,rxsigF[aa]);
|
dft24576(prach2,rxsigF[aa],1);
|
||||||
|
|
||||||
if (prach_fmt>1)
|
if (prach_fmt>1)
|
||||||
dft24576(prach2+49152,rxsigF[aa]+49152);
|
dft24576(prach2+49152,rxsigF[aa]+49152,1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (prach_fmt == 4) {
|
if (prach_fmt == 4) {
|
||||||
dft3072(prach2,rxsigF[aa]);
|
dft3072(prach2,rxsigF[aa],1);
|
||||||
} else {
|
} else {
|
||||||
dft18432(prach2,rxsigF[aa]);
|
dft18432(prach2,rxsigF[aa],1);
|
||||||
|
|
||||||
if (prach_fmt>1)
|
if (prach_fmt>1)
|
||||||
dft18432(prach2+36864,rxsigF[aa]+36864);
|
dft18432(prach2+36864,rxsigF[aa]+36864,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
|||||||
memmove( prach, prach+1024, Ncp<<2 );
|
memmove( prach, prach+1024, Ncp<<2 );
|
||||||
prach_len = 512+Ncp;
|
prach_len = 512+Ncp;
|
||||||
} else {
|
} else {
|
||||||
idft3072(prachF,prach2);
|
idft3072(prachF,prach2,1);
|
||||||
memmove( prach, prach+6144, Ncp<<2 );
|
memmove( prach, prach+6144, Ncp<<2 );
|
||||||
prach_len = 3072+Ncp;
|
prach_len = 3072+Ncp;
|
||||||
|
|
||||||
@@ -393,7 +393,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
|||||||
memmove( prach, prach+2048, Ncp<<2 );
|
memmove( prach, prach+2048, Ncp<<2 );
|
||||||
prach_len = 1024+Ncp;
|
prach_len = 1024+Ncp;
|
||||||
} else {
|
} else {
|
||||||
idft6144(prachF,prach2);
|
idft6144(prachF,prach2,1);
|
||||||
/*for (i=0;i<6144*2;i++)
|
/*for (i=0;i<6144*2;i++)
|
||||||
prach2[i]<<=1;*/
|
prach2[i]<<=1;*/
|
||||||
memmove( prach, prach+12288, Ncp<<2 );
|
memmove( prach, prach+12288, Ncp<<2 );
|
||||||
@@ -413,7 +413,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
|||||||
memmove( prach, prach+4096, Ncp<<2 );
|
memmove( prach, prach+4096, Ncp<<2 );
|
||||||
prach_len = 2048+Ncp;
|
prach_len = 2048+Ncp;
|
||||||
} else {
|
} else {
|
||||||
idft12288(prachF,prach2);
|
idft12288(prachF,prach2,1);
|
||||||
memmove( prach, prach+24576, Ncp<<2 );
|
memmove( prach, prach+24576, Ncp<<2 );
|
||||||
prach_len = 12288+Ncp;
|
prach_len = 12288+Ncp;
|
||||||
|
|
||||||
@@ -427,12 +427,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
|||||||
|
|
||||||
case 75:
|
case 75:
|
||||||
if (prach_fmt == 4) {
|
if (prach_fmt == 4) {
|
||||||
idft3072(prachF,prach2);
|
idft3072(prachF,prach2,1);
|
||||||
//TODO: account for repeated format in dft output
|
//TODO: account for repeated format in dft output
|
||||||
memmove( prach, prach+6144, Ncp<<2 );
|
memmove( prach, prach+6144, Ncp<<2 );
|
||||||
prach_len = 3072+Ncp;
|
prach_len = 3072+Ncp;
|
||||||
} else {
|
} else {
|
||||||
idft18432(prachF,prach2);
|
idft18432(prachF,prach2,1);
|
||||||
memmove( prach, prach+36864, Ncp<<2 );
|
memmove( prach, prach+36864, Ncp<<2 );
|
||||||
prach_len = 18432+Ncp;
|
prach_len = 18432+Ncp;
|
||||||
|
|
||||||
@@ -451,7 +451,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
|||||||
memmove( prach, prach+8192, Ncp<<2 );
|
memmove( prach, prach+8192, Ncp<<2 );
|
||||||
prach_len = 4096+Ncp;
|
prach_len = 4096+Ncp;
|
||||||
} else {
|
} else {
|
||||||
idft24576(prachF,prach2);
|
idft24576(prachF,prach2,1);
|
||||||
memmove( prach, prach+49152, Ncp<<2 );
|
memmove( prach, prach+49152, Ncp<<2 );
|
||||||
prach_len = 24576+Ncp;
|
prach_len = 24576+Ncp;
|
||||||
|
|
||||||
@@ -463,12 +463,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (prach_fmt == 4) {
|
if (prach_fmt == 4) {
|
||||||
idft3072(prachF,prach2);
|
idft3072(prachF,prach2,1);
|
||||||
//TODO: account for repeated format in dft output
|
//TODO: account for repeated format in dft output
|
||||||
memmove( prach, prach+6144, Ncp<<2 );
|
memmove( prach, prach+6144, Ncp<<2 );
|
||||||
prach_len = 3072+Ncp;
|
prach_len = 3072+Ncp;
|
||||||
} else {
|
} else {
|
||||||
idft18432(prachF,prach2);
|
idft18432(prachF,prach2,1);
|
||||||
memmove( prach, prach+36864, Ncp<<2 );
|
memmove( prach, prach+36864, Ncp<<2 );
|
||||||
prach_len = 18432+Ncp;
|
prach_len = 18432+Ncp;
|
||||||
printf("Generated prach for 100 PRB, 3/4 sampling\n");
|
printf("Generated prach for 100 PRB, 3/4 sampling\n");
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#define debug_msg
|
#define debug_msg
|
||||||
#define ONE_OVER_SQRT2_Q15 23170
|
#define ONE_OVER_SQRT2_Q15 23170
|
||||||
|
|
||||||
|
int oai_exit=0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ONE_OVER_SQRT3_Q15 18919
|
#define ONE_OVER_SQRT3_Q15 18919
|
||||||
@@ -64,7 +64,7 @@ const static int16_t conjugatedft[32] __attribute__((aligned(32))) = {-1,1,-1,1,
|
|||||||
|
|
||||||
const static int16_t reflip[32] __attribute__((aligned(32))) = {1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1};
|
const static int16_t reflip[32] __attribute__((aligned(32))) = {1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1};
|
||||||
|
|
||||||
int oai_exit=0;
|
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(__i386__)
|
#if defined(__x86_64__) || defined(__i386__)
|
||||||
static inline void cmac(__m128i a,__m128i b, __m128i *re32, __m128i *im32) __attribute__((always_inline));
|
static inline void cmac(__m128i a,__m128i b, __m128i *re32, __m128i *im32) __attribute__((always_inline));
|
||||||
|
|||||||
@@ -174,27 +174,27 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
|
|||||||
|
|
||||||
void idft1536(int16_t *sigF,int16_t *sig,int scale);
|
void idft1536(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void idft6144(int16_t *sigF,int16_t *sig);
|
void idft6144(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void idft12288(int16_t *sigF,int16_t *sig);
|
void idft12288(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void idft18432(int16_t *sigF,int16_t *sig);
|
void idft18432(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void idft3072(int16_t *sigF,int16_t *sig);
|
void idft3072(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void idft24576(int16_t *sigF,int16_t *sig);
|
void idft24576(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void dft1536(int16_t *sigF,int16_t *sig,int scale);
|
void dft1536(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void dft6144(int16_t *sigF,int16_t *sig);
|
void dft6144(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void dft12288(int16_t *sigF,int16_t *sig);
|
void dft12288(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void dft18432(int16_t *sigF,int16_t *sig);
|
void dft18432(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void dft3072(int16_t *sigF,int16_t *sig);
|
void dft3072(int16_t *sigF,int16_t *sig,int scale);
|
||||||
|
|
||||||
void dft24576(int16_t *sigF,int16_t *sig);
|
void dft24576(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)
|
/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
#include "common/config/config_load_configmodule.h"
|
#include "common/config/config_load_configmodule.h"
|
||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
|
|
||||||
|
|
||||||
void feptx_ofdm(RU_t *ru);
|
void feptx_ofdm(RU_t *ru);
|
||||||
void feptx_prec(RU_t *ru);
|
void feptx_prec(RU_t *ru);
|
||||||
|
|
||||||
@@ -83,6 +84,8 @@ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
|
|||||||
|
|
||||||
int codingw = 0;
|
int codingw = 0;
|
||||||
|
|
||||||
|
int emulate_rf = 0;
|
||||||
|
|
||||||
void handler(int sig)
|
void handler(int sig)
|
||||||
{
|
{
|
||||||
void *array[10];
|
void *array[10];
|
||||||
|
|||||||
Reference in New Issue
Block a user