Commit 20fa442b authored by Guy De Souza's avatar Guy De Souza

gNB Tx procedure

parent 1b68a4f2
...@@ -980,6 +980,7 @@ add_library(SCHED_LIB ${SCHED_SRC}) ...@@ -980,6 +980,7 @@ add_library(SCHED_LIB ${SCHED_SRC})
set(SCHED_NR_SRC set(SCHED_NR_SRC
${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_common.c ${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_common.c
${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_gNB.c
) )
add_library(SCHED_NR_LIB ${SCHED_NR_SRC}) add_library(SCHED_NR_LIB ${SCHED_NR_SRC})
......
...@@ -507,7 +507,7 @@ function main() { ...@@ -507,7 +507,7 @@ function main() {
DIR=$OPENAIR_DIR/cmake_targets DIR=$OPENAIR_DIR/cmake_targets
if [ "$NOS1" = "1" ] ; then if [ "$NOS1" = "1" ] ; then
build_dir=noS1_build_ran build_dir=noS1_ran_build
if [ "$gNB" = "1" ] ; then if [ "$gNB" = "1" ] ; then
exec=nr-softmodem-nos1 exec=nr-softmodem-nos1
elif [ "$nrUE" = "1" ] ; then elif [ "$nrUE" = "1" ] ; then
...@@ -518,7 +518,7 @@ function main() { ...@@ -518,7 +518,7 @@ function main() {
exec=lte-uesoftmodem-nos1 exec=lte-uesoftmodem-nos1
fi fi
else else
build_dir=build_ran build_dir=ran_build
if [ "$gNB" = "1" ] ; then if [ "$gNB" = "1" ] ; then
exec=nr-softmodem exec=nr-softmodem
elif [ "$nrUE" = "1" ] ; then elif [ "$nrUE" = "1" ] ; then
......
...@@ -166,6 +166,9 @@ static inline void* malloc16_clear( size_t size ) ...@@ -166,6 +166,9 @@ static inline void* malloc16_clear( size_t size )
#define MAX_FRAME_NUMBER 0x400 #define MAX_FRAME_NUMBER 0x400
#if 1 #if 1
#define nr_subframe_t lte_subframe_t
typedef struct { typedef struct {
/// EUTRA Band /// EUTRA Band
uint8_t eutra_band; uint8_t eutra_band;
......
/*
* 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
*/
/*! \file phy_procedures_lte_eNB.c
* \brief Implementation of common utilities for eNB/UE procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
nr_subframe_t nr_subframe_select(nfapi_config_request_t *cfg,unsigned char subframe)
{
if (cfg->subframe_config.duplex_mode.value == FDD)
return(SF_DL);
}
...@@ -19,12 +19,11 @@ ...@@ -19,12 +19,11 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "PHY/defs_NR.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/defs.h" #include "SCHED/defs.h"
#include "SCHED/extern.h" #include "SCHED/extern.h"
#include "nfapi_interface.h" #include "nfapi_interface.h"
#include "fapi_l1.h" #include "SCHED/fapi_l1.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
...@@ -39,8 +38,44 @@ ...@@ -39,8 +38,44 @@
# include "intertask_interface.h" # include "intertask_interface.h"
#endif #endif
extern uint8_t nfapi_mode;
void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) { void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
nfapi_config_request_t *cfg = gNB->gNB_config;
int **txdataF = gNB->common_vars.txdataF;
uint8_t *pbch_pdu=&gNB->pbch_pdu[0];
LOG_D(PHY,"common_signal_procedures: frame %d, subframe %d\n",frame,subframe);
}
void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
gNB_rxtx_proc_t *proc,
int do_meas)
{
int aa;
int frame=proc->frame_tx;
int subframe=proc->subframe_tx;
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
nfapi_config_request_t *cfg = gNB->gNB_config;
int offset = gNB->CC_id;
if ((cfg->subframe_config.duplex_mode.value == TDD) && (nr_subframe_select(cfg,subframe)==SF_UL)) return;
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1);
//if (do_meas==1) start_meas(&gNB->phy_proc_tx);
// clear the transmit data array for the current subframe
for (aa=0; aa<cfg->rf_config.tx_antenna_ports.value; aa++) {
memset(&gNB->common_vars.txdataF[aa][subframe*fp->samples_per_subframe_wCP],
0,fp->samples_per_subframe_wCP*sizeof(int32_t));
}
if (nfapi_mode == 0 || nfapi_mode == 1) {
common_signal_procedures(gNB,frame, subframe);
}
} }
...@@ -234,8 +234,7 @@ static inline int rxtx(PHY_VARS_gNB *gNB,gNB_rxtx_proc_t *proc, char *thread_nam ...@@ -234,8 +234,7 @@ static inline int rxtx(PHY_VARS_gNB *gNB,gNB_rxtx_proc_t *proc, char *thread_nam
//if (wait_CCs(proc)<0) return(-1); //if (wait_CCs(proc)<0) return(-1);
if (oai_exit) return(-1); if (oai_exit) return(-1);
/// To call after common signals for NR phy_procedures_gNB_TX(gNB, proc, 1);
//phy_procedures_gNB_TX(gNB, proc, no_relay, NULL, 1);
stop_meas( &softmodem_stats_rxtx_sf ); stop_meas( &softmodem_stats_rxtx_sf );
......
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