Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

eNBs =
(
 {
    ////////// Identification parameters:
    eNB_ID    =  0xe00;

    cell_type =  "CELL_MACRO_ENB";

    eNB_name  =  "eNB_Eurecom_LTEBox";

    // Tracking area code, 0x0000 and 0xfffe are reserved values
    tracking_area_code  =  1;

    plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2;} );

    tr_s_preference     = "local_mac"

    ////////// Physical parameters:

    component_carriers = (
    {
      node_function                             = "3GPP_eNodeB";
      node_timing                               = "synch_to_ext_device";
      node_synch_ref                            = 0;
      frame_type                                = "FDD";
      tdd_config                                = 3;
      tdd_config_s                              = 0;
      prefix_type                               = "NORMAL";
      eutra_band                                = 13;
      downlink_frequency                        = 751000000L;
      uplink_frequency_offset                   = 31000000;
      Nid_cell                                  = 0;
      N_RB_DL                                   = 50;
      Nid_cell_mbsfn                            = 0;
      nb_antenna_ports                          = 1;
      nb_antennas_tx                            = 1;
      nb_antennas_rx                            = 1;
      tx_gain                                   = 90;
      rx_gain                                   = 110;
      pbch_repetition                           = "FALSE";
      prach_root                                = 0;
      prach_config_index                        = 0;
      prach_high_speed                          = "DISABLE";
      prach_zero_correlation                    = 1;
      prach_freq_offset                         = 1;
      pucch_delta_shift                         = 1;
      pucch_nRB_CQI                             = 0;
      pucch_nCS_AN                              = 0;
      pucch_n1_AN                               = 0;
      pdsch_referenceSignalPower                = -27;
      pdsch_p_b                                 = 0;
      pusch_n_SB                                = 1;
      pusch_enable64QAM                         = "DISABLE";
      pusch_hoppingMode                         = "interSubFrame";
      pusch_hoppingOffset                       = 0;
      pusch_groupHoppingEnabled                 = "ENABLE";
      pusch_groupAssignment                     = 0;
      pusch_sequenceHoppingEnabled              = "DISABLE";
      pusch_nDMRS1                              = 1;
      phich_duration                            = "NORMAL";
      phich_resource                            = "ONESIXTH";
      srs_enable                                = "DISABLE";
      /*  srs_BandwidthConfig                   =;
      srs_SubframeConfig                        =;
      srs_ackNackST                             =;
      srs_MaxUpPts                              =;*/

      pusch_p0_Nominal                          = -96;
      pusch_alpha                               = "AL1";
      pucch_p0_Nominal                          = -104;
      msg3_delta_Preamble                       = 6;
      pucch_deltaF_Format1                      = "deltaF2";
      pucch_deltaF_Format1b                     = "deltaF3";
      pucch_deltaF_Format2                      = "deltaF0";
      pucch_deltaF_Format2a                     = "deltaF0";
      pucch_deltaF_Format2b                     = "deltaF0";

      rach_numberOfRA_Preambles                 = "n64"; #64
      rach_preamblesGroupAConfig                = "DISABLE";
      /*
      rach_sizeOfRA_PreamblesGroupA             = ;
      rach_messageSizeGroupA                    = ;
      rach_messagePowerOffsetGroupB             = ;
      */
      rach_powerRampingStep                     = 4;
      rach_preambleInitialReceivedTargetPower   = -108;
      rach_preambleTransMax                     = 10;
      rach_raResponseWindowSize                 = 10;
      rach_macContentionResolutionTimer         = 48;
      rach_maxHARQ_Msg3Tx                       = 4;

      pcch_default_PagingCycle                  = "rf128"; #128
      pcch_nB                                   = "oneT";
      bcch_modificationPeriodCoeff              = 2;
      ue_TimersAndConstants_t300                = "ms1000";
      ue_TimersAndConstants_t301                = "ms1000";
      ue_TimersAndConstants_t310                = "ms1000";
      ue_TimersAndConstants_t311                = "ms10000";
      ue_TimersAndConstants_n310                = "n20";
      ue_TimersAndConstants_n311                = "n1";
      ue_TransmissionMode                       = "tm1";

      # eMTC Parameters
      emtc_parameters :
      {
          eMTC_configured                       = 1;
          #hyperSFN_r13                               = 0;
          #eDRX_Allowed_r13                           = 0;
          #q_QualMinRSRQ_CE_r13                       = ;

          #SIB1
          schedulingInfoSIB1_BR_r13                   = 4;

          #system_info_value_tag_SI =
          #(
          #    {
          #        systemInfoValueTagSi_r13 = 0;
          #    }
          #);

          cellSelectionInfoCE_r13                     = "ENABLE";
          q_RxLevMinCE_r13                            = -70;
          bandwidthReducedAccessRelatedInfo_r13       = "ENABLE"
          si_WindowLength_BR_r13                      = "ms20";    #0
          si_RepetitionPattern_r13                    = "everyRF"; #0

          scheduling_info_br =
          (
              {
                  si_Narrowband_r13 = 8;
                  si_TBS_r13        = 5;
              }
         );

          fdd_DownlinkOrTddSubframeBitmapBR_r13     = "subframePattern40-r13";
          fdd_DownlinkOrTddSubframeBitmapBR_val_r13 = 0xFFFFFFFFFF;
          startSymbolBR_r13                           = 2;
          si_HoppingConfigCommon_r13                  = "off"; #1; # Note: 1==OFF !
          si_ValidityTime_r13                         = "true"; #0

          freqHoppingParametersDL_r13                 = "DISABLE"
          mpdcch_pdsch_HoppingNB_r13                  = "nb2"; #0
          interval_DLHoppingConfigCommonModeA_r13     = "interval-FDD-r13"
          interval_DLHoppingConfigCommonModeA_r13_val = 0;
          interval_DLHoppingConfigCommonModeB_r13     = "interval-FDD-r13"
          interval_DLHoppingConfigCommonModeB_r13_val = 0;
          mpdcch_pdsch_HoppingOffset_r13              = 1;


          # SIB23
          frame_type                                = "FDD";
          preambleTransMax_CE_r13                   = 10; #6

          rach_numberOfRA_Preambles                 = 60; #14
          rach_powerRampingStep                     = 4;
          rach_preambleInitialReceivedTargetPower   = -110;
          rach_preambleTransMax                     = 10;
          rach_raResponseWindowSize                 = 10;
          rach_macContentionResolutionTimer         = 64;
          rach_maxHARQ_Msg3Tx                       = 4;

          # max size for this array is 4
          rach_CE_LevelInfoList_r13 =
          (
              {
                  firstPreamble_r13                 = 60;
                  lastPreamble_r13                  = 63;
                  ra_ResponseWindowSize_r13         = 20; #0
                  mac_ContentionResolutionTimer_r13 = 80; #0
                  rar_HoppingConfig_r13             = "off";  #1;
              }
          );

          # BCCH CONFIG
          bcch_modificationPeriodCoeff              = 2;

          #PCCH Config
          pcch_default_PagingCycle                  = "rf128"; #128
          pcch_nB                                   = "oneT";

          #PRACH Config
          prach_root                                = 89;
          prach_config_index                        = 0;
          prach_high_speed                          = "DISABLE";
          prach_zero_correlation                    = 1;
          prach_freq_offset                         = 1;

          #PDSCH Config Common
          pdsch_referenceSignalPower                = -27
          pdsch_p_b                                 = 0;


          # PUSCH Config Common
          pusch_n_SB                                = 1;
          pusch_hoppingMode                         = "interSubFrame";
          pusch_hoppingOffset                       = 0;
          pusch_enable64QAM                         = "DISABLE";
          pusch_groupHoppingEnabled                 = "ENABLE";
          pusch_groupAssignment                     = 0;
          pusch_sequenceHoppingEnabled              = "DISABLE";
          pusch_nDMRS1                              = 1;

          # PUCCH Config Common
          pucch_delta_shift                         = 1;
          pucch_nRB_CQI                             = 0;
          pucch_nCS_AN                              = 0;
          pucch_n1_AN                               = 32;

          pusch_p0_Nominal                          = -96;
          pusch_alpha                               = "AL1";
          pucch_p0_Nominal                          = -104;
          pucch_deltaF_Format1                      = "deltaF0";
          pucch_deltaF_Format1b                     = "deltaF3";
          pucch_deltaF_Format2                      = "deltaF0";
          pucch_deltaF_Format2a                     = "deltaF0";
          pucch_deltaF_Format2b                     = "deltaF0";

          msg3_delta_Preamble                       = 6;


          prach_ConfigCommon_v1310                  = "ENABLE";

          mpdcch_startSF_CSS_RA_r13                 = "fdd-r13";
          mpdcch_startSF_CSS_RA_r13_val             = "v1"; #0
          prach_HoppingOffset_r13                   = 0;


          pdsch_maxNumRepetitionCEmodeA_r13         = "r16"; #0
          pusch_repetitionLevelCEmodeA_r13			= "l1";  #0
          #pdsch_maxNumRepetitionCEmodeB_r13         = "r384"; # NULL - 2

          pusch_maxNumRepetitionCEmodeA_r13         = "r8"; #0
          #pusch_maxNumRepetitionCEmodeB_r13         = "r768"; #4 #NULL
          #pusch_HoppingOffset_v1310                 = 5; #NULL

          # max size for this array is 3
          rsrp_range_list =
          (
              {
                  rsrp_range_br = 0;
              }
          );

          # max size for this array is 4
          prach_parameters_ce_r13 =
          (
              {
                  prach_config_index_br                     = 3;
                  prach_freq_offset_br                      = 2;
                  prach_StartingSubframe_r13                = 2;
                  maxNumPreambleAttemptCE_r13               = 10; #6
                  numRepetitionPerPreambleAttempt_r13       = 1;  #0
                  mpdcch_NumRepetition_RA_r13               = 1;  #0
                  prach_HoppingConfig_r13                   = 0;  #1
                  max_available_narrow_band                 = [3];
             }
          );

          n1PUCCH_AN_InfoList_r13 =
          (
              {
                  pucch_info_value = 33;
              }
          );


          ue_TimersAndConstants_t300                = "ms1000";
          ue_TimersAndConstants_t301                = "ms400";
          ue_TimersAndConstants_t310                = "ms50";
          ue_TimersAndConstants_t311                = "ms30000";
          ue_TimersAndConstants_n310                = "n1";
          ue_TimersAndConstants_n311                = "n10";
          ue_TransmissionMode                       = "tm1";

          pcch_config_v1310 :
          {
              paging_narrowbands_r13           = 1;
              mpdcch_numrepetition_paging_r13  = "r1";         #0
              #nb_v1310                        = "one256thT";  #2
          }


          pucch_NumRepetitionCE_Msg4_Level0_r13      = "n1";  #0
          #pucch_NumRepetitionCE_Msg4_Level1_r13     = "n2";  #1
          #pucch_NumRepetitionCE_Msg4_Level2_r13     = "n16"; #2
          #pucch_NumRepetitionCE_Msg4_Level3_r13     = "n32"; #3

          sib2_freq_hoppingParameters_r13 :
          {
             #sib2_mpdcch_pdsch_hoppingNB_r13                   = "nb2"; #0
             #sib2_interval_DLHoppingConfigCommonModeA_r13      = "FDD"; # choice -> (0, FDD) (1, TDD)
             #sib2_interval_DLHoppingConfigCommonModeA_r13_val  = "int1";
             #sib2_interval_DLHoppingConfigCommonModeB_r13      = "FDD"; # choice -> (0, FDD) (1, TDD)
             #sib2_interval_DLHoppingConfigCommonModeB_r13_val  = "int2";

             sib2_interval_ULHoppingConfigCommonModeA_r13      = "FDD";  # choice -> (0, FDD) (1, TDD)
             sib2_interval_ULHoppingConfigCommonModeA_r13_val  = "int4"; #2
#            sib2_interval_ULHoppingConfigCommonModeB_r13      = "FDD";  # choice -> (0, FDD) (1, TDD)
#            sib2_interval_ULHoppingConfigCommonModeB_r13_val  = "int2"; #0

#             sib2_mpdcch_pdsch_hoppingOffset_r13               = 1;
          }

          rach_preamblesGroupAConfig                = "DISABLE";

          phich_duration                            = "NORMAL";
          phich_resource                            = "ONESIXTH";
          srs_enable                                = "DISABLE";

      }



}




    );


    srb1_parameters :
    {
        # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
        timer_poll_retransmit    = 80;

        # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
        timer_reordering         = 35;

        # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
        timer_status_prohibit    = 0;

        # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
        poll_pdu                 =  4;

        # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
        poll_byte                =  99999;

        # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
        max_retx_threshold       =  4;
    }

    # ------- SCTP definitions
    SCTP :
    {
        # Number of streams to use in input/output
        SCTP_INSTREAMS  = 2;
        SCTP_OUTSTREAMS = 2;
    };


    ////////// MME parameters:
    mme_ip_address      = ( { ipv4       = "127.0.0.3";
                              ipv6       = "192:168:30::17";
                              active     = "yes";
                              preference = "ipv4";
                            }
                          );

    enable_measurement_reports = "no";

    ///X2
    enable_x2 = "no";
    t_reloc_prep      = 1000;      /* unit: millisecond */
    tx2_reloc_overall = 2000;      /* unit: millisecond */
    t_dc_prep         = 1000;      /* unit: millisecond */
    t_dc_overall      = 2000;      /* unit: millisecond */

    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.4/24";
        ENB_PORT_FOR_S1U                         = 2152; # Spec 2152

        ENB_IPV4_ADDRESS_FOR_X2C                 = "127.0.0.2/24";
        ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
    };
  }
);

MACRLCs = (
        {
        num_cc	 = 1;
        tr_s_preference = "local_L1";
        tr_n_preference = "local_RRC";
	phy_test_mode = 0;
        puSch10xSnr     =  200;
        puCch10xSnr     =  200;
        }
);

L1s = (
      {
      num_cc = 1;
      tr_n_preference = "local_mac";
      }
);

RUs = (
    {
        local_rf       = "yes"
        nb_tx          = 1
        nb_rx          = 1
        att_tx         = 0
        att_rx         = 0;
        bands          = [13];
        max_pdschReferenceSignalPower = -27;
        max_rxgain                    = 125;
        eNB_instances  = [0];
    }
);

log_config :
     {
       global_log_level                      ="info";
       hw_log_level                          ="info";
       phy_log_level                         ="info";
       mac_log_level                         ="info";
       rlc_log_level                         ="info";
       pdcp_log_level                        ="info";
       rrc_log_level                         ="info";
    };
