Commit 9646876a authored by Matthieu Kanj's avatar Matthieu Kanj

creation of new file openair1/SCHED/extern_NB_IoT.h +

seperation for files in /SCHED
parent 759377b8
......@@ -51,7 +51,7 @@ int16_t *primary_synch2_time;
PHY_VARS_UE_NB_IoT ***PHY_vars_UE_NB_IoT_g;
PHY_VARS_eNB_NB_IoT ***PHY_vars_eNB_NB_IoT_g;
PHY_VARS_RN_NB_IoT **PHY_vars_RN_NB_IoT_g;
LTE_DL_FRAME_PARMS *lte_frame_parms_g;
NB_IoT_DL_FRAME_PARMS *lte_frame_parms_g;
#else
PHY_VARS_UE_NB_IoT * PHY_vars_UE_NB_IoT_g[MAX_UE][MAX_NUM_CCs]={NULL};
PHY_vars_eNB_NB_IoT * PHY_vars_eNB_NB_IoT_g[MAX_eNB_NB_IoT][MAX_NUM_CCs]={NULL};
......
#include "../SCHED/IF_Module_L1_primitives_nb_iot.h"
#include "../SCHED/defs.h"
//#include "../SCHED/defs.h"
#include "../SCHED/defs_nb_iot.h"
#include "assertions.h"
#include "PHY/defs.h"
//#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
//#include "PHY/extern.h"
#include "PHY/extern_NB_IoT.h"
......@@ -52,7 +55,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
ndlsch_harq->resource_assignment = rel13->number_of_subframes_for_resource_assignment;//maybe we don't care about it since a fixed schedule
ndlsch_harq->repetition_number = rel13->repetition_number; //is the schedulingInfoSIB1 (value 1-15) of MIB that is mapped into value 4-8-16 (see NDLSCH fapi specs Table 4-47)
ndlsch_harq->modulation = rel13->modulation;
ndlsch_harq->status = ACTIVE;
ndlsch_harq->status = ACTIVE_NB_IoT;
//SI information in reality have no feedback (so there is no retransmission from the HARQ view point since no ack and nack)
// ndlsch_harq->frame = frame;
......@@ -113,7 +116,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
}
//Independently if we have the PDU or not (first transmission or repetition) the process is activated for triggering the ndlsch_procedure
ndlsch_harq->status = ACTIVE;
ndlsch_harq->status = ACTIVE_NB_IoT;
}
......
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto_nb_iot.h"
#ifndef __IF_MODULE_L1_PRIMITIVES_NB_IOT_H__
#define __IF_MODULE_L1_PRIMITIVES_NB_IOT_H__
//#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair1/PHY/defs_nb_iot.h"
//#include "LAYER2/MAC/extern.h"
//#include "LAYER2/MAC/proto_nb_iot.h"
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
void schedule_response(Sched_Rsp_t *Sched_INFO);
......
......@@ -5,7 +5,8 @@
//#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
//#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair2/PHY_INTERFACE/nfapi_interface.h"
void process_schedule_rsp_NB_IoT(Sched_Rsp_t *sched_rsp,
PHY_VARS_eNB_NB_IoT *eNB,
......
/*
* 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.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.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
*/
/*!\brief SCHED external variables */
#ifndef __SCHED_EXTERN_NB_IOT_H__
#define __SCHED_EXTERN_NB_IOT_H__
#ifndef USER_MODE
#define __NO_VERSION__
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/types.h>
#include <asm/io.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>
#include <asm/segment.h>
#include <asm/page.h>
#ifdef RTAI_ENABLED
#include <rtai.h>
//#include <rtai_posix.h>
#include <rtai_fifos.h>
#include <rtai_sched.h>
#include <rtai_sem.h>
//#include "rt_compat.h"
#else
#include <unistd.h>
#endif
#endif /* USER_MODE */
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
extern uint16_t hundred_times_log10_NPRB_NB_IoT[100];
extern Sched_Rsp_t* Sched_Rsp;
#endif /*__SCHED_EXTERN_H__ */
......@@ -11,9 +11,9 @@
* \warning
*/
#include "PHY/defs_nb_iot.h"
#include "PHY/extern_NB_IoT.h"
#include "SCHED/defs_nb_iot.h"
#include "SCHED/extern.h"
//#include "PHY/extern_NB_IoT.h"
//#include "SCHED/defs_nb_iot.h"
//#include "SCHED/extern.h"
#ifdef LOCALIZATION
#include <sys/time.h>
......
......@@ -32,16 +32,16 @@
//#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "PHY/extern_NB_IoT.h" //where we get the global Sched_Rsp_t structure filled
//#include "PHY/extern_NB_IoT.h" //where we get the global Sched_Rsp_t structure filled
//#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if5_tools.h"
#include "RRC/LITE/proto_nb_iot.h"
#include "SIMULATION/TOOLS/defs.h"
#ifdef EMOS
#include "SCHED/phy_procedures_emos.h"
#endif
#include "SCHED/extern_NB_IoT.h"
//#include "PHY/LTE_TRANSPORT/if4_tools.h"
//#include "PHY/LTE_TRANSPORT/if5_tools.h"
//#include "RRC/LITE/proto_nb_iot.h"
#include "SIMULATION/TOOLS/defs.h" // purpose: included for taus() function
//#ifdef EMOS
//#include "SCHED/phy_procedures_emos.h"
//#endif
// for NB-IoT
#include "SCHED/defs_nb_iot.h"
......@@ -49,8 +49,8 @@
//#define DEBUG_PHY_PROC (Already defined in cmake)
//#define DEBUG_ULSCH
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/defs.h"
//#include "LAYER2/MAC/extern.h"
//#include "LAYER2/MAC/defs.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
......@@ -65,6 +65,7 @@
# include "intertask_interface.h"
#endif
/*
#if defined(FLEXRAN_AGENT_SB_IF)
//Agent-related headers
......@@ -72,19 +73,21 @@
#include "ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h"
#include "LAYER2/MAC/flexran_agent_mac_proto.h"
#endif
*/
//#define DIAG_PHY
#define NS_PER_SLOT 500000
///#define NS_PER_SLOT 500000
#define PUCCH 1
///#define PUCCH 1
//DCI_ALLOC_t dci_alloc[8];
#ifdef EMOS
fifo_dump_emos_eNB emos_dump_eNB;
#endif
///#ifdef EMOS
///fifo_dump_emos_eNB emos_dump_eNB;
///#endif
/*
#if defined(SMBV)
extern const char smbv_fname[];
extern unsigned short config_frames[4];
......@@ -95,7 +98,7 @@ extern uint8_t smbv_frame_cnt;
extern int rx_sig_fifo;
#endif
*/
......@@ -359,7 +362,7 @@ void phy_procedures_eNB_uespec_RX_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_
(eNB->nulsch[i]->harq_process->nb_rb*12)/
fp->ofdm_symbol_size) -
eNB->rx_total_gain_dB -
hundred_times_log10_NPRB[eNB->nulsch[i]->harq_process->nb_rb-1]/100 -
hundred_times_log10_NPRB_NB_IoT[eNB->nulsch[i]->harq_process->nb_rb-1]/100 -
get_hundred_times_delta_IF_eNB_NB_IoT(eNB,i,harq_pid, 0)/100;
//for NB-IoT PHICH not work
/*eNB->ulsch[i]->harq_processes[harq_pid]->phich_active = 1;
......
......@@ -30,10 +30,10 @@
* \warning
*/
#include "defs_nb_iot.h"
//#include "defs_nb_iot.h"
#include "PHY/defs_nb_iot.h"
#include "PHY/LTE_TRANSPORT/proto_nb_iot.h"
#include "PHY/extern_NB_IoT.h"
//#include "PHY/LTE_TRANSPORT/proto_nb_iot.h"
//#include "PHY/extern_NB_IoT.h"
// This is the formula from Section 5.1.1.1 in 36.213 100*10*log10((2^(MPR*Ks)-1)), where MPR is in the range [0,6] and Ks=1.25
int16_t hundred_times_delta_TF_NB_IoT[100] = {-32768,-1268,-956,-768,-631,-523,-431,-352,-282,-219,-161,-107,-57,-9,36,79,120,159,197,234,269,304,337,370,402,434,465,495,525,555,583,612,640,668,696,723,750,777,803,829,856,881,907,933,958,983,1008,1033,1058,1083,1108,1132,1157,1181,1205,1229,1254,1278,1302,1325,1349,1373,1397,1421,1444,1468,1491,1515,1538,1562,1585,1609,1632,1655,1679,1702,1725,1748,1772,1795,1818,1841,1864,1887,1910,1933,1956,1980,2003,2026,2049,2072,2095,2118,2141,2164,2186,2209,2232,2255};
......
......@@ -27,7 +27,8 @@
* \version 1.0
*/
#ifndef __LAYER2_MAC_PROTO_NB_IoT_H__
#define __LAYER2_MAC_PROTO_NB_IoT_H__
/** \addtogroup _mac
......@@ -69,4 +70,4 @@ int l2_init_eNB_NB(void);
int mac_init_global_param_NB(void);
int mac_top_init_NB(void);
#endif
......@@ -11,7 +11,7 @@
#include "nfapi_interface.h"
#include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h"
#include "PhysicalConfigDedicated-NB-r13.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
//#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair2/COMMON/platform_types.h"
#define SCH_PAYLOAD_SIZE_MAX 4096
......
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