diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 734a3500f8cf76234d76f6dc3ccf7e13e312296d..cb4f5d8903e78524cd6912eb09b1136fd47a6cd4 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -36,7 +36,8 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/INIT/phy_init.h" #include "PHY/NR_REFSIG/pss_nr.h" -#include "openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h" +#include "PHY/NR_REFSIG/ul_ref_seq_nr.h" +#include "PHY/NR_REFSIG/refsig_defs_ue.h" //uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10}; diff --git a/openair1/PHY/NR_REFSIG/nr_gold.c b/openair1/PHY/NR_REFSIG/nr_gold.c index bd2df98ed6b84a5742e61e5a951191076fc0a21a..1492d7f03f3f91d32943c94a10c836d546e4c924 100644 --- a/openair1/PHY/NR_REFSIG/nr_gold.c +++ b/openair1/PHY/NR_REFSIG/nr_gold.c @@ -101,29 +101,3 @@ void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid) } } } - -void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue, uint16_t *N_n_scid, uint8_t n_scid) -{ - - uint32_t x1, x2, n; - uint8_t reset, slot, symb, q; - NR_DL_FRAME_PARMS *fp = &ue->frame_parms; - uint32_t ****pusch_dmrs = ue->nr_gold_pusch_dmrs; - - for (slot=0; slot<fp->slots_per_frame; slot++) { - - for (symb=0; symb<fp->symbols_per_slot; symb++) { - - reset = 1; - x2 = ((1<<17) * (fp->symbols_per_slot*slot+symb+1) * ((N_n_scid[n_scid]<<1)+1) +((N_n_scid[n_scid]<<1)+n_scid)); - - for (n=0; n<NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD; n++) { - pusch_dmrs[slot][symb][0][n] = lte_gold_generic(&x1, &x2, reset); - reset = 0; - } - - for (q = 1; q < NR_MAX_NB_CODEWORDS; q++) - memcpy(pusch_dmrs[slot][symb][q],pusch_dmrs[slot][symb][0],sizeof(uint32_t)*NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD); - } - } -} diff --git a/openair1/PHY/NR_REFSIG/nr_gold_ue.c b/openair1/PHY/NR_REFSIG/nr_gold_ue.c index 726aab8a37b98a772a6b099e5cdb09ab52f6d655..098931430eb887d733bccdf6a81f9d0c375c5a97 100644 --- a/openair1/PHY/NR_REFSIG/nr_gold_ue.c +++ b/openair1/PHY/NR_REFSIG/nr_gold_ue.c @@ -160,3 +160,29 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,unsigned short lbar,unsigned short *n_idDM } } } + +void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue, uint16_t *N_n_scid, uint8_t n_scid) +{ + + uint32_t x1, x2, n; + uint8_t reset, slot, symb, q; + NR_DL_FRAME_PARMS *fp = &ue->frame_parms; + uint32_t ****pusch_dmrs = ue->nr_gold_pusch_dmrs; + + for (slot=0; slot<fp->slots_per_frame; slot++) { + + for (symb=0; symb<fp->symbols_per_slot; symb++) { + + reset = 1; + x2 = ((1<<17) * (fp->symbols_per_slot*slot+symb+1) * ((N_n_scid[n_scid]<<1)+1) +((N_n_scid[n_scid]<<1)+n_scid)); + + for (n=0; n<NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD; n++) { + pusch_dmrs[slot][symb][0][n] = lte_gold_generic(&x1, &x2, reset); + reset = 0; + } + + for (q = 1; q < NR_MAX_NB_CODEWORDS; q++) + memcpy(pusch_dmrs[slot][symb][q],pusch_dmrs[slot][symb][0],sizeof(uint32_t)*NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD); + } + } +} diff --git a/openair1/PHY/NR_REFSIG/nr_refsig.h b/openair1/PHY/NR_REFSIG/nr_refsig.h index a2ba3b46c55d6ecb3bc5e2ad4c0c3619acde1b11..cb165eed5e3f10a9a8745cb7a8a3f7f9e78e6958 100644 --- a/openair1/PHY/NR_REFSIG/nr_refsig.h +++ b/openair1/PHY/NR_REFSIG/nr_refsig.h @@ -25,7 +25,6 @@ #define __NR_REFSIG__H__ #include "PHY/defs_gNB.h" -#include "PHY/defs_nr_UE.h" #include "PHY/LTE_REFSIG/lte_refsig.h" @@ -39,6 +38,5 @@ void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB); */ void nr_init_pdcch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid); void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid); -void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue, uint16_t *N_n_scid, uint8_t n_scid); #endif diff --git a/openair1/PHY/NR_REFSIG/refsig_defs_ue.h b/openair1/PHY/NR_REFSIG/refsig_defs_ue.h index a47e65d0b0d157ac2ed2cd21a708a55ca2610ca4..d1a72dd2fc1c40a056ce80da069b00acca13c4ca 100644 --- a/openair1/PHY/NR_REFSIG/refsig_defs_ue.h +++ b/openair1/PHY/NR_REFSIG/refsig_defs_ue.h @@ -23,7 +23,9 @@ /* Author R. Knopp / EURECOM / OpenAirInterface.org */ #ifndef __NR_REFSIG_DEFS__H__ #define __NR_REFSIG_DEFS__H__ + #include "PHY/defs_nr_UE.h" +#include "PHY/LTE_REFSIG/lte_refsig.h" /*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS. @@ -61,5 +63,6 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue, unsigned short *n_idDMRS, unsigned short length_dmrs); +void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue, uint16_t *N_n_scid, uint8_t n_scid); #endif