Commit b188a5cf authored by Raymond Knopp's avatar Raymond Knopp

changed threading (acqusition is slot based). removal of eNB_thread. timing...

changed threading (acqusition is slot based). removal of eNB_thread. timing all based on received timestamp.
parent 3cfbb768
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -25,7 +25,7 @@ void lte_param_init(unsigned char N_tx,
uint32_t perfect_ce)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
LTE_DL_FRAME_PARMS *frame_parms;
int i;
......@@ -39,64 +39,64 @@ void lte_param_init(unsigned char N_tx,
randominit(0);
set_taus_seed(0);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->threequarter_fs = threequarter_fs;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Ncp_UL = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->nb_antennas_tx_eNB = N_tx;
lte_frame_parms->phich_config_common.phich_resource = one;
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;44
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
// phy_init_top(lte_frame_parms); //allocation
frame_parms = &(PHY_vars_eNB->frame_parms);
frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
frame_parms->N_RB_UL = N_RB_DL;
frame_parms->threequarter_fs = threequarter_fs;
frame_parms->Ncp = extended_prefix_flag;
frame_parms->Ncp_UL = extended_prefix_flag;
frame_parms->Nid_cell = Nid_cell;
frame_parms->nushift = Nid_cell%6;
frame_parms->nb_antennas_tx = N_tx;
frame_parms->nb_antennas_rx = N_rx;
frame_parms->nb_antennas_tx_eNB = N_tx;
frame_parms->phich_config_common.phich_resource = one;
frame_parms->tdd_config = tdd_config;
frame_parms->frame_type = frame_type;
// frame_parms->Csrs = 2;
// frame_parms->Bsrs = 0;
// frame_parms->kTC = 0;44
// frame_parms->n_RRC = 0;
frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(frame_parms,osf);
//copy_lte_parms_to_phy_framing(frame_parms, &(PHY_config->PHY_framing));
// phy_init_top(frame_parms); //allocation
PHY_vars_UE->is_secondary_ue = 0;
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
PHY_vars_eNB->lte_frame_parms = *lte_frame_parms;
PHY_vars_UE->frame_parms = *frame_parms;
PHY_vars_eNB->frame_parms = *frame_parms;
phy_init_lte_top(lte_frame_parms);
dump_frame_parms(lte_frame_parms);
phy_init_lte_top(frame_parms);
dump_frame_parms(frame_parms);
PHY_vars_UE->PHY_measurements.n_adj_cells=0;
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
PHY_vars_UE->measurements.n_adj_cells=0;
PHY_vars_UE->measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->measurements.adj_cell_id[1] = Nid_cell+2;
for (i=0; i<3; i++)
lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
lte_gold(frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
generate_pcfich_reg_mapping(&PHY_vars_UE->frame_parms);
generate_phich_reg_mapping(&PHY_vars_UE->frame_parms);
// DL power control init
if (transmission_mode == 1) {
PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 0;
((PHY_vars_eNB->frame_parms).pdsch_config_common).p_b = 0;
PHY_vars_UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 0;
((PHY_vars_UE->frame_parms).pdsch_config_common).p_b = 0;
} else { // rho_a = rhob
PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 1;
((PHY_vars_eNB->frame_parms).pdsch_config_common).p_b = 1;
PHY_vars_UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 1;
((PHY_vars_UE->frame_parms).pdsch_config_common).p_b = 1;
}
PHY_vars_UE->perfect_ce = perfect_ce;
......
......@@ -36,7 +36,7 @@ extern int card;
#endif
void
phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint32_t rx_power_fil_dB, uint8_t eNB_id)
phy_adjust_gain (PHY_VARS_UE *ue, uint32_t rx_power_fil_dB, uint8_t eNB_id)
{
#ifdef EXMIMO
......@@ -46,72 +46,72 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint32_t rx_power_fil_dB, uint8_t eNB
LOG_D(PHY,"Gain control: rssi %d (%d,%d)\n",
rx_power_fil_dB,
phy_vars_ue->PHY_measurements.rssi,
phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id]
ue->measurements.rssi,
ue->measurements.rx_power_avg_dB[eNB_id]
);
// Gain control with hysterisis
// Adjust gain in phy_vars_ue->rx_vars[0].rx_total_gain_dB
// Adjust gain in ue->rx_vars[0].rx_total_gain_dB
if (rx_power_fil_dB < TARGET_RX_POWER - 5) //&& (phy_vars_ue->rx_total_gain_dB < MAX_RF_GAIN) )
phy_vars_ue->rx_total_gain_dB+=5;
else if (rx_power_fil_dB > TARGET_RX_POWER + 5) //&& (phy_vars_ue->rx_total_gain_dB > MIN_RF_GAIN) )
phy_vars_ue->rx_total_gain_dB-=5;
if (rx_power_fil_dB < TARGET_RX_POWER - 5) //&& (ue->rx_total_gain_dB < MAX_RF_GAIN) )
ue->rx_total_gain_dB+=5;
else if (rx_power_fil_dB > TARGET_RX_POWER + 5) //&& (ue->rx_total_gain_dB > MIN_RF_GAIN) )
ue->rx_total_gain_dB-=5;
if (phy_vars_ue->rx_total_gain_dB>MAX_RF_GAIN) {
if (ue->rx_total_gain_dB>MAX_RF_GAIN) {
/*
if ((openair_daq_vars.rx_rf_mode==0) && (openair_daq_vars.mode == openair_NOT_SYNCHED)) {
openair_daq_vars.rx_rf_mode=1;
phy_vars_ue->rx_total_gain_dB = max(MIN_RF_GAIN,MAX_RF_GAIN-25);
ue->rx_total_gain_dB = max(MIN_RF_GAIN,MAX_RF_GAIN-25);
}
else {
*/
phy_vars_ue->rx_total_gain_dB = MAX_RF_GAIN;
} else if (phy_vars_ue->rx_total_gain_dB<MIN_RF_GAIN) {
ue->rx_total_gain_dB = MAX_RF_GAIN;
} else if (ue->rx_total_gain_dB<MIN_RF_GAIN) {
/*
if ((openair_daq_vars.rx_rf_mode==1) && (openair_daq_vars.mode == openair_NOT_SYNCHED)) {
openair_daq_vars.rx_rf_mode=0;
phy_vars_ue->rx_total_gain_dB = min(MAX_RF_GAIN,MIN_RF_GAIN+25);
ue->rx_total_gain_dB = min(MAX_RF_GAIN,MIN_RF_GAIN+25);
}
else {
*/
phy_vars_ue->rx_total_gain_dB = MIN_RF_GAIN;
ue->rx_total_gain_dB = MIN_RF_GAIN;
}
LOG_D(PHY,"Gain control: rx_total_gain_dB = %d (max %d,rxpf %d)\n",phy_vars_ue->rx_total_gain_dB,MAX_RF_GAIN,rx_power_fil_dB);
LOG_D(PHY,"Gain control: rx_total_gain_dB = %d (max %d,rxpf %d)\n",ue->rx_total_gain_dB,MAX_RF_GAIN,rx_power_fil_dB);
#ifdef EXMIMO
if (phy_vars_ue->rx_total_gain_dB>phy_vars_ue->rx_gain_max[0]) {
phy_vars_ue->rx_total_gain_dB = phy_vars_ue->rx_gain_max[0];
if (ue->rx_total_gain_dB>ue->rx_gain_max[0]) {
ue->rx_total_gain_dB = ue->rx_gain_max[0];
for (i=0; i<phy_vars_ue->lte_frame_parms.nb_antennas_rx; i++) {
for (i=0; i<ue->frame_parms.nb_antennas_rx; i++) {
p_exmimo_config->rf.rx_gain[i][0] = 30;
}
} else if (phy_vars_ue->rx_total_gain_dB<(phy_vars_ue->rx_gain_max[0]-30)) {
} else if (ue->rx_total_gain_dB<(ue->rx_gain_max[0]-30)) {
// for the moment we stay in max gain mode
phy_vars_ue->rx_total_gain_dB = phy_vars_ue->rx_gain_max[0] - 30;
ue->rx_total_gain_dB = ue->rx_gain_max[0] - 30;
for (i=0; i<phy_vars_ue->lte_frame_parms.nb_antennas_rx; i++) {
for (i=0; i<ue->frame_parms.nb_antennas_rx; i++) {
p_exmimo_config->rf.rx_gain[i][0] = 0;
}
/*
phy_vars_ue->rx_gain_mode[0] = byp;
phy_vars_ue->rx_gain_mode[1] = byp;
ue->rx_gain_mode[0] = byp;
ue->rx_gain_mode[1] = byp;
exmimo_pci_interface->rf.rf_mode0 = 22991; //bypass
exmimo_pci_interface->rf.rf_mode1 = 22991; //bypass
if (phy_vars_ue->rx_total_gain_dB<(phy_vars_ue->rx_gain_byp[0]-50)) {
if (ue->rx_total_gain_dB<(ue->rx_gain_byp[0]-50)) {
exmimo_pci_interface->rf.rx_gain00 = 0;
exmimo_pci_interface->rf.rx_gain10 = 0;
}
*/
} else {
for (i=0; i<phy_vars_ue->lte_frame_parms.nb_antennas_rx; i++) {
p_exmimo_config->rf.rx_gain[i][0] = 30 - phy_vars_ue->rx_gain_max[0] + phy_vars_ue->rx_total_gain_dB;
for (i=0; i<ue->frame_parms.nb_antennas_rx; i++) {
p_exmimo_config->rf.rx_gain[i][0] = 30 - ue->rx_gain_max[0] + ue->rx_total_gain_dB;
}
}
......@@ -119,28 +119,28 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint32_t rx_power_fil_dB, uint8_t eNB
break;
case med_gain:
case byp_gain:
if (phy_vars_ue->rx_total_gain_dB>phy_vars_ue->rx_gain_byp[0]) {
phy_vars_ue->rx_gain_mode[0] = max_gain;
phy_vars_ue->rx_gain_mode[1] = max_gain;
if (ue->rx_total_gain_dB>ue->rx_gain_byp[0]) {
ue->rx_gain_mode[0] = max_gain;
ue->rx_gain_mode[1] = max_gain;
exmimo_pci_interface->rf.rf_mode0 = 55759; //max gain
exmimo_pci_interface->rf.rf_mode1 = 55759; //max gain
if (phy_vars_ue->rx_total_gain_dB>phy_vars_ue->rx_gain_max[0]) {
if (ue->rx_total_gain_dB>ue->rx_gain_max[0]) {
exmimo_pci_interface->rf.rx_gain00 = 50;
exmimo_pci_interface->rf.rx_gain10 = 50;
}
else {
exmimo_pci_interface->rf.rx_gain00 = 50 - phy_vars_ue->rx_gain_max[0] + phy_vars_ue->rx_total_gain_dB;
exmimo_pci_interface->rf.rx_gain10 = 50 - phy_vars_ue->rx_gain_max[1] + phy_vars_ue->rx_total_gain_dB;
exmimo_pci_interface->rf.rx_gain00 = 50 - ue->rx_gain_max[0] + ue->rx_total_gain_dB;
exmimo_pci_interface->rf.rx_gain10 = 50 - ue->rx_gain_max[1] + ue->rx_total_gain_dB;
}
}
else if (phy_vars_ue->rx_total_gain_dB<(phy_vars_ue->rx_gain_byp[0]-50)) {
else if (ue->rx_total_gain_dB<(ue->rx_gain_byp[0]-50)) {
exmimo_pci_interface->rf.rx_gain00 = 0;
exmimo_pci_interface->rf.rx_gain10 = 0;
}
else {
exmimo_pci_interface->rf.rx_gain00 = 50 - phy_vars_ue->rx_gain_byp[0] + phy_vars_ue->rx_total_gain_dB;
exmimo_pci_interface->rf.rx_gain10 = 50 - phy_vars_ue->rx_gain_byp[1] + phy_vars_ue->rx_total_gain_dB;
exmimo_pci_interface->rf.rx_gain00 = 50 - ue->rx_gain_byp[0] + ue->rx_total_gain_dB;
exmimo_pci_interface->rf.rx_gain10 = 50 - ue->rx_gain_byp[1] + ue->rx_total_gain_dB;
}
break;
default:
......@@ -152,9 +152,9 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint32_t rx_power_fil_dB, uint8_t eNB
#endif
#ifdef DEBUG_PHY
/* if ((phy_vars_ue->frame%100==0) || (phy_vars_ue->frame < 10))
/* if ((ue->frame%100==0) || (ue->frame < 10))
msg("[PHY][ADJUST_GAIN] frame %d, rx_power = %d, rx_power_fil = %d, rx_power_fil_dB = %d, coef=%d, ncoef=%d, rx_total_gain_dB = %d (%d,%d,%d)\n",
phy_vars_ue->frame,rx_power,rx_power_fil,rx_power_fil_dB,coef,ncoef,phy_vars_ue->rx_total_gain_dB,
ue->frame,rx_power,rx_power_fil,rx_power_fil_dB,coef,ncoef,ue->rx_total_gain_dB,
TARGET_RX_POWER,MAX_RF_GAIN,MIN_RF_GAIN);
*/
#endif //DEBUG_PHY
......
......@@ -37,7 +37,7 @@
// last channel estimate of the receiver
void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_UE *phy_vars_ue,
PHY_VARS_UE *ue,
unsigned char eNB_id,
unsigned char clear,
short coef)
......@@ -51,7 +51,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
ncoef = 32767 - coef;
#ifdef DEBUG_PHY
LOG_D(PHY,"frame %d, slot %d: rx_offset (before) = %d\n",phy_vars_ue->frame_rx,phy_vars_ue->slot_rx,phy_vars_ue->rx_offset);
LOG_D(PHY,"frame %d, slot %d: rx_offset (before) = %d\n",ue->frame_rx,ue->slot_rx,ue->rx_offset);
#endif //DEBUG_PHY
......@@ -60,8 +60,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
Im = ((int16_t*)phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
Re = ((int16_t*)ue->common_vars.dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
Im = ((int16_t*)ue->common_vars.dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
temp += (Re*Re/2) + (Im*Im/2);
}
......@@ -81,21 +81,21 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
diff = max_pos_fil - frame_parms->nb_prefix_samples/8;
if ( diff > SYNCH_HYST )
phy_vars_ue->rx_offset++;
ue->rx_offset++;
else if (diff < -SYNCH_HYST)
phy_vars_ue->rx_offset--;
ue->rx_offset--;
if ( phy_vars_ue->rx_offset < 0 )
phy_vars_ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
if ( ue->rx_offset < 0 )
ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
if ( phy_vars_ue->rx_offset >= FRAME_LENGTH_COMPLEX_SAMPLES )
phy_vars_ue->rx_offset -= FRAME_LENGTH_COMPLEX_SAMPLES;
if ( ue->rx_offset >= FRAME_LENGTH_COMPLEX_SAMPLES )
ue->rx_offset -= FRAME_LENGTH_COMPLEX_SAMPLES;
#ifdef DEBUG_PHY
LOG_D(PHY,"frame %d: rx_offset (after) = %d : max_pos = %d,max_pos_fil = %d (peak %d)\n",
phy_vars_ue->frame_rx,phy_vars_ue->rx_offset,max_pos,max_pos_fil,temp);
ue->frame_rx,ue->rx_offset,max_pos,max_pos_fil,temp);
#endif //DEBUG_PHY
......@@ -103,7 +103,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
LTE_eNB_SRS *lte_eNb_srs,
LTE_eNB_SRS *lte_eNB_srs,
unsigned int *eNB_id,
unsigned char clear,
unsigned char number_of_cards,
......@@ -133,23 +133,23 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
// do ifft of channel estimate
switch(frame_parms->N_RB_DL) {
case 6:
dft128((int16_t*) &lte_eNb_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNb_srs->srs_ch_estimates_time[ind][aa],
dft128((int16_t*) &lte_eNB_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[ind][aa],
1);
break;
case 25:
dft512((int16_t*) &lte_eNb_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNb_srs->srs_ch_estimates_time[ind][aa],
dft512((int16_t*) &lte_eNB_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[ind][aa],
1);
break;
case 50:
dft1024((int16_t*) &lte_eNb_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNb_srs->srs_ch_estimates_time[ind][aa],
dft1024((int16_t*) &lte_eNB_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[ind][aa],
1);
break;
case 100:
dft2048((int16_t*) &lte_eNb_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNb_srs->srs_ch_estimates_time[ind][aa],
dft2048((int16_t*) &lte_eNB_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[ind][aa],
1);
break;
}
......@@ -157,7 +157,7 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
#ifdef DEBUG_PHY
sprintf(fname,"srs_ch_estimates_time_%d%d.m",ind,aa);
sprintf(vname,"srs_time_%d%d",ind,aa);
write_output(fname,vname,lte_eNb_srs->srs_ch_estimates_time[ind][aa],frame_parms->ofdm_symbol_size*2,2,1);
write_output(fname,vname,lte_eNB_srs->srs_ch_estimates_time[ind][aa],frame_parms->ofdm_symbol_size*2,2,1);
#endif
#endif
}
......@@ -168,8 +168,8 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)lte_eNb_srs->srs_ch_estimates_time[ind][aa])[(i<<1)];
Im = ((int16_t*)lte_eNb_srs->srs_ch_estimates_time[ind][aa])[1+(i<<1)];
Re = ((int16_t*)lte_eNB_srs->srs_ch_estimates_time[ind][aa])[(i<<1)];
Im = ((int16_t*)lte_eNB_srs->srs_ch_estimates_time[ind][aa])[1+(i<<1)];
temp += (Re*Re/2) + (Im*Im/2);
}
......@@ -195,7 +195,7 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
}
int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,uint8_t UE_id,uint8_t sched_subframe)
int lte_est_timing_advance_pusch(PHY_VARS_eNB* eNB,uint8_t UE_id,uint8_t thread_id)
{
static int first_run=1;
static int max_pos_fil2=0;
......@@ -203,8 +203,8 @@ int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,uint8_t UE_id,uint8_
short Re,Im,coef=24576;
short ncoef = 32768 - coef;
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];
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
LTE_eNB_PUSCH *eNB_pusch_vars = eNB->pusch_vars[UE_id];
int32_t **ul_ch_estimates_time= eNB_pusch_vars->drs_ch_estimates_time[0];
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);
......@@ -236,7 +236,7 @@ int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,uint8_t UE_id,uint8_
max_pos_fil2 = ((max_pos_fil2 * coef) + (max_pos * ncoef)) >> 15;
#ifdef DEBUG_PHY
LOG_D(PHY,"frame %d: max_pos = %d, max_pos_fil = %d, sync_pos=%d\n",phy_vars_eNB->proc[sched_subframe].frame_rx,max_pos,max_pos_fil2,sync_pos);
LOG_D(PHY,"frame %d: max_pos = %d, max_pos_fil = %d, sync_pos=%d\n",eNB->proc[thread_id].frame_rx,max_pos,max_pos_fil2,sync_pos);
#endif //DEBUG_PHY
return(max_pos_fil2-sync_pos);
......
......@@ -82,7 +82,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
//compute frequency-domain representation of 6144-sample chunk
rxp = &ue->lte_ue_common_vars.rxdata[0][i];
rxp = &ue->common_vars.rxdata[0][i];
sp=spectrum;
while (1) {
......@@ -341,8 +341,8 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
} // loop on pss index
}
if (rxp == &ue->lte_ue_common_vars.rxdata[0][i+38400*4]) {
rxp = &ue->lte_ue_common_vars.rxdata[0][i+38400*4];
if (rxp == &ue->common_vars.rxdata[0][i+38400*4]) {
rxp = &ue->common_vars.rxdata[0][i+38400*4];
sp=spectrum_p5ms;
} else {
break;
......
......@@ -52,29 +52,29 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
#define SCALE 0x3FFF
int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
uint8_t eNB_id,
uint8_t UE_id,
uint8_t sched_subframe,
uint8_t thread_id,
unsigned char l,
unsigned char Ns,
uint8_t cooperation_flag)
{
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=eNB_pusch_vars->drs_ch_estimates[eNB_id];
int32_t **ul_ch_estimates_time= eNB_pusch_vars->drs_ch_estimates_time[eNB_id];
int32_t **ul_ch_estimates_0= eNB_pusch_vars->drs_ch_estimates_0[eNB_id];
int32_t **ul_ch_estimates_1= eNB_pusch_vars->drs_ch_estimates_1[eNB_id];
int32_t **rxdataF_ext= eNB_pusch_vars->rxdataF_ext[eNB_id];
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx;
uint8_t harq_pid = subframe2harq_pid(frame_parms,phy_vars_eNB->proc[sched_subframe].frame_rx,subframe);
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
LTE_eNB_PUSCH *pusch_vars = eNB->pusch_vars[UE_id];
int32_t **ul_ch_estimates=pusch_vars->drs_ch_estimates[eNB_id];
int32_t **ul_ch_estimates_time= pusch_vars->drs_ch_estimates_time[eNB_id];
int32_t **ul_ch_estimates_0= pusch_vars->drs_ch_estimates_0[eNB_id];
int32_t **ul_ch_estimates_1= pusch_vars->drs_ch_estimates_1[eNB_id];
int32_t **rxdataF_ext= pusch_vars->rxdataF_ext[eNB_id];
int subframe = eNB->proc[thread_id].subframe_rx;
uint8_t harq_pid = subframe2harq_pid(frame_parms,eNB->proc[thread_id].frame_rx,subframe);
int16_t delta_phase = 0;
int16_t *ru1 = ru_90;
int16_t *ru2 = ru_90;
int16_t current_phase1,current_phase2;
uint16_t N_rb_alloc = phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->nb_rb;
uint16_t N_rb_alloc = eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb;
uint16_t aa,Msc_RS,Msc_RS_idx;
uint16_t * Msc_idx_ptr;
int k,pilot_pos1 = 3 - frame_parms->Ncp, pilot_pos2 = 10 - 2*frame_parms->Ncp;
......@@ -116,7 +116,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
Msc_RS = N_rb_alloc*12;
cyclic_shift = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
#if defined(USER_MODE)
......@@ -669,11 +669,11 @@ extern uint16_t transmission_offset_tdd[16];
#define DEBUG_SRS
int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
LTE_eNB_COMMON *eNb_common_vars,
LTE_eNB_SRS *eNb_srs_vars,
LTE_eNB_COMMON *common_vars,
LTE_eNB_SRS *srs_vars,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
unsigned char sub_frame_number,
unsigned char eNb_id)
unsigned char eNB_id)
{
int T_SFC,aa;
......@@ -690,7 +690,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
T_SFC = (Ssrs<=7 ? 5 : 10);
/*
msg("SRS channel estimation eNb %d, subframs %d, %d %d %d %d %d\n",eNb_id,sub_frame_number,
msg("SRS channel estimation eNB %d, subframs %d, %d %d %d %d %d\n",eNB_id,sub_frame_number,
SRS_parms->Csrs,
SRS_parms->Bsrs,
SRS_parms->kTC,
......@@ -702,34 +702,34 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
if (generate_srs_rx(frame_parms,
soundingrs_ul_config_dedicated,
eNb_srs_vars->srs)==-1) {
srs_vars->srs)==-1) {
msg("lte_srs_channel_estimation: Error in generate_srs_rx\n");
return(-1);
}
for (aa=0; aa<nb_antennas_rx; aa++) {
#ifdef DEBUG_SRS
msg("SRS channel estimation eNb %d, subframs %d, aarx %d, %p, %p, %p\n",eNb_id,sub_frame_number,aa,
&eNb_common_vars->rxdataF[eNb_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
eNb_srs_vars->srs,
eNb_srs_vars->srs_ch_estimates[eNb_id][aa]);
msg("SRS channel estimation eNB %d, subframs %d, aarx %d, %p, %p, %p\n",eNB_id,sub_frame_number,aa,
&common_vars->rxdataF[eNB_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
srs_vars->srs,
srs_vars->srs_ch_estimates[eNB_id][aa]);
#endif
//write_output("eNb_rxF.m","rxF",&eNb_common_vars->rxdataF[0][aa][2*frame_parms->ofdm_symbol_size*symbol],2*(frame_parms->ofdm_symbol_size),2,1);
//write_output("eNb_srs.m","srs_eNb",eNb_common_vars->srs,(frame_parms->ofdm_symbol_size),1,1);
//write_output("eNB_rxF.m","rxF",&common_vars->rxdataF[0][aa][2*frame_parms->ofdm_symbol_size*symbol],2*(frame_parms->ofdm_symbol_size),2,1);
//write_output("eNB_srs.m","srs_eNB",common_vars->srs,(frame_parms->ofdm_symbol_size),1,1);
mult_cpx_conj_vector((int16_t*) &eNb_common_vars->rxdataF[eNb_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
(int16_t*) eNb_srs_vars->srs,
(int16_t*) eNb_srs_vars->srs_ch_estimates[eNb_id][aa],
mult_cpx_conj_vector((int16_t*) &common_vars->rxdataF[eNB_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
(int16_t*) srs_vars->srs,
(int16_t*) srs_vars->srs_ch_estimates[eNB_id][aa],
frame_parms->ofdm_symbol_size,
15);
//msg("SRS channel estimation cmult out\n");
#ifdef USER_MODE
#ifdef DEBUG_SRS
sprintf(fname,"eNB_id%d_an%d_srs_ch_est.m",eNb_id,aa);
sprintf(vname,"eNB%d_%d_srs_ch_est",eNb_id,aa);
write_output(fname,vname,eNb_srs_vars->srs_ch_estimates[eNb_id][aa],frame_parms->ofdm_symbol_size,1,1);
sprintf(fname,"eNB_id%d_an%d_srs_ch_est.m",eNB_id,aa);
sprintf(vname,"eNB%d_%d_srs_ch_est",eNB_id,aa);
write_output(fname,vname,srs_vars->srs_ch_estimates[eNB_id][aa],frame_parms->ofdm_symbol_size,1,1);
#endif
#endif
}
......@@ -738,7 +738,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
/*
else {
for (aa=0;aa<nb_antennas_rx;aa++)
bzero(eNb_srs_vars->srs_ch_estimates[eNb_id][aa],frame_parms->ofdm_symbol_size*sizeof(int));
bzero(srs_vars->srs_ch_estimates[eNB_id][aa],frame_parms->ofdm_symbol_size*sizeof(int));
}
*/
return(0);
......
......@@ -40,7 +40,7 @@
//Calibration
int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
int lte_dl_cell_spec_SS(PHY_VARS_eNB *eNB,
int32_t *output,
short amp,
unsigned char Ns,
......@@ -76,27 +76,27 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
return(-1);
}
mprime = 110 - phy_vars_eNB->lte_frame_parms.N_RB_DL;
mprime = 110 - eNB->frame_parms.N_RB_DL;
k = (nu + phy_vars_eNB->lte_frame_parms.nushift);
k = (nu + eNB->frame_parms.nushift);
if (k > 6)//b
k -=6;//b
k+=phy_vars_eNB->lte_frame_parms.first_carrier_offset;
k+=eNB->frame_parms.first_carrier_offset;
for (m=0; m<phy_vars_eNB->lte_frame_parms.N_RB_DL<<1; m++) { // loop over pilots in one slot/symbol, 2*N_RB_DL pilots
for (m=0; m<eNB->frame_parms.N_RB_DL<<1; m++) { // loop over pilots in one slot/symbol, 2*N_RB_DL pilots
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
output[k] = qpsk[(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
//output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
printf("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
printf("index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif
mprime++;
......@@ -108,9 +108,9 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
#endif
k+=6;//b
if (k >= phy_vars_eNB->lte_frame_parms.ofdm_symbol_size) {
if (k >= eNB->frame_parms.ofdm_symbol_size) {
k++; // skip DC carrier
k-=phy_vars_eNB->lte_frame_parms.ofdm_symbol_size;
k-=eNB->frame_parms.ofdm_symbol_size;
}
// printf("** k %d\n",k);
......@@ -120,7 +120,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
}
int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
int lte_dl_cell_spec(PHY_VARS_eNB *eNB,
int32_t *output,
short amp,
unsigned char Ns,
......@@ -155,31 +155,31 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
return(-1);
}
mprime = 110 - phy_vars_eNB->lte_frame_parms.N_RB_DL;
mprime = 110 - eNB->frame_parms.N_RB_DL;
k = (nu + phy_vars_eNB->lte_frame_parms.nushift);
k = (nu + eNB->frame_parms.nushift);
if (k > 5)
k -=6;
k+=phy_vars_eNB->lte_frame_parms.first_carrier_offset;
k+=eNB->frame_parms.first_carrier_offset;
DevAssert( Ns < 20 );
DevAssert( l < 2 );
DevAssert( mprime>>4 < 14 );
for (m=0; m<phy_vars_eNB->lte_frame_parms.N_RB_DL<<1; m++) {
for (m=0; m<eNB->frame_parms.N_RB_DL<<1; m++) {
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
output[k] = qpsk[(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
//output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
printf("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
printf("index = %d (k %d)\n",(eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif
mprime++;
......@@ -191,9 +191,9 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
#endif
k+=6;
if (k >= phy_vars_eNB->lte_frame_parms.ofdm_symbol_size) {
if (k >= eNB->frame_parms.ofdm_symbol_size) {
k++; // skip DC carrier
k-=phy_vars_eNB->lte_frame_parms.ofdm_symbol_size;
k-=eNB->frame_parms.ofdm_symbol_size;
}
// printf("** k %d\n",k);
......@@ -202,7 +202,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
return(0);
}
int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
int lte_dl_cell_spec_rx(PHY_VARS_UE *ue,
uint8_t eNB_offset,
int *output,
unsigned char Ns,
......@@ -230,19 +230,19 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
((short *)&qpsk[3])[0] = -pamp;
((short *)&qpsk[3])[1] = pamp;
mprime = 110 - phy_vars_ue->lte_frame_parms.N_RB_DL;
mprime = 110 - ue->frame_parms.N_RB_DL;
for (m=0; m<phy_vars_ue->lte_frame_parms.N_RB_DL<<1; m++) {
for (m=0; m<ue->frame_parms.N_RB_DL<<1; m++) {
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(phy_vars_ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
output[k] = qpsk[(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
#ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
printf("index = %d (k %d)\n",(phy_vars_ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
printf("index = %d (k %d)\n",(ue->lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif
mprime++;
......
......@@ -39,7 +39,7 @@
//extern unsigned int lte_gold_table[10][3][42];
//#define DEBUG_DL_MBSFN
int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
int lte_dl_mbsfn(PHY_VARS_eNB *eNB, int32_t *output,
short amp,
int subframe,
unsigned char l)
......@@ -62,9 +62,9 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
((short *)&qpsk[3])[1] = -a;
mprime = 3*(110 - phy_vars_eNB->lte_frame_parms.N_RB_DL);
mprime = 3*(110 - eNB->frame_parms.N_RB_DL);
for (m=0; m<phy_vars_eNB->lte_frame_parms.N_RB_DL*6; m++) {
for (m=0; m<eNB->frame_parms.N_RB_DL*6; m++) {
if ((l==0) || (l==2))
k = m<<1;
......@@ -75,24 +75,24 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
return(-1);
}
k+=phy_vars_eNB->lte_frame_parms.first_carrier_offset;
k+=eNB->frame_parms.first_carrier_offset;
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
if (k >= phy_vars_eNB->lte_frame_parms.ofdm_symbol_size) {
if (k >= eNB->frame_parms.ofdm_symbol_size) {
k++; // skip DC carrier
k-=phy_vars_eNB->lte_frame_parms.ofdm_symbol_size;
k-=eNB->frame_parms.ofdm_symbol_size;
}
output[k] = qpsk[(phy_vars_eNB->lte_gold_mbsfn_table[subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
output[k] = qpsk[(eNB->lte_gold_mbsfn_table[subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
//output[k] = (lte_gold_table[eNB_offset][subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_MBSFN
msg("subframe %d, l %d, m %d, mprime %d, mprime_dword %d, mprime_qpsk_symbol %d\n",
subframe,l,m,mprime,mprime_dword,mprime_qpsk_symb);
msg("index = %d (k %d)(%x)\n",(phy_vars_eNB->lte_gold_mbsfn_table[subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k,phy_vars_eNB->lte_gold_mbsfn_table[subframe][l][mprime_dword]);
msg("index = %d (k %d)(%x)\n",(eNB->lte_gold_mbsfn_table[subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k,eNB->lte_gold_mbsfn_table[subframe][l][mprime_dword]);
#endif
mprime++;
......@@ -110,7 +110,7 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
int lte_dl_mbsfn_rx(PHY_VARS_UE *phy_vars_ue,
int lte_dl_mbsfn_rx(PHY_VARS_UE *ue,
int *output,
int subframe,
unsigned char l)
......@@ -131,20 +131,20 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *phy_vars_ue,
((short *)&qpsk[3])[0] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[3])[1] = ONE_OVER_SQRT2_Q15;
mprime = 3*(110 - phy_vars_ue->lte_frame_parms.N_RB_DL);
mprime = 3*(110 - ue->frame_parms.N_RB_DL);
for (m=0; m<phy_vars_ue->lte_frame_parms.N_RB_DL*6; m++) {
for (m=0; m<ue->frame_parms.N_RB_DL*6; m++) {
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2
output[k] = qpsk[(phy_vars_ue->lte_gold_mbsfn_table[subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
output[k] = qpsk[(ue->lte_gold_mbsfn_table[subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
#ifdef DEBUG_DL_MBSFN
printf("subframe %d, l %d, m %d, mprime %d, mprime_dword %d, mprime_qpsk_symbol %d\n",
subframe,l,m,mprime, mprime_dword,mprime_qpsk_symb);
printf("index = %d (k %d) (%x)\n",(phy_vars_ue->lte_gold_mbsfn_table[subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k,phy_vars_ue->lte_gold_mbsfn_table[subframe][l][mprime_dword]);
printf("index = %d (k %d) (%x)\n",(ue->lte_gold_mbsfn_table[subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k,ue->lte_gold_mbsfn_table[subframe][l][mprime_dword]);
#endif
mprime++;
......
......@@ -52,7 +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 lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
int lte_dl_ue_spec(PHY_VARS_eNB *eNB,
uint8_t UE_id,
int32_t *output,
short amp,
......@@ -64,7 +64,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
int32_t qpsk[4],nqpsk[4],*qpsk_p,*output_p;
int16_t a;
int w,lprime,ind,l,ind_dword,ind_qpsk_symb,nPRB;
// LTE_eNB_DLSCH_t *dlsch = phy_vars_eNB->dlsch_eNB[UE_id][0];
// LTE_eNB_DLSCH_t *dlsch = eNB->dlsch_eNB[UE_id][0];
a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a;
......@@ -87,13 +87,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
if (p>=7) {
if (SS_flag==0) {
if (phy_vars_eNB->lte_frame_parms.Ncp == NORMAL) {
if (eNB->frame_parms.Ncp == NORMAL) {
// this is 3GPP 36-211 6.10.3.2, NORMAL CP, p>=7
// position output pointer to 5th symbol in slot
output_p = output+(60*phy_vars_eNB->lte_frame_parms.N_RB_DL);
output_p = output+(60*eNB->frame_parms.N_RB_DL);
// shift to 2nd RE in PRB for p=7,8,11,13
if ((p==7) || (p==8) || (p==11) || (p==13)) output_p++;
......@@ -101,12 +101,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
for (lprime=0; lprime<2; lprime++) {
ind = 3*lprime*phy_vars_eNB->lte_frame_parms.N_RB_DL;
ind = 3*lprime*eNB->frame_parms.N_RB_DL;
l = lprime + ((Ns&1)<<1);
// loop over pairs of PRBs, this is the periodicity of the W_bar_NCP sequence
// unroll the computations for the 6 pilots, select qpsk or nqpsk as function of W_bar_NCP
for (nPRB=0; nPRB<phy_vars_eNB->lte_frame_parms.N_RB_DL; nPRB+=2) {
for (nPRB=0; nPRB<eNB->frame_parms.N_RB_DL; nPRB+=2) {
// First pilot
w = Wbar_NCP[p-7][l];
......@@ -116,13 +116,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
*output_p = qpsk_p[(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
LOG_D(PHY,"index = %d\n",(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p+=5;
......@@ -135,12 +135,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
*output_p = qpsk_p[(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
LOG_D(PHY,"index = %d\n",(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p+=5;
......@@ -152,12 +152,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
*output_p = qpsk_p[(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
LOG_D(PHY,"index = %d\n",(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p+=2;
......@@ -171,13 +171,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
*output_p = qpsk_p[(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
LOG_D(PHY,"index = %d\n",(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p+=5;
......@@ -190,12 +190,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
*output_p = qpsk_p[(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
LOG_D(PHY,"index = %d\n",(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p+=5;
......@@ -207,12 +207,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
*output_p = qpsk_p[(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
LOG_D(PHY,"index = %d\n",(eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p+=2;
......@@ -260,9 +260,9 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
((short *)&qpsk[3])[0] = -pamp;
((short *)&qpsk[3])[1] = pamp;
mprime = 110 - phy_vars_ue->lte_frame_parms.N_RB_DL;
mprime = 110 - phy_vars_ue->frame_parms.N_RB_DL;
for (m=0;m<phy_vars_ue->lte_frame_parms.N_RB_DL<<1;m++) {
for (m=0;m<phy_vars_ue->frame_parms.N_RB_DL<<1;m++) {
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
......
This diff is collapsed.
This diff is collapsed.
......@@ -188,7 +188,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#ifdef DEBUG_DLSCH_DECODING
uint16_t i;
#endif
#ifdef __AVX2__
//#ifdef __AVX2__
#if 0
int Kr_last,skipped_last=0;
uint8_t (*tc_2cw)(int16_t *y,
int16_t *y2,
......@@ -249,7 +250,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
}
if (llr8_flag == 0) {
#ifdef __AVX2__
//#ifdef __AVX2__
#if 0
tc_2cw = phy_threegpplte_turbo_decoder16avx2;
#endif
tc = phy_threegpplte_turbo_decoder16;
......
......@@ -42,7 +42,7 @@
#include "PHY/sse_intrin.h"
//#define DEBUG_DRS
int generate_drs_pusch(PHY_VARS_UE *phy_vars_ue,
int generate_drs_pusch(PHY_VARS_UE *ue,
uint8_t eNB_id,
short amp,
unsigned int subframe,
......@@ -62,26 +62,26 @@ int generate_drs_pusch(PHY_VARS_UE *phy_vars_ue,
int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384};
uint8_t cyclic_shift,cyclic_shift0,cyclic_shift1;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->lte_frame_parms;
int32_t *txdataF = phy_vars_ue->lte_ue_common_vars.txdataF[ant];
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int32_t *txdataF = ue->common_vars.txdataF[ant];
uint32_t u,v,alpha_ind;
uint32_t u0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[subframe<<1];
uint32_t u1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(subframe<<1)];
uint32_t v0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[subframe<<1];
uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
int32_t ref_re,ref_im;
uint8_t harq_pid = subframe2harq_pid(frame_parms,phy_vars_ue->frame_tx,subframe);
uint8_t harq_pid = subframe2harq_pid(frame_parms,ue->frame_tx,subframe);
cyclic_shift0 = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
phy_vars_ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]+
((phy_vars_ue->ulsch_ue[0]->cooperation_flag==2)?10:0)+
ue->ulsch[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]+
((ue->ulsch[0]->cooperation_flag==2)?10:0)+
ant*6) % 12;
// printf("PUSCH.cyclicShift %d, n_DMRS2 %d, nPRS %d\n",frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift,phy_vars_ue->ulsch_ue[eNB_id]->n_DMRS2,phy_vars_ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]);
// printf("PUSCH.cyclicShift %d, n_DMRS2 %d, nPRS %d\n",frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift,ue->ulsch[eNB_id]->n_DMRS2,ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]);
cyclic_shift1 = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
phy_vars_ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+1]+
((phy_vars_ue->ulsch_ue[0]->cooperation_flag==2)?10:0)+
ue->ulsch[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+1]+
((ue->ulsch[0]->cooperation_flag==2)?10:0)+
ant*6) % 12;
// cyclic_shift0 = 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -41,13 +41,13 @@
#include "PHY/defs.h"
int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB,
int generate_mbsfn_pilot(PHY_VARS_eNB *eNB,
int32_t **txdataF,
int16_t amp,
uint16_t subframe)
{
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms;
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
uint32_t subframe_offset,Nsymb,samples_per_symbol;
......@@ -66,7 +66,7 @@ int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB,
//Generate Pilots
//antenna 4 symbol 2 Slot 0
lte_dl_mbsfn(phy_vars_eNB,
lte_dl_mbsfn(eNB,
&txdataF[0][subframe_offset+(2*samples_per_symbol)],
amp,
subframe,
......@@ -75,14 +75,14 @@ int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB,
//antenna 4 symbol 0 slot 1
lte_dl_mbsfn(phy_vars_eNB,
lte_dl_mbsfn(eNB,
&txdataF[0][subframe_offset+(6*samples_per_symbol)],
amp,
subframe,
1);
//antenna 4 symbol 4 slot 1
lte_dl_mbsfn(phy_vars_eNB,
lte_dl_mbsfn(eNB,
&txdataF[0][subframe_offset+(10*samples_per_symbol)],
amp,
subframe,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -174,27 +174,28 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
int8_t delta_PUSCH_msg2[8] = {-6,-4,-2,0,2,4,6,8};
int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *ue,
unsigned char eNB_id )
{
// RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)rar_pdu;
uint8_t transmission_mode = phy_vars_ue->transmission_mode[eNB_id];
unsigned char *rar_pdu = phy_vars_ue->dlsch_ue_ra[eNB_id]->harq_processes[0]->b;
unsigned char subframe = phy_vars_ue->ulsch_ue_Msg3_subframe[eNB_id];
LTE_UE_ULSCH_t *ulsch = phy_vars_ue->ulsch_ue[eNB_id];
PHY_MEASUREMENTS *meas = &phy_vars_ue->PHY_measurements;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->lte_frame_parms;
// int current_dlsch_cqi = phy_vars_ue->current_dlsch_cqi[eNB_id];
uint8_t transmission_mode = ue->transmission_mode[eNB_id];
unsigned char *rar_pdu = ue->dlsch_ra[eNB_id]->harq_processes[0]->b;
unsigned char subframe = ue->ulsch_Msg3_subframe[eNB_id];
LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
PHY_MEASUREMENTS *meas = &ue->measurements;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
// int current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id];
uint8_t *rar = (uint8_t *)(rar_pdu+1);
uint8_t harq_pid = subframe2harq_pid(frame_parms,phy_vars_ue->frame_tx,subframe);
uint8_t harq_pid = subframe2harq_pid(frame_parms,ue->frame_tx,subframe);
uint16_t rballoc;
uint8_t cqireq;
uint16_t *RIV2nb_rb_LUT, *RIV2first_rb_LUT;
uint16_t RIV_max = 0;
LOG_D(PHY,"[eNB][RAPROC] Frame %d: generate_ue_ulsch_params_from_rar: subframe %d (harq_pid %d)\n",phy_vars_ue->frame_tx,subframe,harq_pid);
LOG_D(PHY,"[eNB][RAPROC] Frame %d: generate_ue_ulsch_params_from_rar: subframe %d (harq_pid %d)\n",ue->frame_tx,subframe,harq_pid);
switch (frame_parms->N_RB_DL) {
case 6:
......@@ -269,10 +270,10 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
}
ulsch->uci_format = HLC_subband_cqi_nopmi;
fill_CQI(ulsch,meas,eNB_id,0,phy_vars_ue->lte_frame_parms.N_RB_DL,0, transmission_mode,phy_vars_ue->sinr_eff);
fill_CQI(ulsch,meas,eNB_id,0,ue->frame_parms.N_RB_DL,0, transmission_mode,ue->sinr_eff);
if (((phy_vars_ue->frame_tx % 100) == 0) || (phy_vars_ue->frame_tx < 10))
print_CQI(ulsch->o,ulsch->uci_format,eNB_id,phy_vars_ue->lte_frame_parms.N_RB_DL);
if (((ue->frame_tx % 100) == 0) || (ue->frame_tx < 10))
print_CQI(ulsch->o,ulsch->uci_format,eNB_id,ue->frame_parms.N_RB_DL);
} else {
ulsch->O_RI = 0;
ulsch->O = 0;
......@@ -304,10 +305,10 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
// initialize power control based on PRACH power
ulsch->f_pusch = delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC] +
mac_xface->get_deltaP_rampup(phy_vars_ue->Mod_id,phy_vars_ue->CC_id);
mac_xface->get_deltaP_rampup(ue->Mod_id,ue->CC_id);
LOG_D(PHY,"[UE %d][PUSCH PC] Initializing f_pusch to %d dB, TPC %d (delta_PUSCH_msg2 %d dB), deltaP_rampup %d dB\n",
phy_vars_ue->Mod_id,ulsch->f_pusch,ulsch->harq_processes[harq_pid]->TPC,delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC],
mac_xface->get_deltaP_rampup(phy_vars_ue->Mod_id,phy_vars_ue->CC_id));
ue->Mod_id,ulsch->f_pusch,ulsch->harq_processes[harq_pid]->TPC,delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC],
mac_xface->get_deltaP_rampup(ue->Mod_id,ue->CC_id));
//#ifdef DEBUG_RAR
......
......@@ -129,15 +129,15 @@ int compareints (const void * a, const void * b)
}
int32_t generate_srs_tx(PHY_VARS_UE *phy_vars_ue,
int32_t generate_srs_tx(PHY_VARS_UE *ue,
uint8_t eNB_id,
int16_t amp,
uint32_t subframe)
{
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_ue->lte_frame_parms;
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated=&phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id];
int32_t *txdataF = phy_vars_ue->lte_ue_common_vars.txdataF[0];
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated=&ue->soundingrs_ul_config_dedicated[eNB_id];
int32_t *txdataF = ue->common_vars.txdataF[0];
uint16_t msrsb=0,Nb=0,nb,b,msrs0=0,k,Msc_RS,Msc_RS_idx,carrier_pos,symbol_offset;
uint16_t *Msc_idx_ptr;
int32_t k0;
......
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.
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -27,9 +27,9 @@
*******************************************************************************/
#define UL_RB_ALLOC mac_xface->computeRIV(mac_xface->lte_frame_parms->N_RB_UL,0,24)
#define BCCH_RB_ALLOC mac_xface->computeRIV(mac_xface->lte_frame_parms->N_RB_UL,0,4)
#define RA_RB_ALLOC mac_xface->computeRIV(mac_xface->lte_frame_parms->N_RB_UL,0,4)
#define UL_RB_ALLOC mac_xface->computeRIV(mac_xface->frame_parms->N_RB_UL,0,24)
#define BCCH_RB_ALLOC mac_xface->computeRIV(mac_xface->frame_parms->N_RB_UL,0,4)
#define RA_RB_ALLOC mac_xface->computeRIV(mac_xface->frame_parms->N_RB_UL,0,4)
#define DLSCH_RB_ALLOC 0x1fff
#include "extern.h"
......
This diff is collapsed.
......@@ -198,7 +198,7 @@ void assign_rbs_required (module_id_t Mod_id,
/*
if ((mac_get_rrc_status(Mod_id,1,UE_id) < RRC_RECONFIGURED)){ // If we still don't have a default radio bearer
nb_rbs_required[pCCid][UE_id] = PHY_vars_eNB_g[Mod_id][pCCid]->lte_frame_parms.N_RB_DL;
nb_rbs_required[pCCid][UE_id] = PHY_vars_eNB_g[Mod_id][pCCid]->frame_parms.N_RB_DL;
continue;
}
*/
......@@ -649,8 +649,8 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
if ((j == N_RBG[CC_id]-1) &&
((PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 25) ||
(PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 50))) {
((PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms.N_RB_DL == 25) ||
(PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms.N_RB_DL == 50))) {
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id]+1;
ue_sched_ctl->pre_nb_available_rbs[CC_id] = ue_sched_ctl->pre_nb_available_rbs[CC_id] + min_rb_unit[CC_id]-1;
......@@ -759,7 +759,7 @@ void dlsch_scheduler_pre_processor_reset (int module_idP,
UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
rnti_t rnti = UE_RNTI(module_idP,UE_id);
uint8_t *vrb_map = eNB_mac_inst[module_idP].common_channels[CC_id].vrb_map;
int RBGsize = PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL/N_RBG;
int RBGsize = PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL/N_RBG;
#ifdef SF05_LIMIT
//int subframe05_limit=0;
int sf05_upper=-1,sf05_lower=-1;
......@@ -776,7 +776,7 @@ void dlsch_scheduler_pre_processor_reset (int module_idP,
// WE SHOULD PROTECT the eNB_UE_stats with a mutex here ...
ue_sched_ctl->ta_timer = 20; // wait 20 subframes before taking TA measurement from PHY
switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) {
switch (PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL) {
case 6:
ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update;
break;
......
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.
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