Commit 1ae40bac authored by Raymond Knopp's avatar Raymond Knopp

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);
/*! /*!
......
This diff is collapsed.
...@@ -155,14 +155,14 @@ void lte_ue_measurements_emul(PHY_VARS_UE *phy_vars_ue,uint8_t last_slot,uint8_t ...@@ -155,14 +155,14 @@ void lte_ue_measurements_emul(PHY_VARS_UE *phy_vars_ue,uint8_t last_slot,uint8_t
@param eNB_index Index of eNB on which to act @param eNB_index Index of eNB on which to act
@returns Path loss in dB @returns Path loss in dB
*/ */
int16_t get_PL(module_id_t Mod_id,uint8_t eNB_index); int16_t get_PL(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
uint8_t get_RSRP(module_id_t Mod_id,uint8_t eNB_index); uint8_t get_RSRP(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
uint8_t get_RSRQ(module_id_t Mod_id,uint8_t eNB_index); uint8_t get_RSRQ(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
uint8_t get_n_adj_cells(module_id_t Mod_id); uint8_t get_n_adj_cells(module_id_t Mod_id,uint8_t CC_id);
int8_t get_rx_total_gain_dB(module_id_t Mod_id); int8_t get_rx_total_gain_dB(module_id_t Mod_id,uint8_t CC_id);
int8_t get_RSSI(module_id_t Mod_id); int8_t get_RSSI(module_id_t Mod_id,uint8_t CC_id);
int8_t set_RSRP_filtered(module_id_t Mod_id,uint8_t eNB_index,float rsrp); int8_t set_RSRP_filtered(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,float rsrp);
int8_t set_RSRQ_filtered(module_id_t Mod_id,uint8_t eNB_index,float rstq); int8_t set_RSRQ_filtered(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,float rstq);
//! Automatic gain control //! Automatic gain control
void phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, void phy_adjust_gain (PHY_VARS_UE *phy_vars_ue,
......
...@@ -480,12 +480,13 @@ int lte_sync_time_eNB_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -480,12 +480,13 @@ int lte_sync_time_eNB_emul(PHY_VARS_eNB *phy_vars_eNB,
int32_t *sync_val) { int32_t *sync_val) {
uint8_t UE_id; uint8_t UE_id;
uint8_t CC_id = phy_vars_eNB->CC_id;
msg("[PHY] EMUL lte_sync_time_eNB_emul eNB %d, sect_id %d\n",phy_vars_eNB->Mod_id,sect_id); msg("[PHY] EMUL lte_sync_time_eNB_emul eNB %d, sect_id %d\n",phy_vars_eNB->Mod_id,sect_id);
*sync_val = 0; *sync_val = 0;
for (UE_id=0;UE_id<NB_UE_INST;UE_id++) { for (UE_id=0;UE_id<NB_UE_INST;UE_id++) {
//msg("[PHY] EMUL : eNB %d checking UE %d (PRACH %d) PL %d dB\n",phy_vars_eNB->Mod_id,UE_id,PHY_vars_UE_g[UE_id]->generate_prach,UE2eNB[UE_id][phy_vars_eNB->Mod_id]->path_loss_dB); //msg("[PHY] EMUL : eNB %d checking UE %d (PRACH %d) PL %d dB\n",phy_vars_eNB->Mod_id,UE_id,PHY_vars_UE_g[UE_id]->generate_prach,UE2eNB[UE_id][phy_vars_eNB->Mod_id]->path_loss_dB);
if ((PHY_vars_UE_g[UE_id]->generate_prach == 1) && (phy_vars_eNB->Mod_id == (UE_id % NB_eNB_INST))) { if ((PHY_vars_UE_g[UE_id][CC_id]->generate_prach == 1) && (phy_vars_eNB->Mod_id == (UE_id % NB_eNB_INST))) {
*sync_val = 1; *sync_val = 1;
return(0); return(0);
} }
......
...@@ -50,9 +50,9 @@ __m128i mmtmpPMI1 __attribute__ ((aligned(16))); ...@@ -50,9 +50,9 @@ __m128i mmtmpPMI1 __attribute__ ((aligned(16)));
__m128i mmtmpPMI2 __attribute__ ((aligned(16))); __m128i mmtmpPMI2 __attribute__ ((aligned(16)));
__m128i mmtmpPMI3 __attribute__ ((aligned(16))); __m128i mmtmpPMI3 __attribute__ ((aligned(16)));
int16_t get_PL(uint8_t Mod_id,uint8_t eNB_index) { int16_t get_PL(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index) {
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
int RSoffset; int RSoffset;
LOG_D(PHY,"get_PL : Frame %d : rssi %d, eNB power %d\n", phy_vars_ue->frame, LOG_D(PHY,"get_PL : Frame %d : rssi %d, eNB power %d\n", phy_vars_ue->frame,
...@@ -69,50 +69,50 @@ int16_t get_PL(uint8_t Mod_id,uint8_t eNB_index) { ...@@ -69,50 +69,50 @@ int16_t get_PL(uint8_t Mod_id,uint8_t eNB_index) {
} }
uint8_t get_n_adj_cells (uint8_t Mod_id){ uint8_t get_n_adj_cells (uint8_t Mod_id,uint8_t CC_id){
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
if (phy_vars_ue) if (phy_vars_ue)
return phy_vars_ue->PHY_measurements.n_adj_cells; return phy_vars_ue->PHY_measurements.n_adj_cells;
else else
return 0; return 0;
} }
int8_t get_rx_total_gain_dB (uint8_t Mod_id){ int8_t get_rx_total_gain_dB (uint8_t Mod_id,uint8_t CC_id){
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
if (phy_vars_ue) if (phy_vars_ue)
return phy_vars_ue->rx_total_gain_dB; return phy_vars_ue->rx_total_gain_dB;
else else
return -1; return -1;
} }
int8_t get_RSSI (uint8_t Mod_id){ int8_t get_RSSI (uint8_t Mod_id,uint8_t CC_id){
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
if (phy_vars_ue) if (phy_vars_ue)
return phy_vars_ue->PHY_measurements.rssi; return phy_vars_ue->PHY_measurements.rssi;
else else
return -1; return -1;
} }
uint8_t get_RSRP(uint8_t Mod_id,uint8_t eNB_index) { uint8_t get_RSRP(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index) {
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
if (phy_vars_ue) if (phy_vars_ue)
return phy_vars_ue->PHY_measurements.rsrp[eNB_index]; return phy_vars_ue->PHY_measurements.rsrp[eNB_index];
return 0; return 0;
} }
uint8_t get_RSRQ(uint8_t Mod_id,uint8_t eNB_index) { uint8_t get_RSRQ(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index) {
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
if (phy_vars_ue) if (phy_vars_ue)
return phy_vars_ue->PHY_measurements.rsrq[eNB_index]; return phy_vars_ue->PHY_measurements.rsrq[eNB_index];
return 0; return 0;
} }
int8_t set_RSRP_filtered(uint8_t Mod_id,uint8_t eNB_index,float rsrp) { int8_t set_RSRP_filtered(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,float rsrp) {
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
if (phy_vars_ue){ if (phy_vars_ue){
phy_vars_ue->PHY_measurements.rsrp_filtered[eNB_index]=rsrp; phy_vars_ue->PHY_measurements.rsrp_filtered[eNB_index]=rsrp;
return 0; return 0;
...@@ -121,9 +121,9 @@ int8_t set_RSRP_filtered(uint8_t Mod_id,uint8_t eNB_index,float rsrp) { ...@@ -121,9 +121,9 @@ int8_t set_RSRP_filtered(uint8_t Mod_id,uint8_t eNB_index,float rsrp) {
return -1; return -1;
} }
int8_t set_RSRQ_filtered(uint8_t Mod_id,uint8_t eNB_index,float rsrq) { int8_t set_RSRQ_filtered(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,float rsrq) {
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
if (phy_vars_ue){ if (phy_vars_ue){
phy_vars_ue->PHY_measurements.rsrq_filtered[eNB_index]=rsrq; phy_vars_ue->PHY_measurements.rsrq_filtered[eNB_index]=rsrq;
return 0; return 0;
......
...@@ -1769,7 +1769,8 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars, ...@@ -1769,7 +1769,8 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
write_output("rxF_comp_d.m","rxF_c_d",&lte_ue_pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); if (subframe==5)
write_output("rxF_comp_d.m","rxF_c_d",&lte_ue_pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
#endif #endif
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
...@@ -1833,8 +1834,10 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars, ...@@ -1833,8 +1834,10 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
s); s);
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
if (subframe==5) {
write_output("llr8_seq.m","llr8",&lte_ue_pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4); write_output("llr8_seq.m","llr8",&lte_ue_pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4);
write_output("llr16_seq.m","llr16",&lte_ue_pdcch_vars[eNB_id]->llr16[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4); write_output("llr16_seq.m","llr16",&lte_ue_pdcch_vars[eNB_id]->llr16[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4);
}
#endif #endif
} }
else { else {
...@@ -2303,58 +2306,58 @@ uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -2303,58 +2306,58 @@ uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB,
dci_alloc, dci_alloc,
&phy_vars_eNB->lte_frame_parms, &phy_vars_eNB->lte_frame_parms,
subframe); subframe);
eNB_transport_info[phy_vars_eNB->Mod_id].cntl.cfi=num_pdcch_symbols; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.cfi=num_pdcch_symbols;
memcpy(phy_vars_eNB->dci_alloc[subframe&1],dci_alloc,sizeof(DCI_ALLOC_t)*(num_ue_spec_dci+num_common_dci)); memcpy(phy_vars_eNB->dci_alloc[subframe&1],dci_alloc,sizeof(DCI_ALLOC_t)*(num_ue_spec_dci+num_common_dci));
phy_vars_eNB->num_ue_spec_dci[subframe&1]=num_ue_spec_dci; phy_vars_eNB->num_ue_spec_dci[subframe&1]=num_ue_spec_dci;
phy_vars_eNB->num_common_dci[subframe&1]=num_common_dci; phy_vars_eNB->num_common_dci[subframe&1]=num_common_dci;
eNB_transport_info[phy_vars_eNB->Mod_id].num_ue_spec_dci = num_ue_spec_dci; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_ue_spec_dci = num_ue_spec_dci;
eNB_transport_info[phy_vars_eNB->Mod_id].num_common_dci = num_common_dci; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_common_dci = num_common_dci;
LOG_D(PHY,"[eNB %d][DCI][EMUL] num spec dci %d num comm dci %d num PMCH %d \n", phy_vars_eNB->Mod_id, num_ue_spec_dci,num_common_dci, LOG_D(PHY,"[eNB %d][DCI][EMUL] num spec dci %d num comm dci %d num PMCH %d \n", phy_vars_eNB->Mod_id, num_ue_spec_dci,num_common_dci,
eNB_transport_info[phy_vars_eNB->Mod_id].num_pmch); eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_pmch);
if (eNB_transport_info[phy_vars_eNB->Mod_id].cntl.pmch_flag == 1 ) if (eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.pmch_flag == 1 )
n_dci_dl = eNB_transport_info[phy_vars_eNB->Mod_id].num_pmch; n_dci_dl = eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_pmch;
else else
n_dci_dl = 0; n_dci_dl = 0;
for (n_dci =0 ; for (n_dci =0 ;
n_dci < (eNB_transport_info[phy_vars_eNB->Mod_id].num_ue_spec_dci+ eNB_transport_info[phy_vars_eNB->Mod_id].num_common_dci); n_dci < (eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_ue_spec_dci+ eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_common_dci);
n_dci++) { n_dci++) {
if (dci_alloc[n_dci].format > 0){ // exclude the uplink dci if (dci_alloc[n_dci].format > 0){ // exclude the uplink dci
if (dci_alloc[n_dci].rnti == SI_RNTI) { if (dci_alloc[n_dci].rnti == SI_RNTI) {
dlsch_eNB = PHY_vars_eNB_g[phy_vars_eNB->Mod_id]->dlsch_eNB_SI; dlsch_eNB = PHY_vars_eNB_g[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]->dlsch_eNB_SI;
eNB_transport_info[phy_vars_eNB->Mod_id].dlsch_type[n_dci_dl] = 0;//SI; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dlsch_type[n_dci_dl] = 0;//SI;
eNB_transport_info[phy_vars_eNB->Mod_id].harq_pid[n_dci_dl] = 0; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl] = 0;
eNB_transport_info[phy_vars_eNB->Mod_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[0]->TBS>>3; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[0]->TBS>>3;
LOG_D(PHY,"[DCI][EMUL]SI tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id].tbs[n_dci_dl],n_dci_dl, eNB_transport_info[phy_vars_eNB->Mod_id].harq_pid[n_dci_dl]); LOG_D(PHY,"[DCI][EMUL]SI tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl],n_dci_dl, eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl]);
} }
else if (dci_alloc[n_dci_dl].ra_flag == 1) { else if (dci_alloc[n_dci_dl].ra_flag == 1) {
dlsch_eNB = PHY_vars_eNB_g[phy_vars_eNB->Mod_id]->dlsch_eNB_ra; dlsch_eNB = PHY_vars_eNB_g[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]->dlsch_eNB_ra;
eNB_transport_info[phy_vars_eNB->Mod_id].dlsch_type[n_dci_dl] = 1;//RA; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dlsch_type[n_dci_dl] = 1;//RA;
eNB_transport_info[phy_vars_eNB->Mod_id].harq_pid[n_dci_dl] = 0; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl] = 0;
eNB_transport_info[phy_vars_eNB->Mod_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[0]->TBS>>3; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[0]->TBS>>3;
LOG_D(PHY,"[DCI][EMUL] RA tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id].tbs[n_dci_dl],n_dci_dl, eNB_transport_info[phy_vars_eNB->Mod_id].harq_pid[n_dci_dl]); LOG_D(PHY,"[DCI][EMUL] RA tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl],n_dci_dl, eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl]);
} }
else { else {
ue_id = find_ue(dci_alloc[n_dci_dl].rnti,PHY_vars_eNB_g[phy_vars_eNB->Mod_id]); ue_id = find_ue(dci_alloc[n_dci_dl].rnti,PHY_vars_eNB_g[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]);
dlsch_eNB = PHY_vars_eNB_g[phy_vars_eNB->Mod_id]->dlsch_eNB[ue_id][0]; dlsch_eNB = PHY_vars_eNB_g[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]->dlsch_eNB[ue_id][0];
eNB_transport_info[phy_vars_eNB->Mod_id].dlsch_type[n_dci_dl] = 2;//TB0; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dlsch_type[n_dci_dl] = 2;//TB0;
eNB_transport_info[phy_vars_eNB->Mod_id].harq_pid[n_dci_dl] = dlsch_eNB->current_harq_pid; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl] = dlsch_eNB->current_harq_pid;
eNB_transport_info[phy_vars_eNB->Mod_id].ue_id[n_dci_dl] = ue_id; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].ue_id[n_dci_dl] = ue_id;
eNB_transport_info[phy_vars_eNB->Mod_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[dlsch_eNB->current_harq_pid]->TBS>>3; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl] = dlsch_eNB->harq_processes[dlsch_eNB->current_harq_pid]->TBS>>3;
LOG_D(PHY,"[DCI][EMUL] TB1 tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id].tbs[n_dci_dl],n_dci_dl, eNB_transport_info[phy_vars_eNB->Mod_id].harq_pid[n_dci_dl]); LOG_D(PHY,"[DCI][EMUL] TB1 tbs is %d and dci index %d harq pid is %d \n",eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[n_dci_dl],n_dci_dl, eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[n_dci_dl]);
// check for TB1 later // check for TB1 later
} }
} }
n_dci_dl++; n_dci_dl++;
} }
memcpy((void *)&eNB_transport_info[phy_vars_eNB->Mod_id].dci_alloc, memcpy((void *)&eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dci_alloc,
(void *)dci_alloc, (void *)dci_alloc,
n_dci*sizeof(DCI_ALLOC_t)); n_dci*sizeof(DCI_ALLOC_t));
...@@ -2464,10 +2467,10 @@ uint16_t get_nquad(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uin ...@@ -2464,10 +2467,10 @@ uint16_t get_nquad(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uin
return(Nreg - 4 - (3*Ngroup_PHICH)); return(Nreg - 4 - (3*Ngroup_PHICH));
} }
uint16_t get_nCCE_max(uint8_t Mod_id) { uint16_t get_nCCE_max(uint8_t Mod_id,uint8_t CC_id) {
// check for eNB only ! // check for eNB only !
return(get_nCCE(3,&PHY_vars_eNB_g[Mod_id]->lte_frame_parms,1)); // 5, 15,21 return(get_nCCE(3,&PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms,1)); // 5, 15,21
} }
void dci_decoding_procedure0(LTE_UE_PDCCH **lte_ue_pdcch_vars,int do_common,uint8_t subframe, void dci_decoding_procedure0(LTE_UE_PDCCH **lte_ue_pdcch_vars,int do_common,uint8_t subframe,
......
...@@ -529,9 +529,9 @@ uint8_t get_transmission_mode(uint16_t Mod_id, uint16_t rnti) { ...@@ -529,9 +529,9 @@ uint8_t get_transmission_mode(uint16_t Mod_id, uint16_t rnti) {
unsigned char UE_id; unsigned char UE_id;
// find the UE_index corresponding to rnti // find the UE_index corresponding to rnti
UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id]); UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][0]);
return(PHY_vars_eNB_g[Mod_id]->transmission_mode[UE_id]); return(PHY_vars_eNB_g[Mod_id][0]->transmission_mode[UE_id]);
} }
int generate_eNB_dlsch_params_from_dci(uint8_t subframe, int generate_eNB_dlsch_params_from_dci(uint8_t subframe,
......
...@@ -398,12 +398,12 @@ void dlsch_encoding_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -398,12 +398,12 @@ void dlsch_encoding_emul(PHY_VARS_eNB *phy_vars_eNB,
LOG_T(PHY,"%x.",DLSCH_pdu[i]); LOG_T(PHY,"%x.",DLSCH_pdu[i]);
LOG_T(PHY,"\n"); LOG_T(PHY,"\n");
memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id].transport_blocks[eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]], memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].transport_blocks[eNB_transport_info_TB_index[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]],
// memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id].transport_blocks[payload_offset], // memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id].transport_blocks[payload_offset],
DLSCH_pdu, DLSCH_pdu,
dlsch->harq_processes[harq_pid]->TBS>>3); dlsch->harq_processes[harq_pid]->TBS>>3);
} }
eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]+=dlsch->harq_processes[harq_pid]->TBS>>3; eNB_transport_info_TB_index[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]+=dlsch->harq_processes[harq_pid]->TBS>>3;
//payload_offset +=dlsch->harq_processes[harq_pid]->TBS>>3; //payload_offset +=dlsch->harq_processes[harq_pid]->TBS>>3;
} }
......
...@@ -617,10 +617,11 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -617,10 +617,11 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
uint16_t i; uint16_t i;
#endif #endif
uint8_t CC_id = phy_vars_ue->CC_id;
// may not be necessary for PMCH?? // may not be necessary for PMCH??
for (eNB_id2=0;eNB_id2<NB_eNB_INST;eNB_id2++) { for (eNB_id2=0;eNB_id2<NB_eNB_INST;eNB_id2++) {
if (PHY_vars_eNB_g[eNB_id2]->lte_frame_parms.Nid_cell == phy_vars_ue->lte_frame_parms.Nid_cell) if (PHY_vars_eNB_g[eNB_id2][CC_id]->lte_frame_parms.Nid_cell == phy_vars_ue->lte_frame_parms.Nid_cell)
break; break;
} }
if (eNB_id2==NB_eNB_INST) { if (eNB_id2==NB_eNB_INST) {
...@@ -636,7 +637,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -636,7 +637,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
switch (dlsch_id) { switch (dlsch_id) {
case 0: // SI case 0: // SI
dlsch_ue = phy_vars_ue->dlsch_ue_SI[eNB_id]; dlsch_ue = phy_vars_ue->dlsch_ue_SI[eNB_id];
dlsch_eNB = PHY_vars_eNB_g[eNB_id2]->dlsch_eNB_SI; dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch_eNB_SI;
// msg("Doing SI: TBS %d\n",dlsch_ue->harq_processes[0]->TBS>>3); // msg("Doing SI: TBS %d\n",dlsch_ue->harq_processes[0]->TBS>>3);
memcpy(dlsch_ue->harq_processes[0]->b,dlsch_eNB->harq_processes[0]->b,dlsch_ue->harq_processes[0]->TBS>>3); memcpy(dlsch_ue->harq_processes[0]->b,dlsch_eNB->harq_processes[0]->b,dlsch_ue->harq_processes[0]->TBS>>3);
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
...@@ -649,7 +650,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -649,7 +650,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case 1: // RA case 1: // RA
dlsch_ue = phy_vars_ue->dlsch_ue_ra[eNB_id]; dlsch_ue = phy_vars_ue->dlsch_ue_ra[eNB_id];
dlsch_eNB = PHY_vars_eNB_g[eNB_id2]->dlsch_eNB_ra; dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch_eNB_ra;
memcpy(dlsch_ue->harq_processes[0]->b,dlsch_eNB->harq_processes[0]->b,dlsch_ue->harq_processes[0]->TBS>>3); memcpy(dlsch_ue->harq_processes[0]->b,dlsch_eNB->harq_processes[0]->b,dlsch_ue->harq_processes[0]->TBS>>3);
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
LOG_D(PHY,"RA Decoded\n"); LOG_D(PHY,"RA Decoded\n");
...@@ -662,8 +663,8 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -662,8 +663,8 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
case 2: // TB0 case 2: // TB0
dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id][0];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->lte_ue_pdcch_vars[(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2]); ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->lte_ue_pdcch_vars[(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]);
dlsch_eNB = PHY_vars_eNB_g[eNB_id2]->dlsch_eNB[ue_id][0]; dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch_eNB[ue_id][0];
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
for (i=0;i<dlsch_ue->harq_processes[harq_pid]->TBS>>3;i++) for (i=0;i<dlsch_ue->harq_processes[harq_pid]->TBS>>3;i++)
...@@ -675,7 +676,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -675,7 +676,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
phy_vars_ue->transmission_mode[eNB_id], phy_vars_ue->transmission_mode[eNB_id],
dlsch_eNB->rb_alloc, dlsch_eNB->rb_alloc,
dlsch_eNB->harq_processes[harq_pid]->mcs, dlsch_eNB->harq_processes[harq_pid]->mcs,
PHY_vars_eNB_g[eNB_id]->mu_mimo_mode[ue_id].dl_pow_off) == 1) { PHY_vars_eNB_g[eNB_id][CC_id]->mu_mimo_mode[ue_id].dl_pow_off) == 1) {
// reset HARQ // reset HARQ
dlsch_ue->harq_processes[harq_pid]->status = SCH_IDLE; dlsch_ue->harq_processes[harq_pid]->status = SCH_IDLE;
dlsch_ue->harq_processes[harq_pid]->round = 0; dlsch_ue->harq_processes[harq_pid]->round = 0;
...@@ -702,8 +703,8 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -702,8 +703,8 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
case 3: // TB1 case 3: // TB1
dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id][1]; dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id][1];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
dlsch_eNB = PHY_vars_eNB_g[eNB_id2]->dlsch_eNB[(uint32_t)find_ue((int16_t)phy_vars_ue->lte_ue_pdcch_vars[(uint32_t)eNB_id]->crnti, dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch_eNB[(uint32_t)find_ue((int16_t)phy_vars_ue->lte_ue_pdcch_vars[(uint32_t)eNB_id]->crnti,
PHY_vars_eNB_g[eNB_id2])][1]; PHY_vars_eNB_g[eNB_id2][CC_id])][1];
// reset HARQ // reset HARQ
dlsch_ue->harq_processes[harq_pid]->status = SCH_IDLE; dlsch_ue->harq_processes[harq_pid]->status = SCH_IDLE;
dlsch_ue->harq_processes[harq_pid]->round = 0; dlsch_ue->harq_processes[harq_pid]->round = 0;
...@@ -716,7 +717,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -716,7 +717,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
case 5: // PMCH case 5: // PMCH
dlsch_ue = phy_vars_ue->dlsch_ue_MCH[eNB_id]; dlsch_ue = phy_vars_ue->dlsch_ue_MCH[eNB_id];
dlsch_eNB = PHY_vars_eNB_g[eNB_id2]->dlsch_eNB_MCH; dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch_eNB_MCH;
LOG_D(PHY,"decoding pmch emul (size is %d, enb %d %d)\n", dlsch_ue->harq_processes[0]->TBS>>3, eNB_id, eNB_id2); LOG_D(PHY,"decoding pmch emul (size is %d, enb %d %d)\n", dlsch_ue->harq_processes[0]->TBS>>3, eNB_id, eNB_id2);
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#include "gain_control.h" #include "gain_control.h"
#endif #endif
//#define DEBUG_INITIAL_SYNCH #define DEBUG_INITIAL_SYNCH
int pbch_detection(PHY_VARS_UE *phy_vars_ue, runmode_t mode) { int pbch_detection(PHY_VARS_UE *phy_vars_ue, runmode_t mode) {
......
...@@ -325,9 +325,9 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, ...@@ -325,9 +325,9 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
int32_t generate_pbch_emul(PHY_VARS_eNB *phy_vars_eNB,uint8_t *pbch_pdu) { int32_t generate_pbch_emul(PHY_VARS_eNB *phy_vars_eNB,uint8_t *pbch_pdu) {
LOG_D(PHY,"[eNB %d] generate_pbch_emul \n",phy_vars_eNB->Mod_id); LOG_D(PHY,"[eNB %d] generate_pbch_emul \n",phy_vars_eNB->Mod_id);
eNB_transport_info[phy_vars_eNB->Mod_id].cntl.pbch_flag=1; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.pbch_flag=1;
// Copy PBCH payload // Copy PBCH payload
eNB_transport_info[phy_vars_eNB->Mod_id].cntl.pbch_payload=*(uint32_t *)pbch_pdu; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.pbch_payload=*(uint32_t *)pbch_pdu;
return(0); return(0);
} }
...@@ -915,7 +915,8 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -915,7 +915,8 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
double sinr=0.0; double sinr=0.0;
uint16_t nb_rb = phy_vars_ue->lte_frame_parms.N_RB_DL; uint16_t nb_rb = phy_vars_ue->lte_frame_parms.N_RB_DL;
int16_t f; int16_t f;
uint8_t CC_id=phy_vars_ue->CC_id;
// compute effective sinr // compute effective sinr
// TODO: adapt this to varible bandwidth // TODO: adapt this to varible bandwidth
for (f=(nb_rb*6-3*12);f<(nb_rb*6+3*12);f++) { for (f=(nb_rb*6-3*12);f<(nb_rb*6+3*12);f++) {
...@@ -934,8 +935,8 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -934,8 +935,8 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
if (pbch_phase == (phy_vars_ue->frame % 4)) { if (pbch_phase == (phy_vars_ue->frame % 4)) {
if (uniformrandom() >= bler) { if (uniformrandom() >= bler) {
memcpy(phy_vars_ue->lte_ue_pbch_vars[eNB_id]->decoded_output,PHY_vars_eNB_g[eNB_id]->pbch_pdu,PBCH_PDU_SIZE); memcpy(phy_vars_ue->lte_ue_pbch_vars[eNB_id]->decoded_output,PHY_vars_eNB_g[eNB_id][CC_id]->pbch_pdu,PBCH_PDU_SIZE);
return(PHY_vars_eNB_g[eNB_id]->lte_frame_parms.nb_antennas_tx_eNB); return(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.nb_antennas_tx_eNB);
} }
else else
return(-1); return(-1);
......
...@@ -67,7 +67,7 @@ void dump_mch(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint16_t coded_bits_per_co ...@@ -67,7 +67,7 @@ void dump_mch(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint16_t coded_bits_per_co
phy_vars_ue->lte_frame_parms.samples_per_tti,1,1); phy_vars_ue->lte_frame_parms.samples_per_tti,1,1);
if (PHY_vars_eNB_g) if (PHY_vars_eNB_g)
write_output("txsig_mch.m","txs_mch", write_output("txsig_mch.m","txs_mch",
&PHY_vars_eNB_g[0]->lte_eNB_common_vars.txdata[0][0][subframe*phy_vars_ue->lte_frame_parms.samples_per_tti], &PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdata[0][0][subframe*phy_vars_ue->lte_frame_parms.samples_per_tti],
phy_vars_ue->lte_frame_parms.samples_per_tti,1,1); phy_vars_ue->lte_frame_parms.samples_per_tti,1,1);
} }
...@@ -178,14 +178,14 @@ void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx, in ...@@ -178,14 +178,14 @@ void fill_eNB_dlsch_MCH(PHY_VARS_eNB *phy_vars_eNB,int mcs,int ndi,int rvidx, in
} }
if (abstraction_flag){ if (abstraction_flag){
eNB_transport_info[phy_vars_eNB->Mod_id].cntl.pmch_flag=1; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.pmch_flag=1;
eNB_transport_info[phy_vars_eNB->Mod_id].num_pmch=1; // assumption: there is always one pmch in each SF eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_pmch=1; // assumption: there is always one pmch in each SF
eNB_transport_info[phy_vars_eNB->Mod_id].num_common_dci=0; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_common_dci=0;
eNB_transport_info[phy_vars_eNB->Mod_id].num_ue_spec_dci=0; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_ue_spec_dci=0;
eNB_transport_info[phy_vars_eNB->Mod_id].dlsch_type[0]=5;// put at the reserved position for PMCH eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].dlsch_type[0]=5;// put at the reserved position for PMCH
eNB_transport_info[phy_vars_eNB->Mod_id].harq_pid[0]=0; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].harq_pid[0]=0;
eNB_transport_info[phy_vars_eNB->Mod_id].ue_id[0]=255;//broadcast eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].ue_id[0]=255;//broadcast
eNB_transport_info[phy_vars_eNB->Mod_id].tbs[0]=dlsch->harq_processes[0]->TBS>>3; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].tbs[0]=dlsch->harq_processes[0]->TBS>>3;
} }
} }
...@@ -230,8 +230,8 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eN ...@@ -230,8 +230,8 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eN
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_tx; int subframe = phy_vars_eNB->proc[sched_subframe].subframe_tx;
if (abstraction_flag != 0) { if (abstraction_flag != 0) {
if (eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]!=0) if (eNB_transport_info_TB_index[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]!=0)
printf("[PHY][EMU] PMCH transport block position is different than zero %d \n", eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]); printf("[PHY][EMU] PMCH transport block position is different than zero %d \n", eNB_transport_info_TB_index[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]);
memcpy(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->b, memcpy(phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->b,
a, a,
...@@ -240,10 +240,10 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eN ...@@ -240,10 +240,10 @@ void fill_UE_dlsch_MCH(PHY_VARS_UE *phy_vars_ue,int mcs,int ndi,int rvidx,int eN
phy_vars_eNB->Mod_id, phy_vars_eNB->Mod_id,
phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3); phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3);
memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id].transport_blocks[eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]], memcpy(&eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].transport_blocks[eNB_transport_info_TB_index[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]],
a, a,
phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3); phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3);
eNB_transport_info_TB_index[phy_vars_eNB->Mod_id]+= phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3;//=eNB_transport_info[phy_vars_eNB->Mod_id].tbs[0]; eNB_transport_info_TB_index[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id]+= phy_vars_eNB->dlsch_eNB_MCH->harq_processes[0]->TBS>>3;//=eNB_transport_info[phy_vars_eNB->Mod_id].tbs[0];
}else { }else {
G = get_G(&phy_vars_eNB->lte_frame_parms, G = get_G(&phy_vars_eNB->lte_frame_parms,
phy_vars_eNB->lte_frame_parms.N_RB_DL, phy_vars_eNB->lte_frame_parms.N_RB_DL,
......
...@@ -105,7 +105,7 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t ...@@ -105,7 +105,7 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d)\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset); len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d)\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset);
len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[phy_vars_ue->UE_mode[0]],phy_vars_ue->UE_mode[0]); len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[phy_vars_ue->UE_mode[0]],phy_vars_ue->UE_mode[0]);
len += sprintf(&buffer[len], "[UE PROC] timing_advance = %d\n",phy_vars_ue->timing_advance); len += sprintf(&buffer[len], "[UE PROC] timing_advance = %d\n",phy_vars_ue->timing_advance);
len += sprintf(&buffer[len], "[UE PROC] UE tx power = %d\n", PHY_vars_UE_g[0]->tx_power_dBm); len += sprintf(&buffer[len], "[UE PROC] UE tx power = %d\n", PHY_vars_UE_g[0][0]->tx_power_dBm);
//for (eNB=0;eNB<NUMBER_OF_eNB_MAX;eNB++) { //for (eNB=0;eNB<NUMBER_OF_eNB_MAX;eNB++) {
for (eNB=0;eNB<1;eNB++) { for (eNB=0;eNB<1;eNB++) {
......
...@@ -1562,7 +1562,7 @@ uint16_t get_nquad(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uin ...@@ -1562,7 +1562,7 @@ uint16_t get_nquad(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uin
uint8_t get_mi(LTE_DL_FRAME_PARMS *frame,uint8_t subframe); uint8_t get_mi(LTE_DL_FRAME_PARMS *frame,uint8_t subframe);
uint16_t get_nCCE_max(uint8_t Mod_id); uint16_t get_nCCE_max(uint8_t Mod_id,uint8_t CC_id);
uint8_t get_num_pdcch_symbols(uint8_t num_dci,DCI_ALLOC_t *dci_alloc,LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe); uint8_t get_num_pdcch_symbols(uint8_t num_dci,DCI_ALLOC_t *dci_alloc,LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
......
...@@ -135,6 +135,6 @@ int generate_pss(mod_sym_t **txdataF, ...@@ -135,6 +135,6 @@ int generate_pss(mod_sym_t **txdataF,
int generate_pss_emul(PHY_VARS_eNB *phy_vars_eNb,uint8_t sect_id) { int generate_pss_emul(PHY_VARS_eNB *phy_vars_eNb,uint8_t sect_id) {
msg("[PHY] EMUL eNB generate_pss_emul eNB %d, sect_id %d\n",phy_vars_eNb->Mod_id,sect_id); msg("[PHY] EMUL eNB generate_pss_emul eNB %d, sect_id %d\n",phy_vars_eNb->Mod_id,sect_id);
eNB_transport_info[phy_vars_eNb->Mod_id].cntl.pss=sect_id; eNB_transport_info[phy_vars_eNb->Mod_id][phy_vars_eNb->CC_id].cntl.pss=sect_id;
return(0); return(0);
} }
...@@ -402,24 +402,24 @@ void generate_pucch_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -402,24 +402,24 @@ void generate_pucch_emul(PHY_VARS_UE *phy_vars_ue,
uint8_t sr, uint8_t sr,
uint8_t subframe) { uint8_t subframe) {
UE_transport_info[phy_vars_ue->Mod_id].cntl.pucch_flag = format; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pucch_flag = format;
UE_transport_info[phy_vars_ue->Mod_id].cntl.pucch_Ncs1 = ncs1; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pucch_Ncs1 = ncs1;
UE_transport_info[phy_vars_ue->Mod_id].cntl.sr = sr; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.sr = sr;
// the value of phy_vars_ue->pucch_sel[subframe] is set by get_n1_pucch // the value of phy_vars_ue->pucch_sel[subframe] is set by get_n1_pucch
UE_transport_info[phy_vars_ue->Mod_id].cntl.pucch_sel = phy_vars_ue->pucch_sel[subframe]; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pucch_sel = phy_vars_ue->pucch_sel[subframe];
// LOG_I(PHY,"subframe %d emu tx pucch_sel is %d sr is %d \n", subframe, UE_transport_info[phy_vars_ue->Mod_id].cntl.pucch_sel, sr); // LOG_I(PHY,"subframe %d emu tx pucch_sel is %d sr is %d \n", subframe, UE_transport_info[phy_vars_ue->Mod_id].cntl.pucch_sel, sr);
if (format == pucch_format1a) { if (format == pucch_format1a) {
phy_vars_ue->pucch_payload[0] = pucch_payload[0]; phy_vars_ue->pucch_payload[0] = pucch_payload[0];
UE_transport_info[phy_vars_ue->Mod_id].cntl.pucch_payload = pucch_payload[0]; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pucch_payload = pucch_payload[0];
} }
else if (format == pucch_format1b) { else if (format == pucch_format1b) {
phy_vars_ue->pucch_payload[0] = pucch_payload[0] + (pucch_payload[1]<<1); phy_vars_ue->pucch_payload[0] = pucch_payload[0] + (pucch_payload[1]<<1);
UE_transport_info[phy_vars_ue->Mod_id].cntl.pucch_payload = pucch_payload[0] + (pucch_payload[1]<<1); UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pucch_payload = pucch_payload[0] + (pucch_payload[1]<<1);
} }
else if (format == pucch_format1) { else if (format == pucch_format1) {
LOG_D(PHY,"[UE %d] Frame %d subframe %d Generating PUCCH for SR %d\n",phy_vars_ue->Mod_id,phy_vars_ue->frame,subframe,sr); LOG_D(PHY,"[UE %d] Frame %d subframe %d Generating PUCCH for SR %d\n",phy_vars_ue->Mod_id,phy_vars_ue->frame,subframe,sr);
...@@ -952,10 +952,11 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -952,10 +952,11 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t UE_id; uint8_t UE_id;
uint16_t rnti; uint16_t rnti;
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx; int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx;
uint8_t CC_id = phy_vars_eNB->CC_id;
rnti = phy_vars_eNB->ulsch_eNB[UE_index]->rnti; rnti = phy_vars_eNB->ulsch_eNB[UE_index]->rnti;
for (UE_id=0;UE_id<NB_UE_INST;UE_id++) { for (UE_id=0;UE_id<NB_UE_INST;UE_id++) {
if (rnti == PHY_vars_UE_g[UE_id]->lte_ue_pdcch_vars[0]->crnti) if (rnti == PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->lte_ue_pdcch_vars[0]->crnti)
break; break;
} }
if (UE_id==NB_UE_INST) { if (UE_id==NB_UE_INST) {
...@@ -964,19 +965,19 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -964,19 +965,19 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
} }
if (fmt == pucch_format1) { if (fmt == pucch_format1) {
payload[0] = PHY_vars_UE_g[UE_id]->sr[subframe]; payload[0] = PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->sr[subframe];
} }
else if (fmt == pucch_format1a) { else if (fmt == pucch_format1a) {
payload[0] = PHY_vars_UE_g[UE_id]->pucch_payload[0]; payload[0] = PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->pucch_payload[0];
} }
else if (fmt == pucch_format1b) { else if (fmt == pucch_format1b) {
payload[0] = PHY_vars_UE_g[UE_id]->pucch_payload[0]; payload[0] = PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->pucch_payload[0];
payload[1] = PHY_vars_UE_g[UE_id]->pucch_payload[1]; payload[1] = PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->pucch_payload[1];
} }
else else
LOG_E(PHY,"[eNB] Frame %d: Can't handle formats 2/2a/2b\n",phy_vars_eNB->proc[sched_subframe].frame_rx); LOG_E(PHY,"[eNB] Frame %d: Can't handle formats 2/2a/2b\n",phy_vars_eNB->proc[sched_subframe].frame_rx);
if (PHY_vars_UE_g[UE_id]->pucch_sel[subframe] == n1_pucch_sel) if (PHY_vars_UE_g[UE_id][phy_vars_eNB->CC_id]->pucch_sel[subframe] == n1_pucch_sel)
return(99); return(99);
else else
return(0); return(0);
......
...@@ -300,12 +300,12 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue, ...@@ -300,12 +300,12 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
} }
// initialize power control based on PRACH power // initialize power control based on PRACH power
ulsch->f_pusch = delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC] + ulsch->f_pusch = delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC] +
mac_xface->get_deltaP_rampup(phy_vars_ue->Mod_id); mac_xface->get_deltaP_rampup(phy_vars_ue->Mod_id,phy_vars_ue->CC_id);
LOG_D(PHY,"[UE %d][PUSCH PC] Initializing f_pusch to %d dB, TPC %d (delta_PUSCH_msg2 %d dB), deltaP_rampup %d dB\n", LOG_D(PHY,"[UE %d][PUSCH PC] Initializing f_pusch to %d dB, TPC %d (delta_PUSCH_msg2 %d dB), deltaP_rampup %d dB\n",
phy_vars_ue->Mod_id,ulsch->f_pusch,ulsch->harq_processes[harq_pid]->TPC,delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC], phy_vars_ue->Mod_id,ulsch->f_pusch,ulsch->harq_processes[harq_pid]->TPC,delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC],
mac_xface->get_deltaP_rampup(phy_vars_ue->Mod_id)); mac_xface->get_deltaP_rampup(phy_vars_ue->Mod_id,phy_vars_ue->CC_id));
//#ifdef DEBUG_RAR //#ifdef DEBUG_RAR
msg("ulsch ra (UE): harq_pid %d\n",harq_pid); msg("ulsch ra (UE): harq_pid %d\n",harq_pid);
......
...@@ -912,29 +912,29 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer, ...@@ -912,29 +912,29 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
//memcpy(&UE_transport_info[phy_vars_ue->Mod_id].transport_blocks[UE_transport_info_TB_index[phy_vars_ue->Mod_id]], //memcpy(&UE_transport_info[phy_vars_ue->Mod_id].transport_blocks[UE_transport_info_TB_index[phy_vars_ue->Mod_id]],
memcpy(&UE_transport_info[phy_vars_ue->Mod_id].transport_blocks, memcpy(&UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].transport_blocks,
ulsch_buffer, ulsch_buffer,
phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->TBS>>3); phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->TBS>>3);
//UE_transport_info_TB_index[phy_vars_ue->Mod_id]+=phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->TBS>>3; //UE_transport_info_TB_index[phy_vars_ue->Mod_id]+=phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->TBS>>3;
// navid: currently more than one eNB is not supported in the code // navid: currently more than one eNB is not supported in the code
UE_transport_info[phy_vars_ue->Mod_id].num_eNB = 1; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].num_eNB = 1;
UE_transport_info[phy_vars_ue->Mod_id].rnti[0] = phy_vars_ue->lte_ue_pdcch_vars[0]->crnti; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].rnti[0] = phy_vars_ue->lte_ue_pdcch_vars[0]->crnti;
UE_transport_info[phy_vars_ue->Mod_id].eNB_id[0] = eNB_id; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].eNB_id[0] = eNB_id;
UE_transport_info[phy_vars_ue->Mod_id].harq_pid[0] = harq_pid; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].harq_pid[0] = harq_pid;
UE_transport_info[phy_vars_ue->Mod_id].tbs[0] = phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->TBS>>3 ; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].tbs[0] = phy_vars_ue->ulsch_ue[eNB_id]->harq_processes[harq_pid]->TBS>>3 ;
// msg("\nphy_vars_ue->Mod_id%d\n",phy_vars_ue->Mod_id); // msg("\nphy_vars_ue->Mod_id%d\n",phy_vars_ue->Mod_id);
UE_transport_info[phy_vars_ue->Mod_id].cntl.pusch_flag = 1; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pusch_flag = 1;
//UE_transport_info[phy_vars_ue->Mod_id].cntl.pusch_uci = *(uint32_t *)ulsch->o; //UE_transport_info[phy_vars_ue->Mod_id].cntl.pusch_uci = *(uint32_t *)ulsch->o;
memcpy(UE_transport_info[phy_vars_ue->Mod_id].cntl.pusch_uci, memcpy(UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pusch_uci,
ulsch->o, ulsch->o,
MAX_CQI_BYTES); MAX_CQI_BYTES);
// msg("[UE]cqi is %d \n", ((HLC_subband_cqi_rank1_2A_5MHz *)ulsch->o)->cqi1); // msg("[UE]cqi is %d \n", ((HLC_subband_cqi_rank1_2A_5MHz *)ulsch->o)->cqi1);
UE_transport_info[phy_vars_ue->Mod_id].cntl.length_uci = ulsch->O; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.length_uci = ulsch->O;
UE_transport_info[phy_vars_ue->Mod_id].cntl.uci_format = ulsch->uci_format; UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.uci_format = ulsch->uci_format;
UE_transport_info[phy_vars_ue->Mod_id].cntl.pusch_ri = (ulsch->o_RI[0]&1)+((ulsch->o_RI[1]&1)<<1); UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pusch_ri = (ulsch->o_RI[0]&1)+((ulsch->o_RI[1]&1)<<1);
UE_transport_info[phy_vars_ue->Mod_id].cntl.pusch_ack = (ulsch->o_ACK[0]&1) + ((ulsch->o_ACK[1]&1)<<1); UE_transport_info[phy_vars_ue->Mod_id][phy_vars_ue->CC_id].cntl.pusch_ack = (ulsch->o_ACK[0]&1) + ((ulsch->o_ACK[1]&1)<<1);
//msg("ack is %d %d %d\n",UE_transport_info[phy_vars_ue->Mod_id].cntl.pusch_ack, (ulsch->o_ACK[1]&1)<<1, ulsch->o_ACK[0]&1); //msg("ack is %d %d %d\n",UE_transport_info[phy_vars_ue->Mod_id].cntl.pusch_ack, (ulsch->o_ACK[1]&1)<<1, ulsch->o_ACK[0]&1);
return(0); return(0);
......
...@@ -1677,6 +1677,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1677,6 +1677,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB,
uint16_t rnti; uint16_t rnti;
int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx; int subframe = phy_vars_eNB->proc[sched_subframe].subframe_rx;
uint8_t harq_pid; uint8_t harq_pid;
uint8_t CC_id = phy_vars_eNB->CC_id;
harq_pid = subframe2harq_pid(&phy_vars_eNB->lte_frame_parms,phy_vars_eNB->proc[sched_subframe].frame_rx,subframe); harq_pid = subframe2harq_pid(&phy_vars_eNB->lte_frame_parms,phy_vars_eNB->proc[sched_subframe].frame_rx,subframe);
...@@ -1685,7 +1686,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1685,7 +1686,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB,
LOG_D(PHY,"[eNB %d] ulsch_decoding_emul : subframe %d UE_index %d harq_pid %d rnti %x\n",phy_vars_eNB->Mod_id,subframe,UE_index,harq_pid,rnti); LOG_D(PHY,"[eNB %d] ulsch_decoding_emul : subframe %d UE_index %d harq_pid %d rnti %x\n",phy_vars_eNB->Mod_id,subframe,UE_index,harq_pid,rnti);
#endif #endif
for (UE_id=0;UE_id<NB_UE_INST;UE_id++) { for (UE_id=0;UE_id<NB_UE_INST;UE_id++) {
if (rnti == PHY_vars_UE_g[UE_id]->lte_ue_pdcch_vars[0]->crnti) if (rnti == PHY_vars_UE_g[UE_id][CC_id]->lte_ue_pdcch_vars[0]->crnti)
break; break;
/* /*
msg("[PHY] EMUL eNB %d ulsch_decoding_emul : subframe ue id %d crnti %x nb ue %d\n", msg("[PHY] EMUL eNB %d ulsch_decoding_emul : subframe ue id %d crnti %x nb ue %d\n",
...@@ -1705,9 +1706,9 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1705,9 +1706,9 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB,
LOG_D(PHY,"[eNB %d] Found UE with rnti %x => UE_id %d\n",phy_vars_eNB->Mod_id, rnti, UE_id); LOG_D(PHY,"[eNB %d] Found UE with rnti %x => UE_id %d\n",phy_vars_eNB->Mod_id, rnti, UE_id);
} }
if (PHY_vars_UE_g[UE_id]->ulsch_ue[0]->harq_processes[harq_pid]->status == CBA_ACTIVE){ if (PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->harq_processes[harq_pid]->status == CBA_ACTIVE){
*crnti = rnti; *crnti = rnti;
PHY_vars_UE_g[UE_id]->ulsch_ue[0]->harq_processes[harq_pid]->status=IDLE; PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->harq_processes[harq_pid]->status=IDLE;
} else } else
*crnti = 0x0; *crnti = 0x0;
...@@ -1750,17 +1751,17 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1750,17 +1751,17 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB,
LOG_D(PHY,"ulsch_decoding_emul abstraction successful\n"); LOG_D(PHY,"ulsch_decoding_emul abstraction successful\n");
memcpy(phy_vars_eNB->ulsch_eNB[UE_index]->harq_processes[harq_pid]->b, memcpy(phy_vars_eNB->ulsch_eNB[UE_index]->harq_processes[harq_pid]->b,
PHY_vars_UE_g[UE_id]->ulsch_ue[0]->harq_processes[harq_pid]->b, PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->harq_processes[harq_pid]->b,
phy_vars_eNB->ulsch_eNB[UE_index]->harq_processes[harq_pid]->TBS>>3); phy_vars_eNB->ulsch_eNB[UE_index]->harq_processes[harq_pid]->TBS>>3);
// get local ue's ack // get local ue's ack
if ((UE_index >= oai_emulation.info.first_ue_local) ||(UE_index <(oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local))){ if ((UE_index >= oai_emulation.info.first_ue_local) ||(UE_index <(oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local))){
get_ack(&phy_vars_eNB->lte_frame_parms, get_ack(&phy_vars_eNB->lte_frame_parms,
PHY_vars_UE_g[UE_id]->dlsch_ue[0][0]->harq_ack, PHY_vars_UE_g[UE_id][CC_id]->dlsch_ue[0][0]->harq_ack,
subframe, subframe,
phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK); phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK);
}else { // get remote UEs' ack }else { // get remote UEs' ack
phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK[0] = PHY_vars_UE_g[UE_id]->ulsch_ue[0]->o_ACK[0]; phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK[0] = PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->o_ACK[0];
phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK[1] = PHY_vars_UE_g[UE_id]->ulsch_ue[0]->o_ACK[1]; phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK[1] = PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->o_ACK[1];
} }
// Do abstraction of PUSCH feedback // Do abstraction of PUSCH feedback
...@@ -1768,16 +1769,16 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1768,16 +1769,16 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *phy_vars_eNB,
LOG_D(PHY,"[eNB %d][EMUL] ue index %d UE_id %d: subframe %d : o_ACK (%d %d), cqi (val %d, len %d)\n", LOG_D(PHY,"[eNB %d][EMUL] ue index %d UE_id %d: subframe %d : o_ACK (%d %d), cqi (val %d, len %d)\n",
phy_vars_eNB->Mod_id,UE_index, UE_id, subframe,phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK[0], phy_vars_eNB->Mod_id,UE_index, UE_id, subframe,phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK[0],
phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK[1], phy_vars_eNB->ulsch_eNB[UE_index]->o_ACK[1],
((HLC_subband_cqi_rank1_2A_5MHz *)PHY_vars_UE_g[UE_id]->ulsch_ue[0]->o)->cqi1, ((HLC_subband_cqi_rank1_2A_5MHz *)PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->o)->cqi1,
PHY_vars_UE_g[UE_id]->ulsch_ue[0]->O); PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->O);
#endif #endif
phy_vars_eNB->ulsch_eNB[UE_index]->Or1 = PHY_vars_UE_g[UE_id]->ulsch_ue[0]->O; phy_vars_eNB->ulsch_eNB[UE_index]->Or1 = PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->O;
phy_vars_eNB->ulsch_eNB[UE_index]->Or2 = PHY_vars_UE_g[UE_id]->ulsch_ue[0]->O; phy_vars_eNB->ulsch_eNB[UE_index]->Or2 = PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->O;
phy_vars_eNB->ulsch_eNB[UE_index]->uci_format = PHY_vars_UE_g[UE_id]->ulsch_ue[0]->uci_format; phy_vars_eNB->ulsch_eNB[UE_index]->uci_format = PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->uci_format;
memcpy(phy_vars_eNB->ulsch_eNB[UE_index]->o,PHY_vars_UE_g[UE_id]->ulsch_ue[0]->o,MAX_CQI_BYTES); memcpy(phy_vars_eNB->ulsch_eNB[UE_index]->o,PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->o,MAX_CQI_BYTES);
memcpy(phy_vars_eNB->ulsch_eNB[UE_index]->o_RI,PHY_vars_UE_g[UE_id]->ulsch_ue[0]->o_RI,2); memcpy(phy_vars_eNB->ulsch_eNB[UE_index]->o_RI,PHY_vars_UE_g[UE_id][CC_id]->ulsch_ue[0]->o_RI,2);
phy_vars_eNB->ulsch_eNB[UE_index]->cqi_crc_status = 1; phy_vars_eNB->ulsch_eNB[UE_index]->cqi_crc_status = 1;
......
...@@ -171,10 +171,11 @@ typedef struct { ...@@ -171,10 +171,11 @@ typedef struct {
/// Top-level PHY Data Structure for eNB /// Top-level PHY Data Structure for eNB
typedef struct PHY_VARS_eNB_s{ typedef struct PHY_VARS_eNB_s{
/// Module ID indicator for this instance /// Module ID indicator for this instance
module_id_t Mod_id; module_id_t Mod_id;
eNB_proc_t proc[10]; uint8_t CC_id;
uint8_t local_flag; eNB_proc_t proc[10];
uint32_t rx_total_gain_eNB_dB; uint8_t local_flag;
uint32_t rx_total_gain_eNB_dB;
LTE_DL_FRAME_PARMS lte_frame_parms; LTE_DL_FRAME_PARMS lte_frame_parms;
PHY_MEASUREMENTS_eNB PHY_measurements_eNB[NUMBER_OF_eNB_SECTORS_MAX]; /// Measurement variables PHY_MEASUREMENTS_eNB PHY_measurements_eNB[NUMBER_OF_eNB_SECTORS_MAX]; /// Measurement variables
LTE_eNB_COMMON lte_eNB_common_vars; LTE_eNB_COMMON lte_eNB_common_vars;
...@@ -349,6 +350,7 @@ typedef struct ...@@ -349,6 +350,7 @@ typedef struct
{ {
/// Module ID indicator for this instance /// Module ID indicator for this instance
uint8_t Mod_id; uint8_t Mod_id;
uint8_t CC_id;
uint8_t local_flag; uint8_t local_flag;
uint32_t tx_total_gain_dB; uint32_t tx_total_gain_dB;
uint32_t rx_total_gain_dB; ///this is a function of rx_gain_mode (and the corresponding gain) and the rx_gain of the card uint32_t rx_total_gain_dB; ///this is a function of rx_gain_mode (and the corresponding gain) and the rx_gain of the card
......
...@@ -25,8 +25,8 @@ extern unsigned int DAQ_MBOX; ...@@ -25,8 +25,8 @@ extern unsigned int DAQ_MBOX;
//extern PHY_CONFIG *PHY_config; //extern PHY_CONFIG *PHY_config;
//extern PHY_VARS *PHY_vars; //extern PHY_VARS *PHY_vars;
extern PHY_VARS_UE **PHY_vars_UE_g; extern PHY_VARS_UE ***PHY_vars_UE_g;
extern PHY_VARS_eNB **PHY_vars_eNB_g; extern PHY_VARS_eNB ***PHY_vars_eNB_g;
extern PHY_VARS_RN **PHY_vars_RN_g; extern PHY_VARS_RN **PHY_vars_RN_g;
extern LTE_DL_FRAME_PARMS *lte_frame_parms_g; extern LTE_DL_FRAME_PARMS *lte_frame_parms_g;
......
...@@ -34,8 +34,8 @@ int16_t *primary_synch2_time; ...@@ -34,8 +34,8 @@ int16_t *primary_synch2_time;
#include "PHY/CODING/vars.h" #include "PHY/CODING/vars.h"
//PHY_VARS *PHY_vars; //PHY_VARS *PHY_vars;
PHY_VARS_UE **PHY_vars_UE_g; PHY_VARS_UE ***PHY_vars_UE_g;
PHY_VARS_eNB **PHY_vars_eNB_g; PHY_VARS_eNB ***PHY_vars_eNB_g;
PHY_VARS_RN **PHY_vars_RN_g; PHY_VARS_RN **PHY_vars_RN_g;
LTE_DL_FRAME_PARMS *lte_frame_parms_g; LTE_DL_FRAME_PARMS *lte_frame_parms_g;
......
...@@ -129,7 +129,7 @@ void cleanup_dlsch_threads(void); ...@@ -129,7 +129,7 @@ void cleanup_dlsch_threads(void);
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying @param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
@param *phy_vars_rn pointer to RN variables @param *phy_vars_rn pointer to RN variables
*/ */
void phy_procedures_eNB_lte(uint8_t subframe,PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_flag, relaying_type_t r_type, PHY_VARS_RN *phy_vars_rn); void phy_procedures_eNB_lte(uint8_t subframe,PHY_VARS_eNB **phy_vars_eNB,uint8_t abstraction_flag, relaying_type_t r_type, PHY_VARS_RN *phy_vars_rn);
/*! /*!
\brief Top-level entry routine for UE procedures. Called every slot by process scheduler. In even slots, it performs RX functions from previous subframe (if required). On odd slots, it generate TX waveform for the following subframe. \brief Top-level entry routine for UE procedures. Called every slot by process scheduler. In even slots, it performs RX functions from previous subframe (if required). On odd slots, it generate TX waveform for the following subframe.
@param last_slot Index of last slot (0-19) @param last_slot Index of last slot (0-19)
...@@ -250,10 +250,11 @@ lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) ...@@ -250,10 +250,11 @@ lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
/*! /*!
\brief Function to compute subframe type as a function of Frame type and TDD Configuration (implements Table 4.2.2 from 36.211, p.11 from version 8.6) and subframe index. Same as subframe_select, except that it uses the Mod_id and is provided as a service to the MAC scheduler. \brief Function to compute subframe type as a function of Frame type and TDD Configuration (implements Table 4.2.2 from 36.211, p.11 from version 8.6) and subframe index. Same as subframe_select, except that it uses the Mod_id and is provided as a service to the MAC scheduler.
@param Mod_id Index of eNB @param Mod_id Index of eNB
@param CC_id Component Carrier Index
@param subframe Subframe index @param subframe Subframe index
@returns Subframe type (DL,UL,S) @returns Subframe type (DL,UL,S)
*/ */
lte_subframe_t get_subframe_direction(uint8_t Mod_id, uint8_t subframe); lte_subframe_t get_subframe_direction(uint8_t Mod_id, uint8_t CC_id,uint8_t subframe);
/*! /*!
\brief Function to indicate PHICH transmission subframes. Implements Table 9.1.2-1 for TDD. \brief Function to indicate PHICH transmission subframes. Implements Table 9.1.2-1 for TDD.
...@@ -307,15 +308,17 @@ uint8_t get_Msg3_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t ...@@ -307,15 +308,17 @@ uint8_t get_Msg3_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
/** \brief Function to indicate failure of contention resolution or RA procedure. It places the UE back in PRACH mode. /** \brief Function to indicate failure of contention resolution or RA procedure. It places the UE back in PRACH mode.
@param Mod_id Instance index of UE @param Mod_id Instance index of UE
@param CC_id Component Carrier Index
@param eNB_index Index of eNB @param eNB_index Index of eNB
*/ */
void ra_failed(uint8_t Mod_id,uint8_t eNB_index); void ra_failed(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/** \brief Function to indicate success of contention resolution or RA procedure. /** \brief Function to indicate success of contention resolution or RA procedure.
@param Mod_id Instance index of UE @param Mod_id Instance index of UE
@param CC_id Component Carrier Index
@param eNB_index Index of eNB @param eNB_index Index of eNB
*/ */
void ra_succeeded(uint8_t Mod_id,uint8_t eNB_index); void ra_succeeded(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
uint8_t phich_subframe_to_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t subframe); uint8_t phich_subframe_to_harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t subframe);
...@@ -399,26 +402,26 @@ int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB); ...@@ -399,26 +402,26 @@ int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB); int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_flag); int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_flag);
void process_timing_advance(uint8_t Mod_id,int16_t timing_advance); void process_timing_advance(uint8_t Mod_id,uint8_t CC_id,int16_t timing_advance);
void process_timing_advance_rar(PHY_VARS_UE *phy_vars_ue,uint16_t timing_advance); void process_timing_advance_rar(PHY_VARS_UE *phy_vars_ue,uint16_t timing_advance);
unsigned int get_tx_amp(int gain_dBm, int gain_max_dBm); unsigned int get_tx_amp(int gain_dBm, int gain_max_dBm);
void phy_reset_ue(uint8_t Mod_id,uint8_t eNB_index); void phy_reset_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/** \brief This function retrives the resource (n1_pucch) corresponding to a PDSCH transmission in /** \brief This function retrives the resource (n1_pucch) corresponding to a PDSCH transmission in
subframe n-4 which is acknowledged in subframe n (for FDD) according to n1_pucch = Ncce + N1_pucch. For subframe n-4 which is acknowledged in subframe n (for FDD) according to n1_pucch = Ncce + N1_pucch. For
TDD, this routine computes the complex procedure described in Section 10.1 of 36.213 (through tables 10.1-1,10.1-2) TDD, this routine computes the complex procedure described in Section 10.1 of 36.213 (through tables 10.1-1,10.1-2)
@param phy_vars_ue Pointer to UE variables @param phy_vars_ue Pointer to UE variables
@param eNB_id Index of eNB @param eNB_id Index of eNB
@param subframe Index of subframe @param sched_subframe Index of subframe where procedures were scheduled
@param b Pointer to PUCCH payload (b[0],b[1]) @param b Pointer to PUCCH payload (b[0],b[1])
@param SR 1 means there's a positive SR in parallel to ACK/NAK @param SR 1 means there's a positive SR in parallel to ACK/NAK
@returns n1_pucch @returns n1_pucch
*/ */
uint16_t get_n1_pucch(PHY_VARS_UE *phy_vars_ue, uint16_t get_n1_pucch(PHY_VARS_UE *phy_vars_ue,
uint8_t eNB_id, uint8_t eNB_id,
uint8_t subframe, uint8_t sched_subframe,
uint8_t *b, uint8_t *b,
uint8_t SR); uint8_t SR);
...@@ -464,10 +467,11 @@ void process_HARQ_feedback(uint8_t UE_id, ...@@ -464,10 +467,11 @@ void process_HARQ_feedback(uint8_t UE_id,
/*! /*!
\brief This function retrieves the PHY UE mode. It is used as a helper function for the UE MAC. \brief This function retrieves the PHY UE mode. It is used as a helper function for the UE MAC.
@param Mod_id Local UE index on which to act @param Mod_id Local UE index on which to act
@param CC_id Component Carrier Index
@param eNB_index ID of eNB @param eNB_index ID of eNB
@returns UE mode @returns UE mode
*/ */
UE_MODE_t get_ue_mode(uint8_t Mod_id,uint8_t eNB_index); UE_MODE_t get_ue_mode(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/** \brief This function implements the power control mechanism for PUCCH from 36.213. /** \brief This function implements the power control mechanism for PUCCH from 36.213.
@param phy_vars_ue PHY variables @param phy_vars_ue PHY variables
...@@ -489,8 +493,8 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u ...@@ -489,8 +493,8 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u
int8_t get_PHR(uint8_t Mod_id, uint8_t eNB_index); int8_t get_PHR(uint8_t Mod_id, uint8_t eNB_index);
LTE_eNB_UE_stats* get_eNB_UE_stats(uint8_t Mod_id, uint16_t rnti); LTE_eNB_UE_stats* get_eNB_UE_stats(uint8_t Mod_id, int CC_id,uint16_t rnti);
int get_ue_active_harq_pid(uint8_t Mod_id,uint16_t rnti,uint8_t subframe,uint8_t *harq_pid,uint8_t *round,uint8_t ul_flag); int get_ue_active_harq_pid(uint8_t Mod_id,uint8_t CC_id,uint16_t rnti,uint8_t subframe,uint8_t *harq_pid,uint8_t *round,uint8_t ul_flag);
void ulsch_decoding_procedures(unsigned char last_slot, unsigned int i, PHY_VARS_eNB *phy_vars_eNB, unsigned char abstraction_flag); void ulsch_decoding_procedures(unsigned char last_slot, unsigned int i, PHY_VARS_eNB *phy_vars_eNB, unsigned char abstraction_flag);
......
...@@ -498,9 +498,9 @@ lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub ...@@ -498,9 +498,9 @@ lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub
} }
} }
lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t subframe) { lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subframe) {
return(subframe_select(&PHY_vars_eNB_g[Mod_id]->lte_frame_parms,subframe)); return(subframe_select(&PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms,subframe));
} }
...@@ -544,18 +544,18 @@ unsigned int is_phich_subframe(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub ...@@ -544,18 +544,18 @@ unsigned int is_phich_subframe(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub
} }
LTE_eNB_UE_stats* get_eNB_UE_stats(uint8_t Mod_id, uint16_t rnti) { LTE_eNB_UE_stats* get_eNB_UE_stats(uint8_t Mod_id, int CC_id,uint16_t rnti) {
int8_t UE_id; int8_t UE_id;
if ((PHY_vars_eNB_g == NULL) || (PHY_vars_eNB_g[Mod_id] == NULL)) { if ((PHY_vars_eNB_g == NULL) || (PHY_vars_eNB_g[Mod_id] == NULL) || (PHY_vars_eNB_g[Mod_id][CC_id]==NULL)) {
LOG_E(PHY,"get_eNB_UE_stats: No phy_vars_eNB found (or not allocated) for Mod_id %d\n",Mod_id); LOG_E(PHY,"get_eNB_UE_stats: No phy_vars_eNB found (or not allocated) for Mod_id %d,CC_id %d\n",Mod_id,CC_id);
return NULL; return NULL;
} }
UE_id = find_ue(rnti, PHY_vars_eNB_g[Mod_id]); UE_id = find_ue(rnti, PHY_vars_eNB_g[Mod_id][CC_id]);
if (UE_id == -1) { if (UE_id == -1) {
LOG_E(PHY,"get_eNB_UE_stats: UE with rnti %x not found\n",rnti); LOG_E(PHY,"get_eNB_UE_stats: UE with rnti %x not found\n",rnti);
return NULL; return NULL;
} }
return(&PHY_vars_eNB_g[Mod_id]->eNB_UE_stats[(uint32_t)UE_id]); return(&PHY_vars_eNB_g[Mod_id][CC_id]->eNB_UE_stats[(uint32_t)UE_id]);
} }
int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB) { int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB) {
......
This diff is collapsed.
This diff is collapsed.
...@@ -57,7 +57,7 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id ...@@ -57,7 +57,7 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id
phy_vars_ue->g_pucch[eNB_id] = 0; phy_vars_ue->g_pucch[eNB_id] = 0;
Po_PUCCH = get_PL(phy_vars_ue->Mod_id,eNB_id)+ Po_PUCCH = get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,eNB_id)+
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH+ phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
phy_vars_ue->g_pucch[eNB_id]; phy_vars_ue->g_pucch[eNB_id];
switch (pucch_fmt) { switch (pucch_fmt) {
...@@ -93,7 +93,7 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id ...@@ -93,7 +93,7 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id
phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,phy_vars_ue->frame,subframe, phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,phy_vars_ue->frame,subframe,
Po_PUCCH, Po_PUCCH,
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH, phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
get_PL(phy_vars_ue->Mod_id,eNB_id), get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,eNB_id),
phy_vars_ue->g_pucch[eNB_id]); phy_vars_ue->g_pucch[eNB_id]);
} }
else { else {
...@@ -102,7 +102,7 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id ...@@ -102,7 +102,7 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id
phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,phy_vars_ue->frame,subframe, phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,phy_vars_ue->frame,subframe,
Po_PUCCH, Po_PUCCH,
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH, phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
get_PL(phy_vars_ue->Mod_id,eNB_id), get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,eNB_id),
phy_vars_ue->g_pucch[eNB_id]); phy_vars_ue->g_pucch[eNB_id]);
} }
return(Po_PUCCH); return(Po_PUCCH);
......
...@@ -85,7 +85,7 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u ...@@ -85,7 +85,7 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u
// P_opusch(0) = P_oPTR + deltaP_Msg3 if PUSCH is transporting Msg3 // P_opusch(0) = P_oPTR + deltaP_Msg3 if PUSCH is transporting Msg3
// else // else
// P_opusch(0) = PO_NOMINAL_PUSCH(j) + P_O_UE_PUSCH(j) // P_opusch(0) = PO_NOMINAL_PUSCH(j) + P_O_UE_PUSCH(j)
PL = get_PL(phy_vars_ue->Mod_id,eNB_id); PL = get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,eNB_id);
phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH = (hundred_times_log10_NPRB[nb_rb-1]+ phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH = (hundred_times_log10_NPRB[nb_rb-1]+
get_hundred_times_delta_IF(phy_vars_ue,eNB_id,harq_pid) + get_hundred_times_delta_IF(phy_vars_ue,eNB_id,harq_pid) +
...@@ -93,11 +93,11 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u ...@@ -93,11 +93,11 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u
if( phy_vars_ue->ulsch_ue_Msg3_active[eNB_id] == 1) { // Msg3 PUSCH if( phy_vars_ue->ulsch_ue_Msg3_active[eNB_id] == 1) { // Msg3 PUSCH
phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH += (mac_xface->get_Po_NOMINAL_PUSCH(phy_vars_ue->Mod_id) + PL); phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH += (mac_xface->get_Po_NOMINAL_PUSCH(phy_vars_ue->Mod_id,0) + PL);
LOG_D(PHY,"[UE %d][RAPROC] frame %d, subframe %d: Msg3 Po_PUSCH %d dBm (%d,%d,%d,%d,%d)\n", LOG_D(PHY,"[UE %d][RAPROC] frame %d, subframe %d: Msg3 Po_PUSCH %d dBm (%d,%d,%d,%d,%d)\n",
phy_vars_ue->Mod_id,((subframe==0)?1:0)+phy_vars_ue->frame,subframe,phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH, phy_vars_ue->Mod_id,((subframe==0)?1:0)+phy_vars_ue->frame,subframe,phy_vars_ue->ulsch_ue[eNB_id]->Po_PUSCH,
100*mac_xface->get_Po_NOMINAL_PUSCH(phy_vars_ue->Mod_id), 100*mac_xface->get_Po_NOMINAL_PUSCH(phy_vars_ue->Mod_id,0),
hundred_times_log10_NPRB[nb_rb-1], hundred_times_log10_NPRB[nb_rb-1],
100*PL, 100*PL,
get_hundred_times_delta_IF(phy_vars_ue,eNB_id,harq_pid), get_hundred_times_delta_IF(phy_vars_ue,eNB_id,harq_pid),
...@@ -130,8 +130,8 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u ...@@ -130,8 +130,8 @@ void pusch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id,u
} }
int8_t get_PHR(uint8_t Mod_id, uint8_t eNB_index){ int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id,uint8_t eNB_index){
return PHY_vars_UE_g[Mod_id]->ulsch_ue[eNB_index]->PHR; return PHY_vars_UE_g[Mod_id][CC_id]->ulsch_ue[eNB_index]->PHR;
} }
...@@ -155,7 +155,7 @@ int emu_transport_handle_enb_info(bypass_msg_header_t *messg, ...@@ -155,7 +155,7 @@ int emu_transport_handle_enb_info(bypass_msg_header_t *messg,
{ {
eNB_transport_info_t *eNB_info; eNB_transport_info_t *eNB_info;
int total_header = 0, total_tbs = 0; int total_header = 0, total_tbs = 0;
int n_dci, n_enb, enb_info_ix = 0; int n_dci, n_enb, enb_info_ix = 0,CC_id;
DevAssert(bytes_read >= 0); DevAssert(bytes_read >= 0);
DevAssert(messg != NULL); DevAssert(messg != NULL);
...@@ -196,9 +196,10 @@ int emu_transport_handle_enb_info(bypass_msg_header_t *messg, ...@@ -196,9 +196,10 @@ int emu_transport_handle_enb_info(bypass_msg_header_t *messg,
for (n_enb = oai_emulation.info.master[messg->master_id].first_enb; for (n_enb = oai_emulation.info.master[messg->master_id].first_enb;
n_enb < oai_emulation.info.master[messg->master_id].first_enb + n_enb < oai_emulation.info.master[messg->master_id].first_enb +
oai_emulation.info.master[messg->master_id].nb_enb; n_enb ++) { oai_emulation.info.master[messg->master_id].nb_enb; n_enb ++)
fill_phy_enb_vars(n_enb, next_slot); for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
} fill_phy_enb_vars(n_enb, CC_id,next_slot);
}
} else { } else {
LOG_T(EMU,"WAIT_ENB_TRANSPORT state: no enb transport info from master %d \n", LOG_T(EMU,"WAIT_ENB_TRANSPORT state: no enb transport info from master %d \n",
messg->master_id); messg->master_id);
...@@ -217,7 +218,7 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg, ...@@ -217,7 +218,7 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg,
int bytes_read) int bytes_read)
{ {
UE_transport_info_t *UE_info; UE_transport_info_t *UE_info;
int n_ue, n_enb; int n_ue, n_enb,CC_id;
int total_tbs = 0, total_header = 0, ue_info_ix =0; int total_tbs = 0, total_header = 0, ue_info_ix =0;
DevAssert(bytes_read >= 0); DevAssert(bytes_read >= 0);
...@@ -249,7 +250,7 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg, ...@@ -249,7 +250,7 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg,
n_ue, total_header+total_tbs,total_header,total_tbs); n_ue, total_header+total_tbs,total_header,total_tbs);
} }
memcpy(&UE_transport_info[n_ue], UE_info, total_header + total_tbs); memcpy(&UE_transport_info[n_ue][CC_id], UE_info, total_header + total_tbs);
/* Go to the next UE info */ /* Go to the next UE info */
UE_info = (UE_transport_info_t *)((uintptr_t)UE_info + total_header+ UE_info = (UE_transport_info_t *)((uintptr_t)UE_info + total_header+
...@@ -260,9 +261,10 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg, ...@@ -260,9 +261,10 @@ int emu_transport_handle_ue_info(bypass_msg_header_t *messg,
for (n_ue = oai_emulation.info.master[messg->master_id].first_ue; for (n_ue = oai_emulation.info.master[messg->master_id].first_ue;
n_ue < oai_emulation.info.master[messg->master_id].first_ue + n_ue < oai_emulation.info.master[messg->master_id].first_ue +
oai_emulation.info.master[messg->master_id].nb_ue; oai_emulation.info.master[messg->master_id].nb_ue;
n_ue ++) { n_ue ++)
fill_phy_ue_vars(n_ue, last_slot); for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
} fill_phy_ue_vars(n_ue, CC_id,last_slot);
}
} else { } else {
LOG_T(EMU,"WAIT_UE_TRANSPORT state: no UE transport info from master %d\n", LOG_T(EMU,"WAIT_UE_TRANSPORT state: no UE transport info from master %d\n",
messg->master_id); messg->master_id);
...@@ -510,7 +512,7 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int ...@@ -510,7 +512,7 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int
LOG_D(EMU, "Entering bypass_tx [%s] for frame %d next_slot %d\n", LOG_D(EMU, "Entering bypass_tx [%s] for frame %d next_slot %d\n",
map_int_to_str(transport_names, Type), frame, next_slot); map_int_to_str(transport_names, Type), frame, next_slot);
int n_enb,n_ue, n_dci,total_tbs=0,total_size=0; int n_enb,n_ue, CC_id,n_dci,total_tbs=0,total_size=0;
messg = (bypass_msg_header_t *) ( messg = (bypass_msg_header_t *) (
&bypass_tx_buffer[sizeof (bypass_proto2multicast_header_t)]); &bypass_tx_buffer[sizeof (bypass_proto2multicast_header_t)]);
num_flows = 0; num_flows = 0;
...@@ -565,13 +567,14 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int ...@@ -565,13 +567,14 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int
total_tbs=0; total_tbs=0;
for (n_enb=oai_emulation.info.first_enb_local; for (n_enb=oai_emulation.info.first_enb_local;
n_enb<(oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local); n_enb<(oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local);
n_enb++) { n_enb++)
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
total_tbs=0; total_tbs=0;
for (n_dci = 0; n_dci < (eNB_transport_info[n_enb].num_pmch + for (n_dci = 0; n_dci < (eNB_transport_info[n_enb][CC_id].num_pmch +
eNB_transport_info[n_enb].num_ue_spec_dci + eNB_transport_info[n_enb][CC_id].num_ue_spec_dci +
eNB_transport_info[n_enb].num_common_dci); eNB_transport_info[n_enb][CC_id].num_common_dci);
n_dci++) { n_dci++) {
total_tbs +=eNB_transport_info[n_enb].tbs[n_dci]; total_tbs +=eNB_transport_info[n_enb][CC_id].tbs[n_dci];
} }
if (total_tbs <= MAX_TRANSPORT_BLOCKS_BUFFER_SIZE) { if (total_tbs <= MAX_TRANSPORT_BLOCKS_BUFFER_SIZE) {
total_size = sizeof(eNB_transport_info_t) + total_tbs - total_size = sizeof(eNB_transport_info_t) + total_tbs -
...@@ -581,7 +584,7 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int ...@@ -581,7 +584,7 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int
"[eNB]running out of memory for the eNB emulation transport buffer of size %d\n", "[eNB]running out of memory for the eNB emulation transport buffer of size %d\n",
MAX_TRANSPORT_BLOCKS_BUFFER_SIZE); MAX_TRANSPORT_BLOCKS_BUFFER_SIZE);
} }
memcpy(&bypass_tx_buffer[byte_tx_count], (char *)&eNB_transport_info[n_enb], memcpy(&bypass_tx_buffer[byte_tx_count], (char *)&eNB_transport_info[n_enb][CC_id],
total_size); total_size);
byte_tx_count += total_size; byte_tx_count += total_size;
} }
...@@ -593,8 +596,8 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int ...@@ -593,8 +596,8 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int
for (n_ue = oai_emulation.info.first_ue_local; for (n_ue = oai_emulation.info.first_ue_local;
n_ue < (oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local); n_ue < (oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local);
n_ue++) { n_ue++) {
for (n_enb=0; n_enb<UE_transport_info[n_ue].num_eNB; n_enb++) { for (n_enb=0; n_enb<UE_transport_info[n_ue][CC_id].num_eNB; n_enb++) {
total_tbs+=UE_transport_info[n_ue].tbs[n_enb]; total_tbs+=UE_transport_info[n_ue][CC_id].tbs[n_enb];
} }
if (total_tbs <= MAX_TRANSPORT_BLOCKS_BUFFER_SIZE) { if (total_tbs <= MAX_TRANSPORT_BLOCKS_BUFFER_SIZE) {
total_size = sizeof(UE_transport_info_t)+total_tbs- total_size = sizeof(UE_transport_info_t)+total_tbs-
...@@ -604,7 +607,7 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int ...@@ -604,7 +607,7 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int
"[UE]running out of memory for the UE emulation transport buffer of size %d\n", "[UE]running out of memory for the UE emulation transport buffer of size %d\n",
MAX_TRANSPORT_BLOCKS_BUFFER_SIZE); MAX_TRANSPORT_BLOCKS_BUFFER_SIZE);
} }
memcpy(&bypass_tx_buffer[byte_tx_count], (char *)&UE_transport_info[n_ue], memcpy(&bypass_tx_buffer[byte_tx_count], (char *)&UE_transport_info[n_ue][CC_id],
total_size); total_size);
byte_tx_count += total_size; byte_tx_count += total_size;
} }
......
...@@ -35,12 +35,12 @@ extern char Tx_mutex_var; ...@@ -35,12 +35,12 @@ extern char Tx_mutex_var;
extern rx_handler_t rx_handler; extern rx_handler_t rx_handler;
extern tx_handler_t tx_handler; extern tx_handler_t tx_handler;
extern eNB_transport_info_t eNB_transport_info[NUMBER_OF_eNB_MAX]; extern eNB_transport_info_t eNB_transport_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
extern uint16_t eNB_transport_info_TB_index[NUMBER_OF_eNB_MAX]; extern uint16_t eNB_transport_info_TB_index[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
extern UE_transport_info_t UE_transport_info[NUMBER_OF_UE_MAX]; extern UE_transport_info_t UE_transport_info[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
extern uint16_t UE_transport_info_TB_index[NUMBER_OF_UE_MAX]; extern uint16_t UE_transport_info_TB_index[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
extern UE_cntl ue_cntl_delay[NUMBER_OF_UE_MAX][2]; extern UE_cntl ue_cntl_delay[NUMBER_OF_UE_MAX][MAX_NUM_CCs][2];
#endif #endif
...@@ -36,8 +36,8 @@ unsigned int emul_rx_handler(unsigned char Mode,char *rx_buffer, unsigned int Nb ...@@ -36,8 +36,8 @@ unsigned int emul_rx_handler(unsigned char Mode,char *rx_buffer, unsigned int Nb
unsigned int emul_rx_data(void); unsigned int emul_rx_data(void);
void emu_transport_info(unsigned int last_slot, unsigned int next_slot); void emu_transport_info(unsigned int last_slot, unsigned int next_slot);
void fill_phy_enb_vars(unsigned int enb_id, unsigned int next_slot); void fill_phy_enb_vars(unsigned int enb_id, uint8_t CC_id,unsigned int next_slot);
void fill_phy_ue_vars(unsigned int ue_id, unsigned int last_slot); void fill_phy_ue_vars(unsigned int ue_id, uint8_t CC_id,unsigned int last_slot);
void emu_transport_sync(void); void emu_transport_sync(void);
void emu_transport(unsigned int frame, unsigned int last_slot,unsigned int next_slot, lte_subframe_t direction, unsigned char frame_type, int ethernet_flag ); void emu_transport(unsigned int frame, unsigned int last_slot,unsigned int next_slot, lte_subframe_t direction, unsigned char frame_type, int ethernet_flag );
void emu_transport_DL(unsigned int frame, unsigned int last_slot,unsigned int next_slot); void emu_transport_DL(unsigned int frame, unsigned int last_slot,unsigned int next_slot);
......
...@@ -37,12 +37,12 @@ char Tx_mutex_var; ...@@ -37,12 +37,12 @@ char Tx_mutex_var;
rx_handler_t rx_handler; rx_handler_t rx_handler;
tx_handler_t tx_handler; tx_handler_t tx_handler;
eNB_transport_info_t eNB_transport_info[NUMBER_OF_eNB_MAX]; eNB_transport_info_t eNB_transport_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
uint16_t eNB_transport_info_TB_index[NUMBER_OF_eNB_MAX]; uint16_t eNB_transport_info_TB_index[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
UE_transport_info_t UE_transport_info[NUMBER_OF_UE_MAX]; UE_transport_info_t UE_transport_info[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
uint16_t UE_transport_info_TB_index[NUMBER_OF_UE_MAX]; uint16_t UE_transport_info_TB_index[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
UE_cntl ue_cntl_delay[NUMBER_OF_UE_MAX][2]; UE_cntl ue_cntl_delay[NUMBER_OF_UE_MAX][MAX_NUM_CCs][2];
#endif #endif
...@@ -10,7 +10,7 @@ OPENAIR1_TOP = $(OPENAIR1_DIR) ...@@ -10,7 +10,7 @@ OPENAIR1_TOP = $(OPENAIR1_DIR)
OPENAIR2_TOP = $(OPENAIR2_DIR) OPENAIR2_TOP = $(OPENAIR2_DIR)
OPENAIR3 = $(OPENAIR3_DIR) OPENAIR3 = $(OPENAIR3_DIR)
CFLAGS = -g -O3 -Wno-strict-aliasing -rdynamic -Wall -DPHYSIM -DNODE_RG -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 $(CPUFLAGS) -DMALLOC_CHECK_=1 -DENABLE_VCD_FIFO # -Wno-packed-bitfield-compat CFLAGS = -g -O3 -Wno-strict-aliasing -rdynamic -DMAX_NUM_CCs=1 -Wall -DPHYSIM -DNODE_RG -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 $(CPUFLAGS) -DMALLOC_CHECK_=1 -DENABLE_VCD_FIFO # -Wno-packed-bitfield-compat
# DCI Debug # DCI Debug
......
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