Fixing nr_ulsim configuration for DMRS
This commit is contained in:
committed by
Thomas Schlichter
parent
8e00f8df08
commit
4fe691f443
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
|
||||
NR_DL_FRAME_PARMS *frame_parms;
|
||||
int loglvl = OAILOG_WARNING;
|
||||
uint64_t SSB_positions=0x01;
|
||||
uint16_t nb_symb_sch = 14;
|
||||
uint16_t nb_symb_sch = 12;
|
||||
int start_symbol = 0;
|
||||
uint16_t nb_rb = 50;
|
||||
uint8_t Imcs = 9;
|
||||
@@ -441,18 +441,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
unsigned char harq_pid = 0;
|
||||
unsigned int TBS;
|
||||
unsigned int available_bits;
|
||||
uint8_t nb_re_dmrs = UE->dmrs_UplinkConfig.pusch_maxLength*(UE->dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1?6:4);
|
||||
uint8_t length_dmrs = 1;
|
||||
unsigned char mod_order;
|
||||
uint16_t code_rate;
|
||||
|
||||
mod_order = nr_get_Qm_ul(Imcs, 0);
|
||||
code_rate = nr_get_code_rate_ul(Imcs, 0);
|
||||
available_bits = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, mod_order, 1);
|
||||
TBS = nr_compute_tbs(mod_order, code_rate, nb_rb, nb_symb_sch, nb_re_dmrs*length_dmrs, 0, precod_nbr_layers);
|
||||
|
||||
|
||||
NR_gNB_ULSCH_t *ulsch_gNB = gNB->ulsch[UE_id][0];
|
||||
//nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &ulsch_gNB->harq_processes[harq_pid]->ulsch_pdu;
|
||||
@@ -481,7 +469,7 @@ int main(int argc, char **argv)
|
||||
unsigned char mod_order;
|
||||
uint16_t code_rate;
|
||||
|
||||
for (i = 0; i < NR_SYMBOLS_PER_SLOT; i++)
|
||||
for (i = start_symbol; i < nb_symb_sch; i++)
|
||||
number_dmrs_symbols += is_dmrs_symbol(i,
|
||||
0,
|
||||
0,
|
||||
@@ -541,8 +529,8 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->rnti = n_rnti;
|
||||
pusch_pdu->mcs_index = Imcs;
|
||||
pusch_pdu->mcs_table = 0;
|
||||
pusch_pdu->target_code_rate = nr_get_code_rate_ul(pusch_pdu->mcs_index,pusch_pdu->mcs_table);
|
||||
pusch_pdu->qam_mod_order = nr_get_Qm_ul(pusch_pdu->mcs_index,pusch_pdu->mcs_table) ;
|
||||
pusch_pdu->target_code_rate = code_rate;
|
||||
pusch_pdu->qam_mod_order = mod_order;
|
||||
pusch_pdu->transform_precoding = 0;
|
||||
pusch_pdu->data_scrambling_id = 0;
|
||||
pusch_pdu->nrOfLayers = 1;
|
||||
@@ -561,13 +549,7 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->pusch_data.rv_index = 0;
|
||||
pusch_pdu->pusch_data.harq_process_id = 0;
|
||||
pusch_pdu->pusch_data.new_data_indicator = 0;
|
||||
pusch_pdu->pusch_data.tb_size = nr_compute_tbs(pusch_pdu->mcs_index,
|
||||
pusch_pdu->target_code_rate,
|
||||
pusch_pdu->rb_size,
|
||||
pusch_pdu->nr_of_symbols,
|
||||
nb_re_dmrs*length_dmrs,
|
||||
0,
|
||||
pusch_pdu->nrOfLayers = 1);
|
||||
pusch_pdu->pusch_data.tb_size = TBS;
|
||||
pusch_pdu->pusch_data.num_cb = 0;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user