Commit a413f12d authored by Florian Kaltenberger's avatar Florian Kaltenberger

adding support for bandwidths 40 and 80 MHz to usrp_lib and rru

parent dc30b30b
......@@ -1016,6 +1016,30 @@ extern "C" {
LOG_I(PHY,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate);
switch ((int)openair0_cfg[0].sample_rate) {
case 122880000:
// from usrp_time_offset
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 15; //to be checked
openair0_cfg[0].tx_bw = 80e6;
openair0_cfg[0].rx_bw = 80e6;
break;
case 92160000:
openair0_cfg[0].tx_sample_advance = 15; //to be checked
openair0_cfg[0].tx_bw = 80e6;
openair0_cfg[0].rx_bw = 80e6;
break;
case 61440000:
// from usrp_time_offset
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 15;
openair0_cfg[0].tx_bw = 40e6;
openair0_cfg[0].rx_bw = 40e6;
break;
case 46080000:
openair0_cfg[0].tx_sample_advance = 15;
openair0_cfg[0].tx_bw = 40e6;
openair0_cfg[0].rx_bw = 40e6;
break;
case 30720000:
// from usrp_time_offset
//openair0_cfg[0].samples_per_packet = 2048;
......@@ -1023,6 +1047,11 @@ extern "C" {
openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 20e6;
break;
case 23040000:
openair0_cfg[0].tx_sample_advance = 15;
openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 20e6;
break;
case 15360000:
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 45;
......
......@@ -627,7 +627,7 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
}
/*
void init_openair0(void) {
int card;
......@@ -710,9 +710,9 @@ void init_openair0(void) {
openair0_cfg[card].tx_freq[i],
openair0_cfg[card].rx_freq[i]);
}
} /* for loop on cards */
} // for loop on cards
}
*/
void wait_RUs(void) {
......
......@@ -1168,38 +1168,66 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
nfapi_config_request_t *gNB_config = ru->gNB_list[0]->gNB_config; //tmp index
openair0_config_t *cfg = &ru->openair0_cfg;
int N_RB = gNB_config->rf_config.dl_channel_bandwidth.value;
if(N_RB == 100) {
if (fp->threequarter_fs) {
cfg->sample_rate=23.04e6;
cfg->samples_per_frame = 230400;
cfg->tx_bw = 10e6;
cfg->rx_bw = 10e6;
}
else {
cfg->sample_rate=30.72e6;
cfg->samples_per_frame = 307200;
cfg->tx_bw = 10e6;
cfg->rx_bw = 10e6;
}
} else if(N_RB == 50) {
cfg->sample_rate=15.36e6;
cfg->samples_per_frame = 153600;
cfg->tx_bw = 5e6;
cfg->rx_bw = 5e6;
} else if (N_RB == 25) {
cfg->sample_rate=7.68e6;
cfg->samples_per_frame = 76800;
cfg->tx_bw = 2.5e6;
cfg->rx_bw = 2.5e6;
} else if (N_RB == 6) {
cfg->sample_rate=1.92e6;
cfg->samples_per_frame = 19200;
cfg->tx_bw = 1.5e6;
cfg->rx_bw = 1.5e6;
int mu = gNB_config->subframe_config.numerology_index_mu.value;
if (mu == NR_MU_0) { //or if LTE
if(N_RB == 100) {
if (fp->threequarter_fs) {
cfg->sample_rate=23.04e6;
cfg->samples_per_frame = 230400;
cfg->tx_bw = 10e6;
cfg->rx_bw = 10e6;
}
else {
cfg->sample_rate=30.72e6;
cfg->samples_per_frame = 307200;
cfg->tx_bw = 10e6;
cfg->rx_bw = 10e6;
}
} else if(N_RB == 50) {
cfg->sample_rate=15.36e6;
cfg->samples_per_frame = 153600;
cfg->tx_bw = 5e6;
cfg->rx_bw = 5e6;
} else if (N_RB == 25) {
cfg->sample_rate=7.68e6;
cfg->samples_per_frame = 76800;
cfg->tx_bw = 2.5e6;
cfg->rx_bw = 2.5e6;
} else if (N_RB == 6) {
cfg->sample_rate=1.92e6;
cfg->samples_per_frame = 19200;
cfg->tx_bw = 1.5e6;
cfg->rx_bw = 1.5e6;
}
else AssertFatal(1==0,"Unknown N_RB %d\n",N_RB);
}
else AssertFatal(1==0,"Unknown N_RB %d\n",N_RB);
else if (mu == NR_MU_1) {
if(N_RB == 217) {
if (fp->threequarter_fs) {
cfg->sample_rate=92.16e6;
cfg->samples_per_frame = 921600;
cfg->tx_bw = 40e6;
cfg->rx_bw = 40e6;
}
else {
cfg->sample_rate=122.88e6;
cfg->samples_per_frame = 1228800;
cfg->tx_bw = 40e6;
cfg->rx_bw = 40e6;
}
} else if(N_RB == 106) {
cfg->sample_rate=61.44e6;
cfg->samples_per_frame = 614400;
cfg->tx_bw = 20e6;
cfg->rx_bw = 20e6;
} else {
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
}
} else {
AssertFatal(0 == 1,"Numerology %d not supported for the moment\n",mu);
}
if (gNB_config->subframe_config.duplex_mode.value==TDD)
cfg->duplex_mode = duplex_mode_TDD;
else //FDD
......
......@@ -642,7 +642,7 @@ void set_default_frame_parms(nfapi_config_request_t *config[MAX_NUM_CCs], NR_DL_
}
/*
void init_openair0(void) {
int card;
......@@ -725,9 +725,9 @@ void init_openair0(void) {
openair0_cfg[card].tx_freq[i],
openair0_cfg[card].rx_freq[i]);
}
} /* for loop on cards */
} // for loop on cards
}
*/
void wait_RUs(void) {
......
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