Fixing ulsim and rf simulator
- no_data_in_dmrs was being used at gNB side, and not handled at UE side - nr_schedule_response wasn't being called in ulsim
This commit is contained in:
committed by
Thomas Schlichter
parent
f4d47b1ea7
commit
dae91c60b8
@@ -114,6 +114,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint8_t data_existing =0;
|
||||
uint8_t L_ptrs, K_ptrs; // PTRS parameters
|
||||
uint16_t beta_ptrs; // PTRS parameter related to power control
|
||||
uint8_t no_data_in_dmrs = 1;
|
||||
|
||||
NR_UE_ULSCH_t *ulsch_ue;
|
||||
NR_UL_UE_HARQ_t *harq_process_ul_ue=NULL;
|
||||
@@ -147,7 +148,11 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
rnti = harq_process_ul_ue->pusch_pdu.rnti;
|
||||
ulsch_ue->Nid_cell = Nid_cell;
|
||||
nb_dmrs_re_per_rb = ((dmrs_type == pusch_dmrs_type1) ? 6:4);
|
||||
|
||||
if(no_data_in_dmrs)
|
||||
nb_dmrs_re_per_rb = 12;
|
||||
else
|
||||
nb_dmrs_re_per_rb = ((dmrs_type == pusch_dmrs_type1) ? 6:4);
|
||||
|
||||
N_RE_prime = NR_NB_SC_PER_RB*number_of_symbols - nb_dmrs_re_per_rb*number_dmrs_symbols - N_PRB_oh;
|
||||
|
||||
@@ -223,7 +228,6 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
unsigned int G = nr_get_G(nb_rb, number_of_symbols,
|
||||
nb_dmrs_re_per_rb, number_dmrs_symbols, mod_order, Nl);
|
||||
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G);
|
||||
|
||||
///////////
|
||||
@@ -267,7 +271,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
/////////////////////////DMRS Modulation/////////////////////////
|
||||
///////////
|
||||
pusch_dmrs = UE->nr_gold_pusch_dmrs[slot];
|
||||
n_dmrs = (nb_rb*nb_dmrs_re_per_rb*number_dmrs_symbols);
|
||||
n_dmrs = (nb_rb*((dmrs_type == pusch_dmrs_type1) ? 6:4)*number_dmrs_symbols);
|
||||
int16_t mod_dmrs[n_dmrs<<1];
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -510,9 +510,9 @@ int main(int argc, char **argv)
|
||||
fapi_nr_ul_config_request_t ul_config;
|
||||
|
||||
unsigned int TBS;
|
||||
uint16_t number_dmrs_symbols = 1;
|
||||
uint16_t number_dmrs_symbols = 0;
|
||||
unsigned int available_bits;
|
||||
uint8_t nb_re_dmrs;
|
||||
uint8_t nb_re_dmrs, no_data_in_dmrs = 1;
|
||||
unsigned char mod_order;
|
||||
uint16_t code_rate;
|
||||
uint8_t ptrs_mcs1 = 2;
|
||||
@@ -611,8 +611,6 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list = (nfapi_nr_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ptrs_ports_t));
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
|
||||
|
||||
// prepare ULSCH/PUSCH reception
|
||||
nr_schedule_response(Sched_INFO);
|
||||
|
||||
// --------- setting parameters for UE --------
|
||||
|
||||
@@ -648,12 +646,20 @@ int main(int argc, char **argv)
|
||||
//there are plenty of other parameters that we don't seem to be using for now. e.g.
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.absolute_delta_PUSCH = 0;
|
||||
|
||||
nb_re_dmrs = ((ul_config.ul_config_list[0].pusch_config_pdu.dmrs_config_type == pusch_dmrs_type1) ? 6 : 4);
|
||||
if(no_data_in_dmrs)
|
||||
nb_re_dmrs = 12;
|
||||
else
|
||||
nb_re_dmrs = ((ul_config.ul_config_list[0].pusch_config_pdu.dmrs_config_type == pusch_dmrs_type1) ? 6 : 4);
|
||||
|
||||
available_bits = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, number_dmrs_symbols, mod_order, 1);
|
||||
TBS = nr_compute_tbs(mod_order, code_rate, nb_rb, nb_symb_sch, nb_re_dmrs * number_dmrs_symbols, 0, 0, precod_nbr_layers);
|
||||
|
||||
pusch_pdu->pusch_data.tb_size = TBS>>3;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.tb_size = TBS;
|
||||
|
||||
// prepare ULSCH/PUSCH reception
|
||||
nr_schedule_response(Sched_INFO);
|
||||
|
||||
// set FAPI parameters for UE, put them in the scheduled response and call
|
||||
nr_ue_scheduled_response(&scheduled_response);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user