Commit 60e6c600 authored by Sravan Chintareddy's avatar Sravan Chintareddy

numerology fixes

parent 8d9069e9
...@@ -488,7 +488,7 @@ void set_default_frame_parms(NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) { ...@@ -488,7 +488,7 @@ void set_default_frame_parms(NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
/* Set some default values that may be overwritten while reading options */ /* Set some default values that may be overwritten while reading options */
frame_parms[CC_id] = (NR_DL_FRAME_PARMS *) calloc(sizeof(NR_DL_FRAME_PARMS),1); frame_parms[CC_id] = (NR_DL_FRAME_PARMS *) calloc(sizeof(NR_DL_FRAME_PARMS),1);
frame_parms[CC_id]->eutra_band = 257; frame_parms[CC_id]->eutra_band = 257;
frame_parms[CC_id]->frame_type = FDD; frame_parms[CC_id]->frame_type = TDD; //FDD; // TDD?
frame_parms[CC_id]->tdd_config = 3; frame_parms[CC_id]->tdd_config = 3;
//frame_parms[CC_id]->tdd_config_S = 0; //frame_parms[CC_id]->tdd_config_S = 0;
frame_parms[CC_id]->N_RB_DL = 66; frame_parms[CC_id]->N_RB_DL = 66;
...@@ -511,7 +511,8 @@ void set_default_frame_parms(NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) { ...@@ -511,7 +511,8 @@ void set_default_frame_parms(NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
void init_openair0(void) { void init_openair0(void) {
int card; int card;
int i; int i;
fprintf(stderr, " The value of numerology in init_openair0 is %d\n",numerology ); //why is it 1 here?
numerology = 3; // Hardcoded for testing
for (card=0; card<MAX_CARDS; card++) { for (card=0; card<MAX_CARDS; card++) {
openair0_cfg[card].configFilename = NULL; openair0_cfg[card].configFilename = NULL;
openair0_cfg[card].threequarter_fs = frame_parms[0]->threequarter_fs; openair0_cfg[card].threequarter_fs = frame_parms[0]->threequarter_fs;
...@@ -720,10 +721,12 @@ int main( int argc, char **argv ) { ...@@ -720,10 +721,12 @@ int main( int argc, char **argv ) {
NB_INST=1; NB_INST=1;
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE **)); PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE **));
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE *)*MAX_NUM_CCs); PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE *)*MAX_NUM_CCs);
fprintf(stderr, "$$ The value of numerology in uesoftmodem main is %d $$\n",numerology );
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
printf("frame_parms %d\n",frame_parms[CC_id]->ofdm_symbol_size); printf("frame_parms %d\n",frame_parms[CC_id]->ofdm_symbol_size);
nr_init_frame_parms_ue(frame_parms[CC_id],numerology,NORMAL,frame_parms[CC_id]->N_RB_DL,(frame_parms[CC_id]->N_RB_DL-20)>>1,0); //nr_init_frame_parms_ue(frame_parms[CC_id],numerology,NORMAL,frame_parms[CC_id]->N_RB_DL,(frame_parms[CC_id]->N_RB_DL-20)>>1,0);
nr_init_frame_parms_ue(frame_parms[CC_id],3,NORMAL,frame_parms[CC_id]->N_RB_DL,(frame_parms[CC_id]->N_RB_DL-20)>>1,0); //I dont understand why the numerology is still 1?
PHY_vars_UE_g[0][CC_id] = init_nr_ue_vars(frame_parms[CC_id], 0,abstraction_flag); PHY_vars_UE_g[0][CC_id] = init_nr_ue_vars(frame_parms[CC_id], 0,abstraction_flag);
UE[CC_id] = PHY_vars_UE_g[0][CC_id]; UE[CC_id] = PHY_vars_UE_g[0][CC_id];
...@@ -753,7 +756,7 @@ int main( int argc, char **argv ) { ...@@ -753,7 +756,7 @@ int main( int argc, char **argv ) {
if (frame_parms[CC_id]->frame_type==FDD) { if (frame_parms[CC_id]->frame_type==FDD) {
UE[CC_id]->N_TA_offset = 0; UE[CC_id]->N_TA_offset = 0;
} else { } else {
if (frame_parms[CC_id]->N_RB_DL == 100) if (frame_parms[CC_id]->N_RB_DL == 100) // for TDD for N_RB_DL 66 what is the value?
UE[CC_id]->N_TA_offset = 624; UE[CC_id]->N_TA_offset = 624;
else if (frame_parms[CC_id]->N_RB_DL == 50) else if (frame_parms[CC_id]->N_RB_DL == 50)
UE[CC_id]->N_TA_offset = 624/2; UE[CC_id]->N_TA_offset = 624/2;
......
...@@ -90,7 +90,7 @@ int main(int argc, char **argv) ...@@ -90,7 +90,7 @@ int main(int argc, char **argv)
//char input_val_str[50],input_val_str2[50]; //char input_val_str[50],input_val_str2[50];
//uint16_t NB_RB=25; //uint16_t NB_RB=25;
SCM_t channel_model = AWGN; //Rayleigh1_anticorr; SCM_t channel_model = AWGN; //Rayleigh1_anticorr;
uint16_t N_RB_DL = 106, mu = 1; uint16_t N_RB_DL = 106, mu = 1; //1
//unsigned char frame_type = 0; //unsigned char frame_type = 0;
unsigned char pbch_phase = 0; unsigned char pbch_phase = 0;
int frame = 0, slot = 0; int frame = 0, slot = 0;
......
...@@ -102,7 +102,7 @@ int main(int argc, char **argv) ...@@ -102,7 +102,7 @@ int main(int argc, char **argv)
SCM_t channel_model=AWGN;//Rayleigh1_anticorr; SCM_t channel_model=AWGN;//Rayleigh1_anticorr;
int N_RB_DL=273,mu=1; int N_RB_DL=273,mu=3; //mu=1 here
//unsigned char frame_type = 0; //unsigned char frame_type = 0;
unsigned char pbch_phase = 0; unsigned char pbch_phase = 0;
......
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