bugfixes in lte-softmodem re N_RB_DL parameter, added filter config to openair0_lib
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5723 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -248,7 +248,7 @@ int openair0_stop_without_reset(int card)
|
||||
static exmimo_config_t *p_exmimo_config;
|
||||
static exmimo_id_t *p_exmimo_id;
|
||||
#define MY_RF_MODE (RXEN + TXEN + TXLPFNORM + TXLPFEN + TXLPF25 + RXLPFNORM + RXLPFEN + RXLPF25 + LNA1ON +LNAMax + RFBBNORM + DMAMODE_RX + DMAMODE_TX)
|
||||
#define RF_MODE_BASE (TXLPFNORM + TXLPFEN + TXLPF25 + RXLPFNORM + RXLPFEN + RXLPF25 + LNA1ON +LNAMax + RFBBNORM)
|
||||
#define RF_MODE_BASE (LNA1ON +LNAMax + RFBBNORM)
|
||||
|
||||
int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
|
||||
@@ -256,7 +256,7 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
|
||||
int ret;
|
||||
int ant;
|
||||
int resampling_factor=2;
|
||||
|
||||
int rx_filter=RXLPF25, tx_filter=TXLPF25;
|
||||
|
||||
ret = openair0_open();
|
||||
|
||||
@@ -284,7 +284,10 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
if (!openair0_cfg) {
|
||||
printf("Error, openair0_cfg is null!!\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (p_exmimo_id->board_swrev>=9)
|
||||
p_exmimo_config->framing.eNB_flag = 0;
|
||||
@@ -293,15 +296,27 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
|
||||
|
||||
p_exmimo_config->framing.tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
|
||||
|
||||
if (openair0_cfg->sample_rate==30.72e6)
|
||||
if (openair0_cfg->sample_rate==30.72e6) {
|
||||
resampling_factor = 0;
|
||||
else if (openair0_cfg->sample_rate==15.36e6)
|
||||
rx_filter = RXLPF10;
|
||||
tx_filter = TXLPF10;
|
||||
}
|
||||
else if (openair0_cfg->sample_rate==15.36e6) {
|
||||
resampling_factor = 1;
|
||||
else if (openair0_cfg->sample_rate==7.68e6)
|
||||
rx_filter = RXLPF5;
|
||||
tx_filter = TXLPF5;
|
||||
}
|
||||
else if (openair0_cfg->sample_rate==7.68e6) {
|
||||
resampling_factor = 2;
|
||||
rx_filter = RXLPF25;
|
||||
tx_filter = TXLPF25;
|
||||
}
|
||||
else {
|
||||
printf("Sampling rate not supported, using default 7.68MHz");
|
||||
resampling_factor = 2;
|
||||
rx_filter = RXLPF25;
|
||||
tx_filter = TXLPF25;
|
||||
|
||||
}
|
||||
|
||||
#if (BOARD_SWREV_CNTL2>=0x0A)
|
||||
@@ -311,16 +326,12 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
|
||||
p_exmimo_config->framing.resampling_factor = resampling_factor;
|
||||
#endif
|
||||
|
||||
if (!openair0_cfg) {
|
||||
printf("Error, openair0_cfg is null!!\n");
|
||||
return(-1);
|
||||
}
|
||||
for (ant=0;ant<max(openair0_cfg->tx_num_channels,openair0_cfg->rx_num_channels);ant++)
|
||||
p_exmimo_config->rf.rf_mode[ant] = RF_MODE_BASE;
|
||||
for (ant=0;ant<openair0_cfg->tx_num_channels;ant++)
|
||||
p_exmimo_config->rf.rf_mode[ant] += (TXEN + DMAMODE_TX);
|
||||
p_exmimo_config->rf.rf_mode[ant] += (TXEN + DMAMODE_TX + TXLPFNORM + TXLPFEN + tx_filter);
|
||||
for (ant=0;ant<openair0_cfg->rx_num_channels;ant++) {
|
||||
p_exmimo_config->rf.rf_mode[ant] += (RXEN + DMAMODE_RX);
|
||||
p_exmimo_config->rf.rf_mode[ant] += (RXEN + DMAMODE_RX + RXLPFNORM + RXLPFEN + rx_filter);
|
||||
switch (openair0_cfg->rxg_mode[ant]) {
|
||||
default:
|
||||
case max_gain:
|
||||
|
||||
@@ -304,7 +304,6 @@ static int mbox_bounds[20] = {8,16,24,30,38,46,54,60,68,7
|
||||
static LTE_DL_FRAME_PARMS *frame_parms;
|
||||
|
||||
int multi_thread=1;
|
||||
int N_RB_DL=25;
|
||||
|
||||
int16_t glog_level=LOG_DEBUG;
|
||||
int16_t glog_verbosity=LOG_MED;
|
||||
@@ -1817,21 +1816,26 @@ static void get_options (int argc, char **argv) {
|
||||
case 'r':
|
||||
switch(atoi(optarg)) {
|
||||
case 6:
|
||||
N_RB_DL=6;
|
||||
frame_parms->N_RB_DL=6;
|
||||
frame_parms->N_RB_UL=6;
|
||||
break;
|
||||
case 25:
|
||||
N_RB_DL=25;
|
||||
frame_parms->N_RB_DL=25;
|
||||
frame_parms->N_RB_UL=25;
|
||||
break;
|
||||
case 50:
|
||||
N_RB_DL=50;
|
||||
frame_parms->N_RB_DL=50;
|
||||
frame_parms->N_RB_UL=50;
|
||||
break;
|
||||
case 100:
|
||||
N_RB_DL=100;
|
||||
frame_parms->N_RB_DL=100;
|
||||
frame_parms->N_RB_UL=100;
|
||||
break;
|
||||
default:
|
||||
printf("Unknown N_RB_DL %d, switching to 25\n",atoi(optarg));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
#ifdef USRP
|
||||
|
||||
@@ -1877,11 +1881,12 @@ static void get_options (int argc, char **argv) {
|
||||
frame_parms->frame_type = enb_properties->properties[i]->frame_type;
|
||||
frame_parms->tdd_config = enb_properties->properties[i]->tdd_config;
|
||||
frame_parms->tdd_config_S = enb_properties->properties[i]->tdd_config_s;
|
||||
frame_parms->Ncp = enb_properties->properties[i]->prefix_type;
|
||||
|
||||
for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){
|
||||
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
|
||||
//for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){
|
||||
frame_parms->Nid_cell = enb_properties->properties[i]->cell_id[0];
|
||||
frame_parms->N_RB_DL = enb_properties->properties[i]->N_RB_DL[0];
|
||||
//} // j
|
||||
|
||||
glog_level = enb_properties->properties[i]->glog_level;
|
||||
glog_verbosity = enb_properties->properties[i]->glog_verbosity;
|
||||
@@ -1956,6 +1961,11 @@ int main(int argc, char **argv) {
|
||||
frame_parms->frame_type = TDD; /* TDD */
|
||||
frame_parms->tdd_config = 3;
|
||||
frame_parms->tdd_config_S = 0;
|
||||
frame_parms->N_RB_DL = 25;
|
||||
frame_parms->N_RB_UL = 25;
|
||||
frame_parms->Ncp = NORMAL;
|
||||
frame_parms->Ncp_UL = NORMAL;
|
||||
frame_parms->Nid_cell = Nid_cell;
|
||||
|
||||
get_options (argc, argv); //Command-line options
|
||||
|
||||
@@ -2055,11 +2065,6 @@ int main(int argc, char **argv) {
|
||||
#endif
|
||||
|
||||
// init the parameters
|
||||
frame_parms->N_RB_DL = N_RB_DL;
|
||||
frame_parms->N_RB_UL = N_RB_DL;
|
||||
frame_parms->Ncp = NORMAL;
|
||||
frame_parms->Ncp_UL = NORMAL;
|
||||
frame_parms->Nid_cell = Nid_cell;
|
||||
frame_parms->nushift = 0;
|
||||
if (UE_flag==0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user