Commit 7e6b4ccd authored by Florian Kaltenberger's avatar Florian Kaltenberger

fixed bug in lte-softmodem (messup with CC_id), fixed phy_scope, added support...

fixed bug in lte-softmodem (messup with CC_id), fixed phy_scope, added support for multiple bandwidth in openair0_lib, minor log updates


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5721 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 263571b0
......@@ -5110,7 +5110,7 @@ double sinr_eff_cqi_calc(PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id){
sinr_eff_qam64 = (p_qam64[0]*pow(I_qam64_avg,7) + p_qam64[1]*pow(I_qam64_avg,6) + p_qam64[2]*pow(I_qam64_avg,5) + p_qam64[3]*pow(I_qam64_avg,4) + p_qam64[4]*pow(I_qam64_avg,3) + p_qam64[5]*pow(I_qam64_avg,2) + p_qam64[6]*I_qam64_avg + p_qam64[7]);
sinr_eff = cmax3(sinr_eff_qpsk,sinr_eff_qam16,sinr_eff_qam64);
msg("SINR_Eff = %e\n",sinr_eff);
//msg("SINR_Eff = %e\n",sinr_eff);
return(sinr_eff);
}
......
......@@ -158,7 +158,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
float *chest_f_abs;
float time[FRAME_LENGTH_COMPLEX_SAMPLES];
float freq[nsymb_ce*nb_antennas_rx*nb_antennas_tx];
int frame = phy_vars_enb->frame;
int frame = phy_vars_enb->proc[0].frame_tx;
uint32_t total_dlsch_bitrate = phy_vars_enb->total_dlsch_bitrate;
int coded_bits_per_codeword = 0;
uint8_t harq_pid; // in TDD config 3 it is sf-2, i.e., can be 0,1,2
......@@ -469,6 +469,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->nb_rb,
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->rb_alloc,
get_Qm(mcs),
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->Nl,
num_pdcch_symbols,
frame,
subframe);
......
......@@ -1688,10 +1688,10 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
}
} // RA is scheduled in this subframeP
printf("Doing UE_spec DCIs\n");
LOG_I(MAC,"Doing UE_spec DCIs\n");
// UE specific DCIs
for (UE_id=UE_list->head;UE_id>=0;UE_id=UE_list->next[UE_id]) {
printf("UE_id: %d => status %d\n",UE_id,eNB_dlsch_info[module_idP][UE_id].status);
LOG_I(MAC,"UE_id: %d => status %d\n",UE_id,eNB_dlsch_info[module_idP][UE_id].status);
if (eNB_dlsch_info[module_idP][UE_id].status == S_DL_SCHEDULED) {
// clear scheduling flag
......
......@@ -255,7 +255,7 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
// Initialize card
int ret;
int ant;
int resampling_factor=2;
ret = openair0_open();
......@@ -292,11 +292,23 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
p_exmimo_config->framing.eNB_flag = 1;//!UE_flag;
p_exmimo_config->framing.tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
if (openair0_cfg->sample_rate==30.72e6)
resampling_factor = 0;
else if (openair0_cfg->sample_rate==15.36e6)
resampling_factor = 1;
else if (openair0_cfg->sample_rate==7.68e6)
resampling_factor = 2;
else {
printf("Sampling rate not supported, using default 7.68MHz");
resampling_factor = 2;
}
#if (BOARD_SWREV_CNTL2>=0x0A)
for (ant=0; ant<4; ant++)
p_exmimo_config->framing.resampling_factor[ant] = 2;
p_exmimo_config->framing.resampling_factor[ant] = resampling_factor;
#else
p_exmimo_config->framing.resampling_factor = 2;
p_exmimo_config->framing.resampling_factor = resampling_factor;
#endif
if (!openair0_cfg) {
......
......@@ -84,6 +84,6 @@ int openair0_stop(int card);
int openair0_stop_without_reset(int card);
// return the DAQ block counter
unsigned int *openair0_daq_cnt();
unsigned int *openair0_daq_cnt(void);
#endif
......@@ -424,14 +424,14 @@ static void *scope_thread(void *arg) {
# ifdef ENABLE_XFORMS_WRITE_STATS
len =
# endif
dump_ue_stats (PHY_vars_UE_g[0], stats_buffer, 0, mode,rx_input_level_dBm);
dump_ue_stats (PHY_vars_UE_g[0][0], stats_buffer, 0, mode,rx_input_level_dBm);
fl_set_object_label(form_stats->stats_text, stats_buffer);
# ifdef ENABLE_XFORMS_WRITE_STATS
rewind (UE_stats);
fwrite (stats_buffer, 1, len, UE_stats);
# endif
phy_scope_UE(form_ue[UE_id],
PHY_vars_UE_g[UE_id],
PHY_vars_UE_g[UE_id][0],
eNB_id,
UE_id,7);
......@@ -1047,7 +1047,6 @@ void init_eNB_proc() {
pthread_attr_setschedparam (&attr_eNB_proc_rx[CC_id][i], &sched_param_eNB_proc_rx[CC_id][i]);
pthread_attr_setschedpolicy (&attr_eNB_proc_rx[CC_id][i], SCHED_FIFO);
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
PHY_vars_eNB_g[0][CC_id]->proc[i].instance_cnt_tx=-1;
PHY_vars_eNB_g[0][CC_id]->proc[i].instance_cnt_rx=-1;
PHY_vars_eNB_g[0][CC_id]->proc[i].subframe=i;
......@@ -1067,7 +1066,6 @@ void init_eNB_proc() {
PHY_vars_eNB_g[0][CC_id]->proc[i].subframe_rx = i;
PHY_vars_eNB_g[0][CC_id]->proc[i].subframe_tx = (i+2)%10;
#endif
}
}
......@@ -1371,10 +1369,10 @@ static void *eNB_thread(void *arg)
if (multi_thread == 0) {
if ((slot&1) == 0) {
LOG_I(PHY,"[eNB] Single thread slot %d\n",slot);
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
phy_procedures_eNB_lte ((2+(slot>>1))%10, PHY_vars_eNB_g[0][CC_id], 0, no_relay,NULL);
do_OFDM_mod((2+(slot>>1))%10,PHY_vars_eNB_g[0][CC_id]);
}
phy_procedures_eNB_lte ((2+(slot>>1))%10, PHY_vars_eNB_g[0], 0, no_relay,NULL);
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
do_OFDM_mod((2+(slot>>1))%10,PHY_vars_eNB_g[0][CC_id]);
}
}
}
else { // multi-thread > 0
......@@ -1881,8 +1879,8 @@ static void get_options (int argc, char **argv) {
frame_parms->tdd_config_S = enb_properties->properties[i]->tdd_config_s;
for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){
frame_parms->Nid_cell = enb_properties->properties[i]->cell_id;
frame_parms->N_RB_DL = enb_properties->properties[i]->N_RB_DL;
frame_parms->Nid_cell = enb_properties->properties[i]->cell_id[j];
frame_parms->N_RB_DL = enb_properties->properties[i]->N_RB_DL[j];
} // j
glog_level = enb_properties->properties[i]->glog_level;
......@@ -1941,7 +1939,9 @@ int main(int argc, char **argv) {
// int ret, ant;
int ant_offset=0;
#ifdef XFORMS
int ret;
#endif
#if defined (EMOS) || (! defined (RTAI))
int error_code;
#endif
......@@ -2204,7 +2204,7 @@ int main(int argc, char **argv) {
NB_INST=1;
openair_daq_vars.ue_dl_rb_alloc=0x1fff;
openair_daq_vars.target_ue_dl_mcs=16;
openair_daq_vars.target_ue_dl_mcs=20;
openair_daq_vars.ue_ul_nb_rb=6;
openair_daq_vars.target_ue_ul_mcs=6;
......
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