Commit beb51bc8 authored by trilyrak's avatar trilyrak

updates for rrh configuration params

parent 705bb9b3
......@@ -209,15 +209,23 @@ typedef struct {
typedef struct {
char *remote_addr;
//! remote port number for Ethernet interface
unsigned int remote_port;
uint16_t remote_port;
//! local IP/MAC addr for Ethernet interface (eNB/BBU, UE)
char *my_addr;
//! local port number for Ethernet interface (eNB/BBU, UE)
unsigned int my_port;
//! local port number for Ethernet interface (eNB/BBU, UE)
uint16_t my_port;
//! local Ethernet interface (eNB/BBU, UE)
char *local_if_name;
//! local port number for Ethernet interface (eNB/BBU, UE)
//! tx_sample_advance for RF + ETH
uint8_t tx_sample_advance;
//! tx_scheduling_advance for RF + ETH
uint8_t tx_scheduling_advance;
//! iq_txshift for RF + ETH
uint8_t iq_txshift;
//! transport type preference (RAW/UDP)
uint8_t transp_preference;
//! radio front end preference (EXMIMO,USRP, BALDERF,LMSSDR)
uint8_t rf_preference;
} eth_params_t;
......
......@@ -344,8 +344,9 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
/* device specific */
openair0_cfg[0].txlaunch_wait = 0;//manage when TX processing is triggered
openair0_cfg[0].txlaunch_wait_slotcount = 0; //manage when TX processing is triggered
openair0_cfg[0].iq_txshift = 5;// shift
openair0_cfg[0].iq_rxrescale = 15;//rescale iqs
openair0_cfg[0].iq_txshift = eth_params->iq_txshift;// shift
openair0_cfg[0].tx_sample_advance = eth_params->tx_sample_advance;
/* RRH does not have any information to make this configuration atm */
if (device->host_type == BBU_HOST) {
......@@ -353,34 +354,25 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
switch ((int)openair0_cfg[0].sample_rate) {
case 30720000:
openair0_cfg[0].samples_per_packet = 4096;
openair0_cfg[0].tx_sample_advance = 115;
openair0_cfg[0].tx_scheduling_advance = 11*openair0_cfg[0].samples_per_packet;
break;
case 23040000:
openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 113;
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
break;
case 15360000:
openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 113;
openair0_cfg[0].tx_scheduling_advance = 9*openair0_cfg[0].samples_per_packet;
break;
case 7680000:
openair0_cfg[0].samples_per_packet = 1024;
openair0_cfg[0].tx_sample_advance = 70;
openair0_cfg[0].tx_scheduling_advance = 9*openair0_cfg[0].samples_per_packet;
break;
case 1920000:
openair0_cfg[0].samples_per_packet = 256;
openair0_cfg[0].tx_sample_advance = 40;
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
break;
default:
printf("Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate);
exit(-1);
break;
}
openair0_cfg[0].tx_scheduling_advance = eth_params->tx_scheduling_advance*openair0_cfg[0].samples_per_packet;
}
device->openair0_cfg=&openair0_cfg[0];
......
......@@ -2444,21 +2444,28 @@ static void get_options (int argc, char **argv)
eth_params = (eth_params_t*)malloc(sizeof(eth_params_t));
memset(eth_params, 0, sizeof(eth_params_t));
printf( "\n\tRRH GW %d config for eNB %u:\n\n", j, i);
printf( "\tinterface name : \t%s:\n",enb_properties->properties[i]->rrh_gw_if_name);
printf( "\tlocal address : \t%s:\n",enb_properties->properties[i]->rrh_gw_config[j].local_address);
printf( "\tlocal port : \t%d:\n",enb_properties->properties[i]->rrh_gw_config[j].local_port);
printf( "\tremote address : \t%s:\n",enb_properties->properties[i]->rrh_gw_config[j].remote_address);
printf( "\tremote port : \t%d:\n",enb_properties->properties[i]->rrh_gw_config[j].remote_port);
printf( "\ttransport : \t%s Ethernet:\n\n",(enb_properties->properties[i]->rrh_gw_config[j].raw == 1)? "RAW" : "UDP");
eth_params->local_if_name = enb_properties->properties[i]->rrh_gw_if_name;
eth_params->my_addr = enb_properties->properties[i]->rrh_gw_config[j].local_address;
eth_params->my_port = enb_properties->properties[i]->rrh_gw_config[j].local_port;
eth_params->remote_addr = enb_properties->properties[i]->rrh_gw_config[j].remote_address;
eth_params->remote_port = enb_properties->properties[i]->rrh_gw_config[j].remote_port;
eth_params->transp_preference = enb_properties->properties[i]->rrh_gw_config[j].raw;
eth_params->iq_txshift = enb_properties->properties[i]->rrh_gw_config[j].iq_txshift;
eth_params->tx_sample_advance = enb_properties->properties[i]->rrh_gw_config[j].tx_sample_advance;
eth_params->tx_scheduling_advance = enb_properties->properties[i]->rrh_gw_config[j].tx_scheduling_advance;
if (enb_properties->properties[i]->rrh_gw_config[j].exmimo == 1) {
eth_params->rf_preference = EXMIMO_DEV;
} else if (enb_properties->properties[i]->rrh_gw_config[j].usrp_b200 == 1) {
eth_params->rf_preference = USRP_B200_DEV;
} else if (enb_properties->properties[i]->rrh_gw_config[j].usrp_x300 == 1) {
eth_params->rf_preference = USRP_X300_DEV;
} else if (enb_properties->properties[i]->rrh_gw_config[j].bladerf == 1) {
eth_params->rf_preference = BLADERF_DEV;
} else if (enb_properties->properties[i]->rrh_gw_config[j].lmssdr == 1) {
//eth_params->rf_preference = LMSSDR_DEV;
} else {
eth_params->rf_preference = 0;
}
} else {
local_remote_radio = BBU_LOCAL_RADIO_HEAD;
}
......
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