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, ...@@ -25,7 +25,7 @@ void lte_param_init(unsigned char N_tx,
uint32_t perfect_ce) uint32_t perfect_ce)
{ {
LTE_DL_FRAME_PARMS *lte_frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
int i; int i;
...@@ -39,64 +39,64 @@ void lte_param_init(unsigned char N_tx, ...@@ -39,64 +39,64 @@ void lte_param_init(unsigned char N_tx,
randominit(0); randominit(0);
set_taus_seed(0); set_taus_seed(0);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms); frame_parms = &(PHY_vars_eNB->frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz 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; frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->threequarter_fs = threequarter_fs; frame_parms->threequarter_fs = threequarter_fs;
lte_frame_parms->Ncp = extended_prefix_flag; frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Ncp_UL = extended_prefix_flag; frame_parms->Ncp_UL = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell; frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6; frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx; frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx; frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->nb_antennas_tx_eNB = N_tx; frame_parms->nb_antennas_tx_eNB = N_tx;
lte_frame_parms->phich_config_common.phich_resource = one; frame_parms->phich_config_common.phich_resource = one;
lte_frame_parms->tdd_config = tdd_config; frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type; frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2; // frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0; // frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;44 // frame_parms->kTC = 0;44
// lte_frame_parms->n_RRC = 0; // frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(lte_frame_parms,osf); init_frame_parms(frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); //copy_lte_parms_to_phy_framing(frame_parms, &(PHY_config->PHY_framing));
// phy_init_top(lte_frame_parms); //allocation // phy_init_top(frame_parms); //allocation
PHY_vars_UE->is_secondary_ue = 0; PHY_vars_UE->is_secondary_ue = 0;
PHY_vars_UE->lte_frame_parms = *lte_frame_parms; PHY_vars_UE->frame_parms = *frame_parms;
PHY_vars_eNB->lte_frame_parms = *lte_frame_parms; PHY_vars_eNB->frame_parms = *frame_parms;
phy_init_lte_top(lte_frame_parms); phy_init_lte_top(frame_parms);
dump_frame_parms(lte_frame_parms); dump_frame_parms(frame_parms);
PHY_vars_UE->PHY_measurements.n_adj_cells=0; PHY_vars_UE->measurements.n_adj_cells=0;
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1; PHY_vars_UE->measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2; PHY_vars_UE->measurements.adj_cell_id[1] = Nid_cell+2;
for (i=0; i<3; i++) 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_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0); phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms); generate_pcfich_reg_mapping(&PHY_vars_UE->frame_parms);
generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms); generate_phich_reg_mapping(&PHY_vars_UE->frame_parms);
// DL power control init // DL power control init
if (transmission_mode == 1) { if (transmission_mode == 1) {
PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB 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->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 } else { // rho_a = rhob
PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB 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->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; PHY_vars_UE->perfect_ce = perfect_ce;
......
...@@ -36,7 +36,7 @@ extern int card; ...@@ -36,7 +36,7 @@ extern int card;
#endif #endif
void 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 #ifdef EXMIMO
...@@ -46,72 +46,72 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint32_t rx_power_fil_dB, uint8_t eNB ...@@ -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", LOG_D(PHY,"Gain control: rssi %d (%d,%d)\n",
rx_power_fil_dB, rx_power_fil_dB,
phy_vars_ue->PHY_measurements.rssi, ue->measurements.rssi,
phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id] ue->measurements.rx_power_avg_dB[eNB_id]
); );
// Gain control with hysterisis // 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) ) if (rx_power_fil_dB < TARGET_RX_POWER - 5) //&& (ue->rx_total_gain_dB < MAX_RF_GAIN) )
phy_vars_ue->rx_total_gain_dB+=5; 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) ) else if (rx_power_fil_dB > TARGET_RX_POWER + 5) //&& (ue->rx_total_gain_dB > MIN_RF_GAIN) )
phy_vars_ue->rx_total_gain_dB-=5; 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)) { if ((openair_daq_vars.rx_rf_mode==0) && (openair_daq_vars.mode == openair_NOT_SYNCHED)) {
openair_daq_vars.rx_rf_mode=1; 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 { else {
*/ */
phy_vars_ue->rx_total_gain_dB = MAX_RF_GAIN; ue->rx_total_gain_dB = MAX_RF_GAIN;
} else if (phy_vars_ue->rx_total_gain_dB<MIN_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)) { if ((openair_daq_vars.rx_rf_mode==1) && (openair_daq_vars.mode == openair_NOT_SYNCHED)) {
openair_daq_vars.rx_rf_mode=0; 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 { 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 #ifdef EXMIMO
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]) {
phy_vars_ue->rx_total_gain_dB = phy_vars_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; 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 // 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; p_exmimo_config->rf.rx_gain[i][0] = 0;
} }
/* /*
phy_vars_ue->rx_gain_mode[0] = byp; ue->rx_gain_mode[0] = byp;
phy_vars_ue->rx_gain_mode[1] = byp; ue->rx_gain_mode[1] = byp;
exmimo_pci_interface->rf.rf_mode0 = 22991; //bypass exmimo_pci_interface->rf.rf_mode0 = 22991; //bypass
exmimo_pci_interface->rf.rf_mode1 = 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_gain00 = 0;
exmimo_pci_interface->rf.rx_gain10 = 0; exmimo_pci_interface->rf.rx_gain10 = 0;
} }
*/ */
} else { } else {
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 - phy_vars_ue->rx_gain_max[0] + phy_vars_ue->rx_total_gain_dB; 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 ...@@ -119,28 +119,28 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint32_t rx_power_fil_dB, uint8_t eNB
break; break;
case med_gain: case med_gain:
case byp_gain: case byp_gain:
if (phy_vars_ue->rx_total_gain_dB>phy_vars_ue->rx_gain_byp[0]) { if (ue->rx_total_gain_dB>ue->rx_gain_byp[0]) {
phy_vars_ue->rx_gain_mode[0] = max_gain; ue->rx_gain_mode[0] = max_gain;
phy_vars_ue->rx_gain_mode[1] = max_gain; ue->rx_gain_mode[1] = max_gain;
exmimo_pci_interface->rf.rf_mode0 = 55759; //max gain exmimo_pci_interface->rf.rf_mode0 = 55759; //max gain
exmimo_pci_interface->rf.rf_mode1 = 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_gain00 = 50;
exmimo_pci_interface->rf.rx_gain10 = 50; exmimo_pci_interface->rf.rx_gain10 = 50;
} }
else { 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_gain00 = 50 - ue->rx_gain_max[0] + 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_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_gain00 = 0;
exmimo_pci_interface->rf.rx_gain10 = 0; exmimo_pci_interface->rf.rx_gain10 = 0;
} }
else { 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_gain00 = 50 - ue->rx_gain_byp[0] + 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_gain10 = 50 - ue->rx_gain_byp[1] + ue->rx_total_gain_dB;
} }
break; break;
default: default:
...@@ -152,9 +152,9 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint32_t rx_power_fil_dB, uint8_t eNB ...@@ -152,9 +152,9 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint32_t rx_power_fil_dB, uint8_t eNB
#endif #endif
#ifdef DEBUG_PHY #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", 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); TARGET_RX_POWER,MAX_RF_GAIN,MIN_RF_GAIN);
*/ */
#endif //DEBUG_PHY #endif //DEBUG_PHY
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
// last channel estimate of the receiver // last channel estimate of the receiver
void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, 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 eNB_id,
unsigned char clear, unsigned char clear,
short coef) short coef)
...@@ -51,7 +51,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -51,7 +51,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
ncoef = 32767 - coef; ncoef = 32767 - coef;
#ifdef DEBUG_PHY #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 #endif //DEBUG_PHY
...@@ -60,8 +60,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -60,8 +60,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
temp = 0; temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) { 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)]; Re = ((int16_t*)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)]; Im = ((int16_t*)ue->common_vars.dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
temp += (Re*Re/2) + (Im*Im/2); temp += (Re*Re/2) + (Im*Im/2);
} }
...@@ -81,21 +81,21 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -81,21 +81,21 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
diff = max_pos_fil - frame_parms->nb_prefix_samples/8; diff = max_pos_fil - frame_parms->nb_prefix_samples/8;
if ( diff > SYNCH_HYST ) if ( diff > SYNCH_HYST )
phy_vars_ue->rx_offset++; ue->rx_offset++;
else if (diff < -SYNCH_HYST) else if (diff < -SYNCH_HYST)
phy_vars_ue->rx_offset--; ue->rx_offset--;
if ( phy_vars_ue->rx_offset < 0 ) if ( ue->rx_offset < 0 )
phy_vars_ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES; ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
if ( phy_vars_ue->rx_offset >= FRAME_LENGTH_COMPLEX_SAMPLES ) if ( ue->rx_offset >= FRAME_LENGTH_COMPLEX_SAMPLES )
phy_vars_ue->rx_offset -= FRAME_LENGTH_COMPLEX_SAMPLES; ue->rx_offset -= FRAME_LENGTH_COMPLEX_SAMPLES;
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
LOG_D(PHY,"frame %d: rx_offset (after) = %d : max_pos = %d,max_pos_fil = %d (peak %d)\n", 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 #endif //DEBUG_PHY
...@@ -103,7 +103,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -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, 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 int *eNB_id,
unsigned char clear, unsigned char clear,
unsigned char number_of_cards, unsigned char number_of_cards,
...@@ -133,23 +133,23 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -133,23 +133,23 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
// do ifft of channel estimate // do ifft of channel estimate
switch(frame_parms->N_RB_DL) { switch(frame_parms->N_RB_DL) {
case 6: case 6:
dft128((int16_t*) &lte_eNb_srs->srs_ch_estimates[ind][aa][0], dft128((int16_t*) &lte_eNB_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNb_srs->srs_ch_estimates_time[ind][aa], (int16_t*) lte_eNB_srs->srs_ch_estimates_time[ind][aa],
1); 1);
break; break;
case 25: case 25:
dft512((int16_t*) &lte_eNb_srs->srs_ch_estimates[ind][aa][0], dft512((int16_t*) &lte_eNB_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNb_srs->srs_ch_estimates_time[ind][aa], (int16_t*) lte_eNB_srs->srs_ch_estimates_time[ind][aa],
1); 1);
break; break;
case 50: case 50:
dft1024((int16_t*) &lte_eNb_srs->srs_ch_estimates[ind][aa][0], dft1024((int16_t*) &lte_eNB_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNb_srs->srs_ch_estimates_time[ind][aa], (int16_t*) lte_eNB_srs->srs_ch_estimates_time[ind][aa],
1); 1);
break; break;
case 100: case 100:
dft2048((int16_t*) &lte_eNb_srs->srs_ch_estimates[ind][aa][0], dft2048((int16_t*) &lte_eNB_srs->srs_ch_estimates[ind][aa][0],
(int16_t*) lte_eNb_srs->srs_ch_estimates_time[ind][aa], (int16_t*) lte_eNB_srs->srs_ch_estimates_time[ind][aa],
1); 1);
break; break;
} }
...@@ -157,7 +157,7 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -157,7 +157,7 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
sprintf(fname,"srs_ch_estimates_time_%d%d.m",ind,aa); sprintf(fname,"srs_ch_estimates_time_%d%d.m",ind,aa);
sprintf(vname,"srs_time_%d%d",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
#endif #endif
} }
...@@ -168,8 +168,8 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -168,8 +168,8 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
temp = 0; temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)lte_eNb_srs->srs_ch_estimates_time[ind][aa])[(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)]; Im = ((int16_t*)lte_eNB_srs->srs_ch_estimates_time[ind][aa])[1+(i<<1)];
temp += (Re*Re/2) + (Im*Im/2); temp += (Re*Re/2) + (Im*Im/2);
} }
...@@ -195,7 +195,7 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -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 first_run=1;
static int max_pos_fil2=0; 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_ ...@@ -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 Re,Im,coef=24576;
short ncoef = 32768 - coef; short ncoef = 32768 - coef;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
LTE_eNB_PUSCH *eNB_pusch_vars = phy_vars_eNB->lte_eNB_pusch_vars[UE_id]; 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]; int32_t **ul_ch_estimates_time= eNB_pusch_vars->drs_ch_estimates_time[0];
uint8_t cyclic_shift = 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); 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_ ...@@ -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; max_pos_fil2 = ((max_pos_fil2 * coef) + (max_pos * ncoef)) >> 15;
#ifdef DEBUG_PHY #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 #endif //DEBUG_PHY
return(max_pos_fil2-sync_pos); return(max_pos_fil2-sync_pos);
......
...@@ -82,7 +82,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) ...@@ -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 //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; sp=spectrum;
while (1) { while (1) {
...@@ -341,8 +341,8 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) ...@@ -341,8 +341,8 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
} // loop on pss index } // loop on pss index
} }
if (rxp == &ue->lte_ue_common_vars.rxdata[0][i+38400*4]) { if (rxp == &ue->common_vars.rxdata[0][i+38400*4]) {
rxp = &ue->lte_ue_common_vars.rxdata[0][i+38400*4]; rxp = &ue->common_vars.rxdata[0][i+38400*4];
sp=spectrum_p5ms; sp=spectrum_p5ms;
} else { } else {
break; break;
......
...@@ -52,29 +52,29 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32 ...@@ -52,29 +52,29 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
#define SCALE 0x3FFF #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 eNB_id,
uint8_t UE_id, uint8_t UE_id,
uint8_t sched_subframe, uint8_t thread_id,
unsigned char l, unsigned char l,
unsigned char Ns, unsigned char Ns,
uint8_t cooperation_flag) uint8_t cooperation_flag)
{ {
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
LTE_eNB_PUSCH *eNB_pusch_vars = phy_vars_eNB->lte_eNB_pusch_vars[UE_id]; LTE_eNB_PUSCH *pusch_vars = eNB->pusch_vars[UE_id];
int32_t **ul_ch_estimates=eNB_pusch_vars->drs_ch_estimates[eNB_id]; int32_t **ul_ch_estimates=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_time= 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_0= 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 **ul_ch_estimates_1= pusch_vars->drs_ch_estimates_1[eNB_id];
int32_t **rxdataF_ext= eNB_pusch_vars->rxdataF_ext[eNB_id]; int32_t **rxdataF_ext= pusch_vars->rxdataF_ext[eNB_id];
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx; int subframe = eNB->proc[thread_id].subframe_rx;
uint8_t harq_pid = subframe2harq_pid(frame_parms,phy_vars_eNB->proc[sched_subframe].frame_rx,subframe); uint8_t harq_pid = subframe2harq_pid(frame_parms,eNB->proc[thread_id].frame_rx,subframe);
int16_t delta_phase = 0; int16_t delta_phase = 0;
int16_t *ru1 = ru_90; int16_t *ru1 = ru_90;
int16_t *ru2 = ru_90; int16_t *ru2 = ru_90;
int16_t current_phase1,current_phase2; 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 aa,Msc_RS,Msc_RS_idx;
uint16_t * Msc_idx_ptr; uint16_t * Msc_idx_ptr;
int k,pilot_pos1 = 3 - frame_parms->Ncp, pilot_pos2 = 10 - 2*frame_parms->Ncp; 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, ...@@ -116,7 +116,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
Msc_RS = N_rb_alloc*12; Msc_RS = N_rb_alloc*12;
cyclic_shift = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift + 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; frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
#if defined(USER_MODE) #if defined(USER_MODE)
...@@ -669,11 +669,11 @@ extern uint16_t transmission_offset_tdd[16]; ...@@ -669,11 +669,11 @@ extern uint16_t transmission_offset_tdd[16];
#define DEBUG_SRS #define DEBUG_SRS
int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
LTE_eNB_COMMON *eNb_common_vars, LTE_eNB_COMMON *common_vars,
LTE_eNB_SRS *eNb_srs_vars, LTE_eNB_SRS *srs_vars,
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated, SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
unsigned char sub_frame_number, unsigned char sub_frame_number,
unsigned char eNb_id) unsigned char eNB_id)
{ {
int T_SFC,aa; int T_SFC,aa;
...@@ -690,7 +690,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -690,7 +690,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
T_SFC = (Ssrs<=7 ? 5 : 10); 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->Csrs,
SRS_parms->Bsrs, SRS_parms->Bsrs,
SRS_parms->kTC, SRS_parms->kTC,
...@@ -702,34 +702,34 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -702,34 +702,34 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
if (generate_srs_rx(frame_parms, if (generate_srs_rx(frame_parms,
soundingrs_ul_config_dedicated, soundingrs_ul_config_dedicated,
eNb_srs_vars->srs)==-1) { srs_vars->srs)==-1) {
msg("lte_srs_channel_estimation: Error in generate_srs_rx\n"); msg("lte_srs_channel_estimation: Error in generate_srs_rx\n");
return(-1); return(-1);
} }
for (aa=0; aa<nb_antennas_rx; aa++) { for (aa=0; aa<nb_antennas_rx; aa++) {
#ifdef DEBUG_SRS #ifdef DEBUG_SRS
msg("SRS channel estimation eNb %d, subframs %d, aarx %d, %p, %p, %p\n",eNb_id,sub_frame_number,aa, 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], &common_vars->rxdataF[eNB_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
eNb_srs_vars->srs, srs_vars->srs,
eNb_srs_vars->srs_ch_estimates[eNb_id][aa]); srs_vars->srs_ch_estimates[eNB_id][aa]);
#endif #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_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",eNb_common_vars->srs,(frame_parms->ofdm_symbol_size),1,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], mult_cpx_conj_vector((int16_t*) &common_vars->rxdataF[eNB_id][aa][2*frame_parms->ofdm_symbol_size*symbol],
(int16_t*) eNb_srs_vars->srs, (int16_t*) srs_vars->srs,
(int16_t*) eNb_srs_vars->srs_ch_estimates[eNb_id][aa], (int16_t*) srs_vars->srs_ch_estimates[eNB_id][aa],
frame_parms->ofdm_symbol_size, frame_parms->ofdm_symbol_size,
15); 15);
//msg("SRS channel estimation cmult out\n"); //msg("SRS channel estimation cmult out\n");
#ifdef USER_MODE #ifdef USER_MODE
#ifdef DEBUG_SRS #ifdef DEBUG_SRS
sprintf(fname,"eNB_id%d_an%d_srs_ch_est.m",eNb_id,aa); 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); 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); write_output(fname,vname,srs_vars->srs_ch_estimates[eNB_id][aa],frame_parms->ofdm_symbol_size,1,1);
#endif #endif
#endif #endif
} }
...@@ -738,7 +738,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -738,7 +738,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
/* /*
else { else {
for (aa=0;aa<nb_antennas_rx;aa++) 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); return(0);
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
//Calibration //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, int32_t *output,
short amp, short amp,
unsigned char Ns, unsigned char Ns,
...@@ -76,27 +76,27 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, ...@@ -76,27 +76,27 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
return(-1); 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 if (k > 6)//b
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_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf; mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2 // 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; //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_CELL_SPEC #ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb); 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 #endif
mprime++; mprime++;
...@@ -108,9 +108,9 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, ...@@ -108,9 +108,9 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
#endif #endif
k+=6;//b 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++; // 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); // printf("** k %d\n",k);
...@@ -120,7 +120,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, ...@@ -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, int32_t *output,
short amp, short amp,
unsigned char Ns, unsigned char Ns,
...@@ -155,31 +155,31 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -155,31 +155,31 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
return(-1); 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) if (k > 5)
k -=6; k -=6;
k+=phy_vars_eNB->lte_frame_parms.first_carrier_offset; k+=eNB->frame_parms.first_carrier_offset;
DevAssert( Ns < 20 ); DevAssert( Ns < 20 );
DevAssert( l < 2 ); DevAssert( l < 2 );
DevAssert( mprime>>4 < 14 ); 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_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf; mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2 // 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; //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_CELL_SPEC #ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb); 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 #endif
mprime++; mprime++;
...@@ -191,9 +191,9 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -191,9 +191,9 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
#endif #endif
k+=6; 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++; // 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); // printf("** k %d\n",k);
...@@ -202,7 +202,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -202,7 +202,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
return(0); 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, uint8_t eNB_offset,
int *output, int *output,
unsigned char Ns, unsigned char Ns,
...@@ -230,19 +230,19 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue, ...@@ -230,19 +230,19 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
((short *)&qpsk[3])[0] = -pamp; ((short *)&qpsk[3])[0] = -pamp;
((short *)&qpsk[3])[1] = 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_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf; mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2 // 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 #ifdef DEBUG_DL_CELL_SPEC
printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb); 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 #endif
mprime++; mprime++;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
//extern unsigned int lte_gold_table[10][3][42]; //extern unsigned int lte_gold_table[10][3][42];
//#define DEBUG_DL_MBSFN //#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, short amp,
int subframe, int subframe,
unsigned char l) unsigned char l)
...@@ -62,9 +62,9 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output, ...@@ -62,9 +62,9 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
((short *)&qpsk[3])[1] = -a; ((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)) if ((l==0) || (l==2))
k = m<<1; k = m<<1;
...@@ -75,24 +75,24 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output, ...@@ -75,24 +75,24 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
return(-1); return(-1);
} }
k+=phy_vars_eNB->lte_frame_parms.first_carrier_offset; k+=eNB->frame_parms.first_carrier_offset;
mprime_dword = mprime>>4; mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf; 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++; // 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; //output[k] = (lte_gold_table[eNB_offset][subframe][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_MBSFN #ifdef DEBUG_DL_MBSFN
msg("subframe %d, l %d, m %d, mprime %d, mprime_dword %d, mprime_qpsk_symbol %d\n", 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); 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 #endif
mprime++; mprime++;
...@@ -110,7 +110,7 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output, ...@@ -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 *output,
int subframe, int subframe,
unsigned char l) unsigned char l)
...@@ -131,20 +131,20 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *phy_vars_ue, ...@@ -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])[0] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[3])[1] = 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_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf; mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2 // 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 #ifdef DEBUG_DL_MBSFN
printf("subframe %d, l %d, m %d, mprime %d, mprime_dword %d, mprime_qpsk_symbol %d\n", 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); 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 #endif
mprime++; mprime++;
......
...@@ -52,7 +52,7 @@ ...@@ -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 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, uint8_t UE_id,
int32_t *output, int32_t *output,
short amp, short amp,
...@@ -64,7 +64,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -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; int32_t qpsk[4],nqpsk[4],*qpsk_p,*output_p;
int16_t a; int16_t a;
int w,lprime,ind,l,ind_dword,ind_qpsk_symb,nPRB; 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; a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a; ((short *)&qpsk[0])[0] = a;
...@@ -87,13 +87,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -87,13 +87,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
if (p>=7) { if (p>=7) {
if (SS_flag==0) { 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 // this is 3GPP 36-211 6.10.3.2, NORMAL CP, p>=7
// position output pointer to 5th symbol in slot // 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 // shift to 2nd RE in PRB for p=7,8,11,13
if ((p==7) || (p==8) || (p==11) || (p==13)) output_p++; 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, ...@@ -101,12 +101,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
for (lprime=0; lprime<2; lprime++) { 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); l = lprime + ((Ns&1)<<1);
// loop over pairs of PRBs, this is the periodicity of the W_bar_NCP sequence // 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 // 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 // First pilot
w = Wbar_NCP[p-7][l]; w = Wbar_NCP[p-7][l];
...@@ -116,13 +116,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -116,13 +116,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4; ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf; 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 #ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n", 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); 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 #endif
output_p+=5; output_p+=5;
...@@ -135,12 +135,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -135,12 +135,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4; ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf; 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 #ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n", 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); 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 #endif
output_p+=5; output_p+=5;
...@@ -152,12 +152,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -152,12 +152,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4; ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf; 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 #ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n", 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); 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 #endif
output_p+=2; output_p+=2;
...@@ -171,13 +171,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -171,13 +171,13 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4; ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf; 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 #ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n", 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); 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 #endif
output_p+=5; output_p+=5;
...@@ -190,12 +190,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -190,12 +190,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4; ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf; 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 #ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n", 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); 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 #endif
output_p+=5; output_p+=5;
...@@ -207,12 +207,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -207,12 +207,12 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
ind_dword = ind>>4; ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf; 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 #ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n", 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); 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 #endif
output_p+=2; output_p+=2;
...@@ -260,9 +260,9 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue, ...@@ -260,9 +260,9 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
((short *)&qpsk[3])[0] = -pamp; ((short *)&qpsk[3])[0] = -pamp;
((short *)&qpsk[3])[1] = 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_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf; 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, ...@@ -188,7 +188,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
uint16_t i; uint16_t i;
#endif #endif
#ifdef __AVX2__ //#ifdef __AVX2__
#if 0
int Kr_last,skipped_last=0; int Kr_last,skipped_last=0;
uint8_t (*tc_2cw)(int16_t *y, uint8_t (*tc_2cw)(int16_t *y,
int16_t *y2, int16_t *y2,
...@@ -249,7 +250,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -249,7 +250,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
} }
if (llr8_flag == 0) { if (llr8_flag == 0) {
#ifdef __AVX2__ //#ifdef __AVX2__
#if 0
tc_2cw = phy_threegpplte_turbo_decoder16avx2; tc_2cw = phy_threegpplte_turbo_decoder16avx2;
#endif #endif
tc = phy_threegpplte_turbo_decoder16; tc = phy_threegpplte_turbo_decoder16;
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
//#define DEBUG_DRS //#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, uint8_t eNB_id,
short amp, short amp,
unsigned int subframe, unsigned int subframe,
...@@ -62,26 +62,26 @@ int generate_drs_pusch(PHY_VARS_UE *phy_vars_ue, ...@@ -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}; 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; uint8_t cyclic_shift,cyclic_shift0,cyclic_shift1;
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->lte_frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int32_t *txdataF = phy_vars_ue->lte_ue_common_vars.txdataF[ant]; int32_t *txdataF = ue->common_vars.txdataF[ant];
uint32_t u,v,alpha_ind; uint32_t u,v,alpha_ind;
uint32_t u0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[subframe<<1]; 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 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 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)]; uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
int32_t ref_re,ref_im; 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 + cyclic_shift0 = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->n_DMRS2 + ue->ulsch[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
phy_vars_ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]+ frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]+
((phy_vars_ue->ulsch_ue[0]->cooperation_flag==2)?10:0)+ ((ue->ulsch[0]->cooperation_flag==2)?10:0)+
ant*6) % 12; 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 + cyclic_shift1 = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->n_DMRS2 + ue->ulsch[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
phy_vars_ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+1]+ frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+1]+
((phy_vars_ue->ulsch_ue[0]->cooperation_flag==2)?10:0)+ ((ue->ulsch[0]->cooperation_flag==2)?10:0)+
ant*6) % 12; ant*6) % 12;
// cyclic_shift0 = 0; // cyclic_shift0 = 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
#include "PHY/defs.h" #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, int32_t **txdataF,
int16_t amp, int16_t amp,
uint16_t subframe) 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; uint32_t subframe_offset,Nsymb,samples_per_symbol;
...@@ -66,7 +66,7 @@ int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB, ...@@ -66,7 +66,7 @@ int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB,
//Generate Pilots //Generate Pilots
//antenna 4 symbol 2 Slot 0 //antenna 4 symbol 2 Slot 0
lte_dl_mbsfn(phy_vars_eNB, lte_dl_mbsfn(eNB,
&txdataF[0][subframe_offset+(2*samples_per_symbol)], &txdataF[0][subframe_offset+(2*samples_per_symbol)],
amp, amp,
subframe, subframe,
...@@ -75,14 +75,14 @@ int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB, ...@@ -75,14 +75,14 @@ int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB,
//antenna 4 symbol 0 slot 1 //antenna 4 symbol 0 slot 1
lte_dl_mbsfn(phy_vars_eNB, lte_dl_mbsfn(eNB,
&txdataF[0][subframe_offset+(6*samples_per_symbol)], &txdataF[0][subframe_offset+(6*samples_per_symbol)],
amp, amp,
subframe, subframe,
1); 1);
//antenna 4 symbol 4 slot 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)], &txdataF[0][subframe_offset+(10*samples_per_symbol)],
amp, amp,
subframe, 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, ...@@ -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}; 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 ) unsigned char eNB_id )
{ {
// RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)rar_pdu; // RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)rar_pdu;
uint8_t transmission_mode = phy_vars_ue->transmission_mode[eNB_id]; uint8_t transmission_mode = ue->transmission_mode[eNB_id];
unsigned char *rar_pdu = phy_vars_ue->dlsch_ue_ra[eNB_id]->harq_processes[0]->b; unsigned char *rar_pdu = ue->dlsch_ra[eNB_id]->harq_processes[0]->b;
unsigned char subframe = phy_vars_ue->ulsch_ue_Msg3_subframe[eNB_id]; unsigned char subframe = ue->ulsch_Msg3_subframe[eNB_id];
LTE_UE_ULSCH_t *ulsch = phy_vars_ue->ulsch_ue[eNB_id]; LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
PHY_MEASUREMENTS *meas = &phy_vars_ue->PHY_measurements; PHY_MEASUREMENTS *meas = &ue->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]; 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 *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; uint16_t rballoc;
uint8_t cqireq; uint8_t cqireq;
uint16_t *RIV2nb_rb_LUT, *RIV2first_rb_LUT; uint16_t *RIV2nb_rb_LUT, *RIV2first_rb_LUT;
uint16_t RIV_max = 0; 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) { switch (frame_parms->N_RB_DL) {
case 6: case 6:
...@@ -269,10 +270,10 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue, ...@@ -269,10 +270,10 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
} }
ulsch->uci_format = HLC_subband_cqi_nopmi; 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)) if (((ue->frame_tx % 100) == 0) || (ue->frame_tx < 10))
print_CQI(ulsch->o,ulsch->uci_format,eNB_id,phy_vars_ue->lte_frame_parms.N_RB_DL); print_CQI(ulsch->o,ulsch->uci_format,eNB_id,ue->frame_parms.N_RB_DL);
} else { } else {
ulsch->O_RI = 0; ulsch->O_RI = 0;
ulsch->O = 0; ulsch->O = 0;
...@@ -304,10 +305,10 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue, ...@@ -304,10 +305,10 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
// initialize power control based on PRACH power // initialize power control based on PRACH power
ulsch->f_pusch = delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC] + 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", 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], 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)); mac_xface->get_deltaP_rampup(ue->Mod_id,ue->CC_id));
//#ifdef DEBUG_RAR //#ifdef DEBUG_RAR
......
...@@ -129,15 +129,15 @@ int compareints (const void * a, const void * b) ...@@ -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, uint8_t eNB_id,
int16_t amp, int16_t amp,
uint32_t subframe) uint32_t subframe)
{ {
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_ue->lte_frame_parms; LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated=&phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id]; SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated=&ue->soundingrs_ul_config_dedicated[eNB_id];
int32_t *txdataF = phy_vars_ue->lte_ue_common_vars.txdataF[0]; 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 msrsb=0,Nb=0,nb,b,msrs0=0,k,Msc_RS,Msc_RS_idx,carrier_pos,symbol_offset;
uint16_t *Msc_idx_ptr; uint16_t *Msc_idx_ptr;
int32_t k0; 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.
...@@ -1527,7 +1527,7 @@ fill_DLSCH_dci( ...@@ -1527,7 +1527,7 @@ fill_DLSCH_dci(
/// Synchronizing rballoc with rballoc_sub /// Synchronizing rballoc with rballoc_sub
for(i=0; i<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBG; i++) { for(i=0; i<PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RBG; i++) {
rballoc_sub[i] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][i]; rballoc_sub[i] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][i];
} }
...@@ -1539,8 +1539,8 @@ fill_DLSCH_dci( ...@@ -1539,8 +1539,8 @@ fill_DLSCH_dci(
case 2: case 2:
LOG_D(MAC,"[eNB %d] CC_id %d Adding UE %d spec DCI for %d PRBS \n",module_idP, CC_id, UE_id, nb_rb); LOG_D(MAC,"[eNB %d] CC_id %d Adding UE %d spec DCI for %d PRBS \n",module_idP, CC_id, UE_id, nb_rb);
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { if (PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.frame_type == TDD) {
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: case 6:
((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->rballoc = allocate_prbs_sub(nb_rb,rballoc_sub); ((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->rballoc = allocate_prbs_sub(nb_rb,rballoc_sub);
((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->rah = 0; ((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->rah = 0;
...@@ -1579,7 +1579,7 @@ fill_DLSCH_dci( ...@@ -1579,7 +1579,7 @@ fill_DLSCH_dci(
} else { } else {
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: case 6:
((DCI1_1_5MHz_FDD_t*)DLSCH_dci)->rballoc = allocate_prbs_sub(nb_rb,rballoc_sub); ((DCI1_1_5MHz_FDD_t*)DLSCH_dci)->rballoc = allocate_prbs_sub(nb_rb,rballoc_sub);
((DCI1_1_5MHz_FDD_t*)DLSCH_dci)->rah = 0; ((DCI1_1_5MHz_FDD_t*)DLSCH_dci)->rah = 0;
...@@ -1632,8 +1632,8 @@ fill_DLSCH_dci( ...@@ -1632,8 +1632,8 @@ fill_DLSCH_dci(
LOG_D(MAC,"[eNB %d] CC_id %d Adding Format 2A UE %d spec DCI for %d PRBS (rb alloc: %x) \n", LOG_D(MAC,"[eNB %d] CC_id %d Adding Format 2A UE %d spec DCI for %d PRBS (rb alloc: %x) \n",
module_idP, CC_id, UE_id, nb_rb); module_idP, CC_id, UE_id, nb_rb);
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { if (PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.frame_type == TDD) {
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: case 6:
((DCI2A_1_5MHz_2A_TDD_t*)DLSCH_dci)->rballoc = allocate_prbs_sub(nb_rb,rballoc_sub); ((DCI2A_1_5MHz_2A_TDD_t*)DLSCH_dci)->rballoc = allocate_prbs_sub(nb_rb,rballoc_sub);
((DCI2A_1_5MHz_2A_TDD_t*)DLSCH_dci)->rah = 0; ((DCI2A_1_5MHz_2A_TDD_t*)DLSCH_dci)->rah = 0;
...@@ -1672,7 +1672,7 @@ fill_DLSCH_dci( ...@@ -1672,7 +1672,7 @@ fill_DLSCH_dci(
} else { } else {
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: case 6:
((DCI2A_1_5MHz_2A_FDD_t*)DLSCH_dci)->rballoc = allocate_prbs_sub(nb_rb,rballoc_sub); ((DCI2A_1_5MHz_2A_FDD_t*)DLSCH_dci)->rballoc = allocate_prbs_sub(nb_rb,rballoc_sub);
((DCI2A_1_5MHz_2A_FDD_t*)DLSCH_dci)->rah = 0; ((DCI2A_1_5MHz_2A_FDD_t*)DLSCH_dci)->rah = 0;
...@@ -1834,7 +1834,7 @@ update_ul_dci( ...@@ -1834,7 +1834,7 @@ update_ul_dci(
int i; int i;
DCI0_5MHz_TDD_1_6_t *ULSCH_dci = NULL;; DCI0_5MHz_TDD_1_6_t *ULSCH_dci = NULL;;
if (mac_xface->lte_frame_parms->frame_type == TDD) { if (mac_xface->frame_parms->frame_type == TDD) {
for (i=0; i<DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci; i++) { for (i=0; i<DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci; i++) {
ULSCH_dci = (DCI0_5MHz_TDD_1_6_t *)DCI_pdu->dci_alloc[i].dci_pdu; ULSCH_dci = (DCI0_5MHz_TDD_1_6_t *)DCI_pdu->dci_alloc[i].dci_pdu;
......
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.
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