Commit c8d3f330 authored by chenhsunyang0922's avatar chenhsunyang0922

fix enb_paramdef_NB_IoT.h & the type of NB_UE_INST in MAC/extern_NB_IoT.h

parent 2ebabccb
......@@ -478,6 +478,8 @@ typedef struct NbIoTRrcConfigurationReq_s {
long ue_TimersAndConstants_t311_NB;
long ue_TimersAndConstants_n310_NB;
long ue_TimersAndConstants_n311_NB;
int NB_IoT_configured;
} NbIoTRrcConfigurationReq;
......
......@@ -54,6 +54,7 @@
#include "common/config/config_userapi.h"
#include "RRC_config_tools.h"
#include "enb_paramdef.h"
#include "enb_paramdef_NB_IoT.h"
#include "proto_agent.h"
extern uint16_t sf_ahead;
......@@ -310,7 +311,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
paramdef_t SRB1Params[] = SRB1PARAMS_DESC(srb1_params);
paramdef_t SLParams[] = CCPARAMS_SIDELINK_DESC(SLconfig);
// for NB-IoT
paramdef_t NBIOTParams[] = CCPARAMS_NB_IOT_DESC((&NBconfig));
paramdef_t NBIOTParams[] = CCPARAMS_NB_IOT_DESC(NBconfig);
/* map parameter checking array instances to parameter definition array instances */
for (int I=0; I< ( sizeof(CCsParams)/ sizeof(paramdef_t) ) ; I++) {
......
......@@ -134,43 +134,43 @@ typedef struct ccparams_NB_IoT_s {
#define CCPARAMS_NB_IOT_DESC(NBconfig) { \
{"NB_IoT_configured", NULL, 0, iptr:&NBconfig->NB_IoT_configured, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT, NULL, 0, iptr:&NBconfig->rach_powerRampingStep_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IOT NULL, 0, iptr:&NBconfig->rach_preambleInitialReceivedTargetPower_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX_CE_NB_IOT NULL, 0, iptr:&NBconfig->rach_preambleTransMax_CE_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE_NB_IOT NULL, 0, iptr:&NBconfig->rach_raResponseWindowSize_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IOT NULL, 0, iptr:&NBconfig->rach_macContentionResolutionTimer_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF_NB_IOT NULL, 0, iptr:&NBconfig->bcch_modificationPeriodCoeff_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE_NB_IOT NULL, 0, iptr:&NBconfig->pcch_defaultPagingCycle_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_CP_LENGTH_NB_IOT NULL, 0, iptr:&NBconfig->nprach_CP_Length defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_RSRP_RANGE_NB_IOT NULL, 0, iptr:&NBconfig->nprach_rsrp_range defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPDSCH_NRS_POWER_NB_IOT NULL, 0, iptr:&NBconfig->npdsch_nrs_Power defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IOT NULL, 0, iptr:&NBconfig->npusch_ack_nack_numRepetitions_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_SRS_SUBFRAMECONFIG_NB_IOT NULL, 0, iptr:&NBconfig->npusch_srs_SubframeConfig_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_THREETONE_CYCLICSHIFT_R13_NB_IOT NULL, 0, iptr:&NBconfig->npusch_threeTone_CyclicShift_r13 defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_SIXTONE_CYCLICSHIFT_R13_NB_IOT NULL, 0, iptr:&NBconfig->npusch_sixTone_CyclicShift_r13 defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_GROUP_HOPPING_EN_NB_IOT NULL, 0, strptr:&NBconfig->npusch_groupHoppingEnabled defintval:"DISABLE", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_NPUSCH_GROUPASSIGNMENTNPUSH_R13_NB_IOT NULL, 0, iptr:&NBconfig->npusch_groupAssignmentNPUSCH_r13 defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DL_GAPTHRESHOLD_NB_IOT NULL, 0, iptr:&NBconfig->dl_GapThreshold_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DL_GAPPERIODICITY_NB_IOT NULL, 0, iptr:&NBconfig->dl_GapPeriodicity_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DL_GAPDURATIONCOEFF_NB_IOT NULL, 0, strptr:&NBconfig->dl_GapDurationCoeff_NB defintval:"oneEighth", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT NULL, 0, iptr:&NBconfig->npusch_p0_NominalNPUSCH defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_ALPHA_NB_IOT NULL, 0, strptr:&NBconfig->npusch_alpha defintval:"AL0", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT NULL, 0, iptr:&NBconfig->deltaPreambleMsg3 defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT NULL, 0, iptr:&NBconfig->ue_TimersAndConstants_t300_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T301_NB_IOT NULL, 0, iptr:&NBconfig->ue_TimersAndConstants_t301_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T310_NB_IOT NULL, 0, iptr:&NBconfig->ue_TimersAndConstants_t310_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T311_NB_IOT NULL, 0, iptr:&NBconfig->ue_TimersAndConstants_t311_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N310_NB_IOT NULL, 0, iptr:&NBconfig->ue_TimersAndConstants_n310_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N311_NB_IOT NULL, 0, iptr:&NBconfig->ue_TimersAndConstants_n311_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_PERIODICITY_NB_IOT NULL, 0, iptr:&NBconfig->nprach_Periodicity defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT NULL, 0, iptr:&NBconfig->nprach_StartTime defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT NULL, 0, iptr:&NBconfig->nprach_SubcarrierOffset defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_NUMSUBCARRIERS_NB_IOT NULL, 0, iptr:&NBconfig->nprach_NumSubcarriers defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_SUBCARRIERMSG3_RANGESTART_NB_IOT NULL, 0, strptr:&NBconfig->nprach_SubcarrierMSG3_RangeStart defintval:"one", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MAXNUM_PREAMBLE_ATTEMPT_CE_NB_IOT NULL, 0, iptr:&NBconfig->maxNumPreambleAttemptCE_NB defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IOT NULL, 0, iptr:&NBconfig->numRepetitionsPerPreambleAttempt defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT NULL, 0, iptr:&NBconfig->npdcch_NumRepetitions_RA defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT NULL, 0, iptr:&NBconfig->npdcch_StartSF_CSS_RA defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT NULL, 0, strptr:&NBconfig->npdcch_Offset_RA defintval:"zero", TYPE_STRING, 0}, \
{"NB_IoT_configured", NULL, 0, iptr:&NBconfig.NB_IoT_configured, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT, NULL, 0, iptr:&NBconfig.rach_powerRampingStep_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IOT, NULL, 0, iptr:&NBconfig.rach_preambleInitialReceivedTargetPower_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX_CE_NB_IOT, NULL, 0, iptr:&NBconfig.rach_preambleTransMax_CE_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE_NB_IOT, NULL, 0, iptr:&NBconfig.rach_raResponseWindowSize_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IOT, NULL, 0, iptr:&NBconfig.rach_macContentionResolutionTimer_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF_NB_IOT, NULL, 0, iptr:&NBconfig.bcch_modificationPeriodCoeff_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE_NB_IOT, NULL, 0, iptr:&NBconfig.pcch_defaultPagingCycle_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_CP_LENGTH_NB_IOT, NULL, 0, iptr:&NBconfig.nprach_CP_Length, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_RSRP_RANGE_NB_IOT, NULL, 0, iptr:&NBconfig.nprach_rsrp_range, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPDSCH_NRS_POWER_NB_IOT, NULL, 0, iptr:&NBconfig.npdsch_nrs_Power, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IOT, NULL, 0, iptr:&NBconfig.npusch_ack_nack_numRepetitions_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_SRS_SUBFRAMECONFIG_NB_IOT, NULL, 0, iptr:&NBconfig.npusch_srs_SubframeConfig_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_THREETONE_CYCLICSHIFT_R13_NB_IOT, NULL, 0, iptr:&NBconfig.npusch_threeTone_CyclicShift_r13, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_SIXTONE_CYCLICSHIFT_R13_NB_IOT, NULL, 0, iptr:&NBconfig.npusch_sixTone_CyclicShift_r13, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_GROUP_HOPPING_EN_NB_IOT, NULL, 0, strptr:&NBconfig.npusch_groupHoppingEnabled, defintval:"DISABLE", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_NPUSCH_GROUPASSIGNMENTNPUSH_R13_NB_IOT, NULL, 0, iptr:&NBconfig.npusch_groupAssignmentNPUSCH_r13, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DL_GAPTHRESHOLD_NB_IOT, NULL, 0, iptr:&NBconfig.dl_GapThreshold_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DL_GAPPERIODICITY_NB_IOT, NULL, 0, iptr:&NBconfig.dl_GapPeriodicity_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DL_GAPDURATIONCOEFF_NB_IOT, NULL, 0, strptr:&NBconfig.dl_GapDurationCoeff_NB, defintval:"oneEighth", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT, NULL, 0, iptr:&NBconfig.npusch_p0_NominalNPUSCH, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPUSCH_ALPHA_NB_IOT, NULL, 0, strptr:&NBconfig.npusch_alpha, defintval:"AL0", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT, NULL, 0, iptr:&NBconfig.deltaPreambleMsg3, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT, NULL, 0, iptr:&NBconfig.ue_TimersAndConstants_t300_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T301_NB_IOT, NULL, 0, iptr:&NBconfig.ue_TimersAndConstants_t301_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T310_NB_IOT, NULL, 0, iptr:&NBconfig.ue_TimersAndConstants_t310_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T311_NB_IOT, NULL, 0, iptr:&NBconfig.ue_TimersAndConstants_t311_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N310_NB_IOT, NULL, 0, iptr:&NBconfig.ue_TimersAndConstants_n310_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N311_NB_IOT, NULL, 0, iptr:&NBconfig.ue_TimersAndConstants_n311_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_PERIODICITY_NB_IOT, NULL, 0, iptr:&NBconfig.nprach_Periodicity, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT, NULL, 0, iptr:&NBconfig.nprach_StartTime, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT, NULL, 0, iptr:&NBconfig.nprach_SubcarrierOffset, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_NUMSUBCARRIERS_NB_IOT, NULL, 0, iptr:&NBconfig.nprach_NumSubcarriers, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPRACH_SUBCARRIERMSG3_RANGESTART_NB_IOT, NULL, 0, strptr:&NBconfig.nprach_SubcarrierMSG3_RangeStart, defintval:"one", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MAXNUM_PREAMBLE_ATTEMPT_CE_NB_IOT, NULL, 0, iptr:&NBconfig.maxNumPreambleAttemptCE_NB, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IOT, NULL, 0, iptr:&NBconfig.numRepetitionsPerPreambleAttempt, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT, NULL, 0, iptr:&NBconfig.npdcch_NumRepetitions_RA, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT, NULL, 0, iptr:&NBconfig.npdcch_StartSF_CSS_RA, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT, NULL, 0, strptr:&NBconfig.npdcch_Offset_RA, defintval:"zero", TYPE_STRING, 0}, \
}
......@@ -43,7 +43,7 @@ extern uint8_t Is_rrc_registered;
extern unsigned char NB_INST;
#endif
extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST;
extern uint16_t NB_UE_INST;
extern unsigned char NB_RN_INST;
extern unsigned short NODE_ID[1];
extern void* bigphys_malloc(int);
......
......@@ -35,10 +35,11 @@
#ifdef USER_MODE
//#include "stdio.h"
#endif //USER_MODE
#include "PHY/defs.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "defs.h"
#include "defs_NB_IoT.h"
#include "PHY_INTERFACE/defs.h"
#include "PHY_INTERFACE/defs_NB_IoT.h"
#include "COMMON/mac_rrc_primitives.h"
......
......@@ -74,13 +74,13 @@
#include "PHY/defs.h"
#include "PHY/defs_L1_NB_IoT.h"
//#include "PHY/defs_L1_NB_IoT.h"
#include "SCHED/defs_NB_IoT.h"
#include "SCHED_NBIOT/defs_NB_IoT.h"
#include "SCHED/sched_common.h" // for calling prach_procedures_NB_IoT()
#include "PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h"
#include "PHY/extern_NB_IoT.h"
#include "LAYER2/MAC/defs.h"
#include "PHY_INTERFACE/extern.h"
#include "PHY_INTERFACE/phy_interface_extern.h"
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
......
......@@ -76,12 +76,12 @@
//NB-IoT
#include "PHY/defs_L1_NB_IoT.h"
#include "SCHED/defs_NB_IoT.h"
#include "SCHED_NBIOT/defs_NB_IoT.h"
#include "PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h"
#include "PHY/extern_NB_IoT.h"
#include "LAYER2/MAC/defs.h"
#include "PHY_INTERFACE/extern.h"
#include "PHY_INTERFACE/phy_interface_extern.h"
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
......
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