Commit 76f937d8 authored by Ahmed Hussein's avatar Ahmed Hussein

Removing nb_re_dmrs and length_dmrs from NR_UE_ULSCH_t

parent 1104cf04
...@@ -161,10 +161,6 @@ typedef struct { ...@@ -161,10 +161,6 @@ typedef struct {
} NR_UL_UE_HARQ_t; } NR_UL_UE_HARQ_t;
typedef struct { typedef struct {
/// number of DMRS resource elements
uint8_t nb_re_dmrs;
/// DMRS length
uint8_t length_dmrs;
/// SRS active flag /// SRS active flag
uint8_t srs_active; uint8_t srs_active;
//#if defined(UPGRADE_RAT_NR) //#if defined(UPGRADE_RAT_NR)
......
...@@ -107,7 +107,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -107,7 +107,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
uint16_t start_sc, start_rb; uint16_t start_sc, start_rb;
int8_t Wf[2], Wt[2], l_prime[2], delta; int8_t Wf[2], Wt[2], l_prime[2], delta;
uint16_t n_dmrs, code_rate, number_dmrs_symbols, k; uint16_t n_dmrs, code_rate, number_dmrs_symbols, k;
uint8_t dmrs_type; uint8_t dmrs_type, nb_dmrs_re_per_rb;
int ap, start_symbol, Nid_cell, i; int ap, start_symbol, Nid_cell, i;
int sample_offsetF, N_RE_prime, N_PRB_oh; int sample_offsetF, N_RE_prime, N_PRB_oh;
uint16_t n_rnti; uint16_t n_rnti;
...@@ -146,13 +146,11 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -146,13 +146,11 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
} }
ulsch_ue->length_dmrs = number_dmrs_symbols; // pusch.MaxLenght is redundant here as number_dmrs_symbols
// contains all dmrs symbols even for double symbol dmrs
ulsch_ue->rnti = n_rnti; ulsch_ue->rnti = n_rnti;
ulsch_ue->Nid_cell = Nid_cell; ulsch_ue->Nid_cell = Nid_cell;
ulsch_ue->nb_re_dmrs = ((UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)?6:4); nb_dmrs_re_per_rb = ((UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)?6:4);
N_RE_prime = NR_NB_SC_PER_RB*harq_process_ul_ue->number_of_symbols - ulsch_ue->nb_re_dmrs*ulsch_ue->length_dmrs - N_PRB_oh; N_RE_prime = NR_NB_SC_PER_RB*harq_process_ul_ue->number_of_symbols - nb_dmrs_re_per_rb*number_dmrs_symbols - N_PRB_oh;
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*harq_process_ul_ue->nb_rb*num_of_codewords; harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*harq_process_ul_ue->nb_rb*num_of_codewords;
...@@ -163,7 +161,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -163,7 +161,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
code_rate, code_rate,
harq_process_ul_ue->nb_rb, harq_process_ul_ue->nb_rb,
harq_process_ul_ue->number_of_symbols, harq_process_ul_ue->number_of_symbols,
ulsch_ue->nb_re_dmrs*ulsch_ue->length_dmrs, nb_dmrs_re_per_rb*number_dmrs_symbols,
0, 0,
harq_process_ul_ue->Nl); harq_process_ul_ue->Nl);
...@@ -218,7 +216,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -218,7 +216,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
/////////// ///////////
unsigned int G = nr_get_G(harq_process_ul_ue->nb_rb, harq_process_ul_ue->number_of_symbols, unsigned int G = nr_get_G(harq_process_ul_ue->nb_rb, harq_process_ul_ue->number_of_symbols,
ulsch_ue->nb_re_dmrs, ulsch_ue->length_dmrs, mod_order, harq_process_ul_ue->Nl); nb_dmrs_re_per_rb, number_dmrs_symbols, mod_order, harq_process_ul_ue->Nl);
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G); nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G);
...@@ -230,8 +228,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -230,8 +228,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
available_bits = nr_get_G(harq_process_ul_ue->nb_rb, available_bits = nr_get_G(harq_process_ul_ue->nb_rb,
harq_process_ul_ue->number_of_symbols, harq_process_ul_ue->number_of_symbols,
ulsch_ue->nb_re_dmrs, nb_dmrs_re_per_rb,
ulsch_ue->length_dmrs, number_dmrs_symbols,
mod_order, mod_order,
1); 1);
...@@ -268,7 +266,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -268,7 +266,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
/////////////////////////DMRS Modulation///////////////////////// /////////////////////////DMRS Modulation/////////////////////////
/////////// ///////////
pusch_dmrs = UE->nr_gold_pusch_dmrs[slot]; pusch_dmrs = UE->nr_gold_pusch_dmrs[slot];
n_dmrs = (harq_process_ul_ue->nb_rb*ulsch_ue->nb_re_dmrs*ulsch_ue->length_dmrs); n_dmrs = (harq_process_ul_ue->nb_rb*nb_dmrs_re_per_rb*number_dmrs_symbols);
int16_t mod_dmrs[n_dmrs<<1]; int16_t mod_dmrs[n_dmrs<<1];
dmrs_type = UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type; dmrs_type = UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type;
/////////// ///////////
...@@ -296,7 +294,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -296,7 +294,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
start_symbol, start_symbol,
dmrs_type, dmrs_type,
L_ptrs, L_ptrs,
ulsch_ue->length_dmrs, number_dmrs_symbols,
frame_parms->ofdm_symbol_size); frame_parms->ofdm_symbol_size);
} }
...@@ -337,7 +335,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -337,7 +335,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
// -------------------------- // --------------------------
if (is_dmrs == 1) if (is_dmrs == 1)
nb_re_dmrs_per_rb = ulsch_ue->nb_re_dmrs; nb_re_dmrs_per_rb = nb_dmrs_re_per_rb;
else else
nb_re_dmrs_per_rb = 0; nb_re_dmrs_per_rb = 0;
......
...@@ -402,7 +402,6 @@ int main(int argc, char **argv) ...@@ -402,7 +402,6 @@ int main(int argc, char **argv)
rel15_ul->mcs_index = Imcs; rel15_ul->mcs_index = Imcs;
rel15_ul->pusch_data.rv_index = rvidx; rel15_ul->pusch_data.rv_index = rvidx;
rel15_ul->nrOfLayers = Nl; rel15_ul->nrOfLayers = Nl;
//rel15_ul->length_dmrs = length_dmrs;
rel15_ul->target_code_rate = code_rate; rel15_ul->target_code_rate = code_rate;
rel15_ul->pusch_data.tb_size = TBS>>3; rel15_ul->pusch_data.tb_size = TBS>>3;
/////////////////////////////////////////////////// ///////////////////////////////////////////////////
...@@ -427,8 +426,6 @@ int main(int argc, char **argv) ...@@ -427,8 +426,6 @@ int main(int argc, char **argv)
/////////////////////////[adk] preparing NR_UE_ULSCH_t parameters///////////////////////// A HOT FIX until creating nfapi_nr_ul_config_ulsch_pdu_rel15_t /////////////////////////[adk] preparing NR_UE_ULSCH_t parameters///////////////////////// A HOT FIX until creating nfapi_nr_ul_config_ulsch_pdu_rel15_t
/////////// ///////////
ulsch_ue->nb_re_dmrs = nb_re_dmrs;
ulsch_ue->length_dmrs = length_dmrs;
ulsch_ue->rnti = n_rnti; ulsch_ue->rnti = n_rnti;
/////////// ///////////
//////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////
......
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