Commit 0c7d99c6 authored by root's avatar root

Add numerology for RF

parent c1f9764d
...@@ -488,8 +488,6 @@ extern "C" { ...@@ -488,8 +488,6 @@ extern "C" {
// workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate // workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate
args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock);
// args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096";
// args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096"; // args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096";
uhd::device_addrs_t device_adds = uhd::device::find(args); uhd::device_addrs_t device_adds = uhd::device::find(args);
...@@ -516,6 +514,20 @@ extern "C" { ...@@ -516,6 +514,20 @@ extern "C" {
openair0_cfg[0].rx_gain_calib_table = calib_table_x310; openair0_cfg[0].rx_gain_calib_table = calib_table_x310;
switch ((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 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 30720000: case 30720000:
// from usrp_time_offset // from usrp_time_offset
//openair0_cfg[0].samples_per_packet = 2048; //openair0_cfg[0].samples_per_packet = 2048;
......
...@@ -16,7 +16,7 @@ eNBs = ...@@ -16,7 +16,7 @@ eNBs =
tracking_area_code = "1"; tracking_area_code = "1";
mobile_country_code = "208"; mobile_country_code = "208";
mobile_network_code = "92"; mobile_network_code = "94";
////////// Physical parameters: ////////// Physical parameters:
......
...@@ -181,6 +181,7 @@ uint8_t exit_missed_slots=1; ...@@ -181,6 +181,7 @@ uint8_t exit_missed_slots=1;
uint64_t num_missed_slots=0; // counter for the number of missed slots uint64_t num_missed_slots=0; // counter for the number of missed slots
int transmission_mode=1; int transmission_mode=1;
int numerology = 0;
int16_t glog_level = LOG_INFO; int16_t glog_level = LOG_INFO;
int16_t glog_verbosity = LOG_MED; int16_t glog_verbosity = LOG_MED;
...@@ -701,7 +702,7 @@ static void get_options (int argc, char **argv) { ...@@ -701,7 +702,7 @@ static void get_options (int argc, char **argv) {
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
while ((c = getopt_long (argc, argv, "A:a:C:dEK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:Tx:",long_options,NULL)) != -1) { while ((c = getopt_long (argc, argv, "A:a:C:dEK:g:F:G:hqO:m:n:SUVRM:r:P:Ws:t:Tx:",long_options,NULL)) != -1) {
switch (c) { switch (c) {
case LONG_OPTION_RF_CONFIG_FILE: case LONG_OPTION_RF_CONFIG_FILE:
if ((strcmp("null", optarg) == 0) || (strcmp("NULL", optarg) == 0)) { if ((strcmp("null", optarg) == 0) || (strcmp("NULL", optarg) == 0)) {
...@@ -1054,6 +1055,10 @@ static void get_options (int argc, char **argv) { ...@@ -1054,6 +1055,10 @@ static void get_options (int argc, char **argv) {
frame_parms[CC_id]->frame_type = TDD; frame_parms[CC_id]->frame_type = TDD;
break; break;
case 'n':
numerology=atoi(optarg);
break;
case 'h': case 'h':
help (); help ();
exit (-1); exit (-1);
...@@ -1309,6 +1314,7 @@ void init_openair0() { ...@@ -1309,6 +1314,7 @@ void init_openair0() {
openair0_cfg[card].configFilename = NULL; openair0_cfg[card].configFilename = NULL;
if(frame_parms[0]->N_RB_DL == 100) { if(frame_parms[0]->N_RB_DL == 100) {
if (numerology==0) {
if (frame_parms[0]->threequarter_fs) { if (frame_parms[0]->threequarter_fs) {
openair0_cfg[card].sample_rate=23.04e6; openair0_cfg[card].sample_rate=23.04e6;
openair0_cfg[card].samples_per_frame = 230400; openair0_cfg[card].samples_per_frame = 230400;
...@@ -1320,6 +1326,20 @@ void init_openair0() { ...@@ -1320,6 +1326,20 @@ void init_openair0() {
openair0_cfg[card].tx_bw = 10e6; openair0_cfg[card].tx_bw = 10e6;
openair0_cfg[card].rx_bw = 10e6; openair0_cfg[card].rx_bw = 10e6;
} }
} else if (numerology==1) {
openair0_cfg[card].sample_rate=61.44e6;
openair0_cfg[card].samples_per_frame = 307200;
openair0_cfg[card].tx_bw = 20e6;
openair0_cfg[card].rx_bw = 20e6;
} else if (numerology==2) {
openair0_cfg[card].sample_rate=122.88e6;
openair0_cfg[card].samples_per_frame = 307200;
openair0_cfg[card].tx_bw = 40e6;
openair0_cfg[card].rx_bw = 40e6;
} else {
LOG_E(PHY,"Unsupported numerology!\n");
exit(-1);
}
} else if(frame_parms[0]->N_RB_DL == 50) { } else if(frame_parms[0]->N_RB_DL == 50) {
openair0_cfg[card].sample_rate=15.36e6; openair0_cfg[card].sample_rate=15.36e6;
openair0_cfg[card].samples_per_frame = 153600; openair0_cfg[card].samples_per_frame = 153600;
......
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