From e9fad1854059a1738661228726e8359eb17c78bf Mon Sep 17 00:00:00 2001
From: Raymond Knopp <raymond.knopp@eurecom.fr>
Date: Mon, 16 Mar 2020 01:26:12 +0100
Subject: [PATCH] temporary changes for nr_ulsim. To be removed when new branch
 with SCF NR FAPI for PUSCH is merged in.

---
 openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c | 5 +++++
 openair1/SIMULATION/NR_PHY/ulsim.c          | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
index 0238cb655f6..05705a9fe93 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
@@ -442,6 +442,11 @@ int nr_dlsch_encoding(unsigned char *a,
     }
     encoder_implemparams_t impp;
     impp.n_segments=dlsch->harq_processes[harq_pid]->C;
+    impp.tprep = tprep;
+    impp.tinput = tinput;
+    impp.tparity = tparity;
+    impp.toutput = toutput;
+
     for(int j=0;j<(dlsch->harq_processes[harq_pid]->C/8+1);j++) {
       impp.macro_num=j;
       nrLDPC_encoder(dlsch->harq_processes[harq_pid]->c,dlsch->harq_processes[harq_pid]->d,*Zc,Kb,Kr,BG,&impp);
diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c
index bd005d23319..477efac4134 100644
--- a/openair1/SIMULATION/NR_PHY/ulsim.c
+++ b/openair1/SIMULATION/NR_PHY/ulsim.c
@@ -562,6 +562,10 @@ int main(int argc, char **argv)
       pusch_pdu->nrOfLayers = 1;
       pusch_pdu->ul_dmrs_symb_pos = 1;
       pusch_pdu->dmrs_config_type = 0;
+      // inserted to make simulation work 
+      // remove the next 2 lines when P7 is integrated from new branch
+      gNB->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type=pusch_dmrs_type1;
+      gNB->pusch_config.dmrs_UplinkConfig.pusch_maxLength   = length_dmrs;
       pusch_pdu->ul_dmrs_scrambling_id =  0;
       pusch_pdu->scid = 0;
       pusch_pdu->resource_alloc = 1; 
-- 
GitLab