Commit 8b12045b authored by David Price's avatar David Price

Trying to get NFAPI working. BCH not being sent out over the air but is being scheduled

parent 0fccd994
......@@ -28,6 +28,7 @@ cmake_minimum_required (VERSION 2.8)
################################################
set (OPENAIR_DIR $ENV{OPENAIR_DIR})
set (NFAPI_DIR $ENV{NFAPI_DIR})
set (NFAPI_USER_DIR ${OPENAIR_DIR}/nfapi)
set (OPENAIR1_DIR ${OPENAIR_DIR}/openair1)
set (OPENAIR2_DIR ${OPENAIR_DIR}/openair2)
set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3)
......@@ -738,7 +739,12 @@ else()
include_directories("${OPENAIR2_DIR}/UTIL")
include_directories("${OPENAIR2_DIR}/UTIL/LOG")
endif()
include_directories("${NFAPI_DIR}")
include_directories("${NFAPI_DIR}/nfapi/public_inc")
include_directories("${NFAPI_DIR}/common/public_inc")
include_directories("${NFAPI_DIR}/pnf/public_inc")
include_directories("${NFAPI_DIR}/nfapi/inc")
include_directories("${NFAPI_DIR}/sim_common/inc")
include_directories("${NFAPI_DIR}/pnf_sim/inc")
include_directories("${OPENAIR1_DIR}")
include_directories("${OPENAIR2_DIR}/NAS")
include_directories("${OPENAIR2_DIR}")
......@@ -980,6 +986,58 @@ set(SCHED_SRC
)
add_library(SCHED_LIB ${SCHED_SRC})
# nFAPI
#################################
set(NFAPI_COMMON_SRC
${NFAPI_DIR}/common/src/debug.c
)
add_library(NFAPI_COMMON_LIB ${NFAPI_COMMON_SRC})
include_directories(${NFAPI_DIR}/common/public_inc)
set(NFAPI_SRC
${NFAPI_DIR}/nfapi/src/nfapi.c
${NFAPI_DIR}/nfapi/src/nfapi_p4.c
${NFAPI_DIR}/nfapi/src/nfapi_p5.c
${NFAPI_DIR}/nfapi/src/nfapi_p7.c
)
add_library(NFAPI_LIB ${NFAPI_SRC})
include_directories(${NFAPI_DIR}/nfapi/public_inc)
include_directories(${NFAPI_DIR}/nfapi/inc)
set(NFAPI_PNF_SRC
${NFAPI_DIR}/pnf/src/pnf.c
${NFAPI_DIR}/pnf/src/pnf_interface.c
${NFAPI_DIR}/pnf/src/pnf_p7.c
${NFAPI_DIR}/pnf/src/pnf_p7_interface.c
)
add_library(NFAPI_PNF_LIB ${NFAPI_PNF_SRC})
include_directories(${NFAPI_DIR}/pnf/public_inc)
include_directories(${NFAPI_DIR}/pnf/inc)
set(NFAPI_VNF_SRC
${NFAPI_DIR}/vnf/src/vnf.c
${NFAPI_DIR}/vnf/src/vnf_interface.c
${NFAPI_DIR}/vnf/src/vnf_p7.c
${NFAPI_DIR}/vnf/src/vnf_p7_interface.c
)
add_library(NFAPI_VNF_LIB ${NFAPI_VNF_SRC})
include_directories(${NFAPI_DIR}/vnf/public_inc)
include_directories(${NFAPI_DIR}/vnf/inc)
# nFAPI user defined code
#############################
set(NFAPI_USER_SRC
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/nfapi_pnf.c
${NFAPI_USER_DIR}/nfapi_vnf.c
)
add_library(NFAPI_USER_LIB ${NFAPI_USER_SRC})
include_directories(${NFAPI_USER_DIR})
# Layer 1
#############################
set(PHY_SRC
......@@ -1175,6 +1233,8 @@ add_library(L2
${ENB_APP_SRC})
# ${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c)
include_directories(${NFAPI_USER_DIR})
if (FLEXRAN_AGENT_SB_IF)
#Test for adding a shared library
......@@ -1588,6 +1648,13 @@ add_library(OPENAIR0_LIB
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
)
include_directories("${NFAPI_DIR}/nfapi/public_inc")
include_directories("${NFAPI_DIR}/common/public_inc")
include_directories("${NFAPI_DIR}/pnf/public_inc")
include_directories("${NFAPI_DIR}/nfapi/inc")
include_directories("${NFAPI_DIR}/sim_common/inc")
include_directories("${NFAPI_DIR}/pnf_sim/inc")
# System packages that are required
# We use either the cmake buildin, in ubuntu are in: /usr/share/cmake*/Modules/
# or cmake provide a generic interface to pkg-config that widely used
......@@ -1643,6 +1710,26 @@ endif()
add_definitions("-DNETTLE_VERSION_MAJOR=${NETTLE_VERSION_MAJOR}")
add_definitions("-DNETTLE_VERSION_MINOR=${NETTLE_VERSION_MINOR}")
#pkg_search_module(NFAPI nfapi)
#if(NOT ${NFAPI_FOUND})
#message( FATAL_ERROR "PACKAGE nfapi not found: some targets will fail. Run build_oai -I again!")
#else()
#include_directories(${NFAPI_INCLUDE_DIRS})
#message( "PACKAGE nfapi!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
#message( "${NFAPI_INCLUDE_DIR}")
#message( "${NFAPI_COMMON_INCLUDE_DIR}")
#message( "${NFAPI_VNF_INCLUDE_DIR}")
#message( "${NFAPI_PNF_INCLUDE_DIR}")
#message( "XXX")
#message( "${NFAPI_LIBRARY}")
#message( "${NFAPI_COMMON_LIBRARY}")
#message( "${NFAPI_PNF_LIBRARY}")
#message( "XXX")
#message( "${NFAPI_LIBRARIES}")
#message( "XXX")
#endif()
pkg_search_module(XPM xpm)
if(NOT ${XPM_FOUND})
message("PACKAGE xpm not found: some targets will fail")
......@@ -1682,6 +1769,12 @@ if (${T_TRACER})
set (T_LIB "rt")
endif (${T_TRACER})
#if (${NFAPI_DIR})
#set (NFAPI_PNF_LIB "nfapi_pnf")
#set (NFAPI_LIB "nfapi")
#set (NFAPI_COMMON_LIB "nfapi_common")
#endif (${NFAPI_DIR})
#
#Some files in the T directory are generated.
#This rule and the following deal with it.
add_custom_command (
......@@ -1740,6 +1833,9 @@ add_executable(lte-softmodem
target_link_libraries (lte-softmodem -ldl
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB
z
-Wl,--end-group )
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
......@@ -1858,22 +1954,44 @@ add_executable(oaisim
${T_SOURCE}
)
#add_library( imp_nfapi STATIC IMPORTED)
#set_property(TARGET imp_nfapi PROPERTY IMPORTED_LOCATION ${NFAPI_DIR}/libnfapi.a)
#set_property(TARGET imp_nfapi PROPERTY IMPORTED_IMPLIB ${NFAPI_DIR}/libnfapi.a)
#target_link_libraries(oaisim imp_nfapi)
#add_library( imp_nfapi_common STATIC IMPORTED)
#set_property(TARGET imp_nfapi_common PROPERTY IMPORTED_LOCATION ${NFAPI_DIR}/common/libnfapi_common.a)
#set_property(TARGET imp_nfapi_common PROPERTY IMPORTED_IMPLIB ${NFAPI_DIR}/common/libnfapi_common.a)
#target_link_libraries(oaisim imp_nfapi_common)
#add_library( imp_nfapi_pnf STATIC IMPORTED)
#set_property(TARGET imp_nfapi_pnf PROPERTY IMPORTED_LOCATION ${NFAPI_DIR}/pnf/libnfapi_pnf.a)
#set_property(TARGET imp_nfapi_pnf PROPERTY IMPORTED_IMPLIB ${NFAPI_DIR}/pnf/libnfapi_pnf.a)
#target_link_libraries(oaisim imp_nfapi_pnf)
#
#add_library (imp_nfapi_common STATIC IMPORTED)
#set_target_properties(imp_nfapi_common PROPERTIES IMPORTED_LOCATION ${NFAPI_DIR}/common/libnfapi_common.a
#set_target_properties(oaisim PROPERTIES LINK_FLAGS ${NFAPI_DIR}/nfapi/libnfapi.a ${NFAPI_DIR}/pnf/libnfapi_pnf.a ${NFAPI_DIR}/common/libnfapi_common.a)
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim
-Wl,-ldl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} LIB_NAS_UE SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB}
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB
-Wl,--end-group )
target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp z
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} )
#Force link with forms, regardless XFORMS option
target_link_libraries (oaisim forms)
target_link_libraries (oaisim ${T_LIB})
# A all in one network simulator
################
add_executable(oaisim_nos1
......
......@@ -187,7 +187,7 @@ function main() {
GDB=1
CMAKE_BUILD_TYPE="Debug"
echo_info "Will Compile with gdb symbols and disable compiler optimization"
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug"
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug --trace-expand"
shift;;
--eNB)
eNB=1
......
......@@ -205,6 +205,7 @@ install_protobuf_c_from_source(){
rm -rf /tmp/protobuf-c
git clone https://github.com/protobuf-c/protobuf-c.git
cd protobuf-c
git checkout 2a46af42784abf86804d536f6e0122d47cfeea45
./autogen.sh
./configure
echo "Compiling protobuf-c"
......
This diff is collapsed.
This diff is collapsed.
#if !defined(NFAPI_PNF_H__)
#define NFAPI_PNF_H__
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, int pnf_p7_port, int vnf_p7_port);
#endif
This diff is collapsed.
#if !defined(NFAPI_VNF_H__)
#define NFAPI_VNF_H__
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port);
#endif
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
#ifndef _VENDOR_EXT_H_
#define _VENDOR_EXT_H_
#include "nfapi_interface.h"
typedef enum
{
P5_VENDOR_EXT_REQ = NFAPI_VENDOR_EXT_MSG_MIN,
P5_VENDOR_EXT_RSP,
P7_VENDOR_EXT_REQ,
P7_VENDOR_EXT_IND
} vendor_ext_message_id_e;
typedef struct {
nfapi_p4_p5_message_header_t header;
uint16_t dummy1;
uint16_t dummy2;
} vendor_ext_p5_req;
typedef struct {
nfapi_p4_p5_message_header_t header;
uint16_t error_code;
} vendor_ext_p5_rsp;
typedef struct {
nfapi_p7_message_header_t header;
uint16_t dummy1;
uint16_t dummy2;
} vendor_ext_p7_req;
typedef struct {
nfapi_p7_message_header_t header;
uint16_t error_code;
} vendor_ext_p7_ind;
typedef struct {
nfapi_tl_t tl;
uint32_t dummy;
} vendor_ext_tlv_1;
#define VENDOR_EXT_TLV_1_TAG 0xF001
typedef struct {
nfapi_tl_t tl;
uint32_t dummy;
} vendor_ext_tlv_2;
#define VENDOR_EXT_TLV_2_TAG 0xF002
#endif // _VENDOR_EXT_
......@@ -17,3 +17,12 @@ alias oait='cd $OPENAIR_TARGETS'
alias oailte='cd $OPENAIR_TARGETS/RT/USER'
alias oais='cd $OPENAIR_TARGETS/SIMU/USER'
alias oaiex='cd $OPENAIR_TARGETS/SIMU/EXAMPLES'
#export NFAPI_DIR=/home/nfapi-001/open-nFAPI/nfapi/public_inc
export NFAPI_DIR=/home/nfapi-001/open-nFAPI
alias bld='cd $OPENAIR_HOME/cmake_targets ; ./build_oai --eNB -x -w USRP'
alias b='cd $OPENAIR_HOME/cmake_targets ; ./build_oai --eNB -x -w USRP'
alias run='cd $OPENAIR_HOME/cmake_targets/lte_build_oai/build'
alias nf='cd $OPENAIR_HOME/nfapi'
alias conf='cd $OPENAIR_HOME/targets/PROJECTS/GENERIC-LTE-EPC/CONF'
This diff is collapsed.
......@@ -174,6 +174,8 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
pbch_E = (frame_parms->Ncp==NORMAL) ? 1920 : 1728; //RE/RB * #RB * bits/RB (QPSK)
// pbch_E_bytes = pbch_coded_bits>>3;
LOG_D(PHY,"%s(eNB_pbch:%p txdataF:%p amp:%d frame_parms:%p pbch_pdu:%p frame_mod4:%d)\n", __FUNCTION__, eNB_pbch, txdataF, amp, frame_parms, pbch_pdu, frame_mod4==0);
if (frame_mod4==0) {
bzero(pbch_a,PBCH_A>>3);
bzero(eNB_pbch->pbch_e,pbch_E);
......
......@@ -1531,6 +1531,8 @@ static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *
return(-1);
}
LOG_D(PHY, "%s() name:%s instance_cnt:%u - about to decrement\n", __FUNCTION__, name, *instance_cnt);
*instance_cnt=*instance_cnt-1;
if (pthread_mutex_unlock(mutex) != 0) {
......
......@@ -37,6 +37,8 @@
#include "nfapi_interface.h"
#include "fapi_l1.h"
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req);
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req);
void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
......@@ -576,8 +578,9 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
ul_subframe = pdcch_alloc2ul_subframe(fp,subframe);
ul_frame = pdcch_alloc2ul_frame(fp,frame,subframe);
AssertFatal(proc->subframe_tx == subframe, "Current subframe %d != NFAPI subframe %d\n",proc->subframe_tx,subframe);
AssertFatal(proc->subframe_tx == subframe, "Current frame %d != NFAPI frame %d\n",proc->frame_tx,frame);
// DJP - subframe assert will fail - not sure why yet
// DJP - AssertFatal(proc->subframe_tx == subframe, "Current subframe %d != NFAPI subframe %d\n",proc->subframe_tx,subframe);
// DJP - AssertFatal(proc->subframe_tx == subframe, "Current frame %d != NFAPI frame %d\n",proc->frame_tx,frame);
uint8_t number_dl_pdu = DL_req->dl_config_request_body.number_pdu;
uint8_t number_hi_dci0_pdu = HI_DCI0_req->hi_dci0_request_body.number_of_dci+HI_DCI0_req->hi_dci0_request_body.number_of_hi;
......@@ -591,12 +594,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
int i;
eNB->pdcch_vars[subframe&1].num_pdcch_symbols = DL_req->dl_config_request_body.number_pdcch_ofdm_symbols;
eNB->pdcch_vars[subframe&1].num_dci = 0;
eNB->pdcch_vars[subframe&1].num_dci = DL_req->dl_config_request_body.number_dci;
eNB->phich_vars[subframe&1].num_hi = 0;
LOG_D(PHY,"NFAPI: Frame %d, Subframe %d: received %d dl_pdu, %d tx_req, %d hi_dci0_config_req, %d UL_config \n",
frame,subframe,number_dl_pdu,TX_req->tx_request_body.number_of_pdus,number_hi_dci0_pdu,number_ul_pdu);
int do_oai =0;
if ((subframe_select(fp,ul_subframe)==SF_UL) ||
(fp->frame_type == FDD)) {
......@@ -619,6 +623,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
handle_nfapi_dci_dl_pdu(eNB,proc,dl_config_pdu);
eNB->pdcch_vars[subframe&1].num_dci++;
do_oai=1;
break;
case NFAPI_DL_CONFIG_BCH_PDU_TYPE:
AssertFatal(dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index<TX_req->tx_request_body.number_of_pdus,
......@@ -626,6 +631,11 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index,
TX_req->tx_request_body.number_of_pdus);
eNB->pbch_configured=1;
do_oai=1;
//LOG_D(PHY,"%s() NFAPI_DL_CONFIG_BCH_PDU_TYPE TX:%d/%d RX:%d/%d TXREQ:%d/%d\n",
//__FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, NFAPI_SFNSF2SFN(TX_req->sfn_sf), NFAPI_SFNSF2SF(TX_req->sfn_sf));
handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu,
TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data);
break;
......@@ -633,6 +643,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
// handle_nfapi_mch_dl_pdu(eNB,dl_config_pdu);
break;
case NFAPI_DL_CONFIG_DLSCH_PDU_TYPE:
//LOG_D(PHY,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE TX:%d/%d RX:%d/%d\n", __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx);
AssertFatal(dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index<TX_req->tx_request_body.number_of_pdus,
"dlsch_pdu_rel8.pdu_index>=TX_req->number_of_pdus (%d>%d)\n",
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index,
......@@ -653,6 +665,10 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
subframe);
} */
// Send the data first so that the DL_CONFIG can just pluck it out of the buffer
// DJP - OAI was here - moved to bottom
do_oai=1;
break;
case NFAPI_DL_CONFIG_PCH_PDU_TYPE:
// handle_nfapi_pch_pdu(eNB,dl_config_pdu);
......@@ -673,6 +689,15 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
}
}
#if 1
if (do_oai)
{
oai_nfapi_tx_req(Sched_INFO->TX_req);
oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
}
#endif
for (i=0;i<number_hi_dci0_pdu;i++) {
hi_dci0_req_pdu = &HI_DCI0_req->hi_dci0_request_body.hi_dci0_pdu_list[i];
......
......@@ -135,13 +135,11 @@ void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,PHY_VARS_RN *rn,rel
#endif
}
void common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
int **txdataF = eNB->common_vars.txdataF;
uint8_t *pbch_pdu=&eNB->pbch_pdu[0];
int subframe = proc->subframe_tx;
int frame = proc->frame_tx;
LOG_D(PHY,"common_signal_procedures: frame %d, subframe %d\n",frame,subframe);
......@@ -420,7 +418,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
}
else {
// this is not a pmch subframe, so generate PSS/SSS/PBCH
common_signal_procedures(eNB,proc);
common_signal_procedures(eNB,proc->frame_tx, proc->subframe_tx);
}
// clear existing ulsch dci allocations before applying info from MAC (this is table
......@@ -1914,10 +1912,20 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
// Call SRS first since all others depend on presence of SRS or lack thereof
srs_procedures(eNB,proc);
{
static int first_time=1;
if (first_time)
{
LOG_E(PHY,"%s() DJP - removed lte_eNB_I0_measurements because it core dumps - no idea why!!!\n\n\n\n\n", __FUNCTION__);
first_time=0;
}
}
#if 0
lte_eNB_I0_measurements(eNB,
subframe,
0,
eNB->first_run_I0_measurements);
#endif
eNB->first_run_I0_measurements = 0;
uci_procedures(eNB,proc);
......
......@@ -146,7 +146,7 @@ void feptx_ofdm(RU_t *ru) {
}
txdata = (int16_t*)&ru->common.txdata[aa][0];
for (j=0; i<(len<<1); i++,j++) {
txdata[j++] = ((int16_t*)dummy_tx_b)[i];
txdata[j++] = ((int16_t*)dummy_tx_b)[i];
}
}
else {
......@@ -205,6 +205,14 @@ void feptx_prec(RU_t *ru) {
eNB = eNB_list[0];
fp = &eNB->frame_parms;
if (0) LOG_E(PHY,"%s() run->nb_tx:%u subframe:%u fp->symbols_per_tti:%u fp->ofdm_symbol_size:%u symbols:(%d, %d), (%d,%d)\n",
__FUNCTION__, ru->nb_tx, subframe, fp->symbols_per_tti, fp->ofdm_symbol_size,
((short*)&eNB->common_vars.txdataF[0][1])[0],
((short*)&eNB->common_vars.txdataF[0][1])[1],
((short*)&eNB->common_vars.txdataF[0][2])[0],
((short*)&eNB->common_vars.txdataF[0][2])[1]
);
for (aa=0;aa<ru->nb_tx;aa++)
memcpy((void*)ru->common.txdataF_BF[aa],
(void*)&eNB->common_vars.txdataF[aa][subframe*fp->symbols_per_tti*fp->ofdm_symbol_size],
......@@ -409,4 +417,3 @@ void do_prach_ru(RU_t *ru) {
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -61,7 +61,7 @@ void dl_phy_sync_success(module_id_t module_idP,
#endif
if (first_sync==1 && !(mme_enabled==1)) {
layer2_init_UE(module_idP);
//DJP layer2_init_UE(module_idP);
openair_rrc_ue_init(module_idP,eNB_index);
} else
{
......@@ -148,7 +148,7 @@ int mac_top_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
}
int mac_top_init_eNB()
int mac_top_init_eNB(void)
{
module_id_t Mod_id,i,j;
......@@ -379,7 +379,7 @@ int l2_init_ue(int eMBMS_active, char *uecap_xer,uint8_t cba_group_active, uint8
return(1);
}
int l2_init_eNB()
int l2_init_eNB(void)
{
......
......@@ -207,7 +207,7 @@ void UL_indication(UL_IND_t *UL_info)
sched_info->TX_req = &mac->TX_req[CC_id];
AssertFatal(ifi->schedule_response!=NULL,
"UL_indication is null (mod %d, cc %d)\n",
"schedule_response is null (mod %d, cc %d)\n",
module_id,
CC_id);
ifi->schedule_response(sched_info);
......
......@@ -65,7 +65,7 @@ openair_rrc_on(
int CC_id;
if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" OPENAIR RRC IN....\n",
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" ENB:OPENAIR RRC IN....\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
rrc_config_buffer (&RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SI, BCCH, 1);
......@@ -74,7 +74,7 @@ openair_rrc_on(
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Active = 1;
}
} else {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" OPENAIR RRC IN....\n",
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" UE?:OPENAIR RRC IN....\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
for (i = 0; i < NB_eNB_INST; i++) {
......
......@@ -147,7 +147,7 @@ init_SI(
#ifdef Rel14
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].pbch_repetition = configuration->pbch_repetition[CC_id];
#endif
LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n",
LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %ld,phich_Duration %ld)\n",
configuration->N_RB_DL[CC_id],
configuration->phich_resource[CC_id],
configuration->phich_duration[CC_id]);
......@@ -282,6 +282,8 @@ init_SI(
}
#endif
LOG_I(RRC, "About to call rrc_mac_config_req_eNB");
rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB,
......
......@@ -99,7 +99,7 @@ void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP);
void *udp_eNB_task(void *args_p);
int udp_enb_init();
int udp_enb_init(void);
/* @brief Retrieve the descriptor associated with the task_id
*/
static
......@@ -427,7 +427,7 @@ on_error:
return NULL;
}
int udp_enb_init()
int udp_enb_init(void)
{
LOG_I(UDP_, "Initializing UDP task interface\n");
STAILQ_INIT(&udp_socket_list);
......
......@@ -93,6 +93,6 @@ void *udp_eNB_task(void *args_p);
* \param enb_config_p configuration of eNB
* @returns always 0
*/
int udp_enb_init();
int udp_enb_init(void);
#endif /* UDP_ENB_TASK_H_ */
......@@ -138,10 +138,10 @@ static void trx_usrp_end(openair0_device *device) {
/*! \brief Called to send samples to the USRP RF target
@param device pointer to the device structure specific to the RF hardware target
@param timestamp The timestamp at whicch the first sample MUST be sent
@param timestamp The timestamp at which the first sample MUST be sent
@param buff Buffer which holds the samples
@param nsamps number of samples to be sent
@param antenna_id index of the antenna if the device has multiple anteannas
@param antenna_id index of the antenna if the device has multiple antennas
@param flags flags must be set to TRUE if timestamp parameter needs to be applied
*/
static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
......@@ -515,6 +515,8 @@ extern "C" {
openair0_cfg[0].rx_gain_calib_table = calib_table_x310;
LOG_I(PHY,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate);
switch ((int)openair0_cfg[0].sample_rate) {
case 30720000:
// from usrp_time_offset
......@@ -648,6 +650,8 @@ extern "C" {
s->usrp->set_tx_rate(openair0_cfg[0].sample_rate,i);
s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i);
s->usrp->set_tx_gain(gain_range_tx.stop()-openair0_cfg[0].tx_gain[i],i);
LOG_I(PHY,"USRP TX_GAIN:%3.2lf gain_range:%3.2lf tx_gain:%3.2lf\n", gain_range_tx.stop()-openair0_cfg[0].tx_gain[i], gain_range_tx.stop(), openair0_cfg[0].tx_gain[i]);
}
}
......
......@@ -42,6 +42,8 @@
int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
{
LOG_E(ENB_APP, "%s(enb_nb:%d ue_nb:%d)\n", __FUNCTION__, enb_nb, ue_nb);
itti_wait_ready(1);
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
LOG_E(PDCP, "Create task for L2L1 failed\n");
......
......@@ -17,7 +17,8 @@ eNBs =
mobile_country_code = "208";
mobile_network_code = "93";
#mobile_network_code = "93";
mobile_network_code = "92";
tr_s_preference = "local_mac"
......@@ -140,7 +141,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "127.0.0.3";
mme_ip_address = ( { ipv4 = "192.168.1.78";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -150,10 +151,10 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24";
ENB_INTERFACE_NAME_FOR_S1_MME = "eno1";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.1.74/24";
ENB_INTERFACE_NAME_FOR_S1U = "eno1";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.1.74/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......@@ -200,6 +201,8 @@ RUs = (
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
eNB_instances = [0];
}
);
......@@ -2,13 +2,14 @@ L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "lo";
remote_n_address = "127.0.0.2";
local_n_address = "127.0.0.1";
local_n_portc = 50000;
remote_n_portc = 50000;
local_n_portd = 50001;
remote_n_portd = 50001;
local_n_if_name = "eno1";
#remote_n_address = "192.168.1.78";
remote_n_address = "192.168.1.28";
local_n_address = "192.168.1.74";
local_n_portc = 50000;
remote_n_portc = 50001;
local_n_portd = 50010;
remote_n_portd = 50011;
}
);
......@@ -17,11 +18,10 @@ RUs = (
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_tx = 90
att_rx = 0;
bands = [7,38,42,43];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
eNB_instances = [0];
}
);
);
This diff is collapsed.
......@@ -1278,6 +1278,8 @@ void init_eNB_proc(int inst) {
eNB_rxtx_proc_t *proc_rxtx;
pthread_attr_t *attr0=NULL,*attr1=NULL,*attr_prach=NULL,*attr_asynch=NULL,*attr_single=NULL,*attr_fep=NULL,*attr_td=NULL,*attr_te;
printf("%s()\n", __FUNCTION__);
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
eNB = PHY_vars_eNB_g[inst][CC_id];
LOG_I(PHY,"Initializing eNB %d CC_id %d (%s,%s),\n",inst,CC_id,eNB_functions[eNB->node_function],eNB_timing[eNB->node_timing]);
......@@ -1673,10 +1675,15 @@ void init_RAN(RAN_CONTEXT *rc,eNB_func_t node_function[], eNB_timing_t node_timi
PHY_VARS_eNB *eNB;
int ret;
printf("%s() rc->nb_inst:%d\n", __FUNCTION__, rc->nb_inst);
for (inst=0;inst<rc->nb_inst;inst++) {
printf("%s() rc->nb_inst:%d rc->nb_CC:%d\n", __FUNCTION__, rc->nb_inst, rc->nb_CC);
for (CC_id=0;CC_id<rc->nb_CC;CC_id++) {
eNB = rc->eNB[inst][CC_id];
printf("%s() rc->nb_inst:%d rc->nb_CC:%d eNB:%p rc->eNB[%d][%d]:%p\n", __FUNCTION__, rc->nb_inst, rc->nb_CC, eNB, inst, CC_id, rc->eNB[inst][CC_id]);
if (eNB) {
eNB->node_function = node_function[CC_id];
eNB->node_timing = node_timing[CC_id];
eNB->abstraction_flag = 0;
......
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