Commit e50566cb authored by Sakthivel Velumani's avatar Sakthivel Velumani

updated more

parent 961a06cd
......@@ -1116,6 +1116,13 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
} else {
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
}
} else if (mu == NR_MU_3) {
if (N_RB == 66) {
cfg->sample_rate = 122.88e6;
cfg->samples_per_frame = 1228800;
cfg->tx_bw = 100e6;
cfg->rx_bw = 100e6;
}
} else {
AssertFatal(0 == 1,"Numerology %d not supported for the moment\n",mu);
}
......
......@@ -531,11 +531,11 @@ void set_default_frame_parms(nfapi_nr_config_request_t *config[MAX_NUM_CCs],
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
frame_parms[CC_id] = (NR_DL_FRAME_PARMS *) malloc(sizeof(NR_DL_FRAME_PARMS));
config[CC_id] = (nfapi_nr_config_request_t *) malloc(sizeof(nfapi_nr_config_request_t));
config[CC_id]->subframe_config.numerology_index_mu.value =1;
config[CC_id]->subframe_config.numerology_index_mu.value =3;
config[CC_id]->subframe_config.duplex_mode.value = 1; //FDD
config[CC_id]->subframe_config.dl_cyclic_prefix_type.value = 0; //NORMAL
config[CC_id]->rf_config.dl_carrier_bandwidth.value = 106;
config[CC_id]->rf_config.ul_carrier_bandwidth.value = 106;
config[CC_id]->rf_config.dl_carrier_bandwidth.value = 66;
config[CC_id]->rf_config.ul_carrier_bandwidth.value = 66;
config[CC_id]->sch_config.physical_cell_id.value = 0;
///dl frequency to be filled in
/* //Set some default values that may be overwritten while reading options
......
......@@ -297,6 +297,12 @@ static void UE_synch(void *arg) {
openair0_cfg[UE->rf_map.card].tx_bw=10.0e6;
// openair0_cfg[0].rx_gain[0] -= 0;
break;
case 66:
openair0_cfg[UE->rf_map.card].sample_rate=122.88e6;
openair0_cfg[UE->rf_map.card].rx_bw=100.e6;
openair0_cfg[UE->rf_map.card].tx_bw=100.e6;
break;
}
if (UE->mode != loop_through_memory) {
......
......@@ -191,7 +191,7 @@ uint64_t num_missed_slots=0; // counter for the number of missed slots
int transmission_mode=1;
int numerology = 0;
int numerology = 3;
/* flag set by eNB conf file to specify if the radio head is local or remote (default option is local) */
//uint8_t local_remote_radio = BBU_LOCAL_RADIO_HEAD;
......
......@@ -807,7 +807,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
NRRRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL;
//if(N_RB_DL == 217) sf_ahead = 2;
//else if(N_RB_DL == 106) sf_ahead = 4;
if ((N_RB_DL != 273) && (N_RB_DL != 217) && (N_RB_DL != 106))
if ((N_RB_DL != 273) && (N_RB_DL != 217) && (N_RB_DL != 106) && (N_RB_DL != 66))
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 106, 217 !\n", RC.config_file_name, i, N_RB_DL);
/*
......
......@@ -56,7 +56,7 @@ nr_bandentry_t nr_bandtable[] = {
{74, 1427000, 1470000, 1475000, 1518000, 20, 295000},
{75, 000, 000, 1432000, 1517000, 20, 286400},
{76, 000, 000, 1427000, 1432000, 20, 285400},
{77, 3300000, 4200000, 3300000, 4200000, 1, 620000},
//{77, 3300000, 4200000, 3300000, 4200000, 1, 620000},
{78, 3300000, 3800000, 3300000, 3800000, 1, 620000},
{79, 4400000, 5000000, 4400000, 5000000, 2, 693334},
{80, 1710000, 1785000, 000, 000, 20, 342000},
......@@ -64,53 +64,46 @@ nr_bandentry_t nr_bandtable[] = {
{82, 832000, 862000, 000, 000, 20, 166400},
{83, 703000, 748000, 000, 000, 20, 140600},
{84, 1920000, 1980000, 000, 000, 20, 384000},
{86, 1710000, 1785000, 000, 000, 20, 342000}
{86, 1710000, 1785000, 000, 000, 20, 342000},
{257, 26500000, 29500000,26500000,29500000, 1, 2054167} ///// Added this line ---- src572
};
#define NR_BANDTABLE_SIZE (sizeof(nr_bandtable)/sizeof(nr_bandentry_t))
void get_band(uint64_t downlink_frequency,
uint16_t *current_band,
void get_band(uint64_t downlink_frequency, ///// -----src572
uint16_t *current_band, ///// ----src572 changed from 8 to 16 bit to hold 257 band
int32_t *current_offset,
lte_frame_type_t *current_type)
{
int ind;
uint64_t center_frequency_khz;
uint64_t center_freq_diff_khz;
uint64_t dl_freq_khz = downlink_frequency/1000;
center_freq_diff_khz = 999999999999999999; // 2^64
*current_band = 0;
int64_t dl_freq_khz = downlink_frequency/1000;
fprintf(stderr, "The value of dl_freq_khz in get_band() is %llu size of nr_bandtable = %d \n",(long long unsigned int)dl_freq_khz,sizeof(nr_bandtable) / sizeof(nr_bandtable[0]));
for ( ind=0;
ind < sizeof(nr_bandtable) / sizeof(nr_bandtable[0]);
ind++) {
LOG_I(PHY, "Scanning band %d, dl_min %"PRIu64", ul_min %"PRIu64"\n", nr_bandtable[ind].band, nr_bandtable[ind].dl_min,nr_bandtable[ind].ul_min);
if ( nr_bandtable[ind].dl_min <= dl_freq_khz && nr_bandtable[ind].dl_max >= dl_freq_khz ) {
center_frequency_khz = (nr_bandtable[ind].dl_max + nr_bandtable[ind].dl_min)/2;
if (abs(dl_freq_khz - center_frequency_khz) < center_freq_diff_khz){
*current_band = nr_bandtable[ind].band;
*current_offset = (nr_bandtable[ind].ul_min - nr_bandtable[ind].dl_min)*1000;
center_freq_diff_khz = abs(dl_freq_khz - center_frequency_khz);
if (*current_offset == 0)
*current_type = TDD;
else
*current_type = FDD;
}
ind++)
{
*current_band = nr_bandtable[ind].band;
LOG_I(PHY, "Scanning band %d,current_band %d, dl_min %"PRIu64", ul_max %"PRIu64"\n",*current_band, nr_bandtable[ind].band, nr_bandtable[ind].dl_min,nr_bandtable[ind].dl_max);
if ( nr_bandtable[ind].dl_min <= dl_freq_khz && nr_bandtable[ind].dl_max >= dl_freq_khz )
{
fprintf(stderr, "entering loop to find band() is %d \n", *current_band );
*current_offset = (nr_bandtable[ind].ul_min - nr_bandtable[ind].dl_min)*1000;
if (*current_offset == 0)
*current_type = TDD;
else
*current_type = FDD;
LOG_I( PHY, "DL frequency %"PRIu64": band %d, frame_type %d,TDD %d UL frequency %"PRIu64"\n",
downlink_frequency, *current_band, *current_type, TDD, downlink_frequency+*current_offset);
break;
}
}
LOG_I( PHY, "DL frequency %"PRIu32": band %d, frame_type %d, UL frequency %"PRIu32"\n",
downlink_frequency, *current_band, *current_type, downlink_frequency+*current_offset);
AssertFatal(*current_band != 0,
AssertFatal(ind != (sizeof(nr_bandtable) / sizeof(nr_bandtable[0])),
"Can't find EUTRA band for frequency %u\n", downlink_frequency);
}
uint32_t to_nrarfcn(int nr_bandP,
......@@ -122,9 +115,9 @@ uint32_t to_nrarfcn(int nr_bandP,
int i;
LOG_I(MAC,"Searching for nr band %d DL Carrier frequency %llu bw %u\n",nr_bandP,(long long unsigned int)dl_CarrierFreq,bw);
AssertFatal(nr_bandP < 86, "nr_band %d > 86\n", nr_bandP);
for (i = 0; i < 30 && nr_bandtable[i].band != nr_bandP; i++);
LOG_I(MAC,"Searching for nr band %d DL Carrier frequency %llu bw %d\n",nr_bandP,(long long unsigned int)dl_CarrierFreq,bw);
//AssertFatal(nr_bandP < 86, "nr_band %d > 86\n", nr_bandP);
for (i = 0; i < 33 && nr_bandtable[i].band != nr_bandP; i++); //the loop was till 30. why?
AssertFatal(dl_CarrierFreq_by_1k >= nr_bandtable[i].dl_min,
"Band %d, bw %u : DL carrier frequency %llu kHz < %llu\n",
......@@ -156,8 +149,8 @@ uint64_t from_nrarfcn(int nr_bandP,
if (nr_bandP < 77 || nr_bandP > 79) deltaFglobal = 5;
else deltaFglobal = 15;
AssertFatal(nr_bandP < 87, "nr_band %d > 86\n", nr_bandP);
for (i = 0; i < 31 && nr_bandtable[i].band != nr_bandP; i++);
//AssertFatal(nr_bandP < 87, "nr_band %d > 86\n", nr_bandP);
for (i = 0; i < 33 && nr_bandtable[i].band != nr_bandP; i++);
AssertFatal(dl_nrarfcn>=nr_bandtable[i].N_OFFs_DL,"dl_nrarfcn %u < N_OFFs_DL %llu\n",dl_nrarfcn, (long long unsigned int)nr_bandtable[i].N_OFFs_DL);
return 1000*(nr_bandtable[i].dl_min + (dl_nrarfcn - nr_bandtable[i].N_OFFs_DL) * deltaFglobal);
......
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