From 313cab3d561f25a4031ca9a4e9f8d23b7c0d89ee Mon Sep 17 00:00:00 2001 From: Guy De Souza Date: Thu, 17 May 2018 11:30:38 +0200 Subject: [PATCH] nr_transport.h creation --- openair1/PHY/NR_TRANSPORT/nr_pbch.c | 5 +- openair1/PHY/NR_TRANSPORT/nr_pss.c | 3 +- openair1/PHY/NR_TRANSPORT/nr_sss.c | 2 +- openair1/PHY/NR_TRANSPORT/nr_transport.h | 83 +++++++++++++++++++++++ openair1/PHY/defs_nr_common.h | 13 ++-- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 1 + 6 files changed, 96 insertions(+), 11 deletions(-) create mode 100644 openair1/PHY/NR_TRANSPORT/nr_transport.h diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 2de3673d79..34facbc7e1 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -29,13 +29,14 @@ * \note * \warning */ -#include "PHY/defs_gNB.h" + +#include "PHY/NR_TRANSPORT/nr_transport.h" #include "PHY/phy_extern.h" #include "PHY/sse_intrin.h" //#define DEBUG_PBCH -extern short *nr_mod_table; +extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT]; int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, int32_t **txdataF, diff --git a/openair1/PHY/NR_TRANSPORT/nr_pss.c b/openair1/PHY/NR_TRANSPORT/nr_pss.c index e8e6722494..bb0d43da76 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pss.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pss.c @@ -19,7 +19,8 @@ * contact@openairinterface.org */ -#include "PHY/defs_gNB.h" + +#include "PHY/NR_TRANSPORT/nr_transport.h" //#define NR_PSS_DEBUG diff --git a/openair1/PHY/NR_TRANSPORT/nr_sss.c b/openair1/PHY/NR_TRANSPORT/nr_sss.c index 8001949a75..a9ed801faf 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_sss.c +++ b/openair1/PHY/NR_TRANSPORT/nr_sss.c @@ -19,7 +19,7 @@ * contact@openairinterface.org */ -#include "PHY/defs_gNB.h" +#include "PHY/NR_TRANSPORT/nr_transport.h" //#define NR_SSS_DEBUG diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport.h b/openair1/PHY/NR_TRANSPORT/nr_transport.h new file mode 100644 index 0000000000..cc83734bd7 --- /dev/null +++ b/openair1/PHY/NR_TRANSPORT/nr_transport.h @@ -0,0 +1,83 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +#ifndef __NR_TRANSPORT__H__ +#define __NR_TRANSPORT__H__ + +#include "PHY/defs_gNB.h" + + +/*! +\fn int nr_generate_pss +\brief Generation of the NR PSS +@param +@returns 0 on success + */ +int nr_generate_pss( int16_t *d_pss, + int32_t **txdataF, + int16_t amp, + uint8_t ssb_start_symbol, + nfapi_config_request_t* config, + NR_DL_FRAME_PARMS *frame_parms); + +/*! +\fn int nr_generate_sss +\brief Generation of the NR SSS +@param +@returns 0 on success + */ +int nr_generate_sss( int16_t *d_sss, + int32_t **txdataF, + int16_t amp, + uint8_t ssb_start_symbol, + nfapi_config_request_t* config, + NR_DL_FRAME_PARMS *frame_parms); + +/*! +\fn int nr_generate_pbch_dmrs +\brief Generation of the DMRS for the PBCH +@param +@returns 0 on success + */ +int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, + int32_t **txdataF, + int16_t amp, + uint8_t ssb_start_symbol, + uint8_t nu, + nfapi_config_request_t* config, + NR_DL_FRAME_PARMS *frame_parms); + +/*! +\fn int nr_generate_pbch +\brief Generation of the PBCH +@param +@returns 0 on success + */ +int nr_generate_pbch(NR_gNB_PBCH *pbch, + uint8_t *pbch_pdu, + int32_t **txdataF, + int16_t amp, + uint8_t ssb_start_symbol, + uint8_t nu, + nfapi_config_request_t* config, + NR_DL_FRAME_PARMS *frame_parms); + +#endif /*__NR_TRANSPORT__H__*/ diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index 0be8a2db5a..e25fdf8768 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -35,19 +35,12 @@ #include "defs_common.h" - #define nr_subframe_t lte_subframe_t -#define NR_PBCH_DMRS_LENGTH 144 -#define NR_PBCH_DMRS_LENGTH_DWORD 5 // roundup(NR_PBCH_DMRS_LENGTH/32) - #define MAX_NUM_SUBCARRIER_SPACING 5 #define NR_SYMBOLS_PER_SLOT 14 -#define NR_PSS_LENGTH 127 -#define NR_SSS_LENGTH 127 - #define ONE_OVER_SQRT2_Q15 23170 #define ONE_OVER_TWO_Q15 16384 @@ -55,6 +48,12 @@ #define NR_MOD_TABLE_BPSK_OFFSET 1 #define NR_MOD_TABLE_QPSK_OFFSET 3 +#define NR_PSS_LENGTH 127 +#define NR_SSS_LENGTH 127 + +#define NR_PBCH_DMRS_LENGTH 144 +#define NR_PBCH_DMRS_LENGTH_DWORD 5 // roundup(NR_PBCH_DMRS_LENGTH/32) + typedef enum { NR_MU_0=0, NR_MU_1, diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 4c2ea0b767..5a3d0699c6 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -21,6 +21,7 @@ #include "PHY/phy_extern.h" #include "PHY/defs_gNB.h" +#include "PHY/NR_TRANSPORT/nr_transport.h" #include "SCHED/sched_eNB.h" #include "SCHED/sched_common_extern.h" #include "nfapi_interface.h"