Move radio configuration parameters to MAC, SIB1 not initialized!

!SIB1 is not correctly filled! This commit does not work with COTS UEs!
The next commit fixes this.

- Move radio config (e.g., minRXTXTIME, SIB1 TDA, do_SRS, etc) down to
  MAC.
- Some parameters in MAC are redundant: delete them.
- Remove call to nr_mac_config_scc() from RRC and simulators, the MAC
  initialization routine calls it implicitly
This commit is contained in:
Robert Schmidt
2023-09-22 08:22:15 +02:00
parent 67d5f56a3c
commit c930563929
21 changed files with 155 additions and 172 deletions
+17 -17
View File
@@ -239,7 +239,7 @@ nrUE_params_t *get_nrUE_params(void) {
}
void validate_input_pmi(rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts, int nrOfLayers, int pmi)
void validate_input_pmi(nr_pdsch_AntennaPorts_t pdsch_AntennaPorts, int nrOfLayers, int pmi)
{
if (pmi == 0)
return;
@@ -622,17 +622,32 @@ int main(int argc, char **argv)
frame_parms->N_RB_DL = N_RB_DL;
frame_parms->N_RB_UL = N_RB_DL;
AssertFatal((gNB->if_inst = NR_IF_Module_init(0)) != NULL, "Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(*scc));;
prepare_scc(scc);
uint64_t ssb_bitmap = 1; // Enable only first SSB with index ssb_indx=0
fill_scc_sim(scc, &ssb_bitmap, N_RB_DL, N_RB_DL, mu, mu);
fix_scc(scc, ssb_bitmap);
// TODO do a UECAP for phy-sim
nr_pdsch_AntennaPorts_t pdsch_AntennaPorts = {0};
pdsch_AntennaPorts.N1 = n_tx > 1 ? n_tx >> 1 : 1;
pdsch_AntennaPorts.N2 = 1;
pdsch_AntennaPorts.XP = n_tx > 1 ? 2 : 1;
const nr_mac_config_t conf = {.pdsch_AntennaPorts = pdsch_AntennaPorts,
.pusch_AntennaPorts = n_tx,
.minRXTXTIME = 6,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false};
RC.nb_nr_macrlc_inst = 1;
RC.nb_nr_mac_CC = (int*)malloc(RC.nb_nr_macrlc_inst*sizeof(int));
for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
RC.nb_nr_mac_CC[i] = 1;
mac_top_init_gNB(ngran_gNB, scc, NULL);
mac_top_init_gNB(ngran_gNB, scc, NULL, &conf);
gNB_mac = RC.nrmac[0];
gNB_mac->dl_bler.harq_round_max = num_rounds;
@@ -682,10 +697,6 @@ int main(int argc, char **argv)
NR_ServingCellConfig_t *scd = calloc(1,sizeof(*scd));
prepare_scd(scd);
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts = {0};
pdsch_AntennaPorts.N1 = n_tx>1 ? n_tx>>1 : 1;
pdsch_AntennaPorts.N2 = 1;
pdsch_AntennaPorts.XP = n_tx>1 ? 2 : 1;
gNB->ap_N1 = pdsch_AntennaPorts.N1;
gNB->ap_N2 = pdsch_AntennaPorts.N2;
gNB->ap_XP = pdsch_AntennaPorts.XP;
@@ -696,12 +707,6 @@ int main(int argc, char **argv)
prepare_sim_uecap(UE_Capability_nr,scc,mu,
N_RB_DL,g_mcsTableIdx,0);
// TODO do a UECAP for phy-sim
const gNB_RrcConfigurationReq conf = {.pdsch_AntennaPorts = pdsch_AntennaPorts,
.minRXTXTIME = 6,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false};
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0);
/* RRC parameter validation for secondaryCellGroup */
@@ -719,11 +724,6 @@ int main(int argc, char **argv)
//xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
// common configuration
nr_mac_config_scc(RC.nrmac[0], pdsch_AntennaPorts, n_tx, 0, 6);
// UE dedicated configuration
nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup);
// reset preprocessor to the one of DLSIM after it has been set during
+12 -14
View File
@@ -608,6 +608,9 @@ int main(int argc, char *argv[])
frame_parms->N_RB_UL = N_RB_UL;
frame_parms->Ncp = extended_prefix_flag ? EXTENDED : NORMAL;
AssertFatal((gNB->if_inst = NR_IF_Module_init(0)) != NULL, "Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
s_re = malloc(n_tx*sizeof(double*));
s_im = malloc(n_tx*sizeof(double*));
r_re = malloc(n_rx*sizeof(double*));
@@ -619,11 +622,19 @@ int main(int argc, char *argv[])
fill_scc_sim(scc, &ssb_bitmap, N_RB_DL, N_RB_DL, mu, mu);
fix_scc(scc,ssb_bitmap);
// TODO do a UECAP for phy-sim
const nr_mac_config_t conf = {.pdsch_AntennaPorts = {.N1 = 1, .N2 = 1, .XP = 1},
.pusch_AntennaPorts = n_rx,
.minRXTXTIME = 0,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false};
RC.nb_nr_macrlc_inst = 1;
RC.nb_nr_mac_CC = (int*)malloc(RC.nb_nr_macrlc_inst*sizeof(int));
for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
RC.nb_nr_mac_CC[i] = 1;
mac_top_init_gNB(ngran_gNB, scc, NULL /* scd will be updated further below */);
mac_top_init_gNB(ngran_gNB, scc, NULL /* scd will be updated further below */, &conf);
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
prepare_scd(scd);
@@ -632,14 +643,6 @@ int main(int argc, char *argv[])
prepare_sim_uecap(UE_Capability_nr,scc,mu,
N_RB_UL,0,mcs_table);
// TODO do a UECAP for phy-sim
const gNB_RrcConfigurationReq conf = {.pdsch_AntennaPorts = {.N1 = 1, .N2 = 1, .XP = 1},
.pusch_AntennaPorts = n_rx,
.minRXTXTIME = 0,
.do_CSIRS = 0,
.do_SRS = 0,
.force_256qam_off = false};
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0);
/* RRC parameter validation for secondaryCellGroup */
@@ -647,11 +650,6 @@ int main(int argc, char *argv[])
NR_BCCH_BCH_Message_t *mib = get_new_MIB_NR(scc);
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
// common configuration
nr_mac_config_scc(RC.nrmac[0], conf.pdsch_AntennaPorts, n_tx, 0, 6);
// UE dedicated configuration
nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup);
frame_parms->nb_antennas_tx = 1;