Commit 59f72094 authored by Matthieu Kanj's avatar Matthieu Kanj

creating new files for code separation, openair1/PHY/extern_NB_IoT.h openair1/PHY/vars_NB_IoT.h,

+ replacing PHY_vars_eNB_g by PHY_vars_eNB_NB_IoT_g
parent ab4fb083
......@@ -22,6 +22,7 @@
#include "defs.h"
#include "SCHED/defs.h"
#include "PHY/extern.h"
#include "PHY/extern_NB_IoT.h"
#include "SIMULATION/TOOLS/defs.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
......@@ -60,11 +61,11 @@ void NB_phy_config_mib_eNB(
{
AssertFatal(PHY_vars_eNB_g != NULL, "PHY_vars_eNB_g instance pointer doesn't exist\n");
AssertFatal(PHY_vars_eNB_g[Mod_id] != NULL, "PHY_vars_eNB_g instance %d doesn't exist\n",Mod_id);
AssertFatal(PHY_vars_eNB_g[Mod_id][CC_id] != NULL, "PHY_vars_eNB_g instance %d, CCid %d doesn't exist\n",Mod_id,CC_id);
AssertFatal(PHY_vars_eNB_NB_IoT_g != NULL, "PHY_vars_eNB_NB_IoT_g instance pointer doesn't exist\n");
AssertFatal(PHY_vars_eNB_NB_IoT_g[Mod_id] != NULL, "PHY_vars_eNB_NB_IoT_g instance %d doesn't exist\n",Mod_id);
AssertFatal(PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id] != NULL, "PHY_vars_eNB_NB_IoT_g instance %d, CCid %d doesn't exist\n",Mod_id,CC_id);
NB_IoT_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms_nb_iot;
NB_IoT_DL_FRAME_PARMS *fp = &PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->frame_parms_nb_iot;
LOG_I(PHY,"Configuring MIB-NB for instance %d, CCid %d : (band %d,Nid_cell %d,p %d,EARFCN %u)\n",
Mod_id, CC_id, eutra_band, Nid_cell, p_eNB,EARFCN);
......@@ -98,9 +99,9 @@ void NB_phy_config_mib_eNB(
// RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
// )
//{
// NB_IoT_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms;
// //LTE_eNB_UE_stats *eNB_UE_stats = PHY_vars_eNB_g[Mod_id][CC_id]->eNB_UE_stats;
// //int32_t rx_total_gain_eNB_dB = PHY_vars_eNB_g[Mod_id][CC_id]->rx_total_gain_eNB_dB;
// NB_IoT_DL_FRAME_PARMS *fp = &PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->frame_parms;
// //LTE_eNB_UE_stats *eNB_UE_stats = PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->eNB_UE_stats;
// //int32_t rx_total_gain_eNB_dB = PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->rx_total_gain_eNB_dB;
// uint8_t MAX_NPRACH = 4;
// NPRACH_Parameters_NB_r13_t *np;
//
......@@ -135,7 +136,7 @@ void NB_phy_config_mib_eNB(
// }
//
// /*Should modify to compute_nprach_seq*/
// //compute_prach_seq(&fp->prach_config_common,fp->frame_type,PHY_vars_eNB_g[Mod_id][CC_id]->X_u);
// //compute_prach_seq(&fp->prach_config_common,fp->frame_type,PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->X_u);
//
// /*NPDSCH ConfigCommon*/
// fp->npdsch_config_common.nrs_Power = radioResourceConfigCommon->npdsch_ConfigCommon_r13.nrs_Power_r13;
......@@ -180,7 +181,7 @@ void NB_phy_config_mib_eNB(
// fp->DL_gap_config.dl_GapThreshold = radioResourceConfigCommon->dl_Gap_r13->dl_GapThreshold_r13;
//
// /*PUCCH stuff in LTE*/
// //init_ncs_cell(fp,PHY_vars_eNB_g[Mod_id][CC_id]->ncs_cell);
// //init_ncs_cell(fp,PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->ncs_cell);
//
// //init_ul_hopping(fp);
//
......@@ -196,7 +197,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
extra_phyConfig_t* extra_phy_parms
)
{
NB_IoT_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms;
NB_IoT_DL_FRAME_PARMS *fp = &PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->frame_parms;
LOG_D(PHY,"[eNB%d] CCid %d: Applying nb_iot_config from sib2_NB\n",Mod_id,CC_id);
/*NPRACH_ConfigSIB_NB_r13----------------------------------------------------------*/
......@@ -290,7 +291,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
}
//TODO: Should modify to compute_nprach_seq --> nprach.
//compute_prach_seq(&fp->prach_config_common,fp->frame_type,PHY_vars_eNB_g[Mod_id][CC_id]->X_u);
//compute_prach_seq(&fp->prach_config_common,fp->frame_type,PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id]->X_u);
/*NPDSCH ConfigCommon-------------------------------------------------------------------*/
......@@ -355,7 +356,7 @@ void NB_phy_config_dedicated_eNB(uint8_t Mod_id,
extra_phyConfig_t *extra_parms
)
{
PHY_VARS_eNB_NB_IoT *eNB = PHY_vars_eNB_g[Mod_id][CC_id];
PHY_VARS_eNB_NB_IoT *eNB = PHY_vars_eNB_NB_IoT_g[Mod_id][CC_id];
NB_IoT_eNB_NPDCCH_t *npdcch;
uint8_t UE_id = find_ue(rnti,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
*/
#ifndef __PHY_EXTERN_NB_IOT_H__
#define __PHY_EXTERN_NB_IOT_H__
//#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "PHY_INTERFACE/defs.h"
#include "PHY_INTERFACE/IF_Module_nb_iot.h"
/*
extern char* namepointer_chMag ;
extern char* namepointer_log2;
extern char fmageren_name2[512];
extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX];
extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
*/
#include "PHY/LTE_TRANSPORT/extern.h"
#include "SIMULATION/ETH_TRANSPORT/extern.h"
extern unsigned int DAQ_MBOX;
extern int number_of_cards;
//extern PHY_CONFIG *PHY_config;
//extern PHY_VARS *PHY_vars;
#ifndef OCP_FRAMEWORK
extern PHY_VARS_UE ***PHY_vars_UE_g;
extern PHY_VARS_eNB_NB_IoT ***PHY_vars_eNB_NB_IoT_g;
extern PHY_VARS_RN **PHY_vars_RN_g;
extern NB_IoT_DL_FRAME_PARMS *nb_iot_frame_parms_g;
#else
#define MAX_UE 10
#define MAX_eNB_NB_IoT 20
extern PHY_VARS_UE * PHY_vars_UE_g[MAX_UE][MAX_NUM_CCs];
extern PHY_VARS_eNB_NB_IoT * PHY_vars_eNB_NB_IoT_g[MAX_eNB_NB_IoT][MAX_NUM_CCs];
#endif
/*
extern MAC_xface *mac_xface;
extern IF_Module_t *if_inst;
extern short primary_synch0[144];
extern short primary_synch1[144];
extern short primary_synch2[144];
extern unsigned char primary_synch0_tab[72];
extern unsigned char primary_synch1_tab[72];
extern unsigned char primary_synch2_tab[72];
extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
extern int *sync_corr_ue0; //!< index [0..10*samples_per_tti[
extern int *sync_corr_ue1; //!< index [0..10*samples_per_tti[
extern int *sync_corr_ue2; //!< index [0..10*samples_per_tti[
extern int flagMag;
//extern short **txdataF_rep_tmp;
extern char mode_string[4][20];
*/
#include "PHY/LTE_TRANSPORT/extern.h"
/*
#ifndef OPENAIR2
extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST;
extern unsigned char NB_RN_INST;
#endif
extern unsigned int ULSCH_max_consecutive_errors;
extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern double sinr_to_cqi[4][16];
extern int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern double beta1_dlsch_MI[6][MCS_COUNT];
extern double beta2_dlsch_MI[6][MCS_COUNT];
extern double q_qpsk[8];
extern double q_qam16[8];
extern double q_qam64[8];
extern double p_qpsk[8];
extern double p_qam16[8];
extern double p_qam64[8];
extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT];
extern char eNB_functions[6][20];
extern char eNB_timing[2][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
extern unsigned short msrsb_6_40[8][4];
extern unsigned short msrsb_41_60[8][4];
extern unsigned short msrsb_61_80[8][4];
extern unsigned short msrsb_81_110[8][4];
extern unsigned short Nb_6_40[8][4];
extern unsigned short Nb_41_60[8][4];
extern unsigned short Nb_61_80[8][4];
extern unsigned short Nb_81_110[8][4];
extern uint16_t hundred_times_log10_NPRB[100];
extern uint8_t alpha_lut[8];
*/
#endif /*__PHY_EXTERN_H__ */
This diff is collapsed.
......@@ -2,10 +2,12 @@
#include "../SCHED/defs.h"
#include "../SCHED/defs_nb_iot.h"
#include "common/utils/itti/assertions.h"
//#include "PHY/defs.h"
#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "PHY/extern.h"
//#include "PHY/extern.h"
#include "PHY/extern_NB_IoT.h"
#include "PHY/vars.h"
#include "PHY/vars_NB_IoT.h"
#include "PHY/INIT/defs_nb_iot.h"
......@@ -168,7 +170,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
{
//XXX check if correct to take eNB like this
PHY_VARS_eNB_NB_IoT *eNB = PHY_vars_eNB_g[0][Sched_INFO->CC_id];
PHY_VARS_eNB_NB_IoT *eNB = PHY_vars_eNB_NB_IoT_g[0][Sched_INFO->CC_id];
eNB_rxtx_proc_t *proc = &eNB->proc.proc_rxtx[0];
NB_IoT_eNB_NPBCH_t *npbch;
......
......@@ -32,6 +32,7 @@
#include "assertions.h"
//#include "PHY/defs.h"
#include "PHY/extern.h"
#include "PHY/extern_NB_IoT.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
......@@ -190,9 +191,9 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer= UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[lcgid];
PHY_vars_eNB_g[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP*10)+subframeP] = (payload_ptr[0] & 0x3f);
PHY_vars_eNB_NB_IoT_g[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP*10)+subframeP] = (payload_ptr[0] & 0x3f);
if (UE_id == UE_list->head)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,PHY_vars_eNB_g[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP*10)+subframeP]);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,PHY_vars_eNB_NB_IoT_g[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP*10)+subframeP]);
if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[lcgid] == 0 ) {
UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[lcgid]=frameP;
}
......
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