Commit a99612a5 authored by Thomas Schlichter's avatar Thomas Schlichter

make nb_re_dmrs a parameter of nr_ulsch_decoding()

parent 4da175f5
...@@ -43,6 +43,7 @@ NR_gNB_ULSCH_t *new_gNB_ulsch(uint8_t max_ldpc_iterations,uint8_t N_RB_UL, uint8 ...@@ -43,6 +43,7 @@ NR_gNB_ULSCH_t *new_gNB_ulsch(uint8_t max_ldpc_iterations,uint8_t N_RB_UL, uint8
@param ulsch_llr, Pointer to received llr in ulsch @param ulsch_llr, Pointer to received llr in ulsch
@param frame_parms, Pointer to frame descriptor structure @param frame_parms, Pointer to frame descriptor structure
@param nb_symb_sch, number of symbols used in the uplink shared channel @param nb_symb_sch, number of symbols used in the uplink shared channel
@param nb_re_dmrs, number of DMRS resource elements in one RB
@param nr_tti_rx, current received TTI @param nr_tti_rx, current received TTI
@param harq_pid, harq process id @param harq_pid, harq process id
@param is_crnti @param is_crnti
...@@ -54,6 +55,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -54,6 +55,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint32_t frame, uint32_t frame,
uint16_t nb_symb_sch, uint16_t nb_symb_sch,
uint16_t nb_re_dmrs,
uint8_t nr_tti_rx, uint8_t nr_tti_rx,
uint8_t harq_pid, uint8_t harq_pid,
uint8_t is_crnti); uint8_t is_crnti);
......
...@@ -281,6 +281,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -281,6 +281,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint32_t frame, uint32_t frame,
uint16_t nb_symb_sch, uint16_t nb_symb_sch,
uint16_t nb_re_dmrs,
uint8_t nr_tti_rx, uint8_t nr_tti_rx,
uint8_t harq_pid, uint8_t harq_pid,
uint8_t is_crnti) uint8_t is_crnti)
...@@ -323,7 +324,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -323,7 +324,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint16_t R = nfapi_ulsch_pdu_rel15->R; uint16_t R = nfapi_ulsch_pdu_rel15->R;
uint8_t mcs = nfapi_ulsch_pdu_rel15->mcs; uint8_t mcs = nfapi_ulsch_pdu_rel15->mcs;
uint8_t n_layers = nfapi_ulsch_pdu_rel15->n_layers; uint8_t n_layers = nfapi_ulsch_pdu_rel15->n_layers;
uint16_t nb_re_dmrs = harq_process->nb_re_dmrs;
uint8_t length_dmrs = nfapi_ulsch_pdu_rel15->length_dmrs; uint8_t length_dmrs = nfapi_ulsch_pdu_rel15->length_dmrs;
// ------------------------------------------------------------------ // ------------------------------------------------------------------
......
...@@ -246,8 +246,6 @@ typedef struct { ...@@ -246,8 +246,6 @@ typedef struct {
/// This is needed for PHICH generation which /// This is needed for PHICH generation which
/// is done after a new scheduling /// is done after a new scheduling
uint8_t previous_n_DMRS; uint8_t previous_n_DMRS;
/// number of DMRS resource elements in one RB
uint16_t nb_re_dmrs;
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
......
...@@ -229,10 +229,9 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int UE_id ...@@ -229,10 +229,9 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int UE_id
uint8_t mapping_type; uint8_t mapping_type;
uint32_t G; uint32_t G;
int Nid_cell = 0; // [hna] shouldn't be a local variable (should be signaled) int Nid_cell = 0; // [hna] shouldn't be a local variable (should be signaled)
uint16_t start_symbol, number_symbols; uint16_t start_symbol, number_symbols, nb_re_dmrs;
mapping_type = gNB->pusch_config.pusch_TimeDomainResourceAllocation[0]->mappingType; mapping_type = gNB->pusch_config.pusch_TimeDomainResourceAllocation[0]->mappingType;
gNB->ulsch[UE_id][0]->harq_processes[harq_pid]->nb_re_dmrs = 0;
start_symbol = nfapi_ulsch_pdu_rel15->start_symbol; start_symbol = nfapi_ulsch_pdu_rel15->start_symbol;
number_symbols = nfapi_ulsch_pdu_rel15->number_symbols; number_symbols = nfapi_ulsch_pdu_rel15->number_symbols;
...@@ -249,11 +248,11 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int UE_id ...@@ -249,11 +248,11 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int UE_id
mapping_type, mapping_type,
frame_parms->ofdm_symbol_size); frame_parms->ofdm_symbol_size);
gNB->ulsch[UE_id][0]->harq_processes[harq_pid]->nb_re_dmrs = ((gNB->dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)?6:4)*number_dmrs_symbols; nb_re_dmrs = ((gNB->dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)?6:4)*number_dmrs_symbols;
G = nr_get_G(nfapi_ulsch_pdu_rel15->number_rbs, G = nr_get_G(nfapi_ulsch_pdu_rel15->number_rbs,
number_symbols, number_symbols,
gNB->ulsch[UE_id][0]->harq_processes[harq_pid]->nb_re_dmrs, nb_re_dmrs,
nfapi_ulsch_pdu_rel15->length_dmrs, nfapi_ulsch_pdu_rel15->length_dmrs,
nfapi_ulsch_pdu_rel15->Qm, nfapi_ulsch_pdu_rel15->Qm,
nfapi_ulsch_pdu_rel15->n_layers); nfapi_ulsch_pdu_rel15->n_layers);
...@@ -279,6 +278,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int UE_id ...@@ -279,6 +278,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int UE_id
frame_parms, frame_parms,
frame_rx, frame_rx,
number_symbols, number_symbols,
nb_re_dmrs,
slot_rx, slot_rx,
harq_pid, harq_pid,
0); 0);
......
...@@ -382,7 +382,8 @@ int main(int argc, char **argv) ...@@ -382,7 +382,8 @@ int main(int argc, char **argv)
uint8_t UE_id = 0; uint8_t UE_id = 0;
NR_gNB_ULSCH_t *ulsch_gNB = gNB->ulsch[UE_id][0]; NR_gNB_ULSCH_t *ulsch_gNB = gNB->ulsch[UE_id][0];
nfapi_nr_ul_config_ulsch_pdu_rel15_t *rel15_ul = &ulsch_gNB->harq_processes[harq_pid]->ulsch_pdu.ulsch_pdu_rel15; NR_UL_gNB_HARQ_t *harq_process_gNB = ulsch_gNB->harq_processes[harq_pid];
nfapi_nr_ul_config_ulsch_pdu_rel15_t *rel15_ul = &harq_process_gNB->ulsch_pdu.ulsch_pdu_rel15;
NR_UE_ULSCH_t *ulsch_ue = UE->ulsch[0][0][0]; NR_UE_ULSCH_t *ulsch_ue = UE->ulsch[0][0][0];
...@@ -524,7 +525,7 @@ int main(int argc, char **argv) ...@@ -524,7 +525,7 @@ int main(int argc, char **argv)
#endif #endif
ret = nr_ulsch_decoding(gNB, UE_id, channel_output_fixed, frame_parms, ret = nr_ulsch_decoding(gNB, UE_id, channel_output_fixed, frame_parms,
frame, nb_symb_sch, subframe, harq_pid, is_crnti); frame, nb_symb_sch, nb_re_dmrs, subframe, harq_pid, is_crnti);
if (ret > ulsch_gNB->max_ldpc_iterations) if (ret > ulsch_gNB->max_ldpc_iterations)
n_errors++; n_errors++;
......
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