Commit 669c8eb9 authored by Raymond Knopp's avatar Raymond Knopp

Additions for TM3 in eNB and partially in UE - RK

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6182 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent c753e7bc
......@@ -661,7 +661,8 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
int nulled=0;
#endif
if (Kmimo==0 || Mdlharq==0 || C==0 || Qm==0 || Nl==0) {
msg("lte_rate_matching.c: invalid paramters\n");
msg("lte_rate_matching.c: invalid parameters (Kmimo %d, Mdlharq %d, C %d, Qm %d, Nl %d\n",
Kmimo,Mdlharq,C,Qm,Nl);
return(-1);
}
......
This diff is collapsed.
......@@ -45,7 +45,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
int pilot[2][200] __attribute__((aligned(16)));
unsigned char nu,aarx,aa;
unsigned char nu,aarx;
unsigned short k;
unsigned int rb,pilot_cnt;
short ch[2],*pil,*rxF,*dl_ch,*dl_ch_prev,*f,*f2,*fl,*f2l2,*fr,*f2r2,*f2_dc,*f_dc;
......@@ -88,6 +88,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
//ch_offset = (l*(phy_vars_ue->lte_frame_parms.ofdm_symbol_size));
if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
ch_offset = phy_vars_ue->lte_frame_parms.ofdm_symbol_size ;
else
ch_offset = phy_vars_ue->lte_frame_parms.ofdm_symbol_size*symbol;
symbol_offset = phy_vars_ue->lte_frame_parms.ofdm_symbol_size*symbol;
......@@ -185,8 +188,14 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
rxF = (short *)&rxdataF[aarx][((symbol_offset+k+phy_vars_ue->lte_frame_parms.first_carrier_offset))];
dl_ch = (short *)&dl_ch_estimates[(p<<1)+aarx][ch_offset];
// if (eNb_id==0)
memset(dl_ch,0,4*(phy_vars_ue->lte_frame_parms.ofdm_symbol_size));
if (phy_vars_ue->high_speed_flag==0) // multiply previous channel estimate by ch_est_alpha
multadd_complex_vector_real_scalar(dl_ch-(phy_vars_ue->lte_frame_parms.ofdm_symbol_size<<1),
phy_vars_ue->ch_est_alpha,dl_ch-(phy_vars_ue->lte_frame_parms.ofdm_symbol_size<<1),
1,phy_vars_ue->lte_frame_parms.ofdm_symbol_size);
if ((phy_vars_ue->lte_frame_parms.N_RB_DL==6) ||
(phy_vars_ue->lte_frame_parms.N_RB_DL==50) ||
......@@ -612,6 +621,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
// printf("ch_offset %d\n",ch_offset);
dl_ch = (short *)&dl_ch_estimates[(p<<1)+aarx][ch_offset];
if (phy_vars_ue->high_speed_flag == 0) {
multadd_complex_vector_real_scalar(dl_ch,
32767-phy_vars_ue->ch_est_alpha,
dl_ch-(phy_vars_ue->lte_frame_parms.ofdm_symbol_size<<1),0,phy_vars_ue->lte_frame_parms.ofdm_symbol_size);
}
else { // high_speed_flag == 1
if (symbol == 0) {
// printf("Interpolating %d->0\n",4-phy_vars_ue->lte_frame_parms.Ncp);
// dl_ch_prev = (short *)&dl_ch_estimates[(p<<1)+aarx][(4-phy_vars_ue->lte_frame_parms.Ncp)*(phy_vars_ue->lte_frame_parms.ofdm_symbol_size)];
......@@ -673,9 +689,10 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
multadd_complex_vector_real_scalar(dl_ch,10923,dl_ch_prev+(2*((phy_vars_ue->lte_frame_parms.ofdm_symbol_size)<<1)),0,phy_vars_ue->lte_frame_parms.ofdm_symbol_size);
} // pilot spacing 3 symbols (1/3,2/3 combination)
}
#endif
}
#endif
}
void (*idft)(int16_t *,int16_t *, int);
......
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -109,10 +109,22 @@ typedef struct {
uint8_t rvidx;
/// MIMO mode for this DLSCH
MIMO_mode_t mimo_mode;
/// Number of layers for this PDSCH transmission
uint8_t Nlayers;
/// First layer for this PSCH transmission
uint8_t first_layer;
/// Current RB allocation
uint32_t rb_alloc[4];
/// Current subband PMI allocation
uint16_t pmi_alloc;
/// Current subband RI allocation
uint32_t ri_alloc;
/// Current subband CQI1 allocation
uint32_t cqi_alloc1;
/// Current subband CQI2 allocation
uint32_t cqi_alloc2;
/// Current Number of RBs
uint16_t nb_rb;
/// downlink power offset field
uint8_t dl_power_off;
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
uint8_t e[MAX_NUM_CHANNEL_BITS];
/// Turbo-code outputs (36-212 V8.6 2009-03, p.12
uint8_t d[MAX_NUM_DLSCH_SEGMENTS][(96+3+(3*6144))];
/// Sub-block interleaver outputs (36-212 V8.6 2009-03, p.16-17)
......@@ -129,8 +141,12 @@ typedef struct {
uint32_t Kplus;
/// Number of "Filler" bits (for definition see 36-212 V8.6 2009-03, p.10)
uint32_t F;
/// Number of MIMO layers (streams) (for definition see 36-212 V8.6 2009-03, p.17)
/// Number of MIMO layers (streams) (for definition see 36-212 V8.6 2009-03, p.17, TM3-4)
uint8_t Nl;
/// Number of layers for this PDSCH transmission (TM8-10)
uint8_t Nlayers;
/// First layer for this PSCH transmission
uint8_t first_layer;
} LTE_DL_eNB_HARQ_t;
typedef struct {
......@@ -221,34 +237,16 @@ typedef struct {
uint8_t ra_window_size;
/// First-round error threshold for fine-grain rate adaptation
uint8_t error_threshold;
/// Current RB allocation
uint32_t rb_alloc[4];
/// Current subband PMI allocation
uint16_t pmi_alloc;
/// Current subband RI allocation
uint32_t ri_alloc;
/// Current subband CQI1 allocation
uint32_t cqi_alloc1;
/// Current subband CQI2 allocation
uint32_t cqi_alloc2;
/// Current Number of RBs
uint16_t nb_rb;
/// Pointers to 8 HARQ processes for the DLSCH
LTE_DL_eNB_HARQ_t *harq_processes[8];
/// Number of soft channel bits
uint32_t G;
/// Layer index for this dlsch (0,1)
uint8_t layer_index;
/// Codebook index for this dlsch (0,1,2,3)
uint8_t codebook_index;
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
uint8_t e[MAX_NUM_CHANNEL_BITS];
/// Maximum number of HARQ rounds (for definition see 36-212 V8.6 2009-03, p.17)
uint8_t Mdlharq;
/// MIMO transmission mode indicator for this sub-frame (for definition see 36-212 V8.6 2009-03, p.17)
uint8_t Kmimo;
/// downlink power offset field
uint8_t dl_power_off;
/// amplitude of PDSCH (compared to RS) in symbols without pilots
int16_t sqrt_rho_a;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
......@@ -637,8 +635,6 @@ typedef struct {
harq_status_t harq_ack[10];
/// Pointers to up to 8 HARQ processes
LTE_DL_UE_HARQ_t *harq_processes[8];
/// Layer index for this DLSCH
uint8_t layer_index;
/// Maximum number of HARQ rounds (for definition see 36-212 V8.6 2009-03, p.17
uint8_t Mdlharq;
/// MIMO transmission mode indicator for this sub-frame (for definition see 36-212 V8.6 2009-03, p.17)
......@@ -650,7 +646,6 @@ typedef struct {
typedef enum {format0,
format1,
format1A,
format1A_RA,
format1B,
format1C,
format1D,
......
......@@ -230,8 +230,9 @@ int dlsch_encoding(unsigned char *a,
unsigned int G;
unsigned int crc=1;
unsigned short iind;
unsigned short nb_rb = dlsch->nb_rb;
unsigned char harq_pid = dlsch->current_harq_pid;
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
unsigned int A;
unsigned char mod_order;
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
......@@ -243,7 +244,7 @@ int dlsch_encoding(unsigned char *a,
// printf("Encoder: A: %d\n",A);
mod_order = get_Qm(dlsch->harq_processes[harq_pid]->mcs);
G = get_G(frame_parms,nb_rb,dlsch->rb_alloc,mod_order,dlsch->harq_processes[harq_pid]->Nl,num_pdcch_symbols,frame,subframe);
G = get_G(frame_parms,nb_rb,dlsch->harq_processes[harq_pid]->rb_alloc,mod_order,dlsch->harq_processes[harq_pid]->Nl,num_pdcch_symbols,frame,subframe);
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
......@@ -353,7 +354,7 @@ int dlsch_encoding(unsigned char *a,
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
G, //G
dlsch->harq_processes[harq_pid]->w[r],
dlsch->e+r_offset,
dlsch->harq_processes[harq_pid]->e+r_offset,
dlsch->harq_processes[harq_pid]->C, // C
NSOFT, // Nsoft,
dlsch->Mdlharq,
......@@ -367,7 +368,7 @@ int dlsch_encoding(unsigned char *a,
stop_meas(rm_stats);
#ifdef DEBUG_DLSCH_CODING
if (r==dlsch->harq_processes[harq_pid]->C-1)
write_output("enc_output.m","enc",dlsch->e,r_offset,1,4);
write_output("enc_output.m","enc",dlsch->harq_processes[harq_pid]->e,r_offset,1,4);
#endif
}
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
......
......@@ -291,9 +291,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
(r==0) ? harq_process->F : 0);
#ifdef DEBUG_DLSCH_DECODING
msg("HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, mod_order %d, nb_rb %d, Nl %d)...\n",
msg("HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d)...\n",
harq_pid,r, G,
Kr*3,
harq_process->TBS,
get_Qm(harq_process->mcs),
harq_process->nb_rb,
harq_process->Nl);
......@@ -675,7 +676,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
if (dlsch_abstraction_MIESM(phy_vars_ue->sinr_dB,
phy_vars_ue->transmission_mode[eNB_id],
dlsch_eNB->rb_alloc,
dlsch_eNB->harq_processes[harq_pid]->rb_alloc,
dlsch_eNB->harq_processes[harq_pid]->mcs,
PHY_vars_eNB_g[eNB_id][CC_id]->mu_mimo_mode[ue_id].dl_pow_off) == 1) {
// reset HARQ
......
......@@ -1063,7 +1063,7 @@ length = number of resource elements
xmm0 = _mm_xor_si128(xmm0,xmm0); // ZERO
// 1 term for nominator of LLR
// 1 term for numerator of LLR
xmm3 = _mm_subs_epi16(y1r_over2,rho_rpi);
A = _mm_abs_epi16(xmm3); // A = |y1r/2 - rho/sqrt(8)|
xmm2 = _mm_adds_epi16(A,y0i_over2); // = |y1r/2 - rho/sqrt(8)| + y0i/2
......@@ -1071,7 +1071,7 @@ length = number of resource elements
B = _mm_abs_epi16(xmm3); // B = |y1i/2 - rho*/sqrt(8)|
logmax_num_re0 = _mm_adds_epi16(B,xmm2); // = |y1r/2 - rho/sqrt(8)|+|y1i/2 - rho*/sqrt(8)| + y0i/2
// 2 term for nominator of LLR
// 2 term for numerator of LLR
xmm3 = _mm_subs_epi16(y1r_over2,rho_rmi);
C = _mm_abs_epi16(xmm3); // C = |y1r/2 - rho*/4|
xmm2 = _mm_subs_epi16(C,y0i_over2); // = |y1r/2 - rho*/4| - y0i/2
......
......@@ -58,7 +58,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int i,j,k=0;
// uint8_t reset;
uint32_t x1, x2, s=0;
uint8_t *e=dlsch->e;
uint8_t *e=dlsch->harq_processes[dlsch->current_harq_pid]->e;
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
......
......@@ -48,7 +48,7 @@
#include "gain_control.h"
#endif
//#define DEBUG_INITIAL_SYNCH
#define DEBUG_INITIAL_SYNCH
int pbch_detection(PHY_VARS_UE *phy_vars_ue, runmode_t mode) {
......@@ -111,6 +111,7 @@ int pbch_detection(PHY_VARS_UE *phy_vars_ue, runmode_t mode) {
frame_parms,
0,
SISO,
phy_vars_ue->high_speed_flag,
frame_mod4);
if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
pbch_decoded = 1;
......@@ -122,6 +123,7 @@ int pbch_detection(PHY_VARS_UE *phy_vars_ue, runmode_t mode) {
frame_parms,
0,
ALAMOUTI,
phy_vars_ue->high_speed_flag,
frame_mod4);
if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
pbch_decoded = 1;
......
......@@ -70,6 +70,98 @@ extern __m128i zero;
#define PBCH_A 24
int allocate_pbch_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
mod_sym_t **txdataF,
uint32_t *jj,
uint16_t re_offset,
uint32_t symbol_offset,
uint8_t *x0,
uint8_t pilots,
int16_t amp,
uint32_t *re_allocated) {
MIMO_mode_t mimo_mode = (frame_parms->mode1_flag==1)?SISO:ALAMOUTI;
uint32_t tti_offset,aa;
uint8_t re;
int16_t gain_lin_QPSK;
int16_t re_off=re_offset;
uint8_t first_re,last_re;
int32_t tmp_sample1,tmp_sample2;
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15);
first_re=0;
last_re=12;
for (re=first_re;re<last_re;re++) {
tti_offset = symbol_offset + re_off + re;
// check that RE is not from Cell-specific RS
if (is_not_pilot(pilots,re,frame_parms->nushift,0)==1) {
// printf("re %d (jj %d)\n",re,*jj);
if (mimo_mode == SISO) { //SISO mapping
*re_allocated = *re_allocated + 1;
// printf("%d(%d) : %d,%d => ",tti_offset,*jj,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
((int16_t*)&txdataF[aa][tti_offset])[0] += (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
}
*jj = *jj + 1;
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
((int16_t*)&txdataF[aa][tti_offset])[1] += (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1}
}
*jj = *jj + 1;
}
else if (mimo_mode == ALAMOUTI){
*re_allocated = *re_allocated + 1;
((int16_t*)&tmp_sample1)[0] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK;
*jj=*jj+1;
((int16_t*)&tmp_sample1)[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK;
*jj=*jj+1;
// second antenna position n -> -x1*
((int16_t*)&tmp_sample2)[0] = (x0[*jj]==1) ? (gain_lin_QPSK) : -gain_lin_QPSK;
*jj=*jj+1;
((int16_t*)&tmp_sample2)[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK;
*jj=*jj+1;
// normalization for 2 tx antennas
((int16_t*)&txdataF[0][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*ONE_OVER_SQRT2_Q15)>>15);
((int16_t*)&txdataF[0][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*ONE_OVER_SQRT2_Q15)>>15);
((int16_t*)&txdataF[1][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample2)[0]*ONE_OVER_SQRT2_Q15)>>15);
((int16_t*)&txdataF[1][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample2)[1]*ONE_OVER_SQRT2_Q15)>>15);
// fill in the rest of the ALAMOUTI precoding
if (is_not_pilot(pilots,re + 1,frame_parms->nushift,0)==1) {
((int16_t *)&txdataF[0][tti_offset+1])[0] += -((int16_t *)&txdataF[1][tti_offset])[0]; //x1
((int16_t *)&txdataF[0][tti_offset+1])[1] += ((int16_t *)&txdataF[1][tti_offset])[1];
((int16_t *)&txdataF[1][tti_offset+1])[0] += ((int16_t *)&txdataF[0][tti_offset])[0]; //x0*
((int16_t *)&txdataF[1][tti_offset+1])[1] += -((int16_t *)&txdataF[0][tti_offset])[1];
}
else {
((int16_t *)&txdataF[0][tti_offset+2])[0] += -((int16_t *)&txdataF[1][tti_offset])[0]; //x1
((int16_t *)&txdataF[0][tti_offset+2])[1] += ((int16_t *)&txdataF[1][tti_offset])[1];
((int16_t *)&txdataF[1][tti_offset+2])[0] += ((int16_t *)&txdataF[0][tti_offset])[0]; //x0*
((int16_t *)&txdataF[1][tti_offset+2])[1] += -((int16_t *)&txdataF[0][tti_offset])[1];
}
re++; // adjacent carriers are taken care of by precoding
*re_allocated = *re_allocated + 1;
if (is_not_pilot(pilots,re,frame_parms->nushift,0)==0) { // skip pilots
re++;
*re_allocated = *re_allocated + 1;
}
}
}
}
return(0);
}
//uint8_t pbch_d[96+(3*(16+PBCH_A))], pbch_w[3*3*(16+PBCH_A)],pbch_e[1920]; //one bit per byte
int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
mod_sym_t **txdataF,
......@@ -260,62 +352,51 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
#endif
#ifdef IFFT_FPGA
re_offset = frame_parms->N_RB_DL*12-3*12;
symbol_offset = frame_parms->N_RB_DL*12*l;
#else
re_offset = frame_parms->ofdm_symbol_size-3*12;
symbol_offset = frame_parms->ofdm_symbol_size*l;
#endif
for (rb=0;rb<6;rb++) {
#ifdef DEBUG_PBCH
msg("RB %d, jj %d, re_offset %d, symbol_offset %d, pilots %d, nushift %d\n",rb,jj,re_offset, symbol_offset, pilots,frame_parms->nushift);
#endif
allocate_REs_in_RB(txdataF,
allocate_pbch_REs_in_RB(frame_parms,
txdataF,
&jj,
re_offset,
symbol_offset,
&eNB_pbch->pbch_e[frame_mod4*(pbch_E>>2)],
(frame_parms->mode1_flag == 1) ? SISO : ALAMOUTI,
0,
pilots,
2,
0,
#ifdef INTERFERENCE_MITIGATION
(pilots_2==1)?(amp/3):amp,
#else
amp,
#endif
NULL,
&re_allocated,
0,
0,
0,
1,
0,
frame_parms);
&re_allocated);
re_offset+=12; // go to next RB
// check if we crossed the symbol boundary and skip DC
#ifdef IFFT_FPGA
if (re_offset >= frame_parms->N_RB_DL*12)
re_offset = 0;
#else
if (re_offset >= frame_parms->ofdm_symbol_size)
re_offset=1;
#endif
}
// }
}
#ifdef DEBUG_PBCH
msg("[PBCH] txdataF=\n");
for (i=0;i<frame_parms->ofdm_symbol_size;i++)
msg("%d=>(%d,%d)\n",i,((short*)&txdataF[0][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[0],
printf("[PBCH] txdataF=\n");
for (i=0;i<frame_parms->ofdm_symbol_size;i++) {
printf("%d=>(%d,%d)",i,((short*)&txdataF[0][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[0],
((short*)&txdataF[0][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[1]);
if (frame_parms->mode1_flag==0) {
printf("(%d,%d)\n",((short*)&txdataF[1][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[0],
((short*)&txdataF[1][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[1]);
}
else {
printf("\n");
}
}
#endif
......@@ -336,6 +417,7 @@ uint16_t pbch_extract(int **rxdataF,
int **rxdataF_ext,
int **dl_ch_estimates_ext,
uint32_t symbol,
uint32_t high_speed_flag,
LTE_DL_FRAME_PARMS *frame_parms) {
......@@ -356,21 +438,14 @@ uint16_t pbch_extract(int **rxdataF,
(rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))*2,
LTE_CE_OFFSET+ch_offset+(symbol_mod*(frame_parms->ofdm_symbol_size)));
*/
#ifndef NEW_FFT
rxF = &rxdataF[aarx][(rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))*2];
#else
rxF = &rxdataF[aarx][(rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))];
#endif
rxF_ext = &rxdataF_ext[aarx][symbol_mod*(6*12)];
for (rb=0; rb<nb_rb; rb++) {
// skip DC carrier
if (rb==3) {
#ifndef NEW_FFT
rxF = &rxdataF[aarx][(1 + (symbol*(frame_parms->ofdm_symbol_size)))*2];
#else
rxF = &rxdataF[aarx][(1 + (symbol*(frame_parms->ofdm_symbol_size)))];
#endif
}
if ((symbol_mod==0) || (symbol_mod==1)) {
j=0;
......@@ -379,39 +454,26 @@ uint16_t pbch_extract(int **rxdataF,
(i!=(nushiftmod3+3)) &&
(i!=(nushiftmod3+6)) &&
(i!=(nushiftmod3+9))) {
#ifndef NEW_FFT
rxF_ext[j++]=rxF[i<<1];
#else
rxF_ext[j++]=rxF[i];
#endif
}
}
#ifndef NEW_FFT
rxF+=24;
#else
rxF+=12;
#endif
rxF_ext+=8;
}
else {
for (i=0;i<12;i++) {
#ifndef NEW_FFT
rxF_ext[i]=rxF[i<<1];
#else
rxF_ext[i]=rxF[i];
#endif
}
#ifndef NEW_FFT
rxF+=24;
#else
rxF+=12;
#endif
rxF_ext+=12;
}
}
for (aatx=0;aatx<4;aatx++) {//frame_parms->nb_antennas_tx_eNB;aatx++) {
if (high_speed_flag == 1)
dl_ch0 = &dl_ch_estimates[(aatx<<1)+aarx][LTE_CE_OFFSET+ch_offset+(symbol*(frame_parms->ofdm_symbol_size))];
else
dl_ch0 = &dl_ch_estimates[(aatx<<1)+aarx][LTE_CE_OFFSET+ch_offset];
dl_ch0_ext = &dl_ch_estimates_ext[(aatx<<1)+aarx][symbol_mod*(6*12)];
for (rb=0; rb<nb_rb; rb++) {
......@@ -741,6 +803,7 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
LTE_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
MIMO_mode_t mimo_mode,
uint32_t high_speed_flag,
uint8_t frame_mod4) {
uint8_t log2_maxh;//,aatx,aarx;
......@@ -778,6 +841,7 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
lte_ue_pbch_vars->rxdataF_ext,
lte_ue_pbch_vars->dl_ch_estimates_ext,
symbol,
high_speed_flag,
frame_parms);
#ifdef DEBUG_PBCH
msg("[PHY] PBCH Symbol %d\n",symbol);
......@@ -811,7 +875,7 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
// msg("[PBCH][RX] Alamouti receiver not yet implemented!\n");
// return(-1);
}
else if ((mimo_mode != ANTCYCLING) && (mimo_mode != SISO)) {
else if (mimo_mode != SISO) {
msg("[PBCH][RX] Unsupported MIMO mode\n");
return(-1);
}
......@@ -911,7 +975,7 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
uint8_t eNB_id,
uint8_t pbch_phase) {
double bler=0.0, x=0.0;
double bler=0.0;//, x=0.0;
double sinr=0.0;
uint16_t nb_rb = phy_vars_ue->lte_frame_parms.N_RB_DL;
int16_t f;
......
This diff is collapsed.
......@@ -46,13 +46,13 @@ double get_pa_dB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated) {
}
double computeRhoA_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
LTE_eNB_DLSCH_t *dlsch_eNB ){
LTE_eNB_DLSCH_t *dlsch_eNB,int dl_power_off){
double rho_a_dB;
double sqrt_rho_a_lin;
rho_a_dB = pa_values[ pdsch_config_dedicated->p_a];
if(!dlsch_eNB->dl_power_off)
if(!dl_power_off)
rho_a_dB-=10*log10(2);
sqrt_rho_a_lin= pow(10,(0.05*rho_a_dB));
......@@ -69,12 +69,13 @@ double computeRhoA_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
double computeRhoB_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
PDSCH_CONFIG_COMMON *pdsch_config_common,
uint8_t n_antenna_port,
LTE_eNB_DLSCH_t *dlsch_eNB){
LTE_eNB_DLSCH_t *dlsch_eNB,
int dl_power_off){
double rho_a_dB, rho_b_dB;
double sqrt_rho_b_lin;
rho_a_dB= computeRhoA_eNB(pdsch_config_dedicated,dlsch_eNB);
rho_a_dB= computeRhoA_eNB(pdsch_config_dedicated,dlsch_eNB,dl_power_off);
if(n_antenna_port>1)
rho_b_dB= ratioPB[1][pdsch_config_common->p_b] + rho_a_dB;
......
This diff is collapsed.
......@@ -44,7 +44,7 @@
#ifdef DEBUG_UCI_TOOLS
#include "PHY/vars.h"
#endif
//#define DEBUG_UCI
#define DEBUG_UCI
uint64_t pmi2hex_2Ar1(uint32_t pmi) {
......
......@@ -76,9 +76,8 @@ unsigned char cs_ack_extended[4] = {1,2,6,7};
//unsigned short scfdma_amps[25] = {0,5120,3620,2956,2560,2290,2090,1935,1810,1706,1619,1544,1478,1420,1368,1322,1280,1242,1207,1175,1145,1117,1092,1068,1045,1024};
char dci_format_strings[15][13] = {"0","1","1A","1B","1C","1D",
"2_2A_L10PRB","2_2A_M10PRB","2_4A_L10PRB","2_4A_M10PRB",
"2A_2A_L10PRB","2A_2A_M10PRB","2A_4A_L10PRB","2A_4A_M10PRB",
char dci_format_strings[15][13] = {"0","1","1A","1B","1C","1D","1E_2A_M10PRB",
"2","2A","2B","2C","2D",
"3"};
uint8_t wACK[5][4] = {{1,1,1,1},{1,0,1,0},{1,1,0,0},{1,0,0,1},{0,0,0,0}};
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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