Commit 1ae40bac authored by knopp's avatar knopp
Browse files

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5698 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 20df6d26
...@@ -79,29 +79,33 @@ void phy_config_mib(LTE_DL_FRAME_PARMS *lte_frame_parms, ...@@ -79,29 +79,33 @@ void phy_config_mib(LTE_DL_FRAME_PARMS *lte_frame_parms,
/** \brief Configure LTE_DL_FRAME_PARMS with components derived after reception of SIB1. From a PHY perspective this allows configuration of TDD framing parameters and SI reception. /** \brief Configure LTE_DL_FRAME_PARMS with components derived after reception of SIB1. From a PHY perspective this allows configuration of TDD framing parameters and SI reception.
@param Mod_id Instance ID of eNB @param Mod_id Instance ID of eNB
@param CC_id Component Carrier index
@param tdd_Config TDD UL/DL and S-subframe configurations @param tdd_Config TDD UL/DL and S-subframe configurations
@param SIwindowsize Size of a SI window in frames where repetitions of a unique System Information message block is repeated @param SIwindowsize Size of a SI window in frames where repetitions of a unique System Information message block is repeated
@param SIperiod Periodicity of System Information Messages (in multiples of a frame)*/ @param SIperiod Periodicity of System Information Messages (in multiples of a frame)*/
void phy_config_sib1_eNB(module_id_t Mod_id, void phy_config_sib1_eNB(module_id_t Mod_id,
TDD_Config_t *tdd_Config, int CC_id,
TDD_Config_t *tdd_Config,
uint8_t SIwindowsize, uint8_t SIwindowsize,
uint16_t SIperiod); uint16_t SIperiod);
/** \brief Configure LTE_DL_FRAME_PARMS with components derived after reception of SIB1. From a PHY perspective this allows configuration of TDD framing parameters and SI reception. /** \brief Configure LTE_DL_FRAME_PARMS with components derived after reception of SIB1. From a PHY perspective this allows configuration of TDD framing parameters and SI reception.
@param Mod_id Instance ID of UE @param Mod_id Instance ID of UE
@param CC_id Component Carrier index
@param CH_index Index of eNB for this configuration @param CH_index Index of eNB for this configuration
@param tdd_Config TDD UL/DL and S-subframe configurations @param tdd_Config TDD UL/DL and S-subframe configurations
@param SIwindowsize Size of a SI window in frames where repetitions of a unique System Information message block is repeated @param SIwindowsize Size of a SI window in frames where repetitions of a unique System Information message block is repeated
@param SIperiod Periodicity of System Information Messages (in multiples of a frame)*/ @param SIperiod Periodicity of System Information Messages (in multiples of a frame)*/
void phy_config_sib1_ue(module_id_t Mod_id, void phy_config_sib1_ue(module_id_t Mod_id,
uint8_t CH_index, int CC_id,
uint8_t CH_index,
TDD_Config_t *tdd_Config, TDD_Config_t *tdd_Config,
uint8_t SIwindowsize, uint8_t SIwindowsize,
uint16_t SIperiod); uint16_t SIperiod);
/*! /*!
\fn void phy_config_sib2_ue(module_id_t Mod_id,uint8_t CH_index, \fn void phy_config_sib2_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t CH_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon, RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CArrierFreq, ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth, long *ul_Bandwidth,
...@@ -109,15 +113,18 @@ void phy_config_sib1_ue(module_id_t Mod_id, ...@@ -109,15 +113,18 @@ void phy_config_sib1_ue(module_id_t Mod_id,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList) struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList)
\brief Configure LTE_DL_FRAME_PARMS with components derived after reception of SIB2 (at UE). \brief Configure LTE_DL_FRAME_PARMS with components derived after reception of SIB2 (at UE).
@param Mod_id Instance id @param Mod_id Instance id
@param CC_id
@param CH_index Index of CH to which UE is connected @param CH_index Index of CH to which UE is connected
@param CC_id Component Carrier Index
@param radioResourceConfigCommon Radio Configuration from SIB2 @param radioResourceConfigCommon Radio Configuration from SIB2
@param ul_CarrierFreq UL carrier ARFCN, null if optional (i.e. implicit from DL) @param ul_CarrierFreq UL carrier ARFCN, null if optional (i.e. implicit from DL)
@param ul_Bandwidth UL bandwidth, null if optional (i.e. same as DL) @param ul_Bandwidth UL bandwidth, null if optional (i.e. same as DL)
@param additionalSpectrumEmission UL parameter (see 36.101) @param additionalSpectrumEmission UL parameter (see 36.101)
@param mbsfn_SubframeConfigList MBSFN subframe configuration @param mbsfn_SubframeConfigList MBSFN subframe configuration
*/ */
void phy_config_sib2_ue(module_id_t Mod_id, void phy_config_sib2_ue(module_id_t Mod_id,
uint8_t CH_index, int CC_id,
uint8_t CH_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon, RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CArrierFreq, ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth, long *ul_Bandwidth,
...@@ -129,12 +136,14 @@ void phy_config_sib2_ue(module_id_t Mod_id, ...@@ -129,12 +136,14 @@ void phy_config_sib2_ue(module_id_t Mod_id,
\fn phy_config_afterHO_ue \fn phy_config_afterHO_ue
\brief Configure Common PHY parameters from mobilityControlInfo \brief Configure Common PHY parameters from mobilityControlInfo
@param Mod_id @param Mod_id
@param CC_id
@param eNB_index @param eNB_index
@param mobilityControlInfo pointer to the mobility control information for handover @param mobilityControlInfo pointer to the mobility control information for handover
@param ho_failed flag to indicated whether the ho was successful or not @param ho_failed flag to indicated whether the ho was successful or not
*/ */
void phy_config_afterHO_ue(module_id_t Mod_id, void phy_config_afterHO_ue(module_id_t Mod_id,
uint8_t eNB_index, int CC_id,
uint8_t eNB_index,
MobilityControlInfo_t *mobilityControlInfo, MobilityControlInfo_t *mobilityControlInfo,
uint8_t ho_failed); uint8_t ho_failed);
/*! /*!
...@@ -146,14 +155,16 @@ void phy_config_afterHO_ue(module_id_t Mod_id, ...@@ -146,14 +155,16 @@ void phy_config_afterHO_ue(module_id_t Mod_id,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList) struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList)
\brief Configure LTE_DL_FRAME_PARMS with components of SIB2 (at eNB). \brief Configure LTE_DL_FRAME_PARMS with components of SIB2 (at eNB).
@param Mod_id Instance id @param Mod_id Instance id
@param Mod_id Component Carrier index
@param radioResourceConfigCommon Radio Configuration from SIB2 @param radioResourceConfigCommon Radio Configuration from SIB2
@param ul_CarrierFreq UL carrier ARFCN, null if optional (i.e. implicit from DL) @param ul_CarrierFreq UL carrier ARFCN, null if optional (i.e. implicit from DL)
@param ul_Bandwidth UL bandwidth, null if optional (i.e. same as DL) @param ul_Bandwidth UL bandwidth, null if optional (i.e. same as DL)
@param additionalSpectrumEmission UL parameter (see 36.101) @param additionalSpectrumEmission UL parameter (see 36.101)
@param mbsfn_SubframeConfigList MBSFN subframe configuration @param mbsfn_SubframeConfigList MBSFN subframe configuration
*/ */
void phy_config_sib2_eNB(module_id_t Mod_id, void phy_config_sib2_eNB(module_id_t Mod_id,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon, int CC_id,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CArrierFreq, ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth, long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission, AdditionalSpectrumEmission_t *additionalSpectrumEmission,
...@@ -161,59 +172,67 @@ void phy_config_sib2_eNB(module_id_t Mod_id, ...@@ -161,59 +172,67 @@ void phy_config_sib2_eNB(module_id_t Mod_id,
/*! /*!
\fn void phy_config_dedicated_ue(module_id_t Mod_id,uint8_t CH_index, \fn void phy_config_dedicated_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t CH_index,
struct PhysicalConfigDedicated *physicalConfigDedicated) struct PhysicalConfigDedicated *physicalConfigDedicated)
\brief Configure UE dedicated parameters. Invoked upon reception of RRCConnectionSetup or RRCConnectionReconfiguration from eNB. \brief Configure UE dedicated parameters. Invoked upon reception of RRCConnectionSetup or RRCConnectionReconfiguration from eNB.
@param Mod_id Instance ID for eNB @param Mod_id Instance ID for eNB
@param CC_id Component Carrier index
@param CH_index Index of eNB for this configuration @param CH_index Index of eNB for this configuration
@param physicalConfigDedicated PHY Configuration information @param physicalConfigDedicated PHY Configuration information
*/ */
void phy_config_dedicated_ue(module_id_t Mod_id,
int CC_id,
uint8_t CH_index,
struct PhysicalConfigDedicated *physicalConfigDedicated);
/** /**
\brief Configure UE MBSFN common parameters. Invoked upon reception of SIB13 from eNB. \brief Configure UE MBSFN common parameters. Invoked upon reception of SIB13 from eNB.
@param Mod_id Instance ID for UE @param Mod_id Instance ID for UE
@param CC_id Component Carrier Index
@param CH_index eNB id (for multiple eNB reception) @param CH_index eNB id (for multiple eNB reception)
@param mbsfn_Area_idx Index of MBSFN-Area for which this command operates @param mbsfn_Area_idx Index of MBSFN-Area for which this command operates
@param mbsfn_AreaId_r9 MBSFN-Area Id @param mbsfn_AreaId_r9 MBSFN-Area Id
*/ */
void phy_config_sib13_ue(module_id_t Mod_id, void phy_config_sib13_ue(module_id_t Mod_id,
uint8_t CH_index,int mbsfn_Area_idx, int CC_id,uint8_t CH_index,int mbsfn_Area_idx,
long mbsfn_AreaId_r9); long mbsfn_AreaId_r9);
/** /**
\brief Configure eNB MBSFN common parameters. Invoked upon transmission of SIB13 from eNB. \brief Configure eNB MBSFN common parameters. Invoked upon transmission of SIB13 from eNB.
@param Mod_id Instance ID for eNB @param Mod_id Instance ID for eNB
@param CC_id Component Carrier index
@param mbsfn_Area_idx Index of MBSFN-Area for which this command operates @param mbsfn_Area_idx Index of MBSFN-Area for which this command operates
@param mbsfn_AreaId_r9 MBSFN-Area Id @param mbsfn_AreaId_r9 MBSFN-Area Id
*/ */
void phy_config_sib13_eNB(module_id_t Mod_id, void phy_config_sib13_eNB(module_id_t Mod_id,
int CC_id,
int mbsfn_Area_idx, int mbsfn_Area_idx,
long mbsfn_AreaId_r9); long mbsfn_AreaId_r9);
/** /**
\brief Configure cba rnti for . \brief Configure cba rnti for .
@param Mod_id Instance ID for eNB @param Mod_id Instance ID for eNB
@param CC_id Component Carrier Index
@param eNB_flag flag indicating whether the nodeis eNB (1) or UE (0) @param eNB_flag flag indicating whether the nodeis eNB (1) or UE (0)
@param index index of the node @param index index of the node
@param cba_rnti rnti for the cba transmission @param cba_rnti rnti for the cba transmission
@param num_active_cba_groups num active cba group @param num_active_cba_groups num active cba group
*/ */
void phy_config_cba_rnti (module_id_t Mod_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups); void phy_config_cba_rnti (module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups);
void phy_config_dedicated_ue(module_id_t Mod_id,
uint8_t CH_index,
struct PhysicalConfigDedicated *physicalConfigDedicated);
/** \brief Configure RRC inter-cell measurements procedures /** \brief Configure RRC inter-cell measurements procedures
@param Mod_id Index of UE @param Mod_id Index of UE
@param CC_id
@param eNB_index Index of corresponding eNB @param eNB_index Index of corresponding eNB
@param n_adj_cells Number of adjacent cells on which to perform the measuremnts @param n_adj_cells Number of adjacent cells on which to perform the measuremnts
@param adj_cell_id Array of cell ids of adjacent cells @param adj_cell_id Array of cell ids of adjacent cells
*/ */
void phy_config_meas_ue(module_id_t Mod_id, void phy_config_meas_ue(module_id_t Mod_id,
uint8_t eNB_index, int CC_id,
uint8_t eNB_index,
uint8_t n_adj_cells, uint8_t n_adj_cells,
uint32_t *adj_cell_id); uint32_t *adj_cell_id);
...@@ -222,11 +241,13 @@ void phy_config_meas_ue(module_id_t Mod_id, ...@@ -222,11 +241,13 @@ void phy_config_meas_ue(module_id_t Mod_id,
struct PhysicalConfigDedicated *physicalConfigDedicated) struct PhysicalConfigDedicated *physicalConfigDedicated)
\brief Prepare for configuration of PHY with dedicated parameters. Invoked just prior to transmission of RRCConnectionSetup or RRCConnectionReconfiguration at eNB. \brief Prepare for configuration of PHY with dedicated parameters. Invoked just prior to transmission of RRCConnectionSetup or RRCConnectionReconfiguration at eNB.
@param Mod_id Instance ID for eNB @param Mod_id Instance ID for eNB
@param CC_id Component Carrier index
@param rnti rnti for UE context @param rnti rnti for UE context
@param physicalConfigDedicated PHY Configuration information @param physicalConfigDedicated PHY Configuration information
*/ */
void phy_config_dedicated_eNB(module_id_t Mod_id, void phy_config_dedicated_eNB(module_id_t Mod_id,
rnti_t rnti, int CC_id,
rnti_t rnti,
struct PhysicalConfigDedicated *physicalConfigDedicated); struct PhysicalConfigDedicated *physicalConfigDedicated);
/*! /*!
......
...@@ -44,11 +44,12 @@ void phy_config_mib(LTE_DL_FRAME_PARMS *lte_frame_parms, ...@@ -44,11 +44,12 @@ void phy_config_mib(LTE_DL_FRAME_PARMS *lte_frame_parms,
} }
void phy_config_sib1_eNB(uint8_t Mod_id, void phy_config_sib1_eNB(uint8_t Mod_id,
int CC_id,
TDD_Config_t *tdd_Config, TDD_Config_t *tdd_Config,
uint8_t SIwindowsize, uint8_t SIwindowsize,
uint16_t SIPeriod) { uint16_t SIPeriod) {
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_eNB_g[Mod_id]->lte_frame_parms; LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms;
if (tdd_Config) { if (tdd_Config) {
lte_frame_parms->tdd_config = tdd_Config->subframeAssignment; lte_frame_parms->tdd_config = tdd_Config->subframeAssignment;
...@@ -58,12 +59,13 @@ void phy_config_sib1_eNB(uint8_t Mod_id, ...@@ -58,12 +59,13 @@ void phy_config_sib1_eNB(uint8_t Mod_id,
lte_frame_parms->SIPeriod = SIPeriod; lte_frame_parms->SIPeriod = SIPeriod;
} }
void phy_config_sib1_ue(uint8_t Mod_id,uint8_t CH_index, void phy_config_sib1_ue(uint8_t Mod_id,int CC_id,
TDD_Config_t *tdd_Config, uint8_t CH_index,
uint8_t SIwindowsize, TDD_Config_t *tdd_Config,
uint16_t SIperiod) { uint8_t SIwindowsize,
uint16_t SIperiod) {
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id]->lte_frame_parms; LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms;
if (tdd_Config) { if (tdd_Config) {
lte_frame_parms->tdd_config = tdd_Config->subframeAssignment; lte_frame_parms->tdd_config = tdd_Config->subframeAssignment;
lte_frame_parms->tdd_config_S = tdd_Config->specialSubframePatterns; lte_frame_parms->tdd_config_S = tdd_Config->specialSubframePatterns;
...@@ -73,16 +75,17 @@ void phy_config_sib1_ue(uint8_t Mod_id,uint8_t CH_index, ...@@ -73,16 +75,17 @@ void phy_config_sib1_ue(uint8_t Mod_id,uint8_t CH_index,
} }
void phy_config_sib2_eNB(uint8_t Mod_id, void phy_config_sib2_eNB(uint8_t Mod_id,
int CC_id,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon, RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CArrierFreq, ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth, long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission, AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList) { struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList) {
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_eNB_g[Mod_id]->lte_frame_parms; LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms;
int i; int i;
LOG_D(PHY,"[eNB%d] Frame %d: Applying radioResourceConfigCommon\n",Mod_id,PHY_vars_eNB_g[Mod_id]->proc[8].frame_tx); LOG_D(PHY,"[eNB%d] Frame %d: Applying radioResourceConfigCommon\n",Mod_id,PHY_vars_eNB_g[Mod_id][CC_id]->proc[8].frame_tx);
lte_frame_parms->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex; lte_frame_parms->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
lte_frame_parms->prach_config_common.prach_Config_enabled=1; lte_frame_parms->prach_config_common.prach_Config_enabled=1;
...@@ -92,7 +95,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id, ...@@ -92,7 +95,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset; lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset;
compute_prach_seq(&lte_frame_parms->prach_config_common,lte_frame_parms->frame_type, compute_prach_seq(&lte_frame_parms->prach_config_common,lte_frame_parms->frame_type,
PHY_vars_eNB_g[Mod_id]->X_u); PHY_vars_eNB_g[Mod_id][CC_id]->X_u);
lte_frame_parms->pucch_config_common.deltaPUCCH_Shift = 1+radioResourceConfigCommon->pucch_ConfigCommon.deltaPUCCH_Shift; lte_frame_parms->pucch_config_common.deltaPUCCH_Shift = 1+radioResourceConfigCommon->pucch_ConfigCommon.deltaPUCCH_Shift;
lte_frame_parms->pucch_config_common.nRB_CQI = radioResourceConfigCommon->pucch_ConfigCommon.nRB_CQI; lte_frame_parms->pucch_config_common.nRB_CQI = radioResourceConfigCommon->pucch_ConfigCommon.nRB_CQI;
...@@ -163,7 +166,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id, ...@@ -163,7 +166,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
// PUCCH // PUCCH
init_ncs_cell(lte_frame_parms,PHY_vars_eNB_g[Mod_id]->ncs_cell); init_ncs_cell(lte_frame_parms,PHY_vars_eNB_g[Mod_id][CC_id]->ncs_cell);
init_ul_hopping(lte_frame_parms); init_ul_hopping(lte_frame_parms);
...@@ -198,19 +201,20 @@ void phy_config_sib2_eNB(uint8_t Mod_id, ...@@ -198,19 +201,20 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
} }
void phy_config_sib2_ue(uint8_t Mod_id,uint8_t CH_index, void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
uint8_t CH_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon, RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CarrierFreq, ARFCN_ValueEUTRA_t *ul_CarrierFreq,
long *ul_Bandwidth, long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission, AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList) { struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList) {
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id]->lte_frame_parms; LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms;
int i; int i;
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2, VCD_FUNCTION_IN); vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2, VCD_FUNCTION_IN);
LOG_I(PHY,"[UE%d] Frame %d: Applying radioResourceConfigCommon from eNB%d\n",Mod_id,PHY_vars_UE_g[Mod_id]->frame,CH_index); LOG_I(PHY,"[UE%d] Frame %d: Applying radioResourceConfigCommon from eNB%d\n",Mod_id,PHY_vars_UE_g[Mod_id][CC_id]->frame,CH_index);
lte_frame_parms->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex; lte_frame_parms->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
...@@ -220,7 +224,8 @@ void phy_config_sib2_ue(uint8_t Mod_id,uint8_t CH_index, ...@@ -220,7 +224,8 @@ void phy_config_sib2_ue(uint8_t Mod_id,uint8_t CH_index,
lte_frame_parms->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig; lte_frame_parms->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig;
lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset; lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset;
compute_prach_seq(&lte_frame_parms->prach_config_common,lte_frame_parms->frame_type,PHY_vars_UE_g[Mod_id]->X_u); compute_prach_seq(&lte_frame_parms->prach_config_common,lte_frame_parms->frame_type,PHY_vars_UE_g[Mod_id][CC_id]->X_u);
lte_frame_parms->pucch_config_common.deltaPUCCH_Shift = 1+radioResourceConfigCommon->pucch_ConfigCommon.deltaPUCCH_Shift; lte_frame_parms->pucch_config_common.deltaPUCCH_Shift = 1+radioResourceConfigCommon->pucch_ConfigCommon.deltaPUCCH_Shift;
...@@ -274,7 +279,7 @@ lte_frame_parms->ul_power_control_config_common.deltaF_PUCCH_Format1 = radioRes ...@@ -274,7 +279,7 @@ lte_frame_parms->ul_power_control_config_common.deltaF_PUCCH_Format1 = radioRes
// Now configure some of the Physical Channels // Now configure some of the Physical Channels
// PUCCH // PUCCH
init_ncs_cell(lte_frame_parms,PHY_vars_UE_g[Mod_id]->ncs_cell); init_ncs_cell(lte_frame_parms,PHY_vars_UE_g[Mod_id][CC_id]->ncs_cell);
init_ul_hopping(lte_frame_parms); init_ul_hopping(lte_frame_parms);
...@@ -309,38 +314,38 @@ lte_frame_parms->ul_power_control_config_common.deltaF_PUCCH_Format1 = radioRes ...@@ -309,38 +314,38 @@ lte_frame_parms->ul_power_control_config_common.deltaF_PUCCH_Format1 = radioRes
} }
void phy_config_sib13_ue(uint8_t Mod_id,uint8_t CH_index,int mbsfn_Area_idx, void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t CH_index,int mbsfn_Area_idx,
long mbsfn_AreaId_r9) { long mbsfn_AreaId_r9) {
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id]->lte_frame_parms; LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms;
LOG_I(PHY,"[UE%d] Frame %d: Applying MBSFN_Area_id %d for index %d\n",Mod_id,PHY_vars_UE_g[Mod_id]->frame,mbsfn_AreaId_r9,mbsfn_Area_idx); LOG_I(PHY,"[UE%d] Frame %d: Applying MBSFN_Area_id %d for index %d\n",Mod_id,PHY_vars_UE_g[Mod_id][CC_id]->frame,mbsfn_AreaId_r9,mbsfn_Area_idx);
if (mbsfn_Area_idx == 0) { if (mbsfn_Area_idx == 0) {
lte_frame_parms->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9; lte_frame_parms->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9;
LOG_N(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n"); LOG_N(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n");
} }
lte_gold_mbsfn(lte_frame_parms,PHY_vars_UE_g[Mod_id]->lte_gold_mbsfn_table,lte_frame_parms->Nid_cell_mbsfn); lte_gold_mbsfn(lte_frame_parms,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_table,lte_frame_parms->Nid_cell_mbsfn);
} }
void phy_config_sib13_eNB(uint8_t Mod_id,int mbsfn_Area_idx, void phy_config_sib13_eNB(uint8_t Mod_id,int CC_id,int mbsfn_Area_idx,
long mbsfn_AreaId_r9) { long mbsfn_AreaId_r9) {
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_eNB_g[Mod_id]->lte_frame_parms; LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms;
LOG_I(PHY,"[eNB%d] Frame %d: Applying MBSFN_Area_id %d for index %d\n",Mod_id,PHY_vars_eNB_g[Mod_id]->proc[8].frame_tx,mbsfn_AreaId_r9,mbsfn_Area_idx); LOG_I(PHY,"[eNB%d] Frame %d: Applying MBSFN_Area_id %d for index %d\n",Mod_id,PHY_vars_eNB_g[Mod_id][CC_id]->proc[8].frame_tx,mbsfn_AreaId_r9,mbsfn_Area_idx);
if (mbsfn_Area_idx == 0) { if (mbsfn_Area_idx == 0) {
lte_frame_parms->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9; lte_frame_parms->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9;
LOG_N(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n"); LOG_N(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n");
} }
lte_gold_mbsfn(lte_frame_parms,PHY_vars_eNB_g[Mod_id]->lte_gold_mbsfn_table,lte_frame_parms->Nid_cell_mbsfn); lte_gold_mbsfn(lte_frame_parms,PHY_vars_eNB_g[Mod_id][CC_id]->lte_gold_mbsfn_table,lte_frame_parms->Nid_cell_mbsfn);
} }
...@@ -439,24 +444,24 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *phy_vars_eNB) { ...@@ -439,24 +444,24 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *phy_vars_eNB) {
/* /*
* Configures UE MAC and PHY with radioResourceCommon received in mobilityControlInfo IE during Handover * Configures UE MAC and PHY with radioResourceCommon received in mobilityControlInfo IE during Handover
*/ */
void phy_config_afterHO_ue(uint8_t Mod_id,uint8_t eNB_id, MobilityControlInfo_t *mobilityControlInfo, uint8_t ho_failed) { void phy_config_afterHO_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id, MobilityControlInfo_t *mobilityControlInfo, uint8_t ho_failed) {
if(mobilityControlInfo!=NULL) { if(mobilityControlInfo!=NULL) {
RadioResourceConfigCommon_t *radioResourceConfigCommon = &mobilityControlInfo->radioResourceConfigCommon; RadioResourceConfigCommon_t *radioResourceConfigCommon = &mobilityControlInfo->radioResourceConfigCommon;
LOG_I(PHY,"radioResourceConfigCommon %p\n", radioResourceConfigCommon); LOG_I(PHY,"radioResourceConfigCommon %p\n", radioResourceConfigCommon);
memcpy((void *)&PHY_vars_UE_g[Mod_id]->lte_frame_parms_before_ho, memcpy((void *)&PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms_before_ho,
(void *)&PHY_vars_UE_g[Mod_id]->lte_frame_parms, (void *)&PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms,
sizeof(LTE_DL_FRAME_PARMS)); sizeof(LTE_DL_FRAME_PARMS));
PHY_vars_UE_g[Mod_id]->ho_triggered = 1; PHY_vars_UE_g[Mod_id][CC_id]->ho_triggered = 1;
//PHY_vars_UE_g[UE_id]->UE_mode[0] = PRACH; //PHY_vars_UE_g[UE_id]->UE_mode[0] = PRACH;
LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id]->lte_frame_parms; LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms;
// int N_ZC; // int N_ZC;
// uint8_t prach_fmt; // uint8_t prach_fmt;
// int u; // int u;
LOG_I(PHY,"[UE%d] Frame %d: Handover triggered: Applying radioResourceConfigCommon from eNB %d\n", LOG_I(PHY,"[UE%d] Frame %d: Handover triggered: Applying radioResourceConfigCommon from eNB %d\n",
Mod_id,PHY_vars_UE_g[Mod_id]->frame,eNB_id); Mod_id,PHY_vars_UE_g[Mod_id][CC_id]->frame,eNB_id);
lte_frame_parms->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex; lte_frame_parms->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
lte_frame_parms->prach_config_common.prach_Config_enabled=1; lte_frame_parms->prach_config_common.prach_Config_enabled=1;
...@@ -471,9 +476,9 @@ void phy_config_afterHO_ue(uint8_t Mod_id,uint8_t eNB_id, MobilityControlInfo_t ...@@ -471,9 +476,9 @@ void phy_config_afterHO_ue(uint8_t Mod_id,uint8_t eNB_id, MobilityControlInfo_t
// prach_root_sequence_map4[lte_frame_parms->prach_config_common.rootSequenceIndex]; // prach_root_sequence_map4[lte_frame_parms->prach_config_common.rootSequenceIndex];
//compute_prach_seq(u,N_ZC, PHY_vars_UE_g[Mod_id]->X_u); //compute_prach_seq(u,N_ZC, PHY_vars_UE_g[Mod_id]->X_u);
compute_prach_seq(&PHY_vars_UE_g[Mod_id]->lte_frame_parms.prach_config_common, compute_prach_seq(&PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms.prach_config_common,
lte_frame_parms->frame_type, lte_frame_parms->frame_type,
PHY_vars_UE_g[Mod_id]->X_u); PHY_vars_UE_g[Mod_id][CC_id]->X_u);
lte_frame_parms->pucch_config_common.deltaPUCCH_Shift = 1+radioResourceConfigCommon->pucch_ConfigCommon->deltaPUCCH_Shift; lte_frame_parms->pucch_config_common.deltaPUCCH_Shift = 1+radioResourceConfigCommon->pucch_ConfigCommon->deltaPUCCH_Shift;
...@@ -533,41 +538,43 @@ void phy_config_afterHO_ue(uint8_t Mod_id,uint8_t eNB_id, MobilityControlInfo_t ...@@ -533,41 +538,43 @@ void phy_config_afterHO_ue(uint8_t Mod_id,uint8_t eNB_id, MobilityControlInfo_t
lte_frame_parms->nushift = lte_frame_parms->Nid_cell%6; lte_frame_parms->nushift = lte_frame_parms->Nid_cell%6;
// PUCCH // PUCCH
init_ncs_cell(lte_frame_parms,PHY_vars_UE_g[Mod_id]->ncs_cell); init_ncs_cell(lte_frame_parms,PHY_vars_UE_g[Mod_id][CC_id]->ncs_cell);
init_ul_hopping(lte_frame_parms); init_ul_hopping(lte_frame_parms);
// RNTI // RNTI
PHY_vars_UE_g[Mod_id]->lte_ue_pdcch_vars[eNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8); PHY_vars_UE_g[Mod_id][CC_id]->lte_ue_pdcch_vars[eNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8);
} }
if(ho_failed) { if(ho_failed) {
LOG_D(PHY,"[UE%d] Handover failed, triggering RACH procedure\n",Mod_id); LOG_D(PHY,"[UE%d] Handover failed, triggering RACH procedure\n",Mod_id);
memcpy((void *)&PHY_vars_UE_g[Mod_id]->lte_frame_parms,(void *)&PHY_vars_UE_g[Mod_id]->lte_frame_parms_before_ho, sizeof(LTE_DL_FRAME_PARMS)); memcpy((void *)&PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms,(void *)&PHY_vars_UE_g[Mod_id][CC_id]->lte_frame_parms_before_ho, sizeof(LTE_DL_FRAME_PARMS));
PHY_vars_UE_g[Mod_id]->UE_mode[eNB_id] = PRACH; PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_id] = PRACH;
} }
} }
void phy_config_meas_ue(uint8_t Mod_id,uint8_t eNB_index,uint8_t n_adj_cells,unsigned int *adj_cell_id) { void phy_config_meas_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_index,uint8_t n_adj_cells,unsigned int *adj_cell_id) {
PHY_MEASUREMENTS *phy_meas = &PHY_vars_UE_g[Mod_id]->PHY_measurements; PHY_MEASUREMENTS *phy_meas = &PHY_vars_UE_g[Mod_id][CC_id]->PHY_measurements;
int i; int i;