Commit 38f263cc authored by lfarizav's avatar lfarizav

New Ziggurat Gauss number generation function

parent 57517313
......@@ -442,8 +442,8 @@ clock_t start=clock();*/
else
{
//rx128_gain_lin=mm_mul_set1_ps(rx_gain_lin);
gauss0_sqrt_NOW=sqrt_NOW*gaussdouble(0.0,1.0);
gauss1_sqrt_NOW=sqrt_NOW*gaussdouble(0.0,1.0);
gauss0_sqrt_NOW=sqrt_NOW*ziggurat();
gauss1_sqrt_NOW=sqrt_NOW*ziggurat();
rx128_re = _mm_loadu_pd(&r_re[a][2*i]);//r_re[a][i],r_re[a][i+1]
rx128_im = _mm_loadu_pd(&r_im[a][2*i]);//r_im[a][i],r_im[a][i+1]
rx128_gain_lin = _mm_set1_pd(rx_gain_lin);
......
......@@ -436,9 +436,13 @@ the value \f$\mathrm{sgn}(u)i\f$. The search requires at most \f$Nbits-1\f$ com
*/
int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
double zigguratdouble(unsigned int r, double sigma);
double gaussdouble(double,double);
void randominit(unsigned int seed_init);
void setup_nor();
double uniformrandom(void);
void uniformrandomSSE(__m128d *d1,__m128d *d2);
double ziggurat();
int freq_channel(channel_desc_t *desc,uint16_t nb_rb, int16_t n_samples);
int freq_channel_prach(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples,int16_t prach_fmt,int16_t n_ra_prb);
int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples);
......
This diff is collapsed.
......@@ -139,7 +139,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "172.24.11.4";
mme_ip_address = ( { ipv4 = "192.168.12.148";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......
......@@ -990,10 +990,12 @@ void init_seed(uint8_t set_seed)
if(set_seed) {
randominit (oai_emulation.info.seed);
setup_nor();//Setup for the normal probability distribution function
set_taus_seed (oai_emulation.info.seed);
} else {
randominit (0);
setup_nor();//Setup for the normal probability distribution function
set_taus_seed (0);
}
}
......@@ -1042,7 +1044,6 @@ extern int subframe_eNB_mask,subframe_UE_mask;
int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc)
{
static int count=0;
int eNB,UE,CC;
if (count==500)
{
//Use ./oaisim -q option to enable the oai performance profiler.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment