Commit 0ca82861 authored by Hongzhi Wang's avatar Hongzhi Wang

Merge branch 'nr_initialsync' of...

Merge branch 'nr_initialsync' of https://gitlab.eurecom.fr/oai/openairinterface5g into nr_initialsync
parents 7ccf478a 2cb411c5
This diff is collapsed.
...@@ -48,6 +48,7 @@ DEADLINE_SCHEDULER_FLAG_USER="False" ...@@ -48,6 +48,7 @@ DEADLINE_SCHEDULER_FLAG_USER="False"
FORCE_DEADLINE_SCHEDULER_FLAG_USER="" FORCE_DEADLINE_SCHEDULER_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False
REL="Rel14" REL="Rel14"
NR_REL="NR_Rel15"
HW="None" HW="None"
TP="None" TP="None"
NOS1=0 NOS1=0
...@@ -582,6 +583,7 @@ function main() { ...@@ -582,6 +583,7 @@ function main() {
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( NR_RRC_ASN1_VERSION \"${NR_REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
......
...@@ -147,7 +147,7 @@ clean_all_files() { ...@@ -147,7 +147,7 @@ clean_all_files() {
set_openair_env set_openair_env
dir=$OPENAIR_DIR/cmake_targets dir=$OPENAIR_DIR/cmake_targets
rm -rf $dir/log $OPENAIR_DIR/targets/bin/* rm -rf $dir/log $OPENAIR_DIR/targets/bin/*
rm -rf $dir/build_oai $dir/lte-simulators/build rm -rf $dir/lte_build_oai $dir/lte-simulators/build
rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt
rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build
} }
...@@ -242,36 +242,6 @@ install_protobuf_c_from_source(){ ...@@ -242,36 +242,6 @@ install_protobuf_c_from_source(){
) >& $protobuf_c_install_log ) >& $protobuf_c_install_log
} }
install_libiio_driver_from_source(){
libiio_install_log=$OPENAIR_DIR/cmake_targets/log/libiio_install_log.txt
echo_info "\nInstalling LibIIO driver from sources. The log file for LibIIO driver installation is here: $libiio_install_log "
(
cd /tmp
echo "Downloading LibIIO driver"
rm -rf /tmp/libiio
git clone https://github.com/analogdevicesinc/libiio.git
cd libiio
git checkout 2016_R2
cmake ./
make all
$SUDO make install
) >& $libiio_install_log
}
check_install_libiio_driver(){
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
$SUDO apt-get install -y --allow-unauthenticated libxml2
$SUDO apt-get install -y --allow-unauthenticated libxml2-dev
$SUDO apt-get install -y --allow-unauthenticated bison
$SUDO apt-get install -y --allow-unauthenticated flex
$SUDO apt-get install -y --allow-unauthenticated libcdk5-dev
$SUDO apt-get install -y --allow-unauthenticated cmake
$SUDO apt-get install -y --allow-unauthenticated libaio-dev
$SUDO apt-get install -y --allow-unauthenticated libavahi-client-dev
install_libiio_driver_from_source
fi
}
install_usrp_uhd_driver_from_source(){ install_usrp_uhd_driver_from_source(){
uhd_install_log=$OPENAIR_DIR/cmake_targets/log/uhd_install_log.txt uhd_install_log=$OPENAIR_DIR/cmake_targets/log/uhd_install_log.txt
echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log " echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log "
...@@ -689,8 +659,11 @@ install_asn1c_from_source(){ ...@@ -689,8 +659,11 @@ install_asn1c_from_source(){
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log " echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log "
( (
$SUDO rm -rf /tmp/asn1c $SUDO rm -rf /tmp/asn1c
GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c # GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
git clone https://github.com/velichkov/asn1c /tmp/asn1c
cd /tmp/asn1c cd /tmp/asn1c
git checkout s1ap
test -f configure || autoreconf -iv
./configure ./configure
make -j`nproc` make -j`nproc`
$SUDO make install $SUDO make install
......
...@@ -94,7 +94,7 @@ function patch_rrc() ...@@ -94,7 +94,7 @@ function patch_rrc()
case "$version" in case "$version" in
Rel14 ) Rel14 )
echo "patching RRC files release 14" echo "patching RRC files release 14"
apply_patches "$directory" RRC_Rel14 ${#RRC_Rel14[*]} #apply_patches "$directory" RRC_Rel14 ${#RRC_Rel14[*]}
;; ;;
Rel10 ) Rel10 )
echo "patching RRC files release 10" echo "patching RRC files release 10"
...@@ -109,12 +109,31 @@ function patch_rrc() ...@@ -109,12 +109,31 @@ function patch_rrc()
esac esac
} }
function patch_nr_rrc()
{
local directory="$1"
local version="$2"
case "$version" in
NR_Rel15 )
echo "patching NR_RRC files release 15"
apply_patches "$directory" NR_RRC_Rel15 ${#NR_RRC_Rel15[*]}
;;
* )
error unknwon/unhandled NR_RRC version \'"$version"\'
;;
esac
}
function patch_x2ap() function patch_x2ap()
{ {
local directory="$1" local directory="$1"
local version="$2" local version="$2"
case "$version" in case "$version" in
R14 )
;;
R11 ) R11 )
echo "patching X2AP files release 11.2" echo "patching X2AP files release 11.2"
apply_patches "$directory" X2AP_Rel11_2 ${#X2AP_Rel11_2[*]} apply_patches "$directory" X2AP_Rel11_2 ${#X2AP_Rel11_2[*]}
...@@ -131,6 +150,8 @@ function patch_s1ap() ...@@ -131,6 +150,8 @@ function patch_s1ap()
local version="$2" local version="$2"
case "$version" in case "$version" in
R14 )
;;
R10 ) R10 )
#nothing to do anymore (fixes went to asn1c) #nothing to do anymore (fixes went to asn1c)
;; ;;
...@@ -161,6 +182,9 @@ function main() ...@@ -161,6 +182,9 @@ function main()
RRC ) RRC )
patch_rrc "$directory" "$version" patch_rrc "$directory" "$version"
;; ;;
NR_RRC )
patch_nr_rrc "$directory" "$version"
;;
X2AP ) X2AP )
patch_x2ap "$directory" "$version" patch_x2ap "$directory" "$version"
;; ;;
......
...@@ -6,9 +6,11 @@ mkdir -p $1 ...@@ -6,9 +6,11 @@ mkdir -p $1
cd $1 cd $1
shift shift
local module="$2"
#if this script is called with only 2 arguments (so 1 here after the shift), it's for RRC #if this script is called with only 2 arguments (so 1 here after the shift), it's for RRC
#(there may be a better way...) #(there may be a better way...)
if [ $# -eq 1 ]; then if [ $# -eq 2 ]; then
#asn1c does not work well with extension groups, we need the following fix: #asn1c does not work well with extension groups, we need the following fix:
# replace [[ by '<name> SEQUENCE {' # replace [[ by '<name> SEQUENCE {'
...@@ -99,7 +101,21 @@ echo done with asnfix ...@@ -99,7 +101,21 @@ echo done with asnfix
echo running asn1c echo running asn1c
asn1c -gen-PER -fcompound-names fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample case "$module" in
RRC )
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;;
NR_RRC )
export ASN1C_PREFIX=NR_
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;;
S1AP )
export ASN1C_PREFIX=S1AP_
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;;
esac
rm -f fixed_grammar.asn rm -f fixed_grammar.asn
...@@ -107,7 +123,19 @@ echo asn1c done ...@@ -107,7 +123,19 @@ echo asn1c done
else else
asn1c -gen-PER -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample case "$module" in
RRC )
asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;;
NR_RRC )
export ASN1C_PREFIX=NR_
asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;;
S1AP )
export ASN1C_PREFIX=S1AP_
asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;;
esac
fi fi
......
...@@ -49,15 +49,21 @@ ...@@ -49,15 +49,21 @@
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
#include "RRC/LTE/defs_NB_IoT.h" #include "RRC/LTE/defs_NB_IoT.h"
#include "RRC/NR/defs_NR.h"
typedef struct { typedef struct {
/// RAN context config file name /// RAN context config file name
char *config_file_name; char *config_file_name;
/// Number of RRC instances in this node /// Number of RRC instances in this node
int nb_inst; int nb_inst;
/// Number of NB_IoT RRC instances in this node
int nb_nb_iot_rrc_inst;
/// Number of NR RRC instances in this node
int nb_nr_inst;
/// Number of Component Carriers per instance in this node /// Number of Component Carriers per instance in this node
int *nb_CC; int *nb_CC;
/// Number of NB_IoT instances in this node /// Number of NR Component Carriers per instance in this node
int nb_nb_iot_rrc_inst; int *nb_nr_CC;
/// Number of MACRLC instances in this node /// Number of MACRLC instances in this node
int nb_macrlc_inst; int nb_macrlc_inst;
/// Number of NB_IoT MACRLC instances in this node /// Number of NB_IoT MACRLC instances in this node
...@@ -84,6 +90,8 @@ typedef struct { ...@@ -84,6 +90,8 @@ typedef struct {
struct eNB_RRC_INST_s **rrc; struct eNB_RRC_INST_s **rrc;
/// NB_IoT RRC context variables /// NB_IoT RRC context variables
//struct eNB_RRC_INST_NB_IoT_s **nb_iot_rrc; //struct eNB_RRC_INST_NB_IoT_s **nb_iot_rrc;
/// NR RRC context variables
struct gNB_RRC_INST_s **nrrrc;
/// MAC context variables /// MAC context variables
struct eNB_MAC_INST_s **mac; struct eNB_MAC_INST_s **mac;
/// NB_IoT MAC context variables /// NB_IoT MAC context variables
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* 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/LTE_TRANSPORT/drs_modulation.c
* \brief Top-level routines for generating the Demodulation Reference Signals from 36-211, V8.6 2009-03
* \author R. Knopp, F. Kaltenberger, A. Bhamri
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,ankit.bhamri@eurecom.fr
* \note
* \warning
*/
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "PHY/sse_intrin.h"
//#define DEBUG_DRS
int generate_drs_pusch(PHY_VARS_UE *ue,
UE_rxtx_proc_t *proc,
uint8_t eNB_id,
short amp,
unsigned int subframe,
unsigned int first_rb,
unsigned int nb_rb,
uint8_t ant)
{
uint16_t k,l,Msc_RS,Msc_RS_idx,rb,drs_offset;
uint16_t * Msc_idx_ptr;
int subframe_offset,re_offset,symbol_offset;
//uint32_t phase_shift; // phase shift for cyclic delay in DM RS
//uint8_t alpha_ind;
int16_t alpha_re[12] = {32767, 28377, 16383, 0,-16384, -28378,-32768,-28378,-16384, -1, 16383, 28377};
int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384};
uint8_t cyclic_shift,cyclic_shift0,cyclic_shift1;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int32_t *txdataF = ue->common_vars.txdataF[ant];
uint32_t u,v,alpha_ind;
uint32_t u0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[subframe<<1];
uint32_t u1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(subframe<<1)];
uint32_t v0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[subframe<<1];
uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
int32_t ref_re,ref_im;
uint8_t harq_pid = subframe2harq_pid(frame_parms,proc->frame_tx,subframe);
cyclic_shift0 = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
ue->ulsch[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]+
((ue->ulsch[0]->cooperation_flag==2)?10:0)+
ant*6) % 12;
// printf("PUSCH.cyclicShift %d, n_DMRS2 %d, nPRS %d\n",frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift,ue->ulsch[eNB_id]->n_DMRS2,ue->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1]);
cyclic_shift1 = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
ue->ulsch[eNB_id]->harq_processes[harq_pid]->n_DMRS2 +
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+1]+
((ue->ulsch[0]->cooperation_flag==2)?10:0)+
ant*6) % 12;
// cyclic_shift0 = 0;
// cyclic_shift1 = 0;
Msc_RS = 12*nb_rb;
Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints);
if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes;
else {
LOG_I(PHY,"generate_drs_pusch: index for Msc_RS=%d not found\n",Msc_RS);
return(-1);
}
for (l = (3 - frame_parms->Ncp),u=u0,v=v0,cyclic_shift=cyclic_shift0;
l<frame_parms->symbols_per_tti;
l += (7 - frame_parms->Ncp),u=u1,v=v1,cyclic_shift=cyclic_shift1) {
drs_offset = 0;
#ifdef DEBUG_DRS
printf("drs_modulation: Msc_RS = %d, Msc_RS_idx = %d, u=%d,v=%d\n",Msc_RS, Msc_RS_idx,u,v);
#endif
re_offset = frame_parms->first_carrier_offset;
subframe_offset = subframe*frame_parms->symbols_per_tti*frame_parms->ofdm_symbol_size;
symbol_offset = subframe_offset + frame_parms->ofdm_symbol_size*l;
#ifdef DEBUG_DRS
printf("generate_drs_pusch: symbol_offset %d, subframe offset %d, cyclic shift %d\n",symbol_offset,subframe_offset,cyclic_shift);
#endif
alpha_ind = 0;
for (rb=0; rb<frame_parms->N_RB_UL; rb++) {
if ((rb >= first_rb) && (rb<(first_rb+nb_rb))) {
#ifdef DEBUG_DRS
printf("generate_drs_pusch: doing RB %d, re_offset=%d, drs_offset=%d,cyclic shift %d\n",rb,re_offset,drs_offset,cyclic_shift);
#endif
for (k=0; k<12; k++) {
ref_re = (int32_t) ul_ref_sigs[u][v][Msc_RS_idx][drs_offset<<1];
ref_im = (int32_t) ul_ref_sigs[u][v][Msc_RS_idx][(drs_offset<<1)+1];
((int16_t*) txdataF)[2*(symbol_offset + re_offset)] = (int16_t) (((ref_re*alpha_re[alpha_ind]) -
(ref_im*alpha_im[alpha_ind]))>>15);
((int16_t*) txdataF)[2*(symbol_offset + re_offset)+1] = (int16_t) (((ref_re*alpha_im[alpha_ind]) +
(ref_im*alpha_re[alpha_ind]))>>15);
((short*) txdataF)[2*(symbol_offset + re_offset)] = (short) ((((short*) txdataF)[2*(symbol_offset + re_offset)]*(int32_t)amp)>>15);
((short*) txdataF)[2*(symbol_offset + re_offset)+1] = (short) ((((short*) txdataF)[2*(symbol_offset + re_offset)+1]*(int32_t)amp)>>15);
alpha_ind = (alpha_ind + cyclic_shift);
if (alpha_ind > 11)
alpha_ind-=12;
#ifdef DEBUG_DRS
printf("symbol_offset %d, alpha_ind %d , re_offset %d : (%d,%d)\n",
symbol_offset,
alpha_ind,
re_offset,
((short*) txdataF)[2*(symbol_offset + re_offset)],
((short*) txdataF)[2*(symbol_offset + re_offset)+1]);
#endif // DEBUG_DRS
re_offset++;
drs_offset++;
if (re_offset >= frame_parms->ofdm_symbol_size)
re_offset = 0;
}
} else {
re_offset+=12; // go to next RB
// check if we crossed the symbol boundary and skip DC
if (re_offset >= frame_parms->ofdm_symbol_size) {
if (frame_parms->N_RB_DL&1) // odd number of RBs
re_offset=6;
else // even number of RBs (doesn't straddle DC)
re_offset=0;
}
}
}
}
return(0);
}
This diff is collapsed.
This diff is collapsed.
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/TOOLS/tools_defs.h" #include "PHY/TOOLS/tools_defs.h"
#include "PHY/phy_extern_ue.h" #include "PHY/extern_ue.h"
#include "transport_ue.h" #include "tools_defs.h"
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
int16_t ones256[16] __attribute__ ((aligned(32))) = {0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}; int16_t ones256[16] __attribute__ ((aligned(32))) = {0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff};
......
This diff is collapsed.
...@@ -84,6 +84,10 @@ typedef boolean_t eNB_flag_t; ...@@ -84,6 +84,10 @@ typedef boolean_t eNB_flag_t;
#define ENB_FLAG_NO FALSE #define ENB_FLAG_NO FALSE
#define ENB_FLAG_YES TRUE #define ENB_FLAG_YES TRUE
typedef boolean_t gNB_flag_t;
#define GNB_FLAG_NO FALSE
#define GNB_FLAG_YES TRUE
typedef boolean_t srb_flag_t; typedef boolean_t srb_flag_t;
#define SRB_FLAG_NO FALSE #define SRB_FLAG_NO FALSE
#define SRB_FLAG_YES TRUE #define SRB_FLAG_YES TRUE
...@@ -236,6 +240,9 @@ typedef struct protocol_ctxt_s { ...@@ -236,6 +240,9 @@ typedef struct protocol_ctxt_s {
#define UE_INSTANCE_TO_MODULE_ID( iNSTANCE ) iNSTANCE - NB_eNB_INST #define UE_INSTANCE_TO_MODULE_ID( iNSTANCE ) iNSTANCE - NB_eNB_INST
#define ENB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE #define ENB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE
//NR
#define GNB_MODULE_ID_TO_INSTANCE( mODULE_iD ) mODULE_iD
#define GNB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE
#define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \ #define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \
if(eNB_fLAG == ENB_FLAG_YES) \ if(eNB_fLAG == ENB_FLAG_YES) \
......
This diff is collapsed.
/*
* 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 openair2/GNB_APP/RRC_paramsvalues.h
* \brief macro definitions for RRC authorized and asn1 parameters values, to be used in paramdef_t/chechedparam_t structure initializations
* \author Francois TABURET
* \date 2017
* \version 0.1
* \company NOKIA BellLabs France
* \email: francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
#ifndef __NRRRC_PARAMSVALUES__H__
#define __NRRRC_PARAMSVALUES__H__
/* cell configuration section name */
#define GNB_CONFIG_STRING_GNB_LIST "gNBs"
/* component carriers configuration section name */
#define GNB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers"
#define GNB_CONFIG_STRING_FRAME_TYPE "frame_type"
#define GNB_CONFIG_STRING_DL_PREFIX_TYPE "DL_prefix_type"
#define GNB_CONFIG_STRING_UL_PREFIX_TYPE "UL_prefix_type"
#define GNB_CONFIG_STRING_EUTRA_BAND "eutra_band"
#define GNB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency"
#define GNB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset"
#define GNB_CONFIG_STRING_NID_CELL "Nid_cell"
#define GNB_CONFIG_STRING_N_RB_DL "N_RB_DL"
#define GNB_CONFIG_STRING_CELL_MBSFN "Nid_cell_mbsfn"
#define FRAMETYPE_OKVALUES {"FDD","TDD"}
#define FRAMETYPE_MODVALUES { FDD, TDD}
#define TDDCFG(A) TDD_Config__subframeAssignment_ ## A
#define TDDCONFIG_OKRANGE { TDDCFG(sa0), TDDCFG(sa6)}
#define TDDCFGS(A) TDD_Config__specialSubframePatterns_ ## A
#define TDDCONFIGS_OKRANGE { TDDCFGS(ssp0), TDDCFGS(ssp8)}
#define PREFIX_OKVALUES {"NORMAL","EXTENDED"}
#define PREFIX_MODVALUES { NORMAL, EXTENDED}
#define PREFIXUL_OKVALUES {"NORMAL","EXTENDED"}
#define PREFIXUL_MODVALUES { NORMAL, EXTENDED}
#define NRBDL_OKVALUES {6,15,25,50,75,100}
#define UETIMER_T300_OKVALUES {100,200,300,400,600,1000,1500,2000}
#define UETT300(A) UE_TimersAndConstants__t300_ ## A
#define UETIMER_T300_MODVALUES { UETT300(ms100), UETT300(ms200),UETT300(ms300),UETT300(ms400),UETT300(ms600),UETT300(ms1000),UETT300(ms1500),UETT300(ms2000)}
#define UETIMER_T301_OKVALUES {100,200,300,400,600,1000,1500,2000}
#define UETT301(A) UE_TimersAndConstants__t301_ ## A
#define UETIMER_T301_MODVALUES { UETT301(ms100), UETT301(ms200),UETT301(ms300),UETT301(ms400),UETT301(ms600),UETT301(ms1000),UETT301(ms1500),UETT301(ms2000)}
#define UETIMER_T310_OKVALUES {0,50,100,200,500,1000,2000}
#define UETT310(A) UE_TimersAndConstants__t310_ ## A
#define UETIMER_T310_MODVALUES { UETT310(ms0), UETT310(ms50),UETT310(ms100),UETT310(ms200),UETT310(ms500),UETT310(ms1000),UETT310(ms2000)}
#define UETIMER_T311_OKVALUES {1000,3110,5000,10000,15000,20000,31100}
#define UETT311(A) UE_TimersAndConstants__t311_ ## A
#define UETIMER_T311_MODVALUES { UETT311(ms1000), UETT311(ms3000),UETT311(ms5000),UETT311(ms10000),UETT311(ms15000),UETT311(ms20000),UETT311(ms30000)}
#define UETIMER_N310_OKVALUES {1,2,3,4,6,8,10,20}
#define UETN310(A) UE_TimersAndConstants__n310_ ## A
#define UETIMER_N310_MODVALUES { UETN310(n1), UETN310(n2),UETN310(n3),UETN310(n4),UETN310(n6),UETN310(n8),UETN310(n10),UETN310(n20)}
#define UETIMER_N311_OKVALUES {1,2,3,4,5,6,8,10}
#define UETN311(A) UE_TimersAndConstants__n311_ ## A
#define UETIMER_N311_MODVALUES { UETN311(n1), UETN311(n2),UETN311(n3),UETN311(n4),UETN311(n5),UETN311(n6),UETN311(n8),UETN311(n10)}
#endif
This diff is collapsed.
/*
* 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
*/
/*
gnb_app.h
-------------------
AUTHOR : Laurent Winckel, Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*/
#ifndef GNB_APP_H_
#define GNB_APP_H_
#include <stdint.h>
void *gNB_app_task(void *args_p);
#endif /* GNB_APP_H_ */
This diff is collapsed.
/*
* 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
*/
/*
gnb_config.h
-------------------
AUTHOR : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
*/
#ifndef GNB_CONFIG_H_
#define GNB_CONFIG_H_
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <libconfig.h>
#include "commonDef.h"
#include "platform_types.h"
#include "platform_constants.h"
#include "PHY/impl_defs_lte.h"
#include "PHY/defs.h"
#include "s1ap_messages_types.h"
//#ifdef CMAKER
//#include "SystemInformationBlockType2.h"
//#include "rrc_messages_types.h"
//#else
//#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
//#endif
#include "intertask_interface_types.h"
#include "RRC/NR/defs_NR.h"
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
struct in_addr inp;\
if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\
AssertFatal (0, MeSsAgE);\
} else {\
NwBo = inp.s_addr;\
}\
} while (0);
/** @defgroup _enb_app ENB APP
* @ingroup _oai2
* @{
*/
// Hard to find a defined value for max enb...
#define MAX_ENB 16
/*
typedef struct mme_ip_address_s {
unsigned ipv4:1;
unsigned ipv6:1;
unsigned active:1;
char *ipv4_address;
char *ipv6_address;
} mme_ip_address_t;
typedef struct ru_config_s {
// indicates if local or remote rf is used (1 == LOCAL)
unsigned local_rf:1;
// indicates if UDP socket is used
unsigned udp:1;
// indicates if RAW socket is used
unsigned raw:1;
char *ru_if_name;
char *local_address;
char *remote_address;
uint16_t local_port;
uint16_t remote_port;
uint8_t udpif4p5;
uint8_t rawif4p5;
uint8_t rawif5_mobipass;
uint8_t if_compress;
} ru_config_t;
*/
//extern void RCconfig_RU(void);
//extern void RCconfig_flexran(void);
//extern void RCconfig_L1(void);
//extern void RCconfig_macrlc(void);
//extern int RCconfig_gtpu(void );
extern void NRRCConfig(void);
//void enb_config_display(void);
//void ru_config_display(void);
int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc);
//int RCconfig_S1(MessageDef *msg_p, uint32_t i);
#endif /* GNB_CONFIG_H_ */
/** @} */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* 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 main.c
* \brief top init of Layer 2
* \author Navid Nikaein and Raymond Knopp
* \date 2010 - 2014
* \version 1.0
* \email: navid.nikaein@eurecom.fr
* @ingroup _mac
*/
#include "defs.h"
#include "proto.h"
#include "extern.h"
#include "assertions.h"
static NR_UE_MAC_INST_t *nr_ue_mac_inst;
int
nr_l2_init_ue(void)
{
LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
LOG_I(MAC, "[MAIN] init UE MAC functions \n");
//init mac here
nr_ue_mac_inst = (NR_UE_MAC_INST_t *)malloc(sizeof(NR_UE_MAC_INST_t)*NB_NR_UE_MAC_INST);
return (1);
}
NR_UE_MAC_INST_t *get_mac_inst(Module_id_t Mod_idP){
return &nr_ue_mac_inst[(int)Mod_idP];
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* 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 __PHY_INTERFACE_EXTERN_H__
#define __PHY_INTERFACE_EXTERN_H__
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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