cleanness and comments
This commit is contained in:
@@ -46,7 +46,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
|||||||
unsigned char aarx,l,lprime,nsymb,skip_half=0,sss_symb,pss_symb=0,rb_alloc_ind,harq_pid,uespec_pilots=0;
|
unsigned char aarx,l,lprime,nsymb,skip_half=0,sss_symb,pss_symb=0,rb_alloc_ind,harq_pid,uespec_pilots=0;
|
||||||
int beamforming_mode, ch_offset;
|
int beamforming_mode, ch_offset;
|
||||||
uint8_t subframe;
|
uint8_t subframe;
|
||||||
int8_t uespec_nushift, uespec_poffset=0, pil_offset;
|
int8_t uespec_nushift, uespec_poffset=0, pil_offset=0;
|
||||||
uint8_t pilot0,pilot1,pilot2,pilot3;
|
uint8_t pilot0,pilot1,pilot2,pilot3;
|
||||||
|
|
||||||
short ch[2], *pil, *rxF, *dl_bf_ch, *dl_bf_ch_prev;
|
short ch[2], *pil, *rxF, *dl_bf_ch, *dl_bf_ch_prev;
|
||||||
@@ -81,7 +81,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
|||||||
subframe = Ns>>1;
|
subframe = Ns>>1;
|
||||||
|
|
||||||
|
|
||||||
if (beamforming_mode==7) {
|
// if (beamforming_mode==7) {
|
||||||
//generate ue specific pilots
|
//generate ue specific pilots
|
||||||
lprime = symbol/3-1;
|
lprime = symbol/3-1;
|
||||||
lte_dl_ue_spec_rx(phy_vars_ue,uespec_pilot,Ns,5,lprime,0,dlsch0_harq->nb_rb);
|
lte_dl_ue_spec_rx(phy_vars_ue,uespec_pilot,Ns,5,lprime,0,dlsch0_harq->nb_rb);
|
||||||
@@ -161,11 +161,12 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
|||||||
f2r = filt16_2r1;
|
f2r = filt16_2r1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
// beamforming mode extension
|
||||||
|
/* }
|
||||||
else if (beamforming_mode==0)
|
else if (beamforming_mode==0)
|
||||||
msg("lte_dl_bf_channel_estimation:No beamforming is performed.\n");
|
msg("lte_dl_bf_channel_estimation:No beamforming is performed.\n");
|
||||||
else
|
else
|
||||||
msg("lte_dl_bf_channel_estimation:Beamforming mode not supported yet.\n");
|
msg("lte_dl_bf_channel_estimation:Beamforming mode not supported yet.\n");*/
|
||||||
|
|
||||||
|
|
||||||
l=symbol;
|
l=symbol;
|
||||||
@@ -189,14 +190,16 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
|||||||
memset(dl_bf_ch,0,4*(frame_parms->ofdm_symbol_size));
|
memset(dl_bf_ch,0,4*(frame_parms->ofdm_symbol_size));
|
||||||
//memset(dl_bf_ch,0,2*(frame_parms->ofdm_symbol_size));
|
//memset(dl_bf_ch,0,2*(frame_parms->ofdm_symbol_size));
|
||||||
|
|
||||||
if (phy_vars_ue->high_speed_flag==0) // multiply previous channel estimate by ch_est_alpha
|
if (phy_vars_ue->high_speed_flag==0) {
|
||||||
if (frame_parms->Ncp==0)
|
// multiply previous channel estimate by ch_est_alpha
|
||||||
|
if (frame_parms->Ncp==0){
|
||||||
multadd_complex_vector_real_scalar(dl_bf_ch-(frame_parms->ofdm_symbol_size<<1),
|
multadd_complex_vector_real_scalar(dl_bf_ch-(frame_parms->ofdm_symbol_size<<1),
|
||||||
phy_vars_ue->ch_est_alpha,dl_bf_ch-(frame_parms->ofdm_symbol_size<<1),
|
phy_vars_ue->ch_est_alpha,dl_bf_ch-(frame_parms->ofdm_symbol_size<<1),
|
||||||
1,frame_parms->ofdm_symbol_size);
|
1,frame_parms->ofdm_symbol_size);
|
||||||
else
|
} else {
|
||||||
msg("lte_dl_bf_channel_estimation: beamforming channel estimation not supported for TM7 Extended CP.\n"); // phy_vars_ue->ch_est_beta should be defined equaling 1/3
|
msg("lte_dl_bf_channel_estimation: beamforming channel estimation not supported for TM7 Extended CP.\n"); // phy_vars_ue->ch_est_beta should be defined equaling 1/3
|
||||||
|
}
|
||||||
|
}
|
||||||
//estimation and interpolation
|
//estimation and interpolation
|
||||||
|
|
||||||
if ((frame_parms->N_RB_DL&1) == 0) // even number of RBs
|
if ((frame_parms->N_RB_DL&1) == 0) // even number of RBs
|
||||||
@@ -215,7 +218,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
|||||||
|
|
||||||
// For second half of RBs skip DC carrier
|
// For second half of RBs skip DC carrier
|
||||||
if (rb==(frame_parms->N_RB_DL>>1)) {
|
if (rb==(frame_parms->N_RB_DL>>1)) {
|
||||||
rxF = &rxdataF[aarx][(1 + (symbol*(frame_parms->ofdm_symbol_size)))];
|
rxF = (short *)&rxdataF[aarx][(1 + (symbol*(frame_parms->ofdm_symbol_size)))];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rb_alloc_ind==1) {
|
if (rb_alloc_ind==1) {
|
||||||
|
|||||||
@@ -91,14 +91,14 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
@param p antenna index
|
@param p antenna index
|
||||||
@param SS_flag Flag to indicate special subframe
|
@param SS_flag Flag to indicate special subframe
|
||||||
*/
|
*/
|
||||||
int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
|
/*int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
|
||||||
uint8_t UE_id,
|
uint8_t UE_id,
|
||||||
mod_sym_t *output,
|
mod_sym_t *output,
|
||||||
short amp,
|
short amp,
|
||||||
uint8_t Ns,
|
uint8_t Ns,
|
||||||
uint8_t lprime,
|
uint8_t lprime,
|
||||||
uint8_t p,
|
uint8_t p,
|
||||||
int SS_flag);
|
int SS_flag);*/
|
||||||
|
|
||||||
/*! \brief This function generates the MBSFN reference signal sequence (36-211, Sec 6.10.1.2)
|
/*! \brief This function generates the MBSFN reference signal sequence (36-211, Sec 6.10.1.2)
|
||||||
@param phy_vars_eNB Pointer to eNB variables
|
@param phy_vars_eNB Pointer to eNB variables
|
||||||
@@ -128,6 +128,16 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
|||||||
unsigned char l,
|
unsigned char l,
|
||||||
unsigned char p);
|
unsigned char p);
|
||||||
|
|
||||||
|
/*!\brief This function generates the ue-specific reference signal
|
||||||
|
* sequence (36-211, Sec 6.10.3.1) for beamforming channel estimation upon reception
|
||||||
|
@param phy_vars_ue Pointer to UE variables
|
||||||
|
@param output Output vector for OFDM symbol (Frequency Domain)
|
||||||
|
@param Ns Slot number (0..19)
|
||||||
|
@param p antenna port intex
|
||||||
|
@param lprime symbol (0,1)
|
||||||
|
@param SS_flag Flag to indicate special subframe
|
||||||
|
@param nRB_PDSCH number of allocated PDSCH RBs
|
||||||
|
*/
|
||||||
int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
||||||
mod_sym_t *output,
|
mod_sym_t *output,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
int Wbar_NCP[8][4] = {{1,1,1,1},{1,-1,1,-1},{1,1,1,1},{1,-1,1,-1},{1,1,-1,-1},{-1,-1,1,1},{1,-1,-1,1},{-1,1,1,-1}};
|
int Wbar_NCP[8][4] = {{1,1,1,1},{1,-1,1,-1},{1,1,1,1},{1,-1,1,-1},{1,1,-1,-1},{-1,-1,1,1},{1,-1,-1,1},{-1,1,1,-1}};
|
||||||
|
|
||||||
|
/*
|
||||||
int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
|
int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
|
||||||
uint8_t UE_id,
|
uint8_t UE_id,
|
||||||
mod_sym_t *output,
|
mod_sym_t *output,
|
||||||
@@ -62,7 +63,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
int SS_flag)
|
int SS_flag)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* mod_sym_t qpsk[4],nqpsk[4];
|
mod_sym_t qpsk[4],nqpsk[4];
|
||||||
int16_t k=0,a;
|
int16_t k=0,a;
|
||||||
int mprime,ind,ind_dword,ind_qpsk_symb;
|
int mprime,ind,ind_dword,ind_qpsk_symb;
|
||||||
unsigned nushift,kprime;
|
unsigned nushift,kprime;
|
||||||
@@ -126,8 +127,9 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
LOG_E(PHY,"Illegal p %d UE specific pilots\n",p);
|
LOG_E(PHY,"Illegal p %d UE specific pilots\n",p);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(0);*/
|
return(0);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
||||||
@@ -139,7 +141,6 @@ int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
|||||||
uint16_t nRB_PDSCH)
|
uint16_t nRB_PDSCH)
|
||||||
{
|
{
|
||||||
mod_sym_t qpsk[4],nqpsk[4],*qpsk_p,*output_p;
|
mod_sym_t qpsk[4],nqpsk[4],*qpsk_p,*output_p;
|
||||||
int16_t a;
|
|
||||||
int w,mprime,ind,l,ind_dword,ind_qpsk_symb,nPRB;
|
int w,mprime,ind,l,ind_dword,ind_qpsk_symb,nPRB;
|
||||||
short pamp;
|
short pamp;
|
||||||
|
|
||||||
@@ -172,8 +173,6 @@ int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
|||||||
|
|
||||||
output_p = output;
|
output_p = output;
|
||||||
|
|
||||||
//for (lprime=0; lprime<2; lprime++) {
|
|
||||||
|
|
||||||
ind = 3*lprime*phy_vars_ue->lte_frame_parms.N_RB_DL;
|
ind = 3*lprime*phy_vars_ue->lte_frame_parms.N_RB_DL;
|
||||||
l = lprime + ((Ns&1)<<1);
|
l = lprime + ((Ns&1)<<1);
|
||||||
|
|
||||||
@@ -291,7 +290,6 @@ int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
|||||||
output_p++;
|
output_p++;
|
||||||
ind++;
|
ind++;
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
LOG_E(PHY,"Special subframe not supported for UE specific pilots yet\n");
|
LOG_E(PHY,"Special subframe not supported for UE specific pilots yet\n");
|
||||||
}
|
}
|
||||||
@@ -301,7 +299,6 @@ int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
|||||||
output_p = output;
|
output_p = output;
|
||||||
|
|
||||||
if (phy_vars_ue->lte_frame_parms.Ncp == NORMAL) {
|
if (phy_vars_ue->lte_frame_parms.Ncp == NORMAL) {
|
||||||
//for (lprime=0;lprime<4;lprime++) {
|
|
||||||
for (mprime=0;mprime<3*nRB_PDSCH;mprime++) {
|
for (mprime=0;mprime<3*nRB_PDSCH;mprime++) {
|
||||||
|
|
||||||
ind = 3*lprime*nRB_PDSCH+mprime;
|
ind = 3*lprime*nRB_PDSCH+mprime;
|
||||||
@@ -310,10 +307,9 @@ int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
|
|||||||
|
|
||||||
*output_p = qpsk[(phy_vars_ue->lte_gold_uespec_port5_table[Ns][ind_dword]>>(2*ind_qpsk_symb))&3];
|
*output_p = qpsk[(phy_vars_ue->lte_gold_uespec_port5_table[Ns][ind_dword]>>(2*ind_qpsk_symb))&3];
|
||||||
//printf("lprime=%d,ind=%d,Ns=%d,output_p=(%d,%d)\n",lprime,ind,Ns,((short *)&output_p[0])[0],((short *)&output_p[0])[1]);
|
//printf("lprime=%d,ind=%d,Ns=%d,output_p=(%d,%d)\n",lprime,ind,Ns,((short *)&output_p[0])[0],((short *)&output_p[0])[1]);
|
||||||
*output_p++;
|
output_p++;
|
||||||
|
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -145,15 +145,12 @@ void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_t
|
|||||||
void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_t Nid_cell, uint16_t n_rnti)
|
void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_t Nid_cell, uint16_t n_rnti)
|
||||||
{
|
{
|
||||||
|
|
||||||
unsigned char ns,l;
|
unsigned char ns;
|
||||||
unsigned int n,x1,x2;
|
unsigned int n,x1,x2;
|
||||||
|
|
||||||
|
|
||||||
for (ns=0; ns<20; ns++) {
|
for (ns=0; ns<20; ns++) {
|
||||||
|
|
||||||
//for (l=0; l<2; l++) {
|
|
||||||
|
|
||||||
|
|
||||||
x2 = ((((ns>>1)+1)*((Nid_cell<<1)+1))<<16) + n_rnti;
|
x2 = ((((ns>>1)+1)*((Nid_cell<<1)+1))<<16) + n_rnti;
|
||||||
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
||||||
//n = 0
|
//n = 0
|
||||||
@@ -180,7 +177,6 @@ void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_
|
|||||||
//printf("n=%d : c %x\n",n,x1^x2);
|
//printf("n=%d : c %x\n",n,x1^x2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ int dlsch_encoding(unsigned char *a,
|
|||||||
unsigned char mod_order;
|
unsigned char mod_order;
|
||||||
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
|
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
|
||||||
unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
|
unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
|
||||||
uint8_t transmission_mode_7to9=0;
|
uint8_t beamforming_mode=0;
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||||
|
|
||||||
@@ -268,12 +268,12 @@ int dlsch_encoding(unsigned char *a,
|
|||||||
mod_order = get_Qm(dlsch->harq_processes[harq_pid]->mcs);
|
mod_order = get_Qm(dlsch->harq_processes[harq_pid]->mcs);
|
||||||
|
|
||||||
if(dlsch->harq_processes[harq_pid]->mimo_mode == TM7)
|
if(dlsch->harq_processes[harq_pid]->mimo_mode == TM7)
|
||||||
transmission_mode_7to9 = 7;
|
beamforming_mode = 7;
|
||||||
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM8)
|
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM8)
|
||||||
transmission_mode_7to9 = 8;
|
beamforming_mode = 8;
|
||||||
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM9_10)
|
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM9_10)
|
||||||
transmission_mode_7to9 = 9;
|
beamforming_mode = 9;
|
||||||
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,transmission_mode_7to9);
|
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,beamforming_mode);
|
||||||
|
|
||||||
|
|
||||||
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
|
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
|
||||||
|
|||||||
@@ -338,8 +338,6 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
|
|||||||
aarx = frame_parms->nb_antennas_rx;
|
aarx = frame_parms->nb_antennas_rx;
|
||||||
|
|
||||||
if (dlsch0_harq->mimo_mode<LARGE_CDD) {// SISO or ALAMOUTI
|
if (dlsch0_harq->mimo_mode<LARGE_CDD) {// SISO or ALAMOUTI
|
||||||
printf("dlsch compensation: symbol %d, dl_estimates_ext[0][300] %d \n",symbol, *(short*)<e_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[0][300]);
|
|
||||||
printf("dlsch compensation: symbol %d, dl_estimates_ext[0][2400] %d \n",symbol, lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[0][2400]);
|
|
||||||
|
|
||||||
dlsch_channel_compensation(lte_ue_pdsch_vars[eNB_id]->rxdataF_ext,
|
dlsch_channel_compensation(lte_ue_pdsch_vars[eNB_id]->rxdataF_ext,
|
||||||
lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
|
lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
|
||||||
@@ -557,8 +555,6 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
|
|||||||
1);
|
1);
|
||||||
}
|
}
|
||||||
} else if (dlsch0_harq->mimo_mode==TM7) { //TM7
|
} else if (dlsch0_harq->mimo_mode==TM7) { //TM7
|
||||||
printf("dlsch compensation: symbol %d, dl_bf_estimates_ext[0][300] %d \n",symbol, *(short*)<e_ue_pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext[0][300]);
|
|
||||||
printf("dlsch compensation: symbol %d, dl_bf_estimates_ext[0][2400] %d \n",symbol, lte_ue_pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext[0][2400]);
|
|
||||||
|
|
||||||
dlsch_channel_compensation(lte_ue_pdsch_vars[eNB_id]->rxdataF_ext,
|
dlsch_channel_compensation(lte_ue_pdsch_vars[eNB_id]->rxdataF_ext,
|
||||||
lte_ue_pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext,
|
lte_ue_pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext,
|
||||||
@@ -4236,9 +4232,9 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF,
|
|||||||
unsigned short rb,nb_rb=0;
|
unsigned short rb,nb_rb=0;
|
||||||
unsigned char rb_alloc_ind;
|
unsigned char rb_alloc_ind;
|
||||||
unsigned char i,aarx,l,nsymb,skip_half=0,sss_symb,pss_symb=0;
|
unsigned char i,aarx,l,nsymb,skip_half=0,sss_symb,pss_symb=0;
|
||||||
int *dl_ch0,*dl_ch0_ext,*rxF,*rxF_ext,*rxF_uespec;
|
int *dl_ch0,*dl_ch0_ext,*rxF,*rxF_ext;
|
||||||
|
|
||||||
unsigned char symbol_mod,pilots=0,uespec_pilots=0,j=0,k=0,poffset=0,uespec_poffset=0;
|
unsigned char symbol_mod,pilots=0,uespec_pilots=0,j=0,poffset=0,uespec_poffset=0;
|
||||||
int8_t uespec_nushift = frame_parms->Nid_cell%3;
|
int8_t uespec_nushift = frame_parms->Nid_cell%3;
|
||||||
|
|
||||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||||
@@ -4340,7 +4336,7 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF,
|
|||||||
|
|
||||||
} else if (pilots==0 && uespec_pilots==1) {
|
} else if (pilots==0 && uespec_pilots==1) {
|
||||||
j=0;
|
j=0;
|
||||||
k=0;
|
|
||||||
|
|
||||||
for (i=0; i<12; i++){
|
for (i=0; i<12; i++){
|
||||||
if (frame_parms->Ncp==0){
|
if (frame_parms->Ncp==0){
|
||||||
@@ -4519,7 +4515,6 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF,
|
|||||||
} else if(pilots==0 && uespec_pilots==1){
|
} else if(pilots==0 && uespec_pilots==1){
|
||||||
//printf("Extracting with uespec pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half);
|
//printf("Extracting with uespec pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half);
|
||||||
j=0;
|
j=0;
|
||||||
k=0;
|
|
||||||
|
|
||||||
if (skip_half==1) {
|
if (skip_half==1) {
|
||||||
if (frame_parms->Ncp==0){
|
if (frame_parms->Ncp==0){
|
||||||
@@ -4685,7 +4680,6 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF,
|
|||||||
rxF_ext+=10;
|
rxF_ext+=10;
|
||||||
} else if(pilots==0 && uespec_pilots==1) {
|
} else if(pilots==0 && uespec_pilots==1) {
|
||||||
j=0;
|
j=0;
|
||||||
k=0;
|
|
||||||
|
|
||||||
for (i=0; i<6; i++) {
|
for (i=0; i<6; i++) {
|
||||||
if (frame_parms->Ncp==0){
|
if (frame_parms->Ncp==0){
|
||||||
@@ -4881,7 +4875,6 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF,
|
|||||||
}
|
}
|
||||||
} else if(pilots==0 && uespec_pilots==1) {
|
} else if(pilots==0 && uespec_pilots==1) {
|
||||||
j=0;
|
j=0;
|
||||||
k=0;
|
|
||||||
|
|
||||||
if (skip_half==1) {
|
if (skip_half==1) {
|
||||||
if (frame_parms->Ncp==0){
|
if (frame_parms->Ncp==0){
|
||||||
|
|||||||
@@ -916,15 +916,12 @@ break;
|
|||||||
((int16_t*)&tmp_sample1)[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK;
|
((int16_t*)&tmp_sample1)[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK;
|
||||||
*jj = *jj + 1;
|
*jj = *jj + 1;
|
||||||
|
|
||||||
//printf("%d(%d) : %d,%d => ",tti_offset,*jj,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
|
|
||||||
//printf("%d(%d) : %d,%d => ",tti_offset,*jj,((int16_t*)&tmp_sample1)[0],((int16_t*)&tmp_sample1)[1]);
|
//printf("%d(%d) : %d,%d => ",tti_offset,*jj,((int16_t*)&tmp_sample1)[0],((int16_t*)&tmp_sample1)[1]);
|
||||||
for (aa=0; aa<nb_antennas_tx_phy; aa++) {
|
for (aa=0; aa<nb_antennas_tx_phy; aa++) {
|
||||||
((int16_t*)&txdataF[aa][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((uint16_t*)&beamforming_weights[re][aa])[0])>>15);
|
((int16_t*)&txdataF[aa][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((uint16_t*)&beamforming_weights[re][aa])[0])>>15);
|
||||||
((int16_t*)&txdataF[aa][tti_offset])[0] +=-(int16_t)((((int16_t*)&tmp_sample1)[1]*((uint16_t*)&beamforming_weights[re][aa])[1])>>15);
|
((int16_t*)&txdataF[aa][tti_offset])[0] +=-(int16_t)((((int16_t*)&tmp_sample1)[1]*((uint16_t*)&beamforming_weights[re][aa])[1])>>15);
|
||||||
((int16_t*)&txdataF[aa][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((uint16_t*)&beamforming_weights[re][aa])[1])>>15);
|
((int16_t*)&txdataF[aa][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((uint16_t*)&beamforming_weights[re][aa])[1])>>15);
|
||||||
((int16_t*)&txdataF[aa][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*((uint16_t*)&beamforming_weights[re][aa])[0])>>15);
|
((int16_t*)&txdataF[aa][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[1]*((uint16_t*)&beamforming_weights[re][aa])[0])>>15);
|
||||||
/* ((int16_t*)&txdataF[aa][tti_offset])[0] = ((int16_t*)&tmp_sample1)[0];
|
|
||||||
((int16_t*)&txdataF[aa][tti_offset])[1] = ((int16_t*)&tmp_sample1)[1]; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//printf("%d,%d\n",((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
|
//printf("%d,%d\n",((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
|
||||||
@@ -1028,7 +1025,6 @@ break;
|
|||||||
ind_qpsk_symb = ind&0xf;
|
ind_qpsk_symb = ind&0xf;
|
||||||
|
|
||||||
tmp_sample1 = qpsk[(phy_vars_eNB->lte_gold_uespec_port5_table[0][Ns][ind_dword]>>(2*ind_qpsk_symb))&3];
|
tmp_sample1 = qpsk[(phy_vars_eNB->lte_gold_uespec_port5_table[0][Ns][ind_dword]>>(2*ind_qpsk_symb))&3];
|
||||||
//printf("lprime=%d,nb_rb=%d,mprime2=%d,ind=%d,Ns=%d,tmp_sample1=(%d,%d)\n",lprime,dlsch0_harq->nb_rb,mprime2,ind,Ns,((int16_t*)&tmp_sample1)[0],((int16_t*)&tmp_sample1)[1]);
|
|
||||||
|
|
||||||
((int16_t*)&txdataF[aa][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((uint16_t*)&beamforming_weights[re][aa])[0])>>15);
|
((int16_t*)&txdataF[aa][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((uint16_t*)&beamforming_weights[re][aa])[0])>>15);
|
||||||
((int16_t*)&txdataF[aa][tti_offset])[0] +=-(int16_t)((((int16_t*)&tmp_sample1)[1]*((uint16_t*)&beamforming_weights[re][aa])[1])>>15);
|
((int16_t*)&txdataF[aa][tti_offset])[0] +=-(int16_t)((((int16_t*)&tmp_sample1)[1]*((uint16_t*)&beamforming_weights[re][aa])[1])>>15);
|
||||||
@@ -1037,12 +1033,12 @@ break;
|
|||||||
|
|
||||||
// ((int16_t*)&txdataF[aa][tti_offset])[0] = 0xffff;
|
// ((int16_t*)&txdataF[aa][tti_offset])[0] = 0xffff;
|
||||||
// ((int16_t*)&txdataF[aa][tti_offset])[1] = 0xffff;
|
// ((int16_t*)&txdataF[aa][tti_offset])[1] = 0xffff;
|
||||||
|
//printf("lprime=%d,nb_rb=%d,mprime2=%d,ind=%d,Ns=%d\n",lprime,dlsch0_harq->nb_rb,mprime2,ind,Ns);
|
||||||
|
//printf("tmp_sample1=(%d,%d)\n",((int16_t*)&tmp_sample1)[0],((int16_t*)&tmp_sample1)[1]);
|
||||||
|
//printf("beamforing_weights[%d][%d]=(%d,%d)\n",re,aa,((int16_t*)&beamforming_weights[re][aa])[0],((int16_t*)&beamforming_weights[re][aa])[1]);
|
||||||
|
//printf("txdataF[%d][%d]= (%d,%d)\n ",aa,tti_offset,((int16_t*)&txdataF[aa][tti_offset])[0],((int16_t*)&txdataF[aa][tti_offset])[1]);
|
||||||
|
|
||||||
//printf("tmp_sample1=%d+i%d\n",((int16_t*)&tmp_sample1)[0],((int16_t*)&tmp_sample1)[1]);
|
mprime2++;
|
||||||
//printf("beamforing_weights[%d][%d]=%d+i%d\n",re,aa,((int16_t*)&beamforming_weights[re][aa])[0],((int16_t*)&beamforming_weights[re][aa])[1]);
|
|
||||||
//printf("txdataF[%d][%d]= %d+i%d\n ",aa,tti_offset,((int16_t*)&txdataF[aa][tti_offset])[0],((int16_t*)&txdataF[aa][tti_offset])[1]);
|
|
||||||
|
|
||||||
mprime2 = mprime2++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1284,7 +1280,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
uint16_t l,rb,re_offset;
|
uint16_t l,rb,re_offset;
|
||||||
uint32_t rb_alloc_ind;
|
uint32_t rb_alloc_ind;
|
||||||
uint32_t *rb_alloc = dlsch0_harq->rb_alloc;
|
uint32_t *rb_alloc = dlsch0_harq->rb_alloc;
|
||||||
uint8_t pilots=0,ue_spec_rs=0;
|
uint8_t pilots=0;
|
||||||
uint8_t skip_dc,skip_half;
|
uint8_t skip_dc,skip_half;
|
||||||
uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs);
|
uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs);
|
||||||
uint8_t mod_order1 = 0;
|
uint8_t mod_order1 = 0;
|
||||||
@@ -1293,7 +1289,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];
|
int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];
|
||||||
int16_t *qam_table_s0,*qam_table_s1;
|
int16_t *qam_table_s0,*qam_table_s1;
|
||||||
MIMO_mode_t mimo_mode = dlsch0_harq->mimo_mode;
|
MIMO_mode_t mimo_mode = dlsch0_harq->mimo_mode;
|
||||||
uint8_t beamforming_mode = 0;
|
|
||||||
int32_t **beamforming_weights_RB = beamforming_weights;
|
int32_t **beamforming_weights_RB = beamforming_weights;
|
||||||
uint8_t mprime=0,Ns;
|
uint8_t mprime=0,Ns;
|
||||||
int8_t lprime=-1;
|
int8_t lprime=-1;
|
||||||
@@ -1377,7 +1372,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(mimo_mode==TM7){ //36.211 V8.6.0 2009-03
|
if(mimo_mode==TM7){ //36.211 V8.6.0 2009-03
|
||||||
beamforming_mode = 7;
|
|
||||||
mprime = 0;
|
mprime = 0;
|
||||||
if (frame_parms->Ncp==0) { // normal prefix
|
if (frame_parms->Ncp==0) { // normal prefix
|
||||||
if (l==12)
|
if (l==12)
|
||||||
@@ -1400,10 +1394,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
|||||||
else
|
else
|
||||||
lprime=-1;
|
lprime=-1;
|
||||||
}
|
}
|
||||||
}else if(mimo_mode==TM8){
|
|
||||||
beamforming_mode = 8;
|
|
||||||
}else if(mimo_mode==TM9_10){
|
|
||||||
beamforming_mode = 9;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ns = 2*subframe_offset+(l>=(nsymb>>1));
|
Ns = 2*subframe_offset+(l>=(nsymb>>1));
|
||||||
|
|||||||
@@ -921,6 +921,27 @@ uint16_t dlsch_extract_rbs_dual(int32_t **rxdataF,
|
|||||||
uint32_t high_speed_flag,
|
uint32_t high_speed_flag,
|
||||||
LTE_DL_FRAME_PARMS *frame_parms);
|
LTE_DL_FRAME_PARMS *frame_parms);
|
||||||
|
|
||||||
|
/** \fn dlsch_extract_rbs_TM7(int32_t **rxdataF,
|
||||||
|
int32_t **dl_bf_ch_estimates,
|
||||||
|
int32_t **rxdataF_ext,
|
||||||
|
int32_t **dl_bf_ch_estimates_ext,
|
||||||
|
uint32_t *rb_alloc,
|
||||||
|
uint8_t symbol,
|
||||||
|
uint8_t subframe,
|
||||||
|
uint32_t high_speed_flag,
|
||||||
|
LTE_DL_FRAME_PARMS *frame_parms)
|
||||||
|
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
|
||||||
|
for the current allocation and for single antenna eNB transmission.
|
||||||
|
@param rxdataF Raw FFT output of received signal
|
||||||
|
@param dl_bf_ch_estimates Beamforming channel estimates of current slot
|
||||||
|
@param rxdataF_ext FFT output for RBs in this allocation
|
||||||
|
@param dl_bf_ch_estimates_ext Beamforming channel estimates for RBs in this allocation
|
||||||
|
@param rb_alloc RB allocation vector
|
||||||
|
@param symbol Symbol to extract
|
||||||
|
@param subframe Subframe number
|
||||||
|
@param high_speed_flag
|
||||||
|
@param frame_parms Pointer to frame descriptor
|
||||||
|
*/
|
||||||
uint16_t dlsch_extract_rbs_TM7(int32_t **rxdataF,
|
uint16_t dlsch_extract_rbs_TM7(int32_t **rxdataF,
|
||||||
int32_t **dl_bf_ch_estimates,
|
int32_t **dl_bf_ch_estimates,
|
||||||
int32_t **rxdataF_ext,
|
int32_t **rxdataF_ext,
|
||||||
|
|||||||
Reference in New Issue
Block a user