Commit cab3d882 authored by Raymond Knopp's avatar Raymond Knopp

new code for UE band scanning, more cleanup of warnings in openair1

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6424 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 1a3548e5
......@@ -283,13 +283,16 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho
__m128i *beta128,*alpha128,*beta_ptr;
__m128i beta_max;
int16_t m11,m10,beta0_16,beta1_16,beta2_16,beta3_16,beta4_16,beta5_16,beta6_16,beta7_16,beta0_2,beta1_2,beta2_2,beta3_2,beta_m;
llr_t beta0,beta1;
llr_t beta2,beta3,beta4,beta5,beta6,beta7;
__m128i beta_16;
#if 0
int16_t m11,m10;
int16_t beta0_16,beta1_16,beta2_16,beta3_16,beta4_16,beta5_16,beta6_16,beta7_16,beta0_2,beta1_2,beta2_2,beta3_2,beta_m;
__m128i beta_16;
// termination for beta initialization
m11=(int16_t)m_11[2+frame_length];
......@@ -626,7 +629,8 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
llr_t m10[n+16] __attribute__ ((aligned(16)));
int *pi2_p,*pi4_p,*pi5_p,*pi6_p;
// int *pi2_p,*pi4_p,*pi5_p,*pi6_p;
int *pi4_p,*pi5_p,*pi6_p;
llr_t *s,*s1,*s2,*yp1,*yp2,*yp;
__m128i *yp128;
unsigned int i,j,iind;//,pi;
......
......@@ -43,10 +43,17 @@
/*!\brief Timing drift hysterisis in samples*/
#define SYNCH_HYST 1
/*!
\brief This function is used for time-frequency scanning prior to complete cell search. It scans
over the entire LTE band for maximum correlation and keeps the 10 best scores and the correspoding frequency offset (5 kHz granularity) for each of the 3 PSS sequences.
\param ue Pointer to UE variables
\param band index of lte band
\param DL_freq Central RF Frequency in Hz
*/
/*!
\brief This function allocates memory needed for the synchronization.
\param frame_parms LTE DL frame parameter structure
*/
int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms); //LTE_UE_COMMON *common_vars
......
......@@ -190,15 +190,7 @@ int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,uint8_t UE_id,uint8_
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms;
LTE_eNB_PUSCH *eNB_pusch_vars = phy_vars_eNB->lte_eNB_pusch_vars[UE_id];
int32_t **ul_ch_estimates_time= eNB_pusch_vars->drs_ch_estimates_time[0];
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx;
uint8_t harq_pid;
uint8_t Ns = 1; //we take the estimate from the second slot
uint8_t cyclic_shift = 0;//(frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
//phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
//frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
harq_pid = subframe2harq_pid(frame_parms,phy_vars_eNB->proc[sched_subframe].frame_rx,subframe);
uint8_t cyclic_shift = 0;
int sync_pos = (frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size);
......
This diff is collapsed.
% OCTAVE Code to generate upsampled pss0-2
n=0:61;
d0 = zeros(1,62);
d1 = zeros(1,62);
d2 = zeros(1,62);
d0(1+(0:30)) = exp(-sqrt(-1)*pi*25*(0:30).*(1:31)/63);
d1(1+(0:30)) = exp(-sqrt(-1)*pi*29*(0:30).*(1:31)/63);
d2(1+(0:30)) = exp(-sqrt(-1)*pi*34*(0:30).*(1:31)/63);
d0(1+(31:61)) = exp(-sqrt(-1)*pi*25*(32:62).*(33:63)/63);
d1(1+(31:61)) = exp(-sqrt(-1)*pi*29*(32:62).*(33:63)/63);
d2(1+(31:61)) = exp(-sqrt(-1)*pi*34*(32:62).*(33:63)/63);
pss0f = zeros(1,2048);
pss0f(2:32) = d0(1:31);
pss0f(2048+(-30:0)) = d0(32:62);
pss1f = zeros(1,2048);
pss1f(2:32) = d1(1:31);
pss1f(2048+(-30:0)) = d1(32:62);
pss2f = zeros(1,2048);
pss2f(2:32) = d2(1:31);
pss2f(2048+(-30:0)) = d2(32:62);
pss0_6144f = fftshift(fft(ifft(pss0f)*sqrt(2048),6144)/sqrt(6144));
pss1_6144f = fftshift(fft(ifft(pss1f)*sqrt(2048),6144)/sqrt(6144));
pss2_6144f = fftshift(fft(ifft(pss2f)*sqrt(2048),6144)/sqrt(6144));
pss0_6144_fp = zeros(1,512);
pss0_6144_fp(1:2:512) = (floor(32767*real(pss0_6144f(3072+(-128:127)))));
pss0_6144_fp(2:2:512) = (floor(32767*imag(pss0_6144f(3072+(-128:127)))));
pss1_6144_fp = zeros(1,512);
pss1_6144_fp(1:2:512) = (floor(32767*real(pss1_6144f(3072+(-128:127)))));
pss1_6144_fp(2:2:512) = (floor(32767*imag(pss1_6144f(3072+(-128:127)))));
pss2_6144_fp = zeros(1,512);
pss2_6144_fp(1:2:512) = (floor(32767*real(pss2_6144f(3072+(-128:127)))));
pss2_6144_fp(2:2:512) = (floor(32767*imag(pss2_6144f(3072+(-128:127)))));
fprintf("int16_t pss6144_0[512]={");
fprintf("%d,",pss0_6144_fp(1:511));
fprintf("%d};\n",pss0_6144_fp(512));
fprintf("int16_t pss6144_1[512]={");
fprintf("%d,",pss1_6144_fp(1:511));
fprintf("%d};\n",pss1_6144_fp(512));
fprintf("int16_t pss6144_2[512]={");
fprintf("%d,",pss2_6144_fp(1:511));
fprintf("%d};\n",pss2_6144_fp(512));
......@@ -105,10 +105,8 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
*temp_out_fft_1_ptr = (int32_t*)0,*out_fft_ptr_1 = (int32_t*)0,
*temp_in_ifft_ptr = (int32_t*)0;
#ifdef NEW_FFT
__m128i *rxdataF128,*ul_ref128,*ul_ch128;
__m128i mmtmpU0,mmtmpU1,mmtmpU2,mmtmpU3;
#endif
Msc_RS = N_rb_alloc*12;
......@@ -142,15 +140,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
#endif
#endif
#ifndef NEW_FFT
if ( (frame_parms->ofdm_symbol_size == 128) ||
(frame_parms->ofdm_symbol_size == 512) )
rx_power_correction = 2;
else
rx_power_correction = 1;
#else
rx_power_correction = 1;
#endif
if (l == (3 - frame_parms->Ncp)) {
......@@ -159,13 +149,6 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
for (aa=0; aa<nb_antennas_rx; aa++){
// msg("Componentwise prod aa %d, symbol_offset %d,ul_ch_estimates %p,ul_ch_estimates[aa] %p,ul_ref_sigs_rx[0][0][Msc_RS_idx] %p\n",aa,symbol_offset,ul_ch_estimates,ul_ch_estimates[aa],ul_ref_sigs_rx[0][0][Msc_RS_idx]);
#ifndef NEW_FFT
mult_cpx_vector_norep2((int16_t*) &rxdataF_ext[aa][symbol_offset<<1],
(int16_t*) ul_ref_sigs_rx[u][v][Msc_RS_idx],
(int16_t*) &ul_ch_estimates[aa][symbol_offset],
Msc_RS,
15);
#else
rxdataF128 = (__m128i *)&rxdataF_ext[aa][symbol_offset];
ul_ch128 = (__m128i *)&ul_ch_estimates[aa][symbol_offset];
ul_ref128 = (__m128i *)ul_ref_sigs_rx[u][v][Msc_RS_idx];
......@@ -219,7 +202,6 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
ul_ref128+=3;
rxdataF128+=3;
}
#endif
alpha_ind = 0;
if((cyclic_shift != 0)){
......
......@@ -125,29 +125,8 @@ void generate_ul_ref_sigs_rx(void) {
for (n=0;n<dftsizes[Msc_RS];n++) {
m=n%ref_primes[Msc_RS];
phase = (double)q*m*(m+1)/ref_primes[Msc_RS];
#ifndef IFFT_FPGA
#ifndef NEW_FFT
ul_ref_sigs_rx[u][v][Msc_RS][n<<2] =(int16_t)(floor(32767*cos(M_PI*phase)));
ul_ref_sigs_rx[u][v][Msc_RS][1+(n<<2)] =-(int16_t)(floor(32767*sin(M_PI*phase)));
ul_ref_sigs_rx[u][v][Msc_RS][2+(n<<2)] =(int16_t)(floor(32767*sin(M_PI*phase)));
ul_ref_sigs_rx[u][v][Msc_RS][3+(n<<2)] =(int16_t)(floor(32767*cos(M_PI*phase)));
#else
ul_ref_sigs_rx[u][v][Msc_RS][n<<1] =(int16_t)(floor(32767*cos(M_PI*phase)));
ul_ref_sigs_rx[u][v][Msc_RS][1+(n<<1)] =-(int16_t)(floor(32767*sin(M_PI*phase)));
#endif
#else
#ifndef OFDMA_ULSCH
ul_ref_sigs_rx[u][v][Msc_RS][n<<2] =(int16_t)(floor(32767*cos(M_PI*phase)));
ul_ref_sigs_rx[u][v][Msc_RS][1+(n<<2)] =-(int16_t)(floor(32767*sin(M_PI*phase)));
ul_ref_sigs_rx[u][v][Msc_RS][2+(n<<2)] =(int16_t)(floor(32767*sin(M_PI*phase)));
ul_ref_sigs_rx[u][v][Msc_RS][3+(n<<2)] =(int16_t)(floor(32767*cos(M_PI*phase)));
#else
ul_ref_sigs_rx[u][v][Msc_RS][n<<2] =(int16_t) ((cos(M_PI*phase)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][v][Msc_RS][1+(n<<2)] =(int16_t)((-sin(M_PI*phase)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][v][Msc_RS][2+(n<<2)] =(int16_t)((-sin(M_PI*phase)>=0) ? -ONE_OVER_SQRT2_Q15 : ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][v][Msc_RS][3+(n<<2)] =(int16_t) ((cos(M_PI*phase)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
#endif
#endif
#ifdef MAIN
if (Msc_RS<5)
printf("(%d,%d) ",ul_ref_sigs_rx[u][v][Msc_RS][n<<2],ul_ref_sigs_rx[u][v][Msc_RS][1+(n<<2)]);
......@@ -165,60 +144,19 @@ void generate_ul_ref_sigs_rx(void) {
for (u=0;u<30;u++) {
ul_ref_sigs_rx[u][0][0] = (int16_t*)malloc16(4*sizeof(int16_t)*dftsizes[0]);
for (n=0;n<dftsizes[0];n++) {
#ifndef IFFT_FPGA
#ifndef NEW_FFT
ul_ref_sigs_rx[u][0][0][n<<2] = (int16_t)(floor(32767*cos(M_PI*ref12[(u*12) + n]/4)));
ul_ref_sigs_rx[u][0][0][1+(n<<2)]= (int16_t)(floor(32767*sin(M_PI*ref12[(u*12) + n]/4)));
ul_ref_sigs_rx[u][0][0][2+(n<<2)]=-(int16_t)(floor(32767*sin(M_PI*ref12[(u*12) + n]/4)));
ul_ref_sigs_rx[u][0][0][3+(n<<2)]= (int16_t)(floor(32767*cos(M_PI*ref12[(u*12) + n]/4)));
#else
ul_ref_sigs_rx[u][0][0][n<<1] = (int16_t)(floor(32767*cos(M_PI*ref12[(u*12) + n]/4)));
ul_ref_sigs_rx[u][0][0][1+(n<<1)]= (int16_t)(floor(32767*sin(M_PI*ref12[(u*12) + n]/4)));
#endif
#else
#ifndef OFDMA_ULSCH
ul_ref_sigs_rx[u][0][0][n<<2] = (int16_t)(floor(32767*cos(M_PI*ref12[(u*12) + n]/4)));
ul_ref_sigs_rx[u][0][0][1+(n<<2)]= (int16_t)(floor(32767*sin(M_PI*ref12[(u*12) + n]/4)));
ul_ref_sigs_rx[u][0][0][2+(n<<2)]=-(int16_t)(floor(32767*sin(M_PI*ref12[(u*12) + n]/4)));
ul_ref_sigs_rx[u][0][0][3+(n<<2)]= (int16_t)(floor(32767*cos(M_PI*ref12[(u*12) + n]/4)));
#else
ul_ref_sigs_rx[u][0][0][n<<2] = (int16_t)((cos(M_PI*ref12[(u*12) + n]/4)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][0][0][1+(n<<2)]= (int16_t)((sin(M_PI*ref12[(u*12) + n]/4)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][0][0][2+(n<<2)]= (int16_t)((sin(M_PI*ref12[(u*12) + n]/4)>=0) ? -ONE_OVER_SQRT2_Q15 : ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][0][0][3+(n<<2)]= (int16_t)((cos(M_PI*ref12[(u*12) + n]/4)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
#endif
#endif
}
}
// These are the sequences for RB 2
for (u=0;u<30;u++) {
ul_ref_sigs_rx[u][0][1] = (int16_t*)malloc16(4*sizeof(int16_t)*dftsizes[1]);
for (n=0;n<dftsizes[1];n++) {
#ifndef IFFT_FPGA
#ifndef NEW_FFT
ul_ref_sigs_rx[u][0][1][n<<2] = (int16_t)(floor(32767*cos(M_PI*ref24[(u*24) + n]/4)));
ul_ref_sigs_rx[u][0][1][1+(n<<2)]= (int16_t)(floor(32767*sin(M_PI*ref24[(u*24) + n]/4)));
#else
ul_ref_sigs_rx[u][0][1][n<<1] = (int16_t)(floor(32767*cos(M_PI*ref24[(u*24) + n]/4)));
ul_ref_sigs_rx[u][0][1][1+(n<<1)]= (int16_t)(floor(32767*sin(M_PI*ref24[(u*24) + n]/4)));
#endif
ul_ref_sigs_rx[u][0][1][2+(n<<2)]=-(int16_t)(floor(32767*sin(M_PI*ref24[(u*24) + n]/4)));
ul_ref_sigs_rx[u][0][1][3+(n<<2)]= (int16_t)(floor(32767*cos(M_PI*ref24[(u*24) + n]/4)));
#else
#ifndef OFDMA_ULSCH
ul_ref_sigs_rx[u][0][1][n<<2] = (int16_t)(floor(32767*cos(M_PI*ref24[(u*24) + n]/4)));
ul_ref_sigs_rx[u][0][1][1+(n<<2)]= (int16_t)(floor(32767*sin(M_PI*ref24[(u*24) + n]/4)));
ul_ref_sigs_rx[u][0][1][2+(n<<2)]=-(int16_t)(floor(32767*sin(M_PI*ref24[(u*24) + n]/4)));
ul_ref_sigs_rx[u][0][1][3+(n<<2)]= (int16_t)(floor(32767*cos(M_PI*ref24[(u*24) + n]/4)));
#else
ul_ref_sigs_rx[u][0][1][n<<2] = (int16_t)((cos(M_PI*ref24[(u*24) + n]/4)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][0][1][1+(n<<2)]= (int16_t)((sin(M_PI*ref24[(u*24) + n]/4)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][0][1][2+(n<<2)]= (int16_t)((sin(M_PI*ref24[(u*24) + n]/4)>=0) ? -ONE_OVER_SQRT2_Q15 : ONE_OVER_SQRT2_Q15);
ul_ref_sigs_rx[u][0][1][3+(n<<2)]= (int16_t)((cos(M_PI*ref24[(u*24) + n]/4)>=0) ? ONE_OVER_SQRT2_Q15 : -ONE_OVER_SQRT2_Q15);
#endif
#endif
}
}
......
......@@ -2550,11 +2550,11 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
uint8_t format0_found=0,format_c_found=0;
uint8_t tmode = phy_vars_ue->transmission_mode[eNB_id];
uint8_t frame_type = frame_parms->frame_type;
uint8_t format1A_size_bits,format1A_size_bytes;
uint8_t format0_size_bits,format0_size_bytes;
uint8_t format1_size_bits,format1_size_bytes;
uint8_t format2_size_bits,format2_size_bytes;
uint8_t format2A_size_bits,format2A_size_bytes;
uint8_t format1A_size_bits=0,format1A_size_bytes=0;
uint8_t format0_size_bits=0,format0_size_bytes=0;
uint8_t format1_size_bits=0,format1_size_bytes=0;
uint8_t format2_size_bits=0,format2_size_bytes=0;
uint8_t format2A_size_bits=0,format2A_size_bytes=0;
switch (frame_parms->N_RB_DL) {
case 6:
......
......@@ -5371,7 +5371,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
// uint32_t current_dlsch_cqi = phy_vars_ue->current_dlsch_cqi[eNB_id];
uint32_t cqi_req;
uint32_t dai;
uint32_t dai=0;
uint32_t cshift;
uint32_t TPC;
uint32_t ndi;
......@@ -6141,7 +6141,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
uint32_t dai = 0;
uint32_t cshift = 0;
uint32_t TPC = 0;
uint32_t ndi = 0;
uint32_t mcs = 0;
uint32_t rballoc = UINT32_MAX;
uint32_t RIV_max = 0;
......@@ -6170,7 +6169,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
dai = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->dai;
cshift = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->cshift;
TPC = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->TPC;
ndi = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->ndi;
mcs = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->mcs;
rballoc = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->rballoc;
// hopping = ((DCI0_1_5MHz_TDD_1_6_t *)dci_pdu)->hopping;
......@@ -6180,7 +6178,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
cqi_req = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->cqi_req;
cshift = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->cshift;
TPC = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->TPC;
ndi = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->ndi;
mcs = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->mcs;
rballoc = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->rballoc;
// hopping = ((DCI0_1_5MHz_FDD_t *)dci_pdu)->hopping;
......@@ -6197,7 +6194,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
dai = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->dai;
cshift = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift;
TPC = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->TPC;
ndi = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->ndi;
mcs = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->mcs;
rballoc = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->rballoc;
// hopping = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->hopping;
......@@ -6207,7 +6203,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
cqi_req = ((DCI0_5MHz_FDD_t *)dci_pdu)->cqi_req;
cshift = ((DCI0_5MHz_FDD_t *)dci_pdu)->cshift;
TPC = ((DCI0_5MHz_FDD_t *)dci_pdu)->TPC;
ndi = ((DCI0_5MHz_FDD_t *)dci_pdu)->ndi;
mcs = ((DCI0_5MHz_FDD_t *)dci_pdu)->mcs;
rballoc = ((DCI0_5MHz_FDD_t *)dci_pdu)->rballoc;
// hopping = ((DCI0_5MHz_FDD_t *)dci_pdu)->hopping;
......@@ -6224,7 +6219,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
dai = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->dai;
cshift = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->cshift;
TPC = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->TPC;
ndi = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->ndi;
mcs = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->mcs;
rballoc = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->rballoc;
// hopping = ((DCI0_10MHz_TDD_1_6_t *)dci_pdu)->hopping;
......@@ -6234,7 +6228,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
cqi_req = ((DCI0_10MHz_FDD_t *)dci_pdu)->cqi_req;
cshift = ((DCI0_10MHz_FDD_t *)dci_pdu)->cshift;
TPC = ((DCI0_10MHz_FDD_t *)dci_pdu)->TPC;
ndi = ((DCI0_10MHz_FDD_t *)dci_pdu)->ndi;
mcs = ((DCI0_10MHz_FDD_t *)dci_pdu)->mcs;
rballoc = ((DCI0_10MHz_FDD_t *)dci_pdu)->rballoc;
// hopping = ((DCI0_10MHz_FDD_t *)dci_pdu)->hopping;
......@@ -6251,7 +6244,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
dai = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->dai;
cshift = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->cshift;
TPC = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->TPC;
ndi = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->ndi;
mcs = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->mcs;
rballoc = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->rballoc;
// hopping = ((DCI0_20MHz_TDD_1_6_t *)dci_pdu)->hopping;
......@@ -6261,7 +6253,6 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
cqi_req = ((DCI0_20MHz_FDD_t *)dci_pdu)->cqi_req;
cshift = ((DCI0_20MHz_FDD_t *)dci_pdu)->cshift;
TPC = ((DCI0_20MHz_FDD_t *)dci_pdu)->TPC;
ndi = ((DCI0_20MHz_FDD_t *)dci_pdu)->ndi;
mcs = ((DCI0_20MHz_FDD_t *)dci_pdu)->mcs;
rballoc = ((DCI0_20MHz_FDD_t *)dci_pdu)->rballoc;
// hopping = ((DCI0_20MHz_FDD_t *)dci_pdu)->hopping;
......@@ -6288,14 +6279,12 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu,
}
#ifdef DEBUG_DCI
LOG_D(PHY,"generate_eNB_ulsch_params_from_dci: subframe %d, rnti %x,harq_pid %d,ndi %d,cqi_req %d\n",subframe,rnti,harq_pid,ndi,cqi_req);
LOG_D(PHY,"generate_eNB_ulsch_params_from_dci: subframe %d, rnti %x,harq_pid %d,cqi_req %d\n",subframe,rnti,harq_pid,cqi_req);
#endif
ulsch->harq_processes[harq_pid]->dci_alloc = 1;
ulsch->harq_processes[harq_pid]->rar_alloc = 0;
ulsch->harq_processes[harq_pid]->TPC = TPC;
// ulsch->harq_processes[harq_pid]->Ndi = ndi;
ulsch->harq_processes[harq_pid]->n_DMRS = cshift;
......
......@@ -474,19 +474,19 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#include "LAYER2/MAC/defs.h"
#endif
int dlsch_abstraction_EESM(double* sinr_dB, uint8_t TM, uint32_t rb_alloc[4], uint8_t mcs, uint8_t dl_power_off) {
int index,ii;
int dlsch_abstraction_EESM(double* sinr_dB, uint8_t TM, uint32_t rb_alloc[4], uint8_t mcs, uint8_t dl_power_off) {
int ii;
double sinr_eff = 0;
int rb_count = 0;
int offset;
double bler = 0;
if(TM==5 && dl_power_off==1)
{ //do nothing -- means there is no second UE and TM 5 is behaving like TM 6 for a singal user
}
}
else
TM = TM-1;
TM = TM-1;
for (offset = 0; offset <= 24; offset++) {
if (rb_alloc[0] & (1<<offset)) {
rb_count++;
......@@ -505,12 +505,12 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
LOG_D(OCM,"sinr_eff (lin, weighted) = %f\n",sinr_eff);
sinr_eff = 10 * log10(sinr_eff);
LOG_D(OCM,"sinr_eff (dB) = %f\n",sinr_eff);
bler = interp(sinr_eff,&sinr_bler_map[mcs][0][0],&sinr_bler_map[mcs][1][0],table_length[mcs]);
#ifdef USER_MODE // need to be adapted for the emulation in the kernel space
if (uniformrandom() < bler) {
LOG_I(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f, TM %d)\n",mcs,sinr_eff,bler, TM);
if (uniformrandom() < bler) {
LOG_I(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f, TM %d)\n",mcs,sinr_eff,bler, TM);
return(1);
}
else {
......@@ -520,11 +520,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#endif
}
int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], uint8_t mcs,uint8_t dl_power_off) {
int index,ii;
int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], uint8_t mcs,uint8_t dl_power_off) {
int ii;
double sinr_eff = 0;
double x = 0;
double I =0;
double I =0;
double qpsk_max=12.2;
double qam16_max=19.2;
double qam64_max=25.2;
......
......@@ -658,19 +658,10 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
re_offset -= (frame_parms->ofdm_symbol_size);
symbol_offset = (unsigned int)frame_parms->ofdm_symbol_size*l;
#ifndef NEW_FFT
rxptr = (int16_t *)&eNB_common_vars->rxdataF[0][aa][2*symbol_offset];
#else
rxptr = (int16_t *)&eNB_common_vars->rxdataF[0][aa][symbol_offset];
#endif
for (i=0;i<12;i++,j+=2,re_offset++) {
#ifndef NEW_FFT
rxcomp[aa][j] = (int16_t)((rxptr[re_offset<<2]*(int32_t)zptr[j])>>15) - ((rxptr[1+(re_offset<<2)]*(int32_t)zptr[1+j])>>15);
rxcomp[aa][1+j] = (int16_t)((rxptr[re_offset<<2]*(int32_t)zptr[1+j])>>15) + ((rxptr[1+(re_offset<<2)]*(int32_t)zptr[j])>>15);
#else
rxcomp[aa][j] = (int16_t)((rxptr[re_offset<<1]*(int32_t)zptr[j])>>15) - ((rxptr[1+(re_offset<<1)]*(int32_t)zptr[1+j])>>15);
rxcomp[aa][1+j] = (int16_t)((rxptr[re_offset<<1]*(int32_t)zptr[1+j])>>15) + ((rxptr[1+(re_offset<<1)]*(int32_t)zptr[j])>>15);
#endif
if (re_offset==frame_parms->ofdm_symbol_size)
re_offset = 0;
#ifdef DEBUG_PUCCH_RX
......@@ -956,7 +947,7 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
rnti = phy_vars_eNB->ulsch_eNB[UE_index]->rnti;
for (UE_id=0;UE_id<NB_UE_INST;UE_id++) {
if (rnti == PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->lte_ue_pdcch_vars[0]->crnti)
if (rnti == PHY_vars_UE_g[UE_id][CC_id]->lte_ue_pdcch_vars[0]->crnti)
break;
}
if (UE_id==NB_UE_INST) {
......@@ -965,19 +956,19 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
}
if (fmt == pucch_format1) {
payload[0] = PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->sr[subframe];
payload[0] = PHY_vars_UE_g[UE_id][CC_id]->sr[subframe];
}
else if (fmt == pucch_format1a) {
payload[0] = PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->pucch_payload[0];
payload[0] = PHY_vars_UE_g[UE_id][CC_id]->pucch_payload[0];
}
else if (fmt == pucch_format1b) {
payload[0] = PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->pucch_payload[0];
payload[1] = PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->pucch_payload[1];
payload[0] = PHY_vars_UE_g[UE_id][CC_id]->pucch_payload[0];
payload[1] = PHY_vars_UE_g[UE_id][CC_id]->pucch_payload[1];
}
else
LOG_E(PHY,"[eNB] Frame %d: Can't handle formats 2/2a/2b\n",phy_vars_eNB->proc[sched_subframe].frame_rx);
if (PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->pucch_sel[subframe] == n1_pucch_sel)
if (PHY_vars_UE_g[UE_id][CC_id]->pucch_sel[subframe] == n1_pucch_sel)
return(99);
else
return(0);
......
......@@ -184,7 +184,6 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
uint8_t harq_pid = subframe2harq_pid(frame_parms,phy_vars_ue->frame_tx,subframe);
uint16_t rballoc;
uint8_t cqireq;
double sinr_eff;
uint16_t *RIV2nb_rb_LUT, *RIV2first_rb_LUT;
uint16_t RIV_max = 0;
......@@ -258,12 +257,6 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
}
ulsch->uci_format = HLC_subband_cqi_nopmi;
/*
if(flag_LA==1)
sinr_eff = sinr_eff_cqi_calc(phy_vars_ue, eNB_id);
else
sinr_eff = meas->wideband_cqi_avg[eNB_id];
*/
fill_CQI(ulsch,meas,eNB_id,0,phy_vars_ue->lte_frame_parms.N_RB_DL,0, transmission_mode,phy_vars_ue->sinr_eff);
if (((phy_vars_ue->frame_tx % 100) == 0) || (phy_vars_ue->frame_tx < 10))
......
......@@ -175,46 +175,24 @@ int pss_sss_extract(PHY_VARS_UE *phy_vars_ue,
// (rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))*2,
// LTE_CE_OFFSET+ch_offset+(symbol_mod*(frame_parms->ofdm_symbol_size)));
#ifndef NEW_FFT
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))*2];
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))*2];
#else
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
#endif
pss_rxF_ext = &pss_ext[aarx][0];
sss_rxF_ext = &sss_ext[aarx][0];
for (rb=0; rb<nb_rb; rb++) {
// skip DC carrier
if (rb==3) {
#ifndef NEW_FFT
sss_rxF = &rxdataF[aarx][(1 + (sss_symb*(frame_parms->ofdm_symbol_size)))*2];
pss_rxF = &rxdataF[aarx][(1 + (pss_symb*(frame_parms->ofdm_symbol_size)))*2];
#else
sss_rxF = &rxdataF[aarx][(1 + (sss_symb*(frame_parms->ofdm_symbol_size)))];
pss_rxF = &rxdataF[aarx][(1 + (pss_symb*(frame_parms->ofdm_symbol_size)))];
#endif
}
for (i=0;i<12;i++) {
#ifndef NEW_FFT
pss_rxF_ext[i]=pss_rxF[i<<1];
sss_rxF_ext[i]=sss_rxF[i<<1];
#else
pss_rxF_ext[i]=pss_rxF[i];
sss_rxF_ext[i]=sss_rxF[i];
#endif
}
#ifndef NEW_FFT
pss_rxF+=24;
sss_rxF+=24;
#else
pss_rxF+=12;
sss_rxF+=12;
#endif
pss_rxF_ext+=12;
sss_rxF_ext+=12;
}
......
......@@ -220,7 +220,6 @@ uint32_t ulsch_encoding(uint8_t *a,
PHY_MEASUREMENTS *meas = &phy_vars_ue->PHY_measurements;
LTE_UE_ULSCH_t *ulsch=phy_vars_ue->ulsch_ue[eNB_id];
LTE_UE_DLSCH_t **dlsch = phy_vars_ue->dlsch_ue[eNB_id];
double sinr_eff;
uint16_t rnti;
if (!ulsch) {
......@@ -249,12 +248,6 @@ uint32_t ulsch_encoding(uint8_t *a,
// fill CQI/PMI information
if (ulsch->O>0) {
/* //not correctly done
if (flag_LA==1)
sinr_eff = sinr_eff_cqi_calc(phy_vars_ue, 0); //eNB_id is missing here
else
sinr_eff = 0;
*/
rnti = phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->crnti;
fill_CQI(ulsch,meas,0,harq_pid,phy_vars_ue->lte_frame_parms.N_RB_DL,rnti, tmode,phy_vars_ue->sinr_eff);
......@@ -888,7 +881,6 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
LTE_UE_DLSCH_t **dlsch = phy_vars_ue->dlsch_ue[eNB_id];
PHY_MEASUREMENTS *meas = &phy_vars_ue->PHY_measurements;
uint8_t tmode = phy_vars_ue->transmission_mode[eNB_id];
double sinr_eff;
uint16_t rnti=phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->crnti;
LOG_D(PHY,"EMUL UE ulsch_encoding for eNB %d,mod_id %d, harq_pid %d rnti %x, ACK(%d,%d) \n",
eNB_id,phy_vars_ue->Mod_id, harq_pid, rnti,ulsch->o_ACK[0],ulsch->o_ACK[1]);
......
......@@ -138,19 +138,9 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
msg("[PHY] symbol %d/%d (%p,%p -> %p)\n",i,nb_symbols,input,&input[i<<log2fftsize],&output[(i<<log2fftsize) + ((i)*nb_prefix_samples)]);
#endif
#ifndef NEW_FFT
fft((short *)&input[i<<log2fftsize],
temp,
twiddle_ifft,
rev,
log2fftsize,
log2fftsize/2, // normalized FFT (i.e. 1/sqrt(N) multiplicative factor)
0);
#else
idft((int16_t *)&input[i<<log2fftsize],
(log2fftsize==7) ? (int16_t *)temp : (int16_t *)&output[(i<<log2fftsize) + ((1+i)*nb_prefix_samples)],
1);
#endif
// write_output("fft_out.m","fftout",temp,(1<<log2fftsize)*2,1,1);
//memset(temp,0,1<<log2fftsize);
......@@ -167,21 +157,12 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
// msg("Doing cyclic prefix method\n");
#ifndef NEW_FFT
for (j=0;j<((1<<log2fftsize)) ; j++) {
output_ptr[j] = temp_ptr[j];
output_ptr[j] = temp_ptr[2*j];
}
#else
if (log2fftsize==7) {
for (j=0;j<((1<<log2fftsize)) ; j++) {
output_ptr[j] = temp_ptr[j];
}
}
j=(1<<log2fftsize);
#endif
for (k=-1;k>=-nb_prefix_samples;k--) {
output_ptr[k] = output_ptr[--j];
......
......@@ -27,6 +27,7 @@
*******************************************************************************/
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "defs.h"
//#define DEBUG_FEP
......@@ -79,38 +80,22 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
}
if (l<0 || l>=7-frame_parms->Ncp) {
msg("slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp);
LOG_E(PHY,"slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp);
return(-1);
}
if (Ns<0 || Ns>=20) {
msg("slot_fep: Ns must be between 0 and 19\n");
LOG_E(PHY,"slot_fep: Ns must be between 0 and 19\n");
return(-1);
}
#ifdef DEBUG_FEP
msg("slot_fep: Ns %d offset %d, symbol %d, nb_prefix_samples %d\n",Ns,slot_offset,symbol, nb_prefix_samples);
LOG_D(PHY,"slot_fep: Ns %d offset %d, symbol %d, nb_prefix_samples %d\n",Ns,slot_offset,symbol, nb_prefix_samples);
#endif
for (aa=0;aa<frame_parms->nb_antennas_rx;aa++) {
if (l==0) {
#ifndef NEW_FFT
fft(
#ifndef OFDMA_ULSCH
(short *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][slot_offset +
nb_prefix_samples0],
#else
(short *)&eNB_common_vars->rxdata[eNB_id][aa][((frame_parms->samples_per_tti>>1)*Ns) +
nb_prefix_samples0],
#endif
(short*)&eNB_common_vars->rxdataF[eNB_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
frame_parms->twiddle_fft,
frame_parms->rev,
frame_parms->log2_symbol_size,
frame_parms->log2_symbol_size>>1,
0);
#else
dft(
#ifndef OFDMA_ULSCH
(int16_t *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][slot_offset +
......@@ -120,26 +105,8 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
nb_prefix_samples0],
#endif
(int16_t *)&eNB_common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],1);
#endif
}
else {
#ifndef NEW_FFT
fft(
#ifndef OFDMA_ULSCH
(short *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][slot_offset +
#else
(short *)&eNB_common_vars->rxdata[eNB_id][aa][((frame_parms->samples_per_tti>>1)*Ns) +
#endif
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1)],
(short*)&eNB_common_vars->rxdataF[eNB_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
frame_parms->twiddle_fft,
frame_parms->rev,
frame_parms->log2_symbol_size,
frame_parms->log2_symbol_size>>1,
0);
#else
dft(
#ifndef OFDMA_ULSCH
(short *)&eNB_common_vars->rxdata_7_5kHz[eNB_id][aa][slot_offset +
......@@ -149,12 +116,11 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1)],
(short*)&eNB_common_vars->rxdataF[eNB_id][aa][frame_parms->ofdm_symbol_size*symbol],1);
#endif
}
}
#ifdef DEBUG_FEP
msg("slot_fep: done\n");
LOG_D(PHY,"slot_fep: done\n");
#endif
return(0);
}
......@@ -37,6 +37,7 @@ PHY_OBJS += $(TOP_DIR)/PHY/MODULATION/slot_fep_ul.o
PHY_OBJS += $(TOP_DIR)/PHY/MODULATION/ul_7_5_kHz.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/freq_equalization.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_sync_time.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_sync_timefreq.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_adjust_sync.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.o
PHY_OBJS += $(TOP_DIR)/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.o
......
......@@ -1048,8 +1048,7 @@ int mult_cpx_vector_norep_conj2(int16_t *x1,
// int16_t *temps;
int *tempw;
......@@ -1089,20 +1088,10 @@ int mult_cpx_vector_norep_conj2(int16_t *x1,
printf("x2 : %d,%d,%d,%d,%d,%d,%d,%d\n",temps[0],temps[1],temps[2],temps[3],temps[4],temps[5],temps[6],temps[7]);
*/
m0 = _mm_madd_epi16(m4,x2_128[0]); //pmaddwd_r2r(mm1,mm0); // 1- compute x1[0]*x2[0]
/*
temp = m0;
tempd = &temp;
printf("m0 : %d,%d,%d,%d\n",tempd[0],tempd[1],tempd[2],tempd[3]);
tempw = (int *)&m0;
printf("m0[0] : %d,%d,%d,%d\n",tempw[0],tempw[1],tempw[2],tempw[3]);
*/
m0 = _mm_sra_epi32(m0,shift); // 1- shift right by shift in order to compensate for the input amplitude
tempw = (int *)&m0;
// tempw = (int *)&m0;
// printf("m0[1] : %d,%d,%d,%d\n",tempw[0],tempw[1],tempw[2],tempw[3]);
......
......@@ -46,14 +46,14 @@ int32_t subcarrier_energy(int32_t *input,uint32_t length, int32_t *subcarrier_en
int32_t i, subcarrier_pwr;
register __m64 mm0,mm1, subcarrier;
subcarrier = _m_pxor(subcarrier,subcarrier);
subcarrier = _mm_setzero_si64();//_m_pxor(subcarrier,subcarrier);
__m64 *in = (__m64 *)input;
#ifdef MAIN
int16_t *printb;
#endif
mm0 = _m_pxor(mm0,mm0);
mm0 = _mm_setzero_si64();//pxor(mm0,mm0);
for (i=0;i<length>>1;i++) {
......@@ -82,8 +82,8 @@ int32_t signal_energy(int32_t *input,uint32_t length) {
int16_t *printb;
#endif
mm0 = _m_pxor(mm0,mm0);
mm3 = _m_pxor(mm3,mm3);
mm0 = _mm_setzero_si64();//pxor(mm0,mm0);
mm3 = _mm_setzero_si64();//pxor(mm3,mm3);
for (i=0;i<length>>1;i++) {
......@@ -156,20 +156,19 @@ int32_t signal_energy_nodc(int32_t *input,uint32_t length) {
int32_t i;
int32_t temp;
register __m64 mm0,mm1,mm2,mm3;
register __m64 mm0,mm1;//,mm2,mm3;
__m64 *in = (__m64 *)input;
#ifdef MAIN
int16_t *printb;
#endif
mm0 = _m_pxor(mm0,mm0);
mm3 = _m_pxor(mm3,mm3);
mm0 = _mm_setzero_si64();//_pxor(mm0,mm0);
// mm3 = _mm_setzero_si64();//pxor(mm3,mm3);
for (i=0;i<length>>1;i++) {
mm1 = in[i];
mm2 = mm1;
mm1 = _m_pmaddwd(mm1,mm1);// SIMD complex multiplication
mm1 = _m_psradi(mm1,shift);
mm0 = _m_paddd(mm0,mm1);
......
......@@ -120,6 +120,8 @@
#define NUMBER_OF_eNB_SECTORS_MAX 3
#define NB_BANDS_MAX 8
typedef enum {normal_txrx=0,rx_calib_ue=1,rx_calib_ue_med=2,rx_calib_ue_byp=3,debug_prach=4,no_L2_connect=5} runmode_t;
enum transmission_access_mode{
......@@ -131,6 +133,13 @@ enum transmission_access_mode{
CBA_ACCESS
};
typedef struct UE_SCAN_INFO_s {
/// 10 best amplitudes (linear) for each pss signals
int32_t amp[2][10];
/// 10 frequency offsets (kHz) corresponding to best amplitudes, with respect do minimum DL frequency in the band
int32_t freq_offset_Hz[2][10];
} UE_SCAN_INFO_t;
#if defined(ENABLE_RAL)
typedef struct ral_threshold_phy_s {
SLIST_ENTRY(ral_threshold_phy_s) ral_thresholds;
......@@ -439,6 +448,7 @@ typedef struct
uint32_t high_speed_flag;
uint32_t perfect_ce;
int16_t ch_est_alpha;
UE_SCAN_INFO_t scan_info[NB_BANDS_MAX];
char ulsch_no_allocation_counter[NUMBER_OF_CONNECTED_eNB_MAX];
......
......@@ -152,7 +152,7 @@ uint8_t get_Msg3_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,
unsigned char current_subframe) {
uint8_t ul_subframe=0;
uint32_t ul_frame;
uint32_t ul_frame=0;
if (frame_parms->frame_type ==FDD) {
ul_subframe = (current_subframe>3) ? (current_subframe-4) : (current_subframe+6);
......
......@@ -609,7 +609,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
uint16_t first_rb, nb_rb;
uint8_t harq_pid;
unsigned int input_buffer_length;
unsigned int i,aa;
unsigned int aa;
uint8_t Msg3_flag=0;
uint8_t pucch_ack_payload[2];
uint8_t n1_pucch;
......@@ -632,6 +632,9 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
int frame_tx = phy_vars_ue->frame_tx;
int Mod_id = phy_vars_ue->Mod_id;
int CC_id = phy_vars_ue->CC_id;
#ifndef OPENAIR2
int i;
#endif
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,VCD_FUNCTION_IN);
start_meas(&phy_vars_ue->phy_proc_tx);
......@@ -1395,7 +1398,6 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t
int aa;
#endif
int Mod_id=phy_vars_ue->Mod_id;
int frame_rx = phy_vars_ue->frame_rx;
int slot_rx = phy_vars_ue->slot_rx;
int subframe_rx = slot_rx>>1;
......@@ -1871,14 +1873,19 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
unsigned int dci_cnt=0, i;
//DCI_PDU *DCI_pdu;
//uint16_t ra_RNTI;
uint8_t harq_pid;
int UE_id;
int CC_id;
int frame_rx = phy_vars_ue->frame_rx;
int slot_rx = phy_vars_ue->slot_rx;
int subframe_rx = slot_rx>>1;
#ifdef PHY_ABSTRACTION
int CC_id;
int UE_id;
uint8_t harq_pid;
#endif
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_IN);
/*
......@@ -2299,13 +2306,15 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
uint16_t l,m,n_symb;
// int eNB_id = 0,
int eNB_id_i = 1;
uint8_t dual_stream_UE = 0;
int ret=0;
uint8_t harq_pid = -1;
int timing_advance;
uint8_t pilot1,pilot2,pilot3;
#ifndef DLSCH_THREAD
uint8_t i_mod = 0;
int eNB_id_i = 1;
uint8_t dual_stream_UE = 0;
#endif
int i;
#ifndef OPENAIR2
uint8_t *rar;
......@@ -2318,7 +2327,9 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
int slot_rx = phy_vars_ue->slot_rx;
int subframe_rx = slot_rx>>1;
int subframe_prev = (subframe_rx+9)%10;
#ifdef OPENAIR2
int CC_id = phy_vars_ue->CC_id;
#endif
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN);
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_UE, (slot_rx + 1) % 20);
......@@ -3413,9 +3424,13 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
unsigned int Mod_id;
int result;
#endif
# if defined(ENABLE_RAL)
int CC_id =0;
#endif
int frame_rx = phy_vars_ue->frame_rx;
#ifdef OPENAIR2
int frame_tx = phy_vars_ue->frame_tx;
#endif
int slot_rx = phy_vars_ue->slot_rx;
int slot_tx = phy_vars_ue->slot_tx;
int subframe_tx = slot_tx>>1;
......
......@@ -133,7 +133,6 @@ test: $(SIMULATION_OBJS) $(TOOLS_OBJS) $(TOP_DIR)/PHY/INIT/lte_init.o test.c
OBJ += $(LIST_OBJ)
OBJ += $(MEM_OBJ)
$(OBJ) : %.o : %.c
@echo
@echo Compiling $< ...
@$(CC) -c $(CFLAGS) -o $@ $<
......
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