adding options for 256QAM in UL simulators
This commit is contained in:
@@ -387,7 +387,7 @@ void nr_ulsch_compute_llr(int32_t *rxdataF_comp,
|
|||||||
symbol);
|
symbol);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_E(PHY,"nr_ulsch_compute_llr: invalid Qm value, symbol = %d, Qm = %d\n",symbol, mod_order);
|
AssertFatal(1==0,"nr_ulsch_compute_llr: invalid Qm value, symbol = %d, Qm = %d\n",symbol, mod_order);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -707,7 +707,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
NR_UE_NR_Capability_t* UE_Capability_nr = CALLOC(1,sizeof(NR_UE_NR_Capability_t));
|
NR_UE_NR_Capability_t* UE_Capability_nr = CALLOC(1,sizeof(NR_UE_NR_Capability_t));
|
||||||
prepare_sim_uecap(UE_Capability_nr,scc,mu,
|
prepare_sim_uecap(UE_Capability_nr,scc,mu,
|
||||||
N_RB_DL,g_mcsTableIdx);
|
N_RB_DL,g_mcsTableIdx,0);
|
||||||
|
|
||||||
// TODO do a UECAP for phy-sim
|
// TODO do a UECAP for phy-sim
|
||||||
const gNB_RrcConfigurationReq conf = {
|
const gNB_RrcConfigurationReq conf = {
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ int main(int argc, char **argv)
|
|||||||
uint8_t Imcs = 9;
|
uint8_t Imcs = 9;
|
||||||
uint8_t Nl = 1;
|
uint8_t Nl = 1;
|
||||||
uint8_t max_ldpc_iterations = 5;
|
uint8_t max_ldpc_iterations = 5;
|
||||||
|
uint8_t mcs_table = 0;
|
||||||
|
|
||||||
double DS_TDL = .03;
|
double DS_TDL = .03;
|
||||||
|
|
||||||
@@ -182,7 +183,7 @@ int main(int argc, char **argv)
|
|||||||
randominit(0);
|
randominit(0);
|
||||||
|
|
||||||
//while ((c = getopt(argc, argv, "df:hpg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:")) != -1) {
|
//while ((c = getopt(argc, argv, "df:hpg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:")) != -1) {
|
||||||
while ((c = getopt(argc, argv, "hg:n:s:S:py:z:M:N:R:F:m:l:r:W:")) != -1) {
|
while ((c = getopt(argc, argv, "hg:n:s:S:py:z:M:N:R:F:m:l:q:r:W:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
/*case 'f':
|
/*case 'f':
|
||||||
write_output_file = 1;
|
write_output_file = 1;
|
||||||
@@ -346,6 +347,10 @@ int main(int argc, char **argv)
|
|||||||
nb_symb_sch = atoi(optarg);
|
nb_symb_sch = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'q':
|
||||||
|
mcs_table = atoi(optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'r':
|
case 'r':
|
||||||
nb_rb = atoi(optarg);
|
nb_rb = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
@@ -476,8 +481,8 @@ int main(int argc, char **argv)
|
|||||||
if ((Nl==4)||(Nl==3))
|
if ((Nl==4)||(Nl==3))
|
||||||
nb_re_dmrs = nb_re_dmrs*2;
|
nb_re_dmrs = nb_re_dmrs*2;
|
||||||
|
|
||||||
mod_order = nr_get_Qm_ul(Imcs, 0);
|
mod_order = nr_get_Qm_ul(Imcs, mcs_table);
|
||||||
code_rate = nr_get_code_rate_ul(Imcs, 0);
|
code_rate = nr_get_code_rate_ul(Imcs, mcs_table);
|
||||||
available_bits = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, mod_order, Nl);
|
available_bits = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, mod_order, Nl);
|
||||||
TBS = nr_compute_tbs(mod_order,code_rate, nb_rb, nb_symb_sch, nb_re_dmrs*length_dmrs, 0, 0, Nl);
|
TBS = nr_compute_tbs(mod_order,code_rate, nb_rb, nb_symb_sch, nb_re_dmrs*length_dmrs, 0, 0, Nl);
|
||||||
|
|
||||||
@@ -513,6 +518,7 @@ int main(int argc, char **argv)
|
|||||||
N_RE_prime = NR_NB_SC_PER_RB*nb_symb_sch - nb_re_dmrs - N_PRB_oh;
|
N_RE_prime = NR_NB_SC_PER_RB*nb_symb_sch - nb_re_dmrs - N_PRB_oh;
|
||||||
|
|
||||||
ulsch_ue->pusch_pdu.rnti = n_rnti;
|
ulsch_ue->pusch_pdu.rnti = n_rnti;
|
||||||
|
ulsch_ue->pusch_pdu.mcs_table = mcs_table;
|
||||||
ulsch_ue->pusch_pdu.mcs_index = Imcs;
|
ulsch_ue->pusch_pdu.mcs_index = Imcs;
|
||||||
ulsch_ue->pusch_pdu.nrOfLayers = Nl;
|
ulsch_ue->pusch_pdu.nrOfLayers = Nl;
|
||||||
ulsch_ue->pusch_pdu.rb_size = nb_rb;
|
ulsch_ue->pusch_pdu.rb_size = nb_rb;
|
||||||
|
|||||||
@@ -631,6 +631,10 @@ int main(int argc, char **argv)
|
|||||||
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
|
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
|
||||||
prepare_scd(scd);
|
prepare_scd(scd);
|
||||||
|
|
||||||
|
NR_UE_NR_Capability_t* UE_Capability_nr = CALLOC(1,sizeof(NR_UE_NR_Capability_t));
|
||||||
|
prepare_sim_uecap(UE_Capability_nr,scc,mu,
|
||||||
|
N_RB_UL,0,mcs_table);
|
||||||
|
|
||||||
// TODO do a UECAP for phy-sim
|
// TODO do a UECAP for phy-sim
|
||||||
const gNB_RrcConfigurationReq conf = {
|
const gNB_RrcConfigurationReq conf = {
|
||||||
.pdsch_AntennaPorts = { .N1 = 1, .N2 = 1, .XP = 1 },
|
.pdsch_AntennaPorts = { .N1 = 1, .N2 = 1, .XP = 1 },
|
||||||
@@ -640,7 +644,8 @@ int main(int argc, char **argv)
|
|||||||
.do_SRS = 0,
|
.do_SRS = 0,
|
||||||
.force_256qam_off = false
|
.force_256qam_off = false
|
||||||
};
|
};
|
||||||
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, NULL, 0, 1, &conf, 0);
|
|
||||||
|
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0);
|
||||||
|
|
||||||
/* RRC parameter validation for secondaryCellGroup */
|
/* RRC parameter validation for secondaryCellGroup */
|
||||||
fix_scd(scd);
|
fix_scd(scd);
|
||||||
|
|||||||
@@ -619,7 +619,8 @@ void prepare_sim_uecap(NR_UE_NR_Capability_t *cap,
|
|||||||
NR_ServingCellConfigCommon_t *scc,
|
NR_ServingCellConfigCommon_t *scc,
|
||||||
int numerology,
|
int numerology,
|
||||||
int rbsize,
|
int rbsize,
|
||||||
int mcs_table) {
|
int mcs_table_dl,
|
||||||
|
int mcs_table_ul) {
|
||||||
|
|
||||||
NR_Phy_Parameters_t *phy_Parameters = &cap->phy_Parameters;
|
NR_Phy_Parameters_t *phy_Parameters = &cap->phy_Parameters;
|
||||||
int band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
int band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
||||||
@@ -627,10 +628,15 @@ void prepare_sim_uecap(NR_UE_NR_Capability_t *cap,
|
|||||||
nr_bandnr->bandNR = band;
|
nr_bandnr->bandNR = band;
|
||||||
asn1cSeqAdd(&cap->rf_Parameters.supportedBandListNR.list,
|
asn1cSeqAdd(&cap->rf_Parameters.supportedBandListNR.list,
|
||||||
nr_bandnr);
|
nr_bandnr);
|
||||||
if (mcs_table == 1) {
|
NR_BandNR_t *bandNRinfo = cap->rf_Parameters.supportedBandListNR.list.array[0];
|
||||||
|
|
||||||
|
if (mcs_table_ul == 1) {
|
||||||
|
bandNRinfo->pusch_256QAM = CALLOC(1,sizeof(*bandNRinfo->pusch_256QAM));
|
||||||
|
*bandNRinfo->pusch_256QAM = NR_BandNR__pusch_256QAM_supported;
|
||||||
|
}
|
||||||
|
if (mcs_table_dl == 1) {
|
||||||
int bw = get_supported_band_index(numerology, band, rbsize);
|
int bw = get_supported_band_index(numerology, band, rbsize);
|
||||||
if (band>256) {
|
if (band>256) {
|
||||||
NR_BandNR_t *bandNRinfo = cap->rf_Parameters.supportedBandListNR.list.array[0];
|
|
||||||
bandNRinfo->pdsch_256QAM_FR2 = CALLOC(1,sizeof(*bandNRinfo->pdsch_256QAM_FR2));
|
bandNRinfo->pdsch_256QAM_FR2 = CALLOC(1,sizeof(*bandNRinfo->pdsch_256QAM_FR2));
|
||||||
*bandNRinfo->pdsch_256QAM_FR2 = NR_BandNR__pdsch_256QAM_FR2_supported;
|
*bandNRinfo->pdsch_256QAM_FR2 = NR_BandNR__pdsch_256QAM_FR2_supported;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ void prepare_sim_uecap(NR_UE_NR_Capability_t *cap,
|
|||||||
NR_ServingCellConfigCommon_t *scc,
|
NR_ServingCellConfigCommon_t *scc,
|
||||||
int numerology,
|
int numerology,
|
||||||
int rbsize,
|
int rbsize,
|
||||||
int mcs_table);
|
int mcs_table_dl,
|
||||||
|
int mcs_table_ul);
|
||||||
|
|
||||||
NR_BCCH_BCH_Message_t *get_new_MIB_NR(const NR_ServingCellConfigCommon_t *scc);
|
NR_BCCH_BCH_Message_t *get_new_MIB_NR(const NR_ServingCellConfigCommon_t *scc);
|
||||||
void free_MIB_NR(NR_BCCH_BCH_Message_t *mib);
|
void free_MIB_NR(NR_BCCH_BCH_Message_t *mib);
|
||||||
@@ -79,5 +80,4 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC
|
|||||||
const gNB_RrcConfigurationReq *configuration,
|
const gNB_RrcConfigurationReq *configuration,
|
||||||
int uid);
|
int uid);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user