Merge remote-tracking branch 'origin/develop' into oai_ue_fixes

This commit is contained in:
Florian Kaltenberger
2018-05-29 01:06:54 -07:00
409 changed files with 37215 additions and 29278 deletions
+14 -4
View File
@@ -34,7 +34,7 @@
#include "RadioResourceConfigDedicated.h"
#include "MeasGapConfig.h"
#include "TDD-Config.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-SubframeConfigList.h"
#endif
@@ -356,7 +356,7 @@ typedef struct {
TDD_Config_t *tdd_Config,
uint8_t *SIwindowsize,
uint16_t *SIperiod
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
,
MBMS_flag_t MBMS_Flag,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
@@ -364,10 +364,20 @@ typedef struct {
struct PMCH_InfoList_r9 *pmch_InfoList
#endif
);
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*);
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
#ifdef Rel14
,uint32_t
,uint32_t
#endif
);
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
logical_chan_id_t channel_idP, tb_size_t tb_sizeP);
logical_chan_id_t channel_idP, tb_size_t tb_sizeP
#ifdef Rel14
,uint32_t sourceL2Id
,uint32_t destinationL2Id
#endif
);
signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ),
void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
+2 -4
View File
@@ -29,10 +29,8 @@
#ifndef PHY_MESSAGES_TYPES_H_
#define PHY_MESSAGES_TYPES_H_
#include "PHY/impl_defs_lte.h"
#if ENABLE_RAL
#include "ral_messages_types.h" //LG: MIH moved from repository/trunk to repository/extras
#endif
#include "PHY/defs_common.h"
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
#define PHY_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.phy_configuration_req
+5 -3
View File
@@ -69,10 +69,12 @@
#ifdef LARGE_SCALE
# define MAX_MOBILES_PER_ENB 128
//# define MAX_RG 2
# define MAX_MOBILES_PER_ENB_NB_IoT 128
# define MAX_eNB 2
#else
# define MAX_MOBILES_PER_ENB 16
//# define MAX_RG 2
# define MAX_MOBILES_PER_ENB_NB_IoT 16
# define MAX_eNB 2
#endif
#define MAX_MANAGED_ENB_PER_MOBILE 2
@@ -84,7 +86,7 @@
#define DEFAULT_RAB_ID 1
#define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#define NB_RB_MBMS_MAX (maxSessionPerPMCH*maxServiceCount)
#else
// Do not allocate unused memory
+7 -1
View File
@@ -88,6 +88,10 @@ typedef boolean_t srb_flag_t;
#define SRB_FLAG_NO FALSE
#define SRB_FLAG_YES TRUE
typedef boolean_t sl_discovery_flag_t;
#define SL_DISCOVERY_FLAG_NO FALSE
#define SL_DISCOVERY_FLAG_YES TRUE
typedef enum link_direction_e {
UNKNOWN_DIR = 0,
DIR_UPLINK = 1,
@@ -164,7 +168,9 @@ typedef enum ip_traffic_type_e {
TRAFFIC_IPV4_TYPE_UNICAST = 5,
TRAFFIC_IPV4_TYPE_MULTICAST = 6,
TRAFFIC_IPV4_TYPE_BROADCAST = 7,
TRAFFIC_IPV4_TYPE_UNKNOWN = 8
TRAFFIC_IPV4_TYPE_UNKNOWN = 8,
TRAFFIC_PC5S_SIGNALLING = 9,
TRAFFIC_PC5S_SESSION_INIT = 10
} ip_traffic_type_t;
//-----------------------------------------------------------------------------
+57 -1
View File
@@ -37,6 +37,12 @@
#else
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#endif
#include "SL-OffsetIndicator-r12.h"
#include "SubframeBitmapSL-r12.h"
#include "SL-CP-Len-r12.h"
#include "SL-PeriodComm-r12.h"
#include "SL-DiscResourcePool-r12.h"
//-------------------------------------------------------------------------------------------//
// Messages for RRC logging
@@ -117,7 +123,7 @@ typedef struct RrcConfigurationReq_s {
long pucch_delta_shift[MAX_NUM_CCs];
long pucch_nRB_CQI[MAX_NUM_CCs];
long pucch_nCS_AN[MAX_NUM_CCs];
#if !defined(Rel10) && !defined(Rel14)
#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
long pucch_n1_AN[MAX_NUM_CCs];
#endif
long pdsch_referenceSignalPower[MAX_NUM_CCs];
@@ -168,6 +174,56 @@ typedef struct RrcConfigurationReq_s {
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
long ue_TransmissionMode[MAX_NUM_CCs];
//TTN - for D2D
//SIB18
e_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
e_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
e_SL_CP_Len_r12 rxPool_data_CP_Len[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long rxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//SIB19
//for discRxPool
SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
long discRxPool_numRetx[MAX_NUM_CCs];
long discRxPool_numRepetition[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//for discRxPoolPS
SL_CP_Len_r12_t discRxPoolPS_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod[MAX_NUM_CCs];
long discRxPoolPS_numRetx[MAX_NUM_CCs];
long discRxPoolPS_numRepetition[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
} RrcConfigurationReq;
#define MAX_NUM_NBIOT_CELEVELS 3
typedef struct NbIoTRrcConfigurationReq_s {
+1
View File
@@ -38,6 +38,7 @@ MESSAGE_DEF(S1AP_E_RAB_MODIFY_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgTex
MESSAGE_DEF(S1AP_PAGING_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_paging_log)
MESSAGE_DEF(S1AP_E_RAB_RELEASE_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_request_log)
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_response_log)
MESSAGE_DEF(S1AP_E_RAB_ERROR_INDICATION_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_error_indication_log)
/* eNB application layer -> S1AP messages */
MESSAGE_DEF(S1AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, s1ap_register_enb_req_t , s1ap_register_enb_req)
@@ -34,7 +34,7 @@
#include "flexran_agent_timer.h"
#include "flexran_agent_ran_api.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/mac_proto.h"
#include "liblfds700.h"
@@ -836,7 +836,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
Protocol__FlexHeader *header = NULL;
int i, j, UE_id;
int available_harq[NUMBER_OF_UE_MAX];
int available_harq[MAX_MOBILES_PER_ENB];
const int xid = *((int *)params);
@@ -854,7 +854,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
frame_t frame;
sub_frame_t subframe;
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
available_harq[i] = -1;
}
@@ -878,7 +878,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
sf_trigger_msg->n_dl_info = 0;
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
for (j = 0; j < 8; j++) {
if (RC.mac && RC.mac[mod_id] && RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid == 1) {
available_harq[i] = j;
@@ -904,7 +904,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
goto error;
i = -1;
//Fill the status of the current HARQ process for each UE
for(UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
for(UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (available_harq[UE_id] < 0) {
continue;
} else {
@@ -1262,7 +1262,7 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
//Allow RINGBUFFER_SIZE messages to be stored in the ringbuffer at any time
dl_mac_config_array[mod_id] = malloc( sizeof(struct lfds700_ringbuffer_element) * num_elements);
lfds700_ringbuffer_init_valid_on_current_logical_core( &ringbuffer_state[mod_id], dl_mac_config_array[mod_id], num_elements, &ps[mod_id], NULL );
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
for (j = 0; j < 8; j++) {
if (RC.mac && RC.mac[mod_id])
RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid = 0;
@@ -37,7 +37,7 @@ unsigned int pdcp_agent_registered[NUM_MAX_ENB];
/*Array containing the Agent-PDCP interfaces*/
AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB];
// NUMBER_OF_UE_MAX
// MAX_MOBILES_PER_ENB
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
const mid_t ue_id,
+1 -1
View File
@@ -30,7 +30,7 @@
#include <sys/types.h>
#include "openair1/PHY/extern.h"
#include "openair1/PHY/phy_extern.h"
#include "common/utils/load_module_shlib.h"
#define NBIOT_INTERFACE_SOURCE
#include "NB_IoT_interface.h"
+1
View File
@@ -46,6 +46,7 @@
# include "gtpv1u_eNB_task.h"
# endif
#include "openair1/PHY/INIT/phy_init.h"
extern unsigned char NB_eNB_INST;
#endif
+412 -11
View File
@@ -45,9 +45,10 @@
#endif
#include "sctp_default_values.h"
#include "SystemInformationBlockType2.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
#include "PHY/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "PHY/phy_extern.h"
#include "PHY/INIT/phy_init.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
#include "nfapi_vnf.h"
#include "nfapi_pnf.h"
@@ -101,6 +102,52 @@ void RCconfig_flexran()
ue_TimersAndConstants_n310, ue_TimersAndConstants_n311,
ue_TransmissionMode;
e_SL_CP_Len_r12 rxPool_sc_CP_Len;
e_SL_PeriodComm_r12 rxPool_sc_Period;
e_SL_CP_Len_r12 rxPool_data_CP_Len;
long rxPool_ResourceConfig_prb_Num;
long rxPool_ResourceConfig_prb_Start;
long rxPool_ResourceConfig_prb_End;
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present;
long rxPool_ResourceConfig_offsetIndicator_choice;
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present;
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19
//for discRxPool
SL_CP_Len_r12_t discRxPool_cp_Len;
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod;
long discRxPool_numRetx;
long discRxPool_numRepetition;
long discRxPool_ResourceConfig_prb_Num;
long discRxPool_ResourceConfig_prb_Start;
long discRxPool_ResourceConfig_prb_End;
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present;
long discRxPool_ResourceConfig_offsetIndicator_choice;
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present;
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//for discRxPoolPS
SL_CP_Len_r12_t discRxPoolPS_cp_Len;
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod;
long discRxPoolPS_numRetx;
long discRxPoolPS_numRepetition;
long discRxPoolPS_ResourceConfig_prb_Num;
long discRxPoolPS_ResourceConfig_prb_Start;
long discRxPoolPS_ResourceConfig_prb_End;
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present;
long discRxPoolPS_ResourceConfig_offsetIndicator_choice;
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present;
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
/* get number of eNBs */
paramdef_t ENBSParams[] = ENBSPARAMS_DESC;
config_get(ENBSParams, sizeof(ENBSParams)/sizeof(paramdef_t), NULL);
@@ -181,6 +228,48 @@ void RCconfig_flexran()
}
}
/*void UE_config_stub_pnf(void) {
int j;
paramdef_t L1_Params[] = L1PARAMS_DESC;
paramlist_def_t L1_ParamList = {CONFIG_STRING_L1_LIST,NULL,0};
config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL);
if (L1_ParamList.numelt > 0) {
for (j=0; j<L1_ParamList.numelt; j++){
//nb_L1_CC = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr); // Number of component carriers is of no use for the
// phy_stub mode UE pnf. Maybe we can completely skip it.
if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) {
sf_ahead = 4; // Need 4 subframe gap between RX and TX
}
// Panos: Right now that we have only one UE (thread) it is ok to put the eth_params in the UE_mac_inst.
// Later I think we have to change that to attribute eth_params to a global element for all the UEs.
else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) {
stub_eth_params.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr));
stub_eth_params.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr));
stub_eth_params.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr));
stub_eth_params.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr);
stub_eth_params.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr);
stub_eth_params.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr);
stub_eth_params.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr);
stub_eth_params.transp_preference = ETH_UDP_MODE;
sf_ahead = 2; // Cannot cope with 4 subframes betweem RX and TX - set it to 2
//configure_nfapi_pnf(UE_mac_inst[0].eth_params_n.remote_addr, UE_mac_inst[0].eth_params_n.remote_portc, UE_mac_inst[0].eth_params_n.my_addr, UE_mac_inst[0].eth_params_n.my_portd, UE_mac_inst[0].eth_params_n.remote_portd);
configure_nfapi_pnf(stub_eth_params.remote_addr, stub_eth_params.remote_portc, stub_eth_params.my_addr, stub_eth_params.my_portd, stub_eth_params.remote_portd);
}
else { // other midhaul
}
}
}
else {
}
}*/
void RCconfig_L1(void) {
int i,j;
paramdef_t L1_Params[] = L1PARAMS_DESC;
@@ -196,7 +285,6 @@ void RCconfig_L1(void) {
config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL);
if (L1_ParamList.numelt > 0) {
for (j = 0; j < RC.nb_L1_inst; j++) {
RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr);
@@ -249,6 +337,7 @@ void RCconfig_L1(void) {
configure_nfapi_pnf(RC.eNB[j][0]->eth_params_n.remote_addr, RC.eNB[j][0]->eth_params_n.remote_portc, RC.eNB[j][0]->eth_params_n.my_addr, RC.eNB[j][0]->eth_params_n.my_portd, RC.eNB[j][0]->eth_params_n .remote_portd);
}
else { // other midhaul
//printf("Panos-D: RCconfig_L1 12 \n");
}
}// j=0..num_inst
printf("Initializing northbound interface for L1\n");
@@ -295,8 +384,10 @@ void RCconfig_macrlc() {
RC.nb_macrlc_inst=MacRLC_ParamList.numelt;
mac_top_init_eNB();
for (j=0;j<RC.nb_macrlc_inst;j++) {
RC.nb_mac_CC = (int*)malloc(RC.nb_macrlc_inst*sizeof(int));
for (j=0;j<RC.nb_macrlc_inst;j++) {
RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr);
//RC.mac[j]->phy_test = *(MacRLC_ParamList.paramarray[j][MACRLC_PHY_TEST_IDX].iptr);
//printf("PHY_TEST = %d,%d\n", RC.mac[j]->phy_test, j);
@@ -377,7 +468,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
int32_t pucch_delta_shift = 0;
int32_t pucch_nRB_CQI = 0;
int32_t pucch_nCS_AN = 0;
//#if !defined(Rel10) && !defined(Rel14)
//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
int32_t pucch_n1_AN = 0;
//#endif
int32_t pdsch_referenceSignalPower = 0;
@@ -430,6 +521,52 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
int32_t ue_TimersAndConstants_n311 = 0;
int32_t ue_TransmissionMode = 0;
//TTN - for D2D
//SIB18
const char* rxPool_sc_CP_Len = NULL;
const char* rxPool_sc_Period = NULL;
const char* rxPool_data_CP_Len = NULL;
libconfig_int rxPool_ResourceConfig_prb_Num = 0;
libconfig_int rxPool_ResourceConfig_prb_Start = 0;
libconfig_int rxPool_ResourceConfig_prb_End = 0;
const char* rxPool_ResourceConfig_offsetIndicator_present = NULL;
libconfig_int rxPool_ResourceConfig_offsetIndicator_choice = 0;
const char* rxPool_ResourceConfig_subframeBitmap_present = NULL;
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
//SIB19
//For discRxPool
const char* discRxPool_cp_Len = NULL;
const char* discRxPool_discPeriod = NULL;
libconfig_int discRxPool_numRetx = 0;
libconfig_int discRxPool_numRepetition = 0;
libconfig_int discRxPool_ResourceConfig_prb_Num = 0;
libconfig_int discRxPool_ResourceConfig_prb_Start = 0;
libconfig_int discRxPool_ResourceConfig_prb_End = 0;
const char* discRxPool_ResourceConfig_offsetIndicator_present = NULL;
libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice = 0;
const char* discRxPool_ResourceConfig_subframeBitmap_present = NULL;
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
//For discRxPoolPS
const char* discRxPoolPS_cp_Len = NULL;
const char* discRxPoolPS_discPeriod = NULL;
libconfig_int discRxPoolPS_numRetx = 0;
libconfig_int discRxPoolPS_numRepetition = 0;
libconfig_int discRxPoolPS_ResourceConfig_prb_Num = 0;
libconfig_int discRxPoolPS_ResourceConfig_prb_Start = 0;
libconfig_int discRxPoolPS_ResourceConfig_prb_End = 0;
const char* discRxPoolPS_ResourceConfig_offsetIndicator_present = NULL;
libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice = 0;
const char* discRxPoolPS_ResourceConfig_subframeBitmap_present = NULL;
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
int32_t srb1_timer_poll_retransmit = 0;
int32_t srb1_timer_reordering = 0;
@@ -609,6 +746,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
for (j = 0; j < CCsParamList.numelt ;j++) {
sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j);
LOG_I(RRC, "enb_config::RCconfig_RRC() parameter number: %d, total number of parameters: %zd, ccspath: %s \n \n", j, sizeof(CCsParams)/sizeof(paramdef_t), ccspath);
config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath);
@@ -643,7 +781,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
RC.config_file_name, i, prefix_type);
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (!pbch_repetition)
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
@@ -808,7 +946,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
RC.config_file_name, i, pucch_nCS_AN);
#if !defined(Rel10) && !defined(Rel14)
#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[j] = pucch_n1_AN;
if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047))
@@ -988,7 +1126,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
RC.config_file_name, i, pusch_p0_Nominal);
#ifndef Rel14
#if (RRC_VERSION <= MAKE_VERSION(12, 0, 0))
if (strcmp(pusch_alpha,"AL0")==0) {
RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0;
} else if (strcmp(pusch_alpha,"AL04")==0) {
@@ -1006,7 +1144,9 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
} else if (strcmp(pusch_alpha,"AL1")==0) {
RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1;
}
#else
#endif
#if (RRC_VERSION >= MAKE_VERSION(12, 0, 0))
if (strcmp(pusch_alpha,"AL0")==0) {
RRC_CONFIGURATION_REQ (msg_p).pusch_alpha[j] = Alpha_r12_al0;
} else if (strcmp(pusch_alpha,"AL04")==0) {
@@ -1209,7 +1349,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
switch (rach_preambleTransMax) {
#ifndef Rel14
#if (RRC_VERSION < MAKE_VERSION(14, 0, 0))
case 3:
RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3;
break;
@@ -1439,6 +1579,267 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
RC.config_file_name, i, ue_TransmissionMode);
break;
}
//TTN - for D2D
//SIB18
if (strcmp(rxPool_sc_CP_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(rxPool_sc_CP_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n",
RC.config_file_name, i, rxPool_sc_CP_Len);
if (strcmp(rxPool_sc_Period,"sf40")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf40;
} else if (strcmp(rxPool_sc_Period,"sf60")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf60;
} else if (strcmp(rxPool_sc_Period,"sf70")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf70;
} else if (strcmp(rxPool_sc_Period,"sf80")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf80;
} else if (strcmp(rxPool_sc_Period,"sf120")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf120;
} else if (strcmp(rxPool_sc_Period,"sf140")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf140;
} else if (strcmp(rxPool_sc_Period,"sf160")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf160;
} else if (strcmp(rxPool_sc_Period,"sf240")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf240;
} else if (strcmp(rxPool_sc_Period,"sf280")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf280;
} else if (strcmp(rxPool_sc_Period,"sf320")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf320;
} else if (strcmp(rxPool_sc_Period,"spare6")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare6;
} else if (strcmp(rxPool_sc_Period,"spare5")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare5;
} else if (strcmp(rxPool_sc_Period,"spare4")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare4;
} else if (strcmp(rxPool_sc_Period,"spare3")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare3;
} else if (strcmp(rxPool_sc_Period,"spare2")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare2;
} else if (strcmp(rxPool_sc_Period,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n",
RC.config_file_name, i, rxPool_sc_Period);
if (strcmp(rxPool_data_CP_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(rxPool_data_CP_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n",
RC.config_file_name, i, rxPool_data_CP_Len);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[j] = rxPool_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[j] = rxPool_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[j] = rxPool_ResourceConfig_prb_End;
if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
RC.config_file_name, i, rxPool_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[j] = rxPool_ResourceConfig_offsetIndicator_choice;
if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
RC.config_file_name, i, rxPool_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19 - for discRxPool
if (strcmp(discRxPool_cp_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(discRxPool_cp_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n",
RC.config_file_name, i, discRxPool_cp_Len);
if (strcmp(discRxPool_discPeriod,"rf32")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32;
} else if (strcmp(discRxPool_discPeriod,"rf64")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64;
} else if (strcmp(discRxPool_discPeriod,"rf128")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128;
} else if (strcmp(discRxPool_discPeriod,"rf256")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256;
} else if (strcmp(discRxPool_discPeriod,"rf512")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512;
} else if (strcmp(discRxPool_discPeriod,"rf1024")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
} else if (strcmp(discRxPool_discPeriod,"rf16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
} else if (strcmp(discRxPool_discPeriod,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
RC.config_file_name, i, discRxPool_discPeriod);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[j] = discRxPool_numRetx;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[j] = discRxPool_numRepetition;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[j] = discRxPool_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[j] = discRxPool_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[j] = discRxPool_ResourceConfig_prb_End;
if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
RC.config_file_name, i, discRxPool_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[j] = discRxPool_ResourceConfig_offsetIndicator_choice;
if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
RC.config_file_name, i, discRxPool_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19 - For discRxPoolPS
if (strcmp(discRxPoolPS_cp_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(discRxPoolPS_cp_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n",
RC.config_file_name, i, discRxPoolPS_cp_Len);
if (strcmp(discRxPoolPS_discPeriod,"rf32")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32;
} else if (strcmp(discRxPoolPS_discPeriod,"rf64")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64;
} else if (strcmp(discRxPoolPS_discPeriod,"rf128")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128;
} else if (strcmp(discRxPoolPS_discPeriod,"rf256")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256;
} else if (strcmp(discRxPoolPS_discPeriod,"rf512")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512;
} else if (strcmp(discRxPoolPS_discPeriod,"rf1024")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
} else if (strcmp(discRxPoolPS_discPeriod,"rf16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
} else if (strcmp(discRxPoolPS_discPeriod,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
RC.config_file_name, i, discRxPoolPS_discPeriod);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[j] = discRxPoolPS_numRetx;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[j] = discRxPoolPS_numRepetition;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[j] = discRxPoolPS_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[j] = discRxPoolPS_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[j] = discRxPoolPS_ResourceConfig_prb_End;
if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
RC.config_file_name, i, discRxPoolPS_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[j] = discRxPoolPS_ResourceConfig_offsetIndicator_choice;
if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
RC.config_file_name, i, discRxPoolPS_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
}
}
char srb1path[MAX_OPTNAME_SIZE*2 + 8];
+3 -2
View File
@@ -38,7 +38,7 @@
#include "platform_types.h"
#include "platform_constants.h"
#include "PHY/impl_defs_lte.h"
#include "PHY/defs.h"
#include "PHY/defs_eNB.h"
#include "s1ap_messages_types.h"
#ifdef CMAKER
#include "SystemInformationBlockType2.h"
@@ -47,7 +47,7 @@
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#endif
#include "intertask_interface_types.h"
#include "RRC/LITE/defs.h"
#include "RRC/LTE/rrc_defs.h"
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
struct in_addr inp;\
@@ -97,6 +97,7 @@ extern void RCconfig_RU(void);
extern void RCconfig_flexran(void);
extern void RCconfig_L1(void);
extern void RCconfig_macrlc(void);
extern void UE_config_stub_pnf(void);
extern int RCconfig_gtpu(void );
extern void RCConfig(void);
+128 -7
View File
@@ -35,11 +35,6 @@
#define ENB_CONFIG_STRING_CC_NODE_FUNCTION "node_function"
#define ENB_CONFIG_STRING_CC_NODE_TIMING "node_timing"
#define ENB_CONFIG_STRING_CC_NODE_SYNCH_REF "node_synch_ref"
@@ -259,7 +254,7 @@ typedef enum {
#define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT "pucch_delta_shift"
#define ENB_CONFIG_STRING_PUCCH_NRB_CQI "pucch_nRB_CQI"
#define ENB_CONFIG_STRING_PUCCH_NCS_AN "pucch_nCS_AN"
//#if !defined(Rel10) && !defined(Rel14)
//#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#define ENB_CONFIG_STRING_PUCCH_N1_AN "pucch_n1_AN"
//#endif
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
@@ -310,6 +305,54 @@ typedef enum {
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
//TTN - for D2D
//SIB18
#define ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN "rxPool_sc_CP_Len"
#define ENB_CONFIG_STRING_RXPOOL_SC_PRIOD "rxPool_sc_Period"
#define ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN "rxPool_data_CP_Len"
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_NUM "rxPool_ResourceConfig_prb_Num"
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_START "rxPool_ResourceConfig_prb_Start"
#define ENB_CONFIG_STRING_RXPOOL_RC_PRB_END "rxPool_ResourceConfig_prb_End"
#define ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_PRESENT "rxPool_ResourceConfig_offsetIndicator_present"
#define ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_CHOICE "rxPool_ResourceConfig_offsetIndicator_choice"
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_PRESENT "rxPool_ResourceConfig_subframeBitmap_present"
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_BUF "rxPool_ResourceConfig_subframeBitmap_choice_bs_buf"
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE "rxPool_ResourceConfig_subframeBitmap_choice_bs_size"
#define ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
//SIB19 for DiscRxPool
#define ENB_CONFIG_STRING_DISCRXPOOL_CP_LEN "discRxPool_cp_Len"
#define ENB_CONFIG_STRING_DISCRXPOOL_DISCPERIOD "discRxPool_discPeriod"
#define ENB_CONFIG_STRING_DISCRXPOOL_NUMRETX "discRxPool_numRetx"
#define ENB_CONFIG_STRING_DISCRXPOOL_NUMREPETITION "discRxPool_numRepetition"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_NUM "discRxPool_ResourceConfig_prb_Num"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_START "discRxPool_ResourceConfig_prb_Start"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_END "discRxPool_ResourceConfig_prb_End"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_PRESENT "discRxPool_ResourceConfig_offsetIndicator_present"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_CHOICE "discRxPool_ResourceConfig_offsetIndicator_choice"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_PRESENT "discRxPool_ResourceConfig_subframeBitmap_present"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_BUF "discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE "discRxPool_ResourceConfig_subframeBitmap_choice_bs_size"
#define ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
//SIB19 for DiscRxPoolPS
#define ENB_CONFIG_STRING_DISCRXPOOLPS_CP_LEN "DISCRXPOOLPS_cp_Len"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_DISCPERIOD "DISCRXPOOLPS_discPeriod"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_NUMRETX "DISCRXPOOLPS_numRetx"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_NUMREPETITION "DISCRXPOOLPS_numRepetition"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_NUM "DISCRXPOOLPS_ResourceConfig_prb_Num"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_START "DISCRXPOOLPS_ResourceConfig_prb_Start"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_END "DISCRXPOOLPS_ResourceConfig_prb_End"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_PRESENT "DISCRXPOOLPS_ResourceConfig_offsetIndicator_present"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_CHOICE "DISCRXPOOLPS_ResourceConfig_offsetIndicator_choice"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_PRESENT "DISCRXPOOLPS_ResourceConfig_subframeBitmap_present"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_BUF "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_buf"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_size"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* component carriers configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* init for checkedparam_t structure */
#define CCPARAMS_CHECK { \
@@ -381,11 +424,51 @@ typedef enum {
{ .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} , \
{ .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
}
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* component carriers configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt checked_param */
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CCPARAMS_DESC { \
{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&frame_type, defstrval:"FDD", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&tdd_config, defintval:3, TYPE_UINT, 0}, \
@@ -454,7 +537,45 @@ typedef enum {
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0} \
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN, NULL, 0, strptr:(char **)&rxPool_sc_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_SC_PRIOD, NULL, 0, strptr:(char **)&rxPool_sc_Period, defstrval:"sf40", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN, NULL, 0, strptr:(char **)&rxPool_data_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_NUM, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_START, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_PRB_END, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, strptr:(char **)&rxPool_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, strptr:(char **)&rxPool_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:(char **)&rxPool_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED, NULL, 0, iptr:(int32_t *)&rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_CP_LEN, NULL, 0, strptr:(char **)&discRxPool_cp_Len, defstrval:"normal", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_DISCPERIOD, NULL, 0, strptr:(char **)&discRxPool_discPeriod, defstrval:"rf32", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_NUMRETX, NULL, 0, iptr:(int32_t *)&discRxPool_numRetx, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_NUMREPETITION, NULL, 0, iptr:(int32_t *)&discRxPool_numRepetition, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_NUM, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_START, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_END, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, strptr:(char **)&discRxPool_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, strptr:(char **)&discRxPool_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:(char **)&discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:(int32_t *)&discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_CP_LEN, NULL, 0, strptr:(char **)&discRxPoolPS_cp_Len, defstrval:"normal", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_DISCPERIOD, NULL, 0, strptr:(char **)&discRxPoolPS_discPeriod, defstrval:"rf32", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_NUMRETX, NULL, 0, iptr:(int32_t *)&discRxPoolPS_numRetx, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_NUMREPETITION, NULL, 0, iptr:(int32_t *)&discRxPoolPS_numRepetition, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_NUM, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_START, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_END, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_PRESENT, NULL, 0, strptr:(char **)&discRxPoolPS_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_CHOICE, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_PRESENT, NULL, 0, strptr:(char **)&discRxPoolPS_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:(char **)&discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:(int32_t *)&discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0} \
}
#define ENB_CONFIG_FRAME_TYPE_IDX 0
+3 -3
View File
@@ -35,11 +35,11 @@
#include "flexran_agent_extern.h"
#include "flexran_agent_net_comm.h"
#include "flexran_agent_ran_api.h"
#include "PHY/extern.h"
//#include "PHY/extern.h"
#include "log.h"
#include "SCHED/defs.h"
#include "RRC/LITE/extern.h"
//#include "SCHED/defs.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "rrc_eNB_UE_context.h"
-1
View File
@@ -42,7 +42,6 @@
#include "flexran_agent_defs.h"
#include "enb_config.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/RLC/rlc.h"
# include "tree.h"
+16 -4
View File
@@ -140,7 +140,11 @@ rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logi
rnti_t rnti = flexran_get_ue_crnti(mod_id, ue_id);
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
#ifdef Rel14
,0, 0
#endif
);
return rlc_status.bytes_in_buffer;
}
@@ -149,7 +153,11 @@ rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, lo
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
#ifdef Rel14
,0, 0
#endif
);
return rlc_status.pdus_in_buffer;
}
@@ -158,7 +166,11 @@ frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0
#ifdef Rel14
,0, 0
#endif
);
return rlc_status.head_sdu_creation_time;
}
@@ -1207,7 +1219,7 @@ void flexran_set_pdcp_rx_stat_window(const mid_t mod_id, const mid_t ue_id, uint
/*PDCP num tx pdu status flexRAN*/
uint32_t flexran_get_pdcp_tx(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){
if (mod_id <0 || mod_id> MAX_NUM_CCs || ue_id<0 || ue_id> NUMBER_OF_UE_MAX || lcid<0 || lcid>NB_RB_MAX)
if (mod_id <0 || mod_id> MAX_NUM_CCs || ue_id<0 || ue_id> MAX_MOBILES_PER_ENB || lcid<0 || lcid>NB_RB_MAX)
return -1;
return Pdcp_stats_tx[mod_id][ue_id][lcid];
}
+4 -5
View File
@@ -36,14 +36,13 @@
#include "enb_config.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/RLC/rlc.h"
#include "SCHED/defs.h"
#include "SCHED/sched_eNB.h"
#include "pdcp.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "RRC/LITE/rrc_eNB_UE_context.h"
#include "PHY/extern.h"
#include "RRC/LTE/rrc_eNB_UE_context.h"
#include "PHY/phy_extern.h"
#include "log.h"
/****************************
+22 -23
View File
@@ -32,25 +32,24 @@
#include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h"
#include "SCHED/defs.h"
#include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
#include "PRACH-ConfigSIB-v1310.h"
#endif
#include "MeasGapConfig.h"
#include "MeasObjectToAddModList.h"
#include "TDD-Config.h"
#include "MAC-MainConfig.h"
#include "defs.h"
#include "proto.h"
#include "extern.h"
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/ran_context.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-AreaInfo-r9.h"
#include "MBSFN-SubframeConfigList.h"
@@ -194,7 +193,7 @@ void config_mib(int Mod_idP,
int p_eNBP,
uint32_t dl_CarrierFreqP,
uint32_t ul_CarrierFreqP
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint32_t pbch_repetitionP
#endif
@@ -266,14 +265,14 @@ void config_mib(int Mod_idP,
cfg->sch_config.physical_cell_id.tl.tag = NFAPI_SCH_CONFIG_PHYSICAL_CELL_ID_TAG;
cfg->num_tlv++;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
cfg->emtc_config.pbch_repetitions_enable_r13.value = pbch_repetitionP;
cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG;
cfg->num_tlv++;
#endif
LOG_I(MAC,
"%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d"
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
" PBCH repetition %d"
#endif
@@ -291,7 +290,7 @@ void config_mib(int Mod_idP,
,cfg->sch_config.primary_synchronization_signal_epre_eprers.value
,cfg->sch_config.secondary_synchronization_signal_epre_eprers.value
,cfg->sch_config.physical_cell_id.value
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,cfg->emtc_config.pbch_repetitions_enable_r13.value
#endif
);
@@ -330,7 +329,7 @@ void
config_sib2(int Mod_idP,
int CC_idP,
RadioResourceConfigCommonSIB_t * radioResourceConfigCommonP,
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
RadioResourceConfigCommonSIB_t * radioResourceConfigCommon_BRP,
#endif
ARFCN_ValueEUTRA_t *ul_CArrierFreqP,
@@ -446,7 +445,7 @@ config_sib2(int Mod_idP,
cfg->num_tlv++;
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.schedulingInfoSIB1_BR_r13 > 0) {
AssertFatal(radioResourceConfigCommon_BRP != NULL, "radioResource rou is missing\n");
AssertFatal(radioResourceConfigCommon_BRP->ext4 != NULL, "ext4 is missing\n");
@@ -677,20 +676,20 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
int physCellId,
int p_eNB,
int Ncp, int eutra_band, uint32_t dl_CarrierFreq,
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int pbch_repetition,
#endif
rnti_t rntiP,
BCCH_BCH_Message_t * mib,
RadioResourceConfigCommonSIB_t *
radioResourceConfigCommon,
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
RadioResourceConfigCommonSIB_t *
radioResourceConfigCommon_BR,
#endif
struct PhysicalConfigDedicated
*physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
SCellToAddMod_r10_t * sCellToAddMod_r10,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -708,12 +707,12 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
additionalSpectrumEmission,
struct MBSFN_SubframeConfigList
*mbsfn_SubframeConfigList
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
, uint8_t MBMS_Flag,
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
PMCH_InfoList_r9_t * pmch_InfoList
#endif
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,
SystemInformationBlockType1_v1310_IEs_t *
sib1_v13ext
@@ -764,7 +763,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
p_eNB,
dl_CarrierFreq,
ul_CarrierFreq
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, pbch_repetition
#endif
);
@@ -776,7 +775,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList = schedulingInfoList;
config_sib1(Mod_idP,CC_idP,tdd_Config);
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if (sib1_v13ext != NULL) {
RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext;
}
@@ -835,7 +834,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
dl_Bandwidth;
config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
radioResourceConfigCommon_BR,
#endif
NULL, ul_Bandwidth, additionalSpectrumEmission,
@@ -877,7 +876,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (sCellToAddMod_r10 != NULL) {
UE_id = find_UE_id(Mod_idP, rntiP);
@@ -910,11 +909,11 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
subframeAllocation.choice.oneFrame.buf[0]);
}
#ifdef Rel10
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
RC.mac[Mod_idP]->common_channels[0].MBMS_flag = MBMS_Flag;
#endif
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (mbsfn_AreaInfoList != NULL) {
// One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time
+56 -18
View File
@@ -32,25 +32,26 @@
#include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h"
#include "SCHED/defs.h"
#include "SCHED_UE/sched_UE.h"
#include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
#include "PRACH-ConfigSIB-v1310.h"
#endif
#include "MeasGapConfig.h"
#include "MeasObjectToAddModList.h"
#include "TDD-Config.h"
#include "MAC-MainConfig.h"
#include "defs.h"
#include "proto.h"
#include "extern.h"
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY/INIT/phy_init.h"
#include "common/ran_context.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-AreaInfo-r9.h"
#include "MBSFN-SubframeConfigList.h"
@@ -60,6 +61,8 @@
extern void mac_init_cell_params(int Mod_idP,int CC_idP);
extern void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
extern uint8_t nfapi_mode;
/* sec 5.9, 36.321: MAC Reset Procedure */
void ue_mac_reset(module_id_t module_idP, uint8_t eNB_index)
@@ -108,7 +111,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
radioResourceConfigCommon,
struct PhysicalConfigDedicated
*physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
SCellToAddMod_r10_t * sCellToAddMod_r10,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -127,13 +130,18 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
additionalSpectrumEmission,
struct MBSFN_SubframeConfigList
*mbsfn_SubframeConfigList
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
, uint8_t MBMS_Flag,
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
PMCH_InfoList_r9_t * pmch_InfoList
#endif
#ifdef CBA
, uint8_t num_active_cba_groups, uint16_t cba_rnti
#endif
#if defined(Rel14)
,config_action_t config_action
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
)
{
@@ -211,7 +219,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
} else {
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer =
#ifndef Rel14
#if (RRC_VERSION < MAKE_VERSION(12, 0, 0))
(uint16_t)
MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
#else
@@ -228,16 +236,17 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
(uint16_t)
MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
}
phy_config_harq_ue(Mod_idP, 0, eNB_index,
UE_mac_inst[Mod_idP].
scheduling_info.maxHARQ_Tx);
if(nfapi_mode!=3)
phy_config_harq_ue(Mod_idP, 0, eNB_index,
UE_mac_inst[Mod_idP].
scheduling_info.maxHARQ_Tx);
if (mac_MainConfig->ul_SCH_Config->retxBSR_Timer) {
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
(uint16_t) mac_MainConfig->ul_SCH_Config->
retxBSR_Timer;
} else {
#ifndef Rel14
#if (RRC_VERSION < MAKE_VERSION(12, 0, 0))
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
(uint16_t)
MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
@@ -247,7 +256,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
#endif
}
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (mac_MainConfig->ext1
&& mac_MainConfig->ext1->sr_ProhibitTimer_r9) {
@@ -348,11 +357,12 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
if (physicalConfigDedicated != NULL) {
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
physicalConfigDedicated);
if(nfapi_mode!=3)
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
physicalConfigDedicated);
UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (sCellToAddMod_r10 != NULL) {
@@ -522,7 +532,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
// UE_mac_inst[Mod_idP].mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]);
}
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (mbsfn_AreaInfoList != NULL) {
LOG_I(MAC, "[UE %d][CONFIG] Received %d MBSFN Area Info\n",
@@ -579,6 +589,34 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
//for D2D
#if defined(Rel10) || defined(Rel14)
switch (config_action) {
case CONFIG_ACTION_ADD:
if (sourceL2Id){
UE_mac_inst[Mod_idP].sourceL2Id = *sourceL2Id;
LOG_I(MAC,"[UE %d] Configure source L2Id 0x%08x \n", Mod_idP, *sourceL2Id );
}
if (destinationL2Id) {
LOG_I(MAC,"[UE %d] Configure destination L2Id 0x%08x\n", Mod_idP, *destinationL2Id );
int j = 0;
int i = 0;
for (i=0; i< MAX_NUM_DEST; i++) {
if ((UE_mac_inst[Mod_idP].destinationList[i] == 0) && (j == 0)) j = i+1;
if (UE_mac_inst[Mod_idP].destinationList[i] == *destinationL2Id) break; //destination already exists!
}
if ((i == MAX_NUM_DEST) && (j > 0)) UE_mac_inst[Mod_idP].destinationList[j-1] = *destinationL2Id;
UE_mac_inst[Mod_idP].numCommFlows++;
}
break;
case CONFIG_ACTION_REMOVE:
//TODO
break;
default:
break;
}
#endif
return (0);
}
+6 -6
View File
@@ -98,7 +98,7 @@ typedef enum{
DL
}message_direction_t;
#define MAX_NUMBER_OF_UE_MAX_NB_IoT 20
#define MAX_MAX_MOBILES_PER_ENB_NB_IoT 20
#define SCH_PAYLOAD_SIZE_MAX_NB_IoT 320
#define MAX_NUMBER_OF_SIBs_NB_IoT 16
@@ -233,17 +233,17 @@ typedef struct{
typedef struct {
/// DCI template and MAC connection parameters for UEs
UE_TEMPLATE_NB_IoT UE_template_NB_IoT[MAX_NUMBER_OF_UE_MAX_NB_IoT];
UE_TEMPLATE_NB_IoT UE_template_NB_IoT[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
/// NPDCCH Period and searching space info
NPDCCH_config_dedicated_NB_IoT_t NPDCCH_config_dedicated;
//int next[MAX_NUMBER_OF_UE_MAX_NB_IoT];
//int next[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
// -1:No UE in list
int head;
// -1:No UE in list
int tail;
int num_UEs;
//boolean_t active[MAX_NUMBER_OF_UE_MAX_NB_IoT];
//boolean_t active[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
} UE_list_NB_IoT_t;
@@ -261,7 +261,7 @@ typedef struct{
// flag to indicate scheduling type1 NPDCCH CSS with different CE level
uint8_t flag_type1_css[3];
// flag to indicate scheduling NPDCCH USS with UE list
uint8_t flag_uss[MAX_NUMBER_OF_UE_MAX_NB_IoT];
uint8_t flag_uss[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
// flag to indicate scheduling sib1/MIB
uint8_t flag_fix_scheduling;
// number of the type2 css to schedule in this period
@@ -494,7 +494,7 @@ typedef struct eNB_MAC_INST_NB_IoT_s {
RA_template_list_t RA_msg3_list;
RA_template_list_t RA_msg4_list;
RA_TEMPLATE_NB_IoT RA_template[MAX_NUMBER_OF_UE_MAX_NB_IoT];
RA_TEMPLATE_NB_IoT RA_template[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
//int32_t last_tx_subframe;
+91 -94
View File
@@ -30,23 +30,18 @@
*/
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/mac_proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
@@ -60,6 +55,8 @@
#include "intertask_interface.h"
#endif
#include "assertions.h"
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
@@ -108,9 +105,8 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
if ((1 << tmp) & deltaTSFC) {
// This is an SRS subframe, loop over UEs
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE)
continue;
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (!RC.mac[module_idP]->UE_list.active[UE_id]) continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
@@ -170,9 +166,8 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
cc = &eNB->common_channels[CC_id];
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (UE_list->active[UE_id] != TRUE)
continue;
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (!UE_list->active[UE_id]) continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
@@ -211,7 +206,7 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
ul_req->number_of_pdus++;
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
// PUT rel10-13 UCI options here
#endif
} else
@@ -256,8 +251,8 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE) continue;
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (!RC.mac[module_idP]->UE_list.active[UE_id]) continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id];
ul_req_body = &ul_req->ul_config_request_body;
@@ -314,7 +309,7 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
LOG_D(MAC,"Frame %d, Subframe %d : Scheduling SR for UE %d/%x is_harq:%d\n",frameP,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].rnti, is_harq);
// check Rel10 or Rel8 SR
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if ((UE_list-> UE_template[CC_id][UE_id].physicalConfigDedicated->ext2)
&& (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)
&& (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) {
@@ -527,7 +522,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
memset(cc[CC_id].vrb_map_UL, 0, 100);
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
cc[CC_id].mcch_active = 0;
#endif
@@ -535,91 +530,93 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
}
// refresh UE list based on UEs dropped by PHY in previous subframe
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if (UE_list->active[i] != TRUE)
continue;
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_list->active[i]) {
rnti = UE_RNTI(module_idP, i);
CC_id = UE_PCCID(module_idP, i);
if (((frameP&127) == 0) && (subframeP == 0)) {
LOG_I(MAC,
"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n",
rnti,
UE_list->UE_sched_ctrl[i].ul_out_of_sync ==
0 ? "in synch" : "out of sync",
UE_list->UE_template[CC_id][i].phr_info,
UE_list->UE_sched_ctrl[i].dl_cqi[CC_id],
(UE_list->UE_sched_ctrl[i].pusch_snr[CC_id] - 128) / 2,
(UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 128) / 2);
}
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP * 10) +
subframeP] = -63;
if (i == UE_list->head)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
RC.eNB[module_idP][CC_id]->
pusch_stats_bsr[i][(frameP * 10) + subframeP]);
// increment this, it is cleared when we receive an sdu
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ul_inactivity_timer++;
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer++;
LOG_D(MAC, "UE %d/%x : ul_inactivity %d, cqi_req %d\n", i, rnti,
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].
ul_inactivity_timer,
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer);
check_ul_failure(module_idP, CC_id, i, frameP, subframeP);
if (RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer > 0) {
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer++;
if(RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer >=
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer_thres) {
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer = 0;
for (int ue_id_l = 0; ue_id_l < NUMBER_OF_UE_MAX; ue_id_l++) {
if (reestablish_rnti_map[ue_id_l][0] == rnti) {
// clear currentC-RNTI from map
reestablish_rnti_map[ue_id_l][0] = 0;
reestablish_rnti_map[ue_id_l][1] = 0;
break;
rnti = UE_RNTI(module_idP, i);
CC_id = UE_PCCID(module_idP, i);
if (((frameP&127) == 0) && (subframeP == 0)) {
LOG_I(MAC,
"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n",
rnti,
UE_list->UE_sched_ctrl[i].ul_out_of_sync ==
0 ? "in synch" : "out of sync",
UE_list->UE_template[CC_id][i].phr_info,
UE_list->UE_sched_ctrl[i].dl_cqi[CC_id],
(UE_list->UE_sched_ctrl[i].pusch_snr[CC_id] - 128) / 2,
(UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 128) / 2);
}
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP * 10) +
subframeP] = -63;
if (i == UE_list->head)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
RC.eNB[module_idP][CC_id]->
pusch_stats_bsr[i][(frameP * 10) + subframeP]);
// increment this, it is cleared when we receive an sdu
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ul_inactivity_timer++;
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer++;
LOG_D(MAC, "UE %d/%x : ul_inactivity %d, cqi_req %d\n", i, rnti,
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].
ul_inactivity_timer,
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer);
check_ul_failure(module_idP, CC_id, i, frameP, subframeP);
if (RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer > 0) {
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer++;
if(RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer >=
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer_thres) {
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer = 0;
for (int ue_id_l = 0; ue_id_l < MAX_MOBILES_PER_ENB; ue_id_l++) {
if (reestablish_rnti_map[ue_id_l][0] == rnti) {
// clear currentC-RNTI from map
reestablish_rnti_map[ue_id_l][0] = 0;
reestablish_rnti_map[ue_id_l][1] = 0;
break;
}
}
}
for (int ii=0; ii<NUMBER_OF_UE_MAX; ii++) {
LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii];
if((ulsch != NULL) && (ulsch->rnti == rnti)){
LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
clean_eNb_ulsch(ulsch);
// Note: This should not be done in the MAC!
for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) {
LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii];
if((ulsch != NULL) && (ulsch->rnti == rnti)){
void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
clean_eNb_ulsch(ulsch);
}
}
}
for (int ii=0; ii<NUMBER_OF_UE_MAX; ii++) {
LTE_eNB_DLSCH_t *dlsch = RC.eNB[module_idP][CC_id]->dlsch[ii][0];
if((dlsch != NULL) && (dlsch->rnti == rnti)){
LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
clean_eNb_dlsch(dlsch);
for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) {
LTE_eNB_DLSCH_t *dlsch = RC.eNB[module_idP][CC_id]->dlsch[ii][0];
if((dlsch != NULL) && (dlsch->rnti == rnti)){
void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
clean_eNb_dlsch(dlsch);
}
}
}
for(int j = 0; j < 10; j++){
nfapi_ul_config_request_body_t *ul_req_tmp = NULL;
ul_req_tmp = &RC.mac[module_idP]->UL_req_tmp[CC_id][j].ul_config_request_body;
if(ul_req_tmp){
int pdu_number = ul_req_tmp->number_of_pdus;
for(int pdu_index = pdu_number-1; pdu_index >= 0; pdu_index--){
if(ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == rnti){
LOG_I(MAC, "remove UE %x from ul_config_pdu_list %d/%d\n", rnti, pdu_index, pdu_number);
if(pdu_index < pdu_number -1){
memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index+1], (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
for(int j = 0; j < 10; j++){
nfapi_ul_config_request_body_t *ul_req_tmp = NULL;
ul_req_tmp = &RC.mac[module_idP]->UL_req_tmp[CC_id][j].ul_config_request_body;
if(ul_req_tmp){
int pdu_number = ul_req_tmp->number_of_pdus;
for(int pdu_index = pdu_number-1; pdu_index >= 0; pdu_index--){
if(ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == rnti){
LOG_I(MAC, "remove UE %x from ul_config_pdu_list %d/%d\n", rnti, pdu_index, pdu_number);
if(pdu_index < pdu_number -1){
memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index+1], (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
}
ul_req_tmp->number_of_pdus--;
}
ul_req_tmp->number_of_pdus--;
}
}
}
}
rrc_mac_remove_ue(module_idP,rnti);
}
}
}
}
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES,
NOT_A_RNTI, frameP, subframeP,
module_idP);
@@ -628,7 +625,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
rrc_rx_tx(&ctxt, CC_id);
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
if (cc[CC_id].MBMS_flag > 0) {
+69 -35
View File
@@ -34,24 +34,20 @@
#include "assertions.h"
#include "platform_types.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "msc.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/mac_proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
@@ -61,10 +57,14 @@
#include "intertask_interface.h"
#endif
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "T.h"
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
extern uint8_t nfapi_mode;
extern int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
@@ -118,7 +118,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
AssertFatal(ra->state != IDLE, "RA is not active for RA %X\n",
ra->rnti);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (ra->rach_resource_type > 0) {
LOG_D(MAC,
"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n",
@@ -174,9 +174,9 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
ra->Msg3_subframe);
LOG_D(MAC,
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d)\n",
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d) for rnti: %d\n",
frameP, subframeP, ra->Msg3_frame, ra->Msg3_subframe,
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round);
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round, ra->rnti);
ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus];
@@ -267,7 +267,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int rmax = 0;
int rep = 0;
int reps = 0;
@@ -620,7 +620,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
uint8_t offset;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int rmax = 0;
int rep = 0;
int reps = 0;
@@ -698,7 +698,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
else
ra->harq_pid = ((frameP * 10) + subframeP) & 7;
// Get RRCConnectionSetup for Piggyback
/* // Get RRCConnectionSetup for Piggyback
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
@@ -708,10 +708,10 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);*/
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (ra->rach_resource_type > 0) {
// Generate DCI + repetitions first
@@ -817,6 +817,20 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
// Program PDSCH
// Get RRCConnectionSetup for Piggyback
/*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
AssertFatal(rrc_sdu_length > 0,
"[MAC][eNB Scheduler] CCCH not allocated\n");
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 BR with RRC Piggyback (ce_level %d RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP,
@@ -978,8 +992,27 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
} // rach_resource_type > 0
else
#endif
{ // This is normal LTE case
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
{
// This is normal LTE case
LOG_D(MAC, "Panos-D: generate_Msg4 1 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
// Get RRCConnectionSetup for Piggyback
/*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
AssertFatal(rrc_sdu_length > 0,
"[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length);
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti);
@@ -1185,7 +1218,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
int round;
/*
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
COMMON_channels_t *cc = mac->common_channels;
int rmax = 0;
@@ -1233,12 +1266,12 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d)\n",
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round);
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d), UE_id: %d \n",
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round, UE_id);
if (round != 8) {
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (ra->rach_resource_type > 0) {
AssertFatal(1 == 0,
"Msg4 Retransmissions not handled yet for BL/CE UEs\n");
@@ -1283,6 +1316,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
ra->rnti, round, frameP, subframeP);
// DLSCH Config
//DJP - fix this pdu_index = -1
LOG_D(MAC, "Panos:D: check_Msg4_retransmission() before fill_nfapi_dlsch_config() with pdu_index = -1 \n");
fill_nfapi_dlsch_config(mac, dl_req_body, ra->msg4_TBsize,
-1
/* retransmission, no pdu_index */
@@ -1393,7 +1427,7 @@ initiate_ra_proc(module_id_t module_idP,
sub_frame_t subframeP,
uint16_t preamble_index,
int16_t timing_offset, uint16_t ra_rnti
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, uint8_t rach_resource_type
#endif
)
@@ -1404,7 +1438,7 @@ initiate_ra_proc(module_id_t module_idP,
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
RA_t *ra = &cc->ra[0];
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
struct PRACH_ConfigSIB_v1310 *ext4_prach = NULL;
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL;
@@ -1415,12 +1449,12 @@ initiate_ra_proc(module_id_t module_idP,
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
}
#endif /* Rel14 */
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n",
module_idP, CC_id, frameP, subframeP, preamble_index);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n",
module_idP, CC_id, frameP, subframeP, rach_resource_type);
@@ -1430,7 +1464,7 @@ initiate_ra_proc(module_id_t module_idP,
uint16_t msg2_subframe = subframeP;
int offset;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if (prach_ParametersListCE_r13 &&
prach_ParametersListCE_r13->list.count < rach_resource_type) {
@@ -1441,7 +1475,7 @@ initiate_ra_proc(module_id_t module_idP,
return;
}
#endif /* Rel14 */
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0);
@@ -1454,7 +1488,7 @@ initiate_ra_proc(module_id_t module_idP,
ra[i].state = MSG2;
ra[i].timing_offset = timing_offset;
ra[i].preamble_subframe = subframeP;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
ra[i].rach_resource_type = rach_resource_type;
ra[i].msg2_mpdcch_repetition_cnt = 0;
ra[i].msg4_mpdcch_repetition_cnt = 0;
@@ -1477,18 +1511,18 @@ initiate_ra_proc(module_id_t module_idP,
/* TODO: find better procedure to allocate RNTI */
do {
#if defined(USRP_REC_PLAY) // deterministic rnti in usrp record/playback mode
static int drnti[NUMBER_OF_UE_MAX] = { 0xbda7, 0x71da, 0x9c40, 0xc350, 0x2710, 0x4e20, 0x7530, 0x1388, 0x3a98, 0x61a8, 0x88b8, 0xafc8, 0xd6d8, 0x1b58, 0x4268, 0x6978 };
static int drnti[MAX_MOBILES_PER_ENB] = { 0xbda7, 0x71da, 0x9c40, 0xc350, 0x2710, 0x4e20, 0x7530, 0x1388, 0x3a98, 0x61a8, 0x88b8, 0xafc8, 0xd6d8, 0x1b58, 0x4268, 0x6978 };
int j = 0;
int nb_ue = 0;
for (j = 0; j < NUMBER_OF_UE_MAX; j++) {
for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
if (UE_RNTI(module_idP, j) > 0) {
nb_ue++;
} else {
break;
}
}
if (nb_ue >= NUMBER_OF_UE_MAX) {
printf("No more free RNTI available, increase NUMBER_OF_UE_MAX\n");
if (nb_ue >= MAX_MOBILES_PER_ENB) {
printf("No more free RNTI available, increase MAX_MOBILES_PER_ENB\n");
abort();
}
ra[i].rnti = drnti[nb_ue];
+10 -15
View File
@@ -30,22 +30,16 @@
*/
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
@@ -58,11 +52,14 @@
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
// NEED TO ADD schedule_SI_BR for SIB1_BR and SIB23_BR
// CCE_allocation_infeasible to be done for EPDCCH/MPDCCH
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#define size_Sj25 2
int Sj25[size_Sj25] = { 0, 3 };
@@ -84,7 +81,6 @@ schedule_SIB1_BR(module_id_t module_idP,
frame_t frameP, sub_frame_t subframeP)
//------------------------------------------------------------------------------
{
int8_t bcch_sdu_length;
int CC_id;
eNB_MAC_INST *eNB = RC.mac[module_idP];
@@ -509,7 +505,6 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
void
schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
{
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc;
nfapi_dl_config_request_pdu_t *dl_config_pdu;
@@ -538,7 +533,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length);
if ((frameP & 1023) < 40)
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LOG_D(MAC,
"[eNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n",
module_idP, frameP, CC_id, mib_sdu_length,
@@ -794,7 +789,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
}
}
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
schedule_SIB1_BR(module_idP, frameP, subframeP);
schedule_SI_BR(module_idP, frameP, subframeP);
#endif
+44 -19
View File
@@ -29,29 +29,26 @@
*/
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "assertions.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
@@ -1007,7 +1004,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// RLC data on DCCH
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
TBS - ta_len - header_length_total - sdu_length_total - 3);
TBS - ta_len - header_length_total - sdu_length_total - 3
#ifdef Rel14
,0, 0
#endif
);
sdu_lengths[0] = 0;
@@ -1018,7 +1019,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
TBS, //not used
(char *)&dlsch_buffer[0]);
(char *)&dlsch_buffer[0]
#ifdef Rel14
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
@@ -1057,7 +1062,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// RLC data on DCCH1
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
TBS - ta_len - header_length_total - sdu_length_total - 3);
TBS - ta_len - header_length_total - sdu_length_total - 3
#ifdef Rel14
,0, 0
#endif
);
// DCCH SDU
sdu_lengths[num_sdus] = 0;
@@ -1069,7 +1078,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]);
(char *)&dlsch_buffer[sdu_length_total]
#ifdef Rel14
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
@@ -1099,6 +1112,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
LOG_T(MAC, "\n");
#endif
}
}
@@ -1119,7 +1133,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS - ta_len - header_length_total - sdu_length_total - 3);
TBS - ta_len - header_length_total - sdu_length_total - 3
#ifdef Rel14
,0, 0
#endif
);
@@ -1133,7 +1151,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]);
(char *)&dlsch_buffer[sdu_length_total]
#ifdef Rel14
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
@@ -1505,7 +1527,6 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
} // CC_id loop
fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_flag);
stop_meas(&eNB->schedule_dlsch);
@@ -1777,7 +1798,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
vrb_map = (void*)&cc->vrb_map;
n_rb_dl = to_prb(cc->mib->message.dl_Bandwidth);
dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
for (uint16_t i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (uint16_t i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_PF_PO[CC_id][i].enable_flag != TRUE) {
continue;
}
@@ -1992,11 +2013,15 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
// Rel10 fields
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
#endif
// Rel13 fields
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;
#endif
if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, P_RNTI)) {
LOG_D(MAC,"Frame %d: Subframe %d : Adding common DCI for P_RNTI\n", frameP,subframeP);
+26 -18
View File
@@ -29,40 +29,37 @@
*/
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#include "assertions.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
#endif
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "SIMULATION/TOOLS/sim.h" // for taus
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
int8_t
get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
uint8_t mbsfn_sync_area)
@@ -588,7 +585,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
TBS =
get_TBS_DL(cc->MCH_pdu.mcs, to_prb(cc->mib->message.dl_Bandwidth));
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
// do not let mcch and mtch multiplexing when relaying is active
// for sync area 1, so not transmit data
//if ((i == 0) && ((RC.mac[module_idP]->MBMS_flag != multicast_relay) || (RC.mac[module_idP]->mcch_active==0))) {
@@ -635,7 +632,12 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
MTCH,
TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch);
sdu_length_total - header_len_mtch
#ifdef Rel14
,0, 0
#endif
);
LOG_D(MAC,
"e-MBMS log channel %u frameP %d, subframeP %d, rlc_status.bytes_in_buffer is %d\n",
MTCH, frameP, subframeP, rlc_status.bytes_in_buffer);
@@ -649,9 +651,15 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES, MTCH, 0, //not used
(char *)
&mch_buffer
[sdu_length_total]);
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(NUMBER_OF_UE_MAX+1)), (char*)&mch_buffer[sdu_length_total]);
&mch_buffer[sdu_length_total]
#ifdef Rel14
,0,
0
#endif
);
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(MAX_MOBILES_PER_ENB+1)), (char*)&mch_buffer[sdu_length_total]);
LOG_I(MAC,
"[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n",
module_idP, CC_id, sdu_lengths[num_sdus], MTCH);
@@ -668,7 +676,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
header_len_mtch = 0;
}
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
// }
#endif
+8 -8
View File
@@ -30,22 +30,22 @@
*/
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "PHY/defs_eNB.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "SCHED/sched_eNB.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "T.h"
+31 -29
View File
@@ -30,23 +30,18 @@
*/
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/mac_proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
@@ -61,6 +56,10 @@
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
extern int n_active_slices;
int choose(int n, int k)
@@ -891,7 +890,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
else if (ri >= 2 && cc->p_eNB == 4)
return (4 + (N << 1) + 4 + (N << 1) + 4);
break;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(12, 5, 0))
case CQI_ReportModeAperiodic_rm32_v1250:
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9
|| tmode == 10,
@@ -925,7 +924,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
return (4 + 4 + 4);
break;
#endif /* Rel14 */
#endif /* #if (RRC_VERSION >= MAKE_VERSION(12, 5, 0)) */
}
AssertFatal(1 == 0, "Shouldn't get here\n");
return (0);
@@ -984,6 +983,8 @@ get_rel8_dl_cqi_pmi_size(UE_sched_ctrl * sched_ctl, int CC_idP,
cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present);
}
void
fill_nfapi_dl_dci_1A(nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint8_t aggregation_level,
@@ -1031,7 +1032,7 @@ program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP,
nfapi_ul_config_ulsch_harq_information *ulsch_harq_information = NULL;
nfapi_ul_config_harq_information *harq_information = NULL;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 2, 0))
if ((UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2)
&& (UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020)
@@ -1201,12 +1202,15 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pusch_ConfigDedicated) != NULL,
"physicalConfigDedicated->puschConfigDedicated for rnti %x is null\n",
rntiP);
#if defined(Rel14) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 2, 0))
/* if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2) puschConfigDedicated_v1020 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2->pusch_ConfigDedicated_v1020;
#endif
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(11, 3, 0))
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4) puschConfigDedicated_v1130 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4->pusch_ConfigDedicated_v1130;
#endif
#if (RRC_VERSION >= MAKE_VERSION(12, 5, 0))
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5) puschConfigDedicated_v1250 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5->pusch_ConfigDedicated_v1250;
#endif
*/
#endif
harq_information->harq_information_rel10.delta_offset_harq = puschConfigDedicated->betaOffset_ACK_Index;
@@ -1522,7 +1526,7 @@ fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_config_pd
}
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
void
fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *
ul_config_pdu, uint8_t ue_type,
@@ -1666,7 +1670,7 @@ void init_ue_sched_info(void)
for (i = 0; i < NUMBER_OF_eNB_MAX; i++) {
for (k = 0; k < MAX_NUM_CCs; k++) {
for (j = 0; j < NUMBER_OF_UE_MAX; j++) {
for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
// init DL
eNB_dlsch_info[i][k][j].weight = 0;
eNB_dlsch_info[i][k][j].subframe = 0;
@@ -1697,7 +1701,7 @@ int find_UE_id(module_id_t mod_idP, rnti_t rntiP)
int UE_id;
UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list;
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_list->active[UE_id] != TRUE)
continue;
if (UE_list->UE_template[UE_PCCID(mod_idP, UE_id)][UE_id].rnti ==
@@ -1823,7 +1827,7 @@ void dump_ue_list(UE_list_t * listP, int ul_flag)
}
int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, uint8_t rach_resource_type
#endif
)
@@ -1838,7 +1842,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
mod_idP, cc_idP, rntiP, UE_list->avail, UE_list->num_UEs);
dump_ue_list(UE_list, 0);
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_list->active[i] == TRUE)
continue;
UE_id = i;
@@ -1857,7 +1861,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
UE_list->UE_template[cc_idP][UE_id].pre_assigned_mcs_ul = 0;
#endif
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
UE_list->UE_template[cc_idP][UE_id].rach_resource_type =
rach_resource_type;
#endif
@@ -2324,9 +2328,7 @@ int get_bw_index(module_id_t module_id, uint8_t CC_id)
{
int bw_index = 0;
int N_RB_DL =
to_prb(RC.mac[module_id]->common_channels[CC_id].mib->
message.dl_Bandwidth);
int N_RB_DL = to_prb(RC.mac[module_id]->common_channels[CC_id].mib->message.dl_Bandwidth);
switch (N_RB_DL) {
case 6: // 1.4 MHz
@@ -2359,9 +2361,7 @@ int get_bw_index(module_id_t module_id, uint8_t CC_id)
int get_min_rb_unit(module_id_t module_id, uint8_t CC_id)
{
int min_rb_unit = 0;
int N_RB_DL =
to_prb(RC.mac[module_id]->common_channels[CC_id].mib->
message.dl_Bandwidth);
int N_RB_DL = to_prb(RC.mac[module_id]->common_channels[CC_id].mib->message.dl_Bandwidth);
switch (N_RB_DL) {
case 6: // 1.4 MHz
@@ -3201,7 +3201,7 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
int i, j;
uint8_t *pdu;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if (UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated != NULL &&
UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated->pucch_ConfigDedicated != NULL &&
(UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated->ext7)
@@ -3945,7 +3945,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
}
break;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(12, 5, 0))
case CQI_ReportModeAperiodic_rm32_v1250:
AssertFatal(tmode == 4 || tmode == 5 || tmode == 6 || tmode == 8
|| tmode == 9
@@ -3954,6 +3954,8 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
tmode);
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm32 to be done\n");
break;
#endif
#if (RRC_VERSION >= MAKE_VERSION(13, 1, 0))
case CQI_ReportModeAperiodic_rm10_v1310:
AssertFatal(tmode == 1 || tmode == 2 || tmode == 3
|| tmode == 7,
@@ -3969,7 +3971,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
tmode);
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm11 to be done\n");
break;
#endif /* Rel14 */
#endif /* #if (RRC_VERSION >= MAKE_VERSION(13, 1, 0)) */
}
}
+10 -13
View File
@@ -31,25 +31,22 @@
/* indented with: indent -kr eNB_scheduler_RA.c */
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "assertions.h"
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
@@ -144,7 +141,7 @@ rx_sdu(const module_id_t enb_mod_idP,
start_meas(&mac->rx_ulsch_sdu);
if ((UE_id > NUMBER_OF_UE_MAX) || (UE_id == -1))
if ((UE_id > MAX_MOBILES_PER_ENB) || (UE_id == -1))
for (ii = 0; ii < NB_RB_MAX; ii++) {
rx_lengths[ii] = 0;
}
@@ -547,7 +544,7 @@ rx_sdu(const module_id_t enb_mod_idP,
if ((UE_id = add_new_ue(enb_mod_idP, CC_idP,
mac->common_channels[CC_idP].
ra[ii].rnti, harq_pid
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
mac->common_channels[CC_idP].
ra[ii].rach_resource_type
@@ -1438,7 +1435,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
mcs_UL[harq_pid],
rb_table
[rb_table_index]));
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (UE_template->rach_resource_type > 0) { // This is a BL/CE UE allocation
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_tmp_body->number_of_pdus], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions
1, //repetition_number
@@ -1521,7 +1518,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
0, // n_srs
UE_template->
TBS_UL[harq_pid]);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (UE_template->rach_resource_type > 0) { // This is a BL/CE UE allocation
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_tmp_body->number_of_pdus], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions
1, //repetition_number
+49 -3
View File
@@ -29,10 +29,10 @@
*/
#include "defs.h"
#include "extern.h"
#include "mac.h"
#include "mac_extern.h"
#include "UTIL/LOG/log.h"
#include "proto.h"
#include "mac_proto.h"
int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP, uint8_t CC_id)
{
@@ -54,6 +54,52 @@ int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP, uint8_t CC_id)
1) + get_DELTA_PREAMBLE(module_idP, CC_id));
}
int8_t get_DELTA_PREAMBLE(module_id_t module_idP, int CC_id)
{
AssertFatal(CC_id == 0,
"Transmission on secondary CCs is not supported yet\n");
uint8_t prachConfigIndex =
UE_mac_inst[module_idP].radioResourceConfigCommon->
prach_Config.prach_ConfigInfo.prach_ConfigIndex;
uint8_t preambleformat;
if (UE_mac_inst[module_idP].tdd_Config) { // TDD
if (prachConfigIndex < 20) {
preambleformat = 0;
} else if (prachConfigIndex < 30) {
preambleformat = 1;
} else if (prachConfigIndex < 40) {
preambleformat = 2;
} else if (prachConfigIndex < 48) {
preambleformat = 3;
} else {
preambleformat = 4;
}
} else { // FDD
preambleformat = prachConfigIndex >> 2;
}
switch (preambleformat) {
case 0:
case 1:
return (0);
case 2:
case 3:
return (-3);
case 4:
return (8);
default:
AssertFatal(1 == 0,
"[UE %d] ue_procedures.c: FATAL, Illegal preambleformat %d, prachConfigIndex %d\n",
module_idP, preambleformat, prachConfigIndex);
}
}
int8_t get_deltaP_rampup(module_id_t module_idP, uint8_t CC_id)
{
@@ -43,11 +43,10 @@
#include <stdlib.h>
#include <string.h>
#include "PHY/defs.h"
#include "PHY/LTE_TRANSPORT/defs.h"
#include "COMMON/platform_constants.h"
#include "BCCH-BCH-Message.h"
#include "RadioResourceConfigCommon.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "MeasGapConfig.h"
#include "SchedulingInfoList.h"
@@ -55,19 +54,29 @@
#include "RACH-ConfigCommon.h"
#include "MeasObjectToAddModList.h"
#include "MobilityControlInfo.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-SubframeConfigList.h"
#include "PMCH-InfoList-r9.h"
#endif
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "SCellToAddMod-r10.h"
#endif
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
#include "SystemInformationBlockType1-v1310-IEs.h"
#include "SystemInformationBlockType18-r12.h"
#endif
#include "RadioResourceConfigCommonSIB.h"
#include "nfapi_interface.h"
#include "PHY_INTERFACE/IF_Module.h"
#include "PHY/TOOLS/time_meas.h"
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t
#include "PHY/LTE_TRANSPORT/transport_common.h"
#include "targets/ARCH/COMMON/common_lib.h"
/** @defgroup _mac MAC
* @ingroup _oai2
* @{
@@ -79,9 +88,10 @@
#define RAR_PAYLOAD_SIZE_MAX 128
#define SCH_PAYLOAD_SIZE_MAX 4096
#define DCH_PAYLOAD_SIZE_MAX 4096
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// Mask for identifying subframe for MBMS
#define MBSFN_TDD_SF3 0x80 // for TDD
@@ -155,6 +165,7 @@
/*!\brief maximum number of slices / groups */
#define MAX_NUM_SLICES 4
#define U_PLANE_INACTIVITY_VALUE 6000
/*
@@ -233,6 +244,75 @@ typedef struct {
uint8_t R:2;
} __attribute__ ((__packed__)) SCH_SUBHEADER_FIXED;
/*!\brief MAC subheader long with 24bit DST field */
typedef struct {
uint8_t R0:4;
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
uint8_t DST07; //Prose UE destination ID. Size 24 bits.
uint8_t DST815; //Prose UE destination ID. Size 24 bits.
uint8_t DST1623; //Prose UE destination ID. Size 24 bits.
uint8_t LCID:5;
uint8_t E:1;
uint8_t R1:2;
uint8_t L:7; // Length field indicating the size of the corresponding SDU in bytes.
uint8_t F:1;
}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_SHORT;
/*!\brief MAC subheader long with 24bit DST field */
typedef struct {
uint8_t R0:4;
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
uint8_t DST07; //Prose UE destination ID. Size 24 bits.
uint8_t DST815; //Prose UE destination ID. Size 24 bits.
uint8_t DST1623; //Prose UE destination ID. Size 24 bits.
uint8_t LCID:5;
uint8_t E:1;
uint8_t R1:2;
uint8_t L_MSB:7; // Length field indicating the size of the corresponding SDU in bytes.
uint8_t F:1;
uint8_t L_LSB:8;
}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_LONG;
/*!\brief MAC subheader long with 24bit DST field */
typedef struct {
uint8_t R0:4;
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
uint8_t DST07; //Prose UE destination ID. Size 16 bits.
uint8_t DST815; //Prose UE destination ID. Size 16 bits.
uint8_t LCID:5;
uint8_t E:1;
uint8_t R1:2;
uint8_t L:7; // Length field indicating the size of the corresponding SDU in bytes.
uint8_t F:1;
}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_SHORT;
/*!\brief MAC subheader long with 24bit DST field */
typedef struct {
uint8_t R0:4;
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
uint8_t DST07; //Prose UE destination ID. Size 16 bits.
uint8_t DST815; //Prose UE destination ID. Size 16 bits.
uint8_t LCID:5;
uint8_t E:1;
uint8_t R1:2;
uint8_t L_MSB:7; // Length field indicating the size of the corresponding SDU in bytes.
uint8_t F:1;
uint8_t L_LSB:8;
}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_LONG;
/*!\brief mac control element: short buffer status report for a specific logical channel group ID*/
typedef struct {
uint8_t Buffer_size:6; // octet 1 LSB
@@ -248,6 +328,30 @@ typedef struct {
uint8_t Buffer_size0:6;
} __attribute__ ((__packed__)) BSR_LONG;
// Panos:
/*!\brief mac control element: sidelink buffer status report */
typedef struct {
uint8_t DST_1:4;
uint8_t LCGID_1: 2;
uint8_t Buffer_size_1:6;
uint8_t DST_2:4;
uint8_t LCGID_2: 2;
uint8_t Buffer_size_2:6;
}__attribute__((__packed__))SL_BSR;
/*!\brief mac control element: truncated sidelink buffer status report */
typedef struct {
uint8_t DST:4;
uint8_t LCGID: 2;
uint8_t Buffer_size:6;
uint8_t R1:1;
uint8_t R2:1;
uint8_t R3:1;
uint8_t R4:1;
}__attribute__((__packed__))SL_BSR_Truncated;
#define BSR_LONG_SIZE (sizeof(BSR_LONG))
/*!\brief mac control element: timing advance */
typedef struct {
@@ -281,7 +385,7 @@ typedef struct {
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX];
} __attribute__ ((__packed__)) PCCH_PDU;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/*! \brief MCCH payload */
typedef struct {
uint8_t payload[MCCH_PAYLOAD_SIZE_MAX];
@@ -338,7 +442,7 @@ typedef struct {
/*!\brief LCID of padding LCID for DLSCH */
#define SHORT_PADDING 31
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
// MCH LCHAN IDs (table6.2.1-4 TS36.321)
/*!\brief LCID of MCCH for DL */
#define MCCH_LCHANID 0
@@ -346,6 +450,9 @@ typedef struct {
#define MCH_SCHDL_INFO 3
/*!\brief LCID of Carrier component activation/deactivation */
#define CC_ACT_DEACT 27
//TTN (for D2D)
#define SL_DISCOVERY 8 //LCID (fake)
#define MAX_NUM_DEST 10
#endif
// ULSCH LCHAN IDs
@@ -392,7 +499,11 @@ typedef struct {
uint16_t Pdu_size;
} __attribute__ ((__packed__)) ULSCH_PDU;
#include "PHY/impl_defs_top.h"
/*! \brief Uplink SCH PDU Structure */
typedef struct {
int8_t payload[DCH_PAYLOAD_SIZE_MAX]; /*!< \brief SACH payload */
uint16_t Pdu_size;
} __attribute__ ((__packed__)) ULDCH_PDU;
/*!\brief RA process state*/
typedef enum {
@@ -522,7 +633,6 @@ typedef struct {
} eNB_STATS;
/*! \brief eNB statistics for the connected UEs*/
typedef struct {
/// CRNTI of UE
rnti_t crnti; ///user id (rnti) of connected UEs
// rrc status
@@ -784,7 +894,7 @@ typedef struct {
eNB_UE_estimated_distances distance;
#endif
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t rach_resource_type;
uint16_t mpdcch_repetition_cnt;
frame_t Msg2_frame;
@@ -816,8 +926,8 @@ typedef struct {
///Contention resolution timer used during random access
uint8_t mac_ContentionResolutionTimer;
uint16_t max_rbs_allowed_slice[MAX_NUM_CCs][MAX_NUM_SLICES];
uint16_t max_rbs_allowed_slice_uplink[MAX_NUM_CCs][MAX_NUM_SLICES];
uint16_t max_rbs_allowed_slice[NFAPI_CC_MAX][MAX_NUM_SLICES];
uint16_t max_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES];
uint8_t max_mcs[MAX_NUM_LCID];
@@ -826,14 +936,14 @@ typedef struct {
// resource scheduling information
/// Current DL harq round per harq_pid on each CC
uint8_t round[MAX_NUM_CCs][10];
uint8_t round[NFAPI_CC_MAX][10];
/// Current Active TBs per harq_pid on each CC
uint8_t tbcnt[MAX_NUM_CCs][10];
uint8_t tbcnt[NFAPI_CC_MAX][10];
/// Current UL harq round per harq_pid on each CC
uint8_t round_UL[MAX_NUM_CCs][8];
uint8_t dl_pow_off[MAX_NUM_CCs];
uint16_t pre_nb_available_rbs[MAX_NUM_CCs];
unsigned char rballoc_sub_UE[MAX_NUM_CCs][N_RBG_MAX];
uint8_t round_UL[NFAPI_CC_MAX][8];
uint8_t dl_pow_off[NFAPI_CC_MAX];
uint16_t pre_nb_available_rbs[NFAPI_CC_MAX];
unsigned char rballoc_sub_UE[NFAPI_CC_MAX][N_RBG_MAX];
uint16_t ta_timer;
int16_t ta_update;
uint16_t ul_consecutive_errors;
@@ -926,7 +1036,7 @@ typedef struct {
int msg4_TBsize;
/// MCS used for Msg4
int msg4_mcs;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t rach_resource_type;
uint8_t msg2_mpdcch_repetition_cnt;
uint8_t msg4_mpdcch_repetition_cnt;
@@ -938,7 +1048,7 @@ typedef struct {
/*! \brief subband bitmap confguration (for ALU icic algo purpose), in test phase */
typedef struct {
uint8_t sbmap[NUMBER_OF_SUBBANDS_MAX]; //13 = number of SB MAX for 100 PRB
uint8_t sbmap[13]; //13 = number of SB MAX for 100 PRB
uint8_t periodicity;
uint8_t first_subframe;
uint8_t sb_size;
@@ -948,34 +1058,34 @@ typedef struct {
typedef struct {
/// Dedicated information for UEs
struct PhysicalConfigDedicated
*physicalConfigDedicated[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
*physicalConfigDedicated[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
/// DLSCH pdu
DLSCH_PDU DLSCH_pdu[MAX_NUM_CCs][2][NUMBER_OF_UE_MAX];
DLSCH_PDU DLSCH_pdu[NFAPI_CC_MAX][2][MAX_MOBILES_PER_ENB];
/// DCI template and MAC connection parameters for UEs
UE_TEMPLATE UE_template[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
UE_TEMPLATE UE_template[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
/// DCI template and MAC connection for RA processes
int pCC_id[NUMBER_OF_UE_MAX];
int pCC_id[MAX_MOBILES_PER_ENB];
/// sorted downlink component carrier for the scheduler
int ordered_CCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
int ordered_CCids[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
/// number of downlink active component carrier
int numactiveCCs[NUMBER_OF_UE_MAX];
int numactiveCCs[MAX_MOBILES_PER_ENB];
/// sorted uplink component carrier for the scheduler
int ordered_ULCCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
int ordered_ULCCids[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
/// number of uplink active component carrier
int numactiveULCCs[NUMBER_OF_UE_MAX];
int numactiveULCCs[MAX_MOBILES_PER_ENB];
/// number of downlink active component carrier
uint8_t dl_CC_bitmap[NUMBER_OF_UE_MAX];
uint8_t dl_CC_bitmap[MAX_MOBILES_PER_ENB];
/// eNB to UE statistics
eNB_UE_STATS eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
eNB_UE_STATS eNB_UE_stats[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
/// scheduling control info
UE_sched_ctrl UE_sched_ctrl[NUMBER_OF_UE_MAX];
int next[NUMBER_OF_UE_MAX];
UE_sched_ctrl UE_sched_ctrl[MAX_MOBILES_PER_ENB];
int next[MAX_MOBILES_PER_ENB];
int head;
int next_ul[NUMBER_OF_UE_MAX];
int next_ul[MAX_MOBILES_PER_ENB];
int head_ul;
int avail;
int num_UEs;
boolean_t active[NUMBER_OF_UE_MAX];
boolean_t active[MAX_MOBILES_PER_ENB];
/// Sorting criteria for the UE list in the MAC preprocessor
uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM];
@@ -991,7 +1101,7 @@ typedef struct {
uint32_t dl_CarrierFreq;
BCCH_BCH_Message_t *mib;
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
#endif
TDD_Config_t *tdd_Config;
@@ -1022,7 +1132,7 @@ typedef struct {
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
/// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/// MBMS Flag
uint8_t MBMS_flag;
/// Outgoing MCCH pdu for PHY
@@ -1044,7 +1154,7 @@ typedef struct {
/// Outgoing MCH pdu for PHY
MCH_PDU MCH_pdu;
#endif
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
/// Rel13 parameters from SIB1
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
/// Counter for SIB1-BR scheduling
@@ -1056,84 +1166,82 @@ typedef struct {
/*! \brief top level eNB MAC structure */
typedef struct eNB_MAC_INST_s {
/// Ethernet parameters for northbound midhaul interface
eth_params_t eth_params_n;
/// Ethernet parameters for fronthaul interface
eth_params_t eth_params_s;
///
module_id_t Mod_id;
/// frame counter
frame_t frame;
/// subframe counter
sub_frame_t subframe;
/// Pointer to IF module instance for PHY
IF_Module_t *if_inst;
/// Common cell resources
COMMON_channels_t common_channels[MAX_NUM_CCs];
/// current PDU index (BCH,MCH,DLSCH)
uint16_t pdu_index[MAX_NUM_CCs];
/// flag to enable phy-test (disables the scheduler)
uint16_t phy_test;
/// NFAPI Config Request Structure
nfapi_config_request_t config[MAX_NUM_CCs];
/// Preallocated DL pdu list
nfapi_dl_config_request_pdu_t
dl_config_pdu_list[MAX_NUM_CCs][MAX_NUM_DL_PDU];
/// NFAPI DL Config Request Structure
nfapi_dl_config_request_t DL_req[MAX_NUM_CCs];
/// Preallocated UL pdu list
nfapi_ul_config_request_pdu_t
ul_config_pdu_list[MAX_NUM_CCs][MAX_NUM_UL_PDU];
/// Preallocated UL pdu list for ULSCH (n+k delay)
nfapi_ul_config_request_pdu_t
ul_config_pdu_list_tmp[MAX_NUM_CCs][10][MAX_NUM_UL_PDU];
/// NFAPI UL Config Request Structure, send to L1 4 subframes before processing takes place
nfapi_ul_config_request_t UL_req[MAX_NUM_CCs];
/// NFAPI "Temporary" UL Config Request Structure, holds future UL_config requests
nfapi_ul_config_request_t UL_req_tmp[MAX_NUM_CCs][10];
/// Preallocated HI_DCI0 pdu list
nfapi_hi_dci0_request_pdu_t
hi_dci0_pdu_list[MAX_NUM_CCs][MAX_NUM_HI_DCI0_PDU];
/// NFAPI HI/DCI0 Config Request Structure
nfapi_hi_dci0_request_t HI_DCI0_req[MAX_NUM_CCs];
/// Prealocated TX pdu list
nfapi_tx_request_pdu_t
tx_request_pdu[MAX_NUM_CCs][MAX_NUM_TX_REQUEST_PDU];
/// NFAPI DL PDU structure
nfapi_tx_request_t TX_req[MAX_NUM_CCs];
/// UL handle
uint32_t ul_handle;
UE_list_t UE_list;
///subband bitmap configuration
SBMAP_CONF sbmap_conf;
/// CCE table used to build DCI scheduling information
int CCE_table[MAX_NUM_CCs][800];
/// active flag for Other lcid
uint8_t lcid_active[NB_RB_MAX];
/// eNB stats
eNB_STATS eNB_stats[MAX_NUM_CCs];
// MAC function execution peformance profiler
/// processing time of eNB scheduler
time_stats_t eNB_scheduler;
/// processing time of eNB scheduler for SI
time_stats_t schedule_si;
/// processing time of eNB scheduler for Random access
time_stats_t schedule_ra;
/// processing time of eNB ULSCH scheduler
time_stats_t schedule_ulsch;
/// processing time of eNB DCI generation
time_stats_t fill_DLSCH_dci;
/// processing time of eNB MAC preprocessor
time_stats_t schedule_dlsch_preprocessor;
/// processing time of eNB DLSCH scheduler
time_stats_t schedule_dlsch; // include rlc_data_req + MAC header + preprocessor
/// processing time of eNB MCH scheduler
time_stats_t schedule_mch;
/// processing time of eNB ULSCH reception
time_stats_t rx_ulsch_sdu; // include rlc_data_ind
/// processing time of eNB PCH scheduler
time_stats_t schedule_pch;
eth_params_t eth_params_n;
/// Ethernet parameters for fronthaul interface
eth_params_t eth_params_s;
///
module_id_t Mod_id;
/// frame counter
frame_t frame;
/// subframe counter
sub_frame_t subframe;
/// Pointer to IF module instance for PHY
IF_Module_t *if_inst;
/// Common cell resources
COMMON_channels_t common_channels[NFAPI_CC_MAX];
/// current PDU index (BCH,MCH,DLSCH)
uint16_t pdu_index[NFAPI_CC_MAX];
/// NFAPI Config Request Structure
nfapi_config_request_t config[NFAPI_CC_MAX];
/// Preallocated DL pdu list
nfapi_dl_config_request_pdu_t
dl_config_pdu_list[NFAPI_CC_MAX][MAX_NUM_DL_PDU];
/// NFAPI DL Config Request Structure
nfapi_dl_config_request_t DL_req[NFAPI_CC_MAX];
/// Preallocated UL pdu list
nfapi_ul_config_request_pdu_t
ul_config_pdu_list[NFAPI_CC_MAX][MAX_NUM_UL_PDU];
/// Preallocated UL pdu list for ULSCH (n+k delay)
nfapi_ul_config_request_pdu_t
ul_config_pdu_list_tmp[NFAPI_CC_MAX][10][MAX_NUM_UL_PDU];
/// NFAPI UL Config Request Structure, send to L1 4 subframes before processing takes place
nfapi_ul_config_request_t UL_req[NFAPI_CC_MAX];
/// NFAPI "Temporary" UL Config Request Structure, holds future UL_config requests
nfapi_ul_config_request_t UL_req_tmp[NFAPI_CC_MAX][10];
/// Preallocated HI_DCI0 pdu list
nfapi_hi_dci0_request_pdu_t
hi_dci0_pdu_list[NFAPI_CC_MAX][MAX_NUM_HI_DCI0_PDU];
/// NFAPI HI/DCI0 Config Request Structure
nfapi_hi_dci0_request_t HI_DCI0_req[NFAPI_CC_MAX];
/// Prealocated TX pdu list
nfapi_tx_request_pdu_t
tx_request_pdu[NFAPI_CC_MAX][MAX_NUM_TX_REQUEST_PDU];
/// NFAPI DL PDU structure
nfapi_tx_request_t TX_req[NFAPI_CC_MAX];
/// UL handle
uint32_t ul_handle;
UE_list_t UE_list;
///subband bitmap configuration
SBMAP_CONF sbmap_conf;
/// CCE table used to build DCI scheduling information
int CCE_table[NFAPI_CC_MAX][800];
/// active flag for Other lcid
uint8_t lcid_active[NB_RB_MAX];
/// eNB stats
eNB_STATS eNB_stats[NFAPI_CC_MAX];
// MAC function execution peformance profiler
/// processing time of eNB scheduler
time_stats_t eNB_scheduler;
/// processing time of eNB scheduler for SI
time_stats_t schedule_si;
/// processing time of eNB scheduler for Random access
time_stats_t schedule_ra;
/// processing time of eNB ULSCH scheduler
time_stats_t schedule_ulsch;
/// processing time of eNB DCI generation
time_stats_t fill_DLSCH_dci;
/// processing time of eNB MAC preprocessor
time_stats_t schedule_dlsch_preprocessor;
/// processing time of eNB DLSCH scheduler
time_stats_t schedule_dlsch; // include rlc_data_req + MAC header + preprocessor
/// processing time of eNB MCH scheduler
time_stats_t schedule_mch;
/// processing time of eNB ULSCH reception
time_stats_t rx_ulsch_sdu; // include rlc_data_ind
/// processing time of eNB PCH scheduler
time_stats_t schedule_pch;
} eNB_MAC_INST;
/*
@@ -1241,10 +1349,36 @@ typedef struct {
struct RACH_ConfigDedicated *rach_ConfigDedicated;
/// pointer to RRC PHY configuration
struct PhysicalConfigDedicated *physicalConfigDedicated;
#if defined(Rel10) || defined(Rel14)
/// pointer to RRC PHY configuration SCEll
struct PhysicalConfigDedicatedSCell_r10
*physicalConfigDedicatedSCell_r10;
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/// pointer to RRC PHY configuration SCEll
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
/// Preconfiguration for Sidelink
struct SL_Preconfiguration_r12 *SL_Preconfiguration;
/// RX Pool for Sidelink from SIB18
SL_CommRxPoolList_r12_t commRxPool_r12;
/// TX Pool Normal for Sidelink from SIB18
struct SL_CommTxPoolList_r12 *commTxPoolNormalCommon_r12;
/// TX Pool Exceptional for Sidelink from SIB18
struct SL_CommTxPoolList_r12 *commTxPoolExceptional_r12;
/// Common Sync Config for Sidelink from SIB18
struct SL_SyncConfigList_r12 *commSyncConfig_r12;
/// Dedicated Sync TX control for Sidelink
struct SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
/// Dedicated Discovery TX control for Sidelink
struct SL_DiscConfig_r12 *sl_DiscConfig_r12;
/// Dedicated TX config for Sidelink
struct SL_CommConfig_r12 *sl_CommConfig_r12;
//SL sourceL2ID
uint32_t sourceL2Id;
//SL groupL2Id
uint32_t groupL2Id;
//SL destinationL2Id
uint32_t destinationL2Id;
//List of destinations
uint32_t destinationList[MAX_NUM_DEST];
uint8_t numCommFlows;
uint32_t SL_LCID[MAX_NUM_LCID];
#endif
/// pointer to TDD Configuration (NULL for FDD)
TDD_Config_t *tdd_Config;
@@ -1265,7 +1399,14 @@ typedef struct {
/// Outgoing RAR pdu for PHY
RAR_PDU RAR_pdu;
/// Incoming DLSCH pdu for PHY
DLSCH_PDU DLSCH_pdu[NUMBER_OF_UE_MAX][2];
DLSCH_PDU DLSCH_pdu[MAX_MOBILES_PER_ENB][2];
#ifdef Rel14
int sltx_active;
SLSCH_t slsch;
SLDCH_t sldch;
ULSCH_PDU slsch_pdu;
int slsch_lcid;
#endif
/// number of attempt for rach
uint8_t RA_attempt_number;
/// Random-access procedure flag
@@ -1306,7 +1447,7 @@ typedef struct {
/// power backoff due to power management (as allowed by P-MPRc) for this cell
uint8_t PHR_reporting_active;
/// power backoff due to power management (as allowed by P-MPRc) for this cell
uint8_t power_backoff_db[NUMBER_OF_eNB_MAX];
uint8_t power_backoff_db[MAX_eNB];
/// BSR report falg management
uint8_t BSR_reporting_active;
/// retxBSR-Timer expires flag
@@ -1318,7 +1459,7 @@ typedef struct {
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
/// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
/// number of active MBSFN area
uint8_t num_active_mbsfn_area;
/// MBSFN Area Info
@@ -1330,26 +1471,41 @@ typedef struct {
/// MSI status
uint8_t msi_status; // could be an array if there are >1 MCH in one MBSFN area
#endif
//#ifdef CBA
/// CBA RNTI for each group
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
/// last SFN for CBA channel access
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
//#endif
/// total UE scheduler processing time
time_stats_t ue_scheduler; // total
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
time_stats_t tx_ulsch_sdu;
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
time_stats_t rx_dlsch_sdu;
/// UE query for MCH subframe processing time
time_stats_t ue_query_mch;
/// UE MCH rx processing time
time_stats_t rx_mch_sdu;
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t rx_si;
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t rx_p;
//#ifdef CBA
/// CBA RNTI for each group
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
/// last SFN for CBA channel access
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
//#endif
/// total UE scheduler processing time
time_stats_t ue_scheduler; // total
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
time_stats_t tx_ulsch_sdu;
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
time_stats_t rx_dlsch_sdu ;
/// UE query for MCH subframe processing time
time_stats_t ue_query_mch;
/// UE MCH rx processing time
time_stats_t rx_mch_sdu;
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t rx_si;
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t rx_p;
/// Panos: Mutex for nfapi UL_INFO
pthread_mutex_t UL_INFO_mutex;
/// Panos: UE_Mode variable should be used in the case of Phy_stub operation since we won't have access to PHY_VARS_UE
/// where the UE_mode originally is for the full stack operation mode. The transitions between the states of the UE_Mode
/// will be triggered within phy_stub_ue.c in this case
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_eNB_MAX];
/// Panos: Phy_stub mode: Boolean variable to distinguish whether a Msg3 or a regular ULSCH data pdu should be generated
/// after the reception of NFAPI_UL_CONFIG_ULSCH_PDU_TYPE.
uint8_t first_ULSCH_Tx;
uint8_t SI_Decoded;
int ra_frame; // This variable keeps the frame in which the RA started for the specific UE. It is used in order
// to make sure that different UEs RA starts within a number of frames difference.
eth_params_t eth_params_n;
} UE_MAC_INST;
/*! \brief ID of the neighboring cells used for HO*/
typedef struct {
@@ -1357,6 +1513,6 @@ typedef struct {
uint8_t n_adj_cells;
} neigh_cell_id_t;
#include "proto.h"
#include "mac_proto.h"
/*@}*/
#endif /*__LAYER2_MAC_DEFS_H__ */
@@ -32,10 +32,10 @@
#ifndef __MAC_EXTERN_H__
#define __MAC_EXTERN_H__
#include "PHY/defs.h"
#include "defs.h"
//#include "PHY/defs_common.h"
#include "mac.h"
#include "RRC/LITE/defs.h"
#include "RRC/LTE/rrc_defs.h"
extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
//extern uint32_t EBSR_Level[63];
@@ -52,8 +52,8 @@ extern UE_RRC_INST *UE_rrc_inst;
extern UE_MAC_INST *UE_mac_inst;
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
@@ -75,26 +75,5 @@ extern uint32_t RRC_CONNECTION_FLAG;
extern uint8_t rb_table[34];
extern DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
extern DCI1A_5MHz_TDD_1_6_t RA_alloc_pdu;
extern DCI1A_5MHz_TDD_1_6_t DLSCH_alloc_pdu1A;
extern DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
extern DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
extern DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
extern DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
extern DCI1A_5MHz_FDD_t DLSCH_alloc_pdu1A_fdd;
extern DCI1A_5MHz_FDD_t RA_alloc_pdu_fdd;
extern DCI1A_5MHz_FDD_t BCCH_alloc_pdu_fdd;
extern DCI1A_5MHz_FDD_t CCCH_alloc_pdu_fdd;
extern DCI1_5MHz_FDD_t DLSCH_alloc_pdu_fdd;
extern DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu1;
extern DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu2;
extern DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
#endif //DEF_H
@@ -29,7 +29,8 @@
#ifndef __LAYER2_MAC_PROTO_H__
#define __LAYER2_MAC_PROTO_H__
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/mac.h"
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t and lte_subframe_t
/** \addtogroup _mac
* @{
@@ -210,13 +211,13 @@ void dlsch_scheduler_pre_processor_reset(int module_idP, int UE_id,
int subframeP,
int N_RBG,
uint16_t
nb_rbs_required[MAX_NUM_CCs]
[NUMBER_OF_UE_MAX],
nb_rbs_required[NFAPI_CC_MAX]
[MAX_MOBILES_PER_ENB],
unsigned char
rballoc_sub[MAX_NUM_CCs]
rballoc_sub[NFAPI_CC_MAX]
[N_RBG_MAX],
unsigned char
MIMO_mode_indicator[MAX_NUM_CCs]
MIMO_mode_indicator[NFAPI_CC_MAX]
[N_RBG_MAX]);
// eNB functions
@@ -232,7 +233,7 @@ void dlsch_scheduler_pre_processor(module_id_t module_idP,
slice_id_t slice_idP,
frame_t frameP,
sub_frame_t subframe,
int N_RBG[MAX_NUM_CCs],
int N_RBG[NFAPI_CC_MAX],
int *mbsfn_flag);
@@ -243,19 +244,10 @@ void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id,
int transmission_mode,
int min_rb_unit,
uint8_t N_RB_DL,
uint16_t
nb_rbs_required[MAX_NUM_CCs]
[NUMBER_OF_UE_MAX],
uint16_t
nb_rbs_required_remaining
[MAX_NUM_CCs]
[NUMBER_OF_UE_MAX],
unsigned char
rballoc_sub[MAX_NUM_CCs]
[N_RBG_MAX],
unsigned char
MIMO_mode_indicator
[MAX_NUM_CCs][N_RBG_MAX]);
uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]);
/* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f
and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f.
@@ -275,7 +267,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
void initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
sub_frame_t subframeP, uint16_t preamble_index,
int16_t timing_offset, uint16_t rnti
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, uint8_t rach_resource_type
#endif
);
@@ -294,7 +286,7 @@ unsigned short fill_rar(const module_id_t module_idP,
const uint16_t N_RB_UL,
const uint8_t input_buffer_length);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
unsigned short fill_rar_br(eNB_MAC_INST * eNB,
int CC_id,
RA_t * ra,
@@ -520,8 +512,17 @@ void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame,
sub_frame_t subframe, uint8_t * sdu, uint16_t sdu_len,
uint8_t CH_index);
void ue_send_sl_sdu(module_id_t module_idP,
uint8_t CC_id,
frame_t frameP,
sub_frame_t subframeP,
uint8_t* sdu,
uint16_t sdu_len,
uint8_t eNB_index,
sl_discovery_flag_t sl_discovery_flag
);
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/* \brief Called by PHY to transfer MCH transport block to ue MAC.
@param Mod_id Index of module instance
@param frame Frame index
@@ -553,13 +554,36 @@ int ue_query_mch(uint8_t Mod_id, uint8_t CC_id, uint32_t frame,
@param eNB_id Index of eNB that UE is attached to
@param rnti C_RNTI of UE
@param subframe subframe number
@returns 0 for no SR, 1 for SR
*/
void ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
sub_frame_t subframe, uint8_t eNB_index,
uint8_t * ulsch_buffer, uint16_t buflen,
uint8_t * access_mode);
/* \brief Called by PHY to get sdu for PSBCH/SSS/PSS transmission.
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
@returns pointer to SLSS_t descriptor
*/
SLSS_t *ue_get_slss(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
/* \brief Called by PHY to get sdu for PSDCH transmission.
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
@returns pointer to SLDCH_t descriptor
*/
SLDCH_t *ue_get_sldch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
/* \brief Called by PHY to get sdu for PSSCH transmission.
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
@returns pointer to SLSCH_t descriptor
*/
SLSCH_t *ue_get_slsch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
/* \brief Function called by PHY to retrieve information to be transmitted using the RA procedure. If the UE is not in PUSCH mode for a particular eNB index, this is assumed to be an Msg3 and MAC attempts to retrieves the CCCH message from RRC. If the UE is in PUSCH mode for a particular eNB index and PUCCH format 0 (Scheduling Request) is not activated, the MAC may use this resource for random-access to transmit a BSR along with the C-RNTI control element (see 5.1.4 from 36.321)
@param Mod_id Index of UE instance
@param Mod_id Component Carrier Index
@@ -641,11 +665,9 @@ uint8_t *parse_ulsch_header(uint8_t * mac_header,
int to_prb(int);
int to_rbg(int);
int l2_init(LTE_DL_FRAME_PARMS * frame_parms, int eMBMS_active,
char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
int mac_init(void);
int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
, uint8_t rach_resource_type
#endif
);
@@ -896,20 +918,20 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
int p_eNB,
int Ncp,
int eutra_band, uint32_t dl_CarrierFreq,
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int pbch_repetition,
#endif
rnti_t rntiP,
BCCH_BCH_Message_t * mib,
RadioResourceConfigCommonSIB_t *
radioResourceConfigCommon,
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
RadioResourceConfigCommonSIB_t *
radioResourceConfigCommon_BR,
#endif
struct PhysicalConfigDedicated
*physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
SCellToAddMod_r10_t * sCellToAddMod_r10,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -927,13 +949,13 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
additionalSpectrumEmission,
struct MBSFN_SubframeConfigList
*mbsfn_SubframeConfigList
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
,
uint8_t MBMS_Flag,
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
PMCH_InfoList_r9_t * pmch_InfoList
#endif
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
,
SystemInformationBlockType1_v1310_IEs_t *
sib1_ext_r13
@@ -967,7 +989,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
radioResourceConfigCommon,
struct PhysicalConfigDedicated
*physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
SCellToAddMod_r10_t * sCellToAddMod_r10,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
@@ -986,7 +1008,7 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
additionalSpectrumEmission,
struct MBSFN_SubframeConfigList
*mbsfn_SubframeConfigList
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
,
uint8_t MBMS_Flag,
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
@@ -996,7 +1018,13 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
,
uint8_t num_active_cba_groups, uint16_t cba_rnti
#endif
);
#if defined(Rel14)
,config_action_t config_action
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
);
uint16_t getRIV(uint16_t N_RB_DL, uint16_t RBstart, uint16_t Lcrbs);
@@ -1087,7 +1115,7 @@ void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *
uint8_t current_tx_nb,
uint8_t n_srs, uint16_t size);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *
ul_config_pdu, uint8_t ue_type,
uint16_t
@@ -1163,7 +1191,7 @@ uint8_t get_tmode(module_id_t module_idP, int CC_idP, int UE_idP);
uint8_t get_ul_req_index(module_id_t module_idP, int CC_idP,
sub_frame_t subframeP);
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int get_numnarrowbandbits(long dl_Bandwidth);
int mpdcch_sf_condition(eNB_MAC_INST * eNB, int CC_id, frame_t frameP,
@@ -32,8 +32,8 @@
#ifndef __MAC_VARS_H__
#define __MAC_VARS_H__
#include "PHY/defs.h"
#include "defs.h"
#include "PHY/defs_common.h"
#include "mac.h"
#include "COMMON/mac_rrc_primitives.h"
const uint32_t BSR_TABLE[BSR_TABLE_SIZE] =
@@ -103,8 +103,8 @@ int pCC_id[NUMBER_OF_eNB_MAX];
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
#ifdef OPENAIR2
@@ -124,7 +124,7 @@ DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
DCI1C_5MHz_t MCCH_alloc_pdu;
#endif
+9 -12
View File
@@ -29,21 +29,18 @@
*/
#include "defs.h"
#include "proto.h"
#include "extern.h"
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
#include "assertions.h"
#include "PHY_INTERFACE/extern.h"
#include "PHY/defs.h"
#include "SCHED/defs.h"
//#include "PHY_INTERFACE/phy_extern.h"
//#include "PHY/defs_eNB.h"
//#include "SCHED/sched_eNB.h"
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "RRC/LITE/defs.h"
#include "RRC/LTE/rrc_defs.h"
#include "UTIL/LOG/log.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "SCHED/defs.h"
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
@@ -123,7 +120,7 @@ void mac_top_init_eNB(void)
UE_list->head_ul = -1;
UE_list->avail = 0;
for (list_el = 0; list_el < NUMBER_OF_UE_MAX - 1; list_el++) {
for (list_el = 0; list_el < MAX_MOBILES_PER_ENB - 1; list_el++) {
UE_list->next[list_el] = list_el + 1;
UE_list->next_ul[list_el] = list_el + 1;
}
@@ -147,7 +144,7 @@ void mac_init_cell_params(int Mod_idP, int CC_idP)
UE_template =
(UE_TEMPLATE *) & RC.mac[Mod_idP]->UE_list.UE_template[CC_idP][0];
for (j = 0; j < NUMBER_OF_UE_MAX; j++) {
for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
UE_template[j].rnti = 0;
// initiallize the eNB to UE statistics
memset(&RC.mac[Mod_idP]->UE_list.eNB_UE_stats[CC_idP][j], 0,
+7 -9
View File
@@ -29,20 +29,18 @@
*/
#include "defs.h"
#include "proto.h"
#include "extern.h"
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
#include "assertions.h"
#include "PHY_INTERFACE/extern.h"
#include "PHY/defs.h"
#include "SCHED/defs.h"
#include "PHY_INTERFACE/phy_interface_extern.h"
#include "PHY/defs_UE.h"
#include "SCHED_UE/sched_UE.h"
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "RRC/LITE/defs.h"
#include "RRC/LTE/rrc_defs.h"
#include "UTIL/LOG/log.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "SCHED/defs.h"
#include "common/ran_context.h"
+65 -75
View File
@@ -33,24 +33,22 @@
#include <stdlib.h>
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "rlc.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
#define DEBUG_eNB_SCHEDULER 1
#define DEBUG_HEADER_PARSING 1
@@ -107,7 +105,7 @@ store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP,
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
UE_TEMPLATE *UE_template;
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_list->active[UE_id] != TRUE)
continue;
@@ -128,13 +126,19 @@ store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP,
UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = 0;
}
rnti = UE_RNTI(Mod_id, UE_id);
for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels
rlc_status =
mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
ENB_FLAG_YES, MBMS_FLAG_NO, i, 0);
ENB_FLAG_YES, MBMS_FLAG_NO, i, 0
#ifdef Rel14
,0, 0
#endif
);
UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer;
UE_template->dl_buffer_head_sdu_creation_time[i] =
@@ -190,8 +194,8 @@ assign_rbs_required(module_id_t Mod_id,
frame_t frameP,
sub_frame_t subframe,
uint16_t
nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
int min_rb_unit[MAX_NUM_CCs])
nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
int min_rb_unit[NFAPI_CC_MAX])
{
uint16_t TBS = 0;
@@ -202,7 +206,7 @@ assign_rbs_required(module_id_t Mod_id,
int N_RB_DL;
// clear rb allocations across all CC_id
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_list->active[UE_id] != TRUE)
continue;
if (!ue_slice_membership(UE_id, slice_id))
@@ -211,7 +215,6 @@ assign_rbs_required(module_id_t Mod_id,
//update CQI information across component carriers
for (n = 0; n < UE_list->numactiveCCs[UE_id]; n++) {
CC_id = UE_list->ordered_CCids[n][UE_id];
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
@@ -226,7 +229,7 @@ assign_rbs_required(module_id_t Mod_id,
&UE_list->eNB_UE_stats[UE_list->
ordered_CCids[i][UE_id]][UE_id];
for (j = i + 1; j < UE_list->numactiveCCs[UE_id]; j++) {
DevAssert(j < MAX_NUM_CCs);
DevAssert(j < NFAPI_CC_MAX);
eNB_UE_stats_j =
&UE_list->
eNB_UE_stats[UE_list->ordered_CCids[j][UE_id]][UE_id];
@@ -310,7 +313,7 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
COMMON_channels_t *cc;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
cc = &RC.mac[Mod_id]->common_channels[CC_id];
@@ -485,14 +488,14 @@ void decode_sorting_policy(module_id_t Mod_idP, slice_id_t slice_id) {
void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t subframeP)
{
int i;
int list[NUMBER_OF_UE_MAX];
int list[MAX_MOBILES_PER_ENB];
int list_size = 0;
int rnti;
struct sort_ue_dl_params params = { Mod_idP, frameP, subframeP, slice_id };
UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list;
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_list->active[i] == FALSE)
continue;
@@ -597,11 +600,11 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
slice_id_t slice_id,
frame_t frameP,
sub_frame_t subframeP,
int N_RBG[MAX_NUM_CCs],
int min_rb_unit[MAX_NUM_CCs],
uint8_t rballoc_sub[MAX_NUM_CCs][N_RBG_MAX],
uint8_t MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX],
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX]) {
int N_RBG[NFAPI_CC_MAX],
int min_rb_unit[NFAPI_CC_MAX],
uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX],
uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]) {
int UE_id, CC_id;
@@ -609,22 +612,22 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
rnti_t rnti;
uint8_t harq_pid, round, transmission_mode;
uint8_t total_rbs_used[MAX_NUM_CCs];
uint8_t total_ue_count[MAX_NUM_CCs];
uint16_t average_rbs_per_user[MAX_NUM_CCs];
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
uint16_t nb_rbs_required_remaining_1[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
uint8_t total_rbs_used[NFAPI_CC_MAX];
uint8_t total_ue_count[NFAPI_CC_MAX];
uint16_t average_rbs_per_user[NFAPI_CC_MAX];
uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
uint16_t nb_rbs_required_remaining_1[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
int N_RB_DL;
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
UE_sched_ctrl *ue_sched_ctl;
COMMON_channels_t *cc;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
total_ue_count[CC_id] = 0;
total_rbs_used[CC_id] = 0;
average_rbs_per_user[CC_id] = 0;
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; ++UE_id) {
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) {
nb_rbs_required_remaining[CC_id][UE_id] = 0;
}
}
@@ -815,9 +818,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
transmission_mode,
min_rb_unit
[CC_id],
to_prb(RC.mac
[Mod_id]->common_channels
[CC_id].mib->message.dl_Bandwidth),
to_prb(RC.mac[Mod_id]->common_channels[CC_id].mib->message.dl_Bandwidth),
nb_rbs_required,
nb_rbs_required_remaining,
rballoc_sub,
@@ -997,18 +998,18 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
slice_id_t slice_id,
frame_t frameP,
sub_frame_t subframeP,
int N_RBG[MAX_NUM_CCs],
int N_RBG[NFAPI_CC_MAX],
int *mbsfn_flag) {
int UE_id;
uint8_t CC_id;
uint16_t i, j;
uint8_t rballoc_sub[MAX_NUM_CCs][N_RBG_MAX];
uint8_t MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]; // If TM5 is revisited, we can move this inside accounting
uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX];
uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]; // If TM5 is revisited, we can move this inside accounting
int min_rb_unit[MAX_NUM_CCs];
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
int min_rb_unit[NFAPI_CC_MAX];
uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
UE_sched_ctrl *ue_sched_ctl;
@@ -1025,14 +1026,14 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
UE_sched_ctrl *ue_sched_ctl1, *ue_sched_ctl2;
#endif
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here
continue;
min_rb_unit[CC_id] = get_min_rb_unit(Mod_id, CC_id);
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; ++UE_id) {
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; ++UE_id) {
if (UE_list->active[UE_id] != TRUE)
continue;
@@ -1076,7 +1077,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
#ifdef TM5
// This has to be revisited!!!!
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
i1 = 0;
i2 = 0;
i3 = 0;
@@ -1150,13 +1151,13 @@ dlsch_scheduler_pre_processor_reset(int module_idP,
int frameP,
int subframeP,
int N_RBG,
uint16_t nb_rbs_required[MAX_NUM_CCs]
[NUMBER_OF_UE_MAX],
uint16_t nb_rbs_required[NFAPI_CC_MAX]
[MAX_MOBILES_PER_ENB],
unsigned char
rballoc_sub[MAX_NUM_CCs]
rballoc_sub[NFAPI_CC_MAX]
[N_RBG_MAX],
unsigned char
MIMO_mode_indicator[MAX_NUM_CCs]
MIMO_mode_indicator[NFAPI_CC_MAX]
[N_RBG_MAX])
{
int i, j;
@@ -1192,7 +1193,6 @@ dlsch_scheduler_pre_processor_reset(int module_idP,
&ue_sched_ctl->round[CC_id],
openair_harq_DL);
if (ue_sched_ctl->ta_timer == 0) {
// WE SHOULD PROTECT the eNB_UE_stats with a mutex here ...
@@ -1338,17 +1338,10 @@ dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id,
int transmission_mode,
int min_rb_unit,
uint8_t N_RB_DL,
uint16_t
nb_rbs_required[MAX_NUM_CCs]
[NUMBER_OF_UE_MAX],
uint16_t
nb_rbs_required_remaining
[MAX_NUM_CCs]
[NUMBER_OF_UE_MAX], unsigned char
rballoc_sub[MAX_NUM_CCs]
[N_RBG_MAX], unsigned char
MIMO_mode_indicator
[MAX_NUM_CCs][N_RBG_MAX])
uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
uint16_t nb_rbs_required_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
unsigned char rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
unsigned char MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX])
{
int i;
@@ -1418,11 +1411,11 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
int16_t i;
uint16_t UE_id, n, r;
uint8_t CC_id, harq_pid;
uint16_t nb_allocated_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
total_allocated_rbs[MAX_NUM_CCs],
average_rbs_per_user[MAX_NUM_CCs];
int16_t total_remaining_rbs[MAX_NUM_CCs];
uint16_t total_ue_count[MAX_NUM_CCs];
uint16_t nb_allocated_rbs[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
total_allocated_rbs[NFAPI_CC_MAX],
average_rbs_per_user[NFAPI_CC_MAX];
int16_t total_remaining_rbs[NFAPI_CC_MAX];
uint16_t total_ue_count[NFAPI_CC_MAX];
rnti_t rnti = -1;
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
UE_TEMPLATE *UE_template = 0;
@@ -1440,7 +1433,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
// we need to distribute RBs among UEs
// step1: reset the vars
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
total_allocated_rbs[CC_id] = 0;
total_remaining_rbs[CC_id] = 0;
average_rbs_per_user[CC_id] = 0;
@@ -1613,7 +1606,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
/* this logging is wrong, ue_sched_ctl may not be valid here
* TODO: fix
*/
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
if (total_allocated_rbs[CC_id] > 0) {
LOG_D(MAC, "[eNB %d] total RB allocated for all UEs = %d/%d\n",
@@ -1644,7 +1637,7 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
int Ncp;
int N_RB_UL;
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_list->active[i] != TRUE)
continue;
@@ -1672,14 +1665,11 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
// This is the actual CC_id in the list
CC_id = UE_list->ordered_ULCCids[n][UE_id];
if (CC_id >= MAX_NUM_CCs) {
LOG_E(MAC, "CC_id %u should be < %u, loop n=%u < numactiveULCCs[%u]=%u",
CC_id, MAX_NUM_CCs, n, UE_id, UE_list->numactiveULCCs[UE_id]);
}
AssertFatal(CC_id < MAX_NUM_CCs,
AssertFatal(CC_id < RC.nb_mac_CC[module_idP],
"CC_id %u should be < %u, loop n=%u < numactiveULCCs[%u]=%u",
CC_id, MAX_NUM_CCs, n, UE_id,
CC_id, NFAPI_CC_MAX, n, UE_id,
UE_list->numactiveULCCs[UE_id]);
UE_template = &UE_list->UE_template[CC_id][UE_id];
@@ -1841,14 +1831,14 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params)
void sort_ue_ul(module_id_t module_idP, int frameP, sub_frame_t subframeP)
{
int i;
int list[NUMBER_OF_UE_MAX];
int list[MAX_MOBILES_PER_ENB];
int list_size = 0;
int rnti;
struct sort_ue_ul_params params = { module_idP, frameP, subframeP };
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_list->active[i] == FALSE)
continue;
if ((rnti = UE_RNTI(module_idP, i)) == NOT_A_RNTI)
+36 -63
View File
@@ -30,71 +30,25 @@
* \warning
*/
#include "extern.h"
#include "defs.h"
#include "proto.h"
#include "mac_extern.h"
#include "mac.h"
#include "mac_proto.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY_INTERFACE/extern.h"
#include "SCHED/defs.h"
#include "PHY_INTERFACE/phy_interface_extern.h"
#include "SCHED_UE/sched_UE.h"
#include "COMMON/mac_rrc_primitives.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "UTIL/LOG/log.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h"
#endif
#include "SIMULATION/TOOLS/defs.h" // for taus
int8_t get_DELTA_PREAMBLE(module_id_t module_idP, int CC_id)
{
AssertFatal(CC_id == 0,
"Transmission on secondary CCs is not supported yet\n");
uint8_t prachConfigIndex =
UE_mac_inst[module_idP].radioResourceConfigCommon->
prach_Config.prach_ConfigInfo.prach_ConfigIndex;
uint8_t preambleformat;
if (UE_mac_inst[module_idP].tdd_Config) { // TDD
if (prachConfigIndex < 20) {
preambleformat = 0;
} else if (prachConfigIndex < 30) {
preambleformat = 1;
} else if (prachConfigIndex < 40) {
preambleformat = 2;
} else if (prachConfigIndex < 48) {
preambleformat = 3;
} else {
preambleformat = 4;
}
} else { // FDD
preambleformat = prachConfigIndex >> 2;
}
switch (preambleformat) {
case 0:
case 1:
return (0);
case 2:
case 3:
return (-3);
case 4:
return (8);
default:
AssertFatal(1 == 0,
"[UE %d] ue_procedures.c: FATAL, Illegal preambleformat %d, prachConfigIndex %d\n",
module_idP, preambleformat, prachConfigIndex);
}
}
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
extern uint8_t nfapi_mode;
extern UE_MODE_t get_ue_mode(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/// This routine implements Section 5.1.2 (UE Random Access Resource Selection) from 36.321
void
@@ -105,7 +59,6 @@ get_prach_resources(module_id_t module_idP,
uint8_t first_Msg3,
RACH_ConfigDedicated_t * rach_ConfigDedicated)
{
uint8_t Msg3_size = UE_mac_inst[module_idP].RA_Msg3_size;
PRACH_RESOURCES_t *prach_resources =
&UE_mac_inst[module_idP].RA_prach_resources;
@@ -344,9 +297,18 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
sub_frame_t subframeP)
{
uint8_t Size = 0;
UE_MODE_t UE_mode = get_ue_mode(module_idP, 0, eNB_indexP);
UE_MODE_t UE_mode;
// Panos: Modification for phy_stub_ue operation
if(nfapi_mode == 3) { // Panos: phy_stub_ue mode
UE_mode = UE_mac_inst[module_idP].UE_mode[0];
LOG_D(MAC, "ue_get_rach , UE_mode: %d", UE_mode);
}
else { // Full stack mode
UE_mode = get_ue_mode(module_idP,0,eNB_indexP);
}
uint8_t lcid = CCCH;
uint16_t Size16;
struct RACH_ConfigCommon *rach_ConfigCommon =
@@ -361,6 +323,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
"Transmission on secondary CCs is not supported yet\n");
if (UE_mode == PRACH) {
LOG_D(MAC, "ue_get_rach 3, RA_active value: %d", UE_mac_inst[module_idP].RA_active);
if (UE_mac_inst[module_idP].radioResourceConfigCommon) {
rach_ConfigCommon =
&UE_mac_inst[module_idP].
@@ -392,7 +355,6 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
module_idP, frameP, Size);
if (Size > 0) {
UE_mac_inst[module_idP].RA_active = 1;
UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER =
1;
@@ -447,7 +409,12 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
mac_rlc_status_ind(module_idP,
UE_mac_inst[module_idP].crnti,
eNB_indexP, frameP, subframeP,
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6);
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6
#ifdef Rel14
,0, 0
#endif
);
if (UE_mac_inst[module_idP].crnti_before_ho)
LOG_D(MAC,
@@ -463,7 +430,13 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
dcch_header_len);
sdu_lengths[0] = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
(char *) &ulsch_buff[0]);
(char *) &ulsch_buff[0]
#ifdef Rel14
,0,
0
#endif
);
LOG_D(MAC, "[UE %d] TX Got %d bytes for DCCH\n",
module_idP, sdu_lengths[0]);
+5 -5
View File
@@ -28,10 +28,10 @@
*/
#include "defs.h"
#include "proto.h"
#include "extern.h"
#include "SIMULATION/TOOLS/defs.h"
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
#include "SIMULATION/TOOLS/sim.h"
#include "UTIL/LOG/log.h"
#include "OCG.h"
#include "OCG_extern.h"
@@ -98,7 +98,7 @@ fill_rar(const module_id_t module_idP,
return (ra->rnti);
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//------------------------------------------------------------------------------
unsigned short
fill_rar_br(eNB_MAC_INST * eNB,
+4 -4
View File
@@ -28,10 +28,10 @@
*/
#include "defs.h"
#include "proto.h"
#include "extern.h"
#include "SIMULATION/TOOLS/defs.h"
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
#include "SIMULATION/TOOLS/sim.h"
#include "UTIL/LOG/log.h"
#include "OCG.h"
#include "OCG_extern.h"
+420 -106
View File
@@ -33,29 +33,25 @@
#include <pthread.h>
#endif
#include "extern.h"
#include "defs.h"
#include "proto.h"
#ifdef PHY_EMUL
#include "SIMULATION/PHY_EMULATION/impl_defs.h"
#else
#include "SCHED/defs.h"
#include "mac_extern.h"
#include "mac.h"
#include "mac_proto.h"
#include "SCHED_UE/sched_UE.h"
#include "PHY/impl_defs_top.h"
#endif
#include "PHY_INTERFACE/extern.h"
#include "PHY_INTERFACE/phy_interface_extern.h"
#include "COMMON/mac_rrc_primitives.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "openair2/PHY_INTERFACE/phy_stub_UE.h"
#ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h"
#endif
#include "pdcp.h"
#if defined(ENABLE_ITTI)
@@ -64,13 +60,24 @@
#include "assertions.h"
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "SIMULATION/TOOLS/sim.h" // for taus
#define DEBUG_HEADER_PARSING 1
#define ENABLE_MAC_PAYLOAD_DEBUG 1
extern uint8_t usim_test;
extern UL_IND_t *UL_INFO;
extern uint8_t nfapi_mode;
/*
*
#ifndef USER_MODE
#define msg debug_msg
#endif
*/
mapping BSR_names[] = {
{"NONE", 0},
{"SHORT BSR", 1},
@@ -83,6 +90,7 @@ mapping BSR_names[] = {
void ue_init_mac(module_id_t module_idP)
{
int i;
// default values as deined in 36.331 sec 9.2.2
LOG_I(MAC, "[UE%d] Applying default macMainConfig\n", module_idP);
@@ -145,6 +153,19 @@ void ue_init_mac(module_id_t module_idP)
UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[i] = 0;
}
if(nfapi_mode == 3) {
pthread_mutex_init(&UE_mac_inst[module_idP].UL_INFO_mutex,NULL);
UE_mac_inst[module_idP].UE_mode[0] = NOT_SYNCHED; //PRACH;
UE_mac_inst[module_idP].first_ULSCH_Tx =0;
UE_mac_inst[module_idP].SI_Decoded = 0;
next_ra_frame = 0;
next_Mod_id = 0;
tx_request_pdu_list = NULL;
tx_req_num_elems = 0;
}
#ifdef CBA
for (i = 0; i < NUM_MAX_CBA_GROUP; i++) {
@@ -395,7 +416,8 @@ ue_send_sdu(module_id_t module_idP,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_IN);
LOG_T(MAC, "sdu: %x.%x.%x\n", sdu[0], sdu[1], sdu[2]);
//LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
if (opt_enabled) {
trace_pdu(1, sdu, sdu_len, module_idP, 3,
@@ -453,7 +475,16 @@ ue_send_sdu(module_id_t module_idP,
LOG_E(MAC,
"[UE %d][RAPROC] Contention detected, RA failed\n",
module_idP);
ra_failed(module_idP, CC_id, eNB_index);
if(nfapi_mode == 3) { // Panos: phy_stub mode
// Panos: Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
// PRACH state.
LOG_I(MAC, "nfapi_mode3: Setting UE_mode BACK to PRACH 1\n");
UE_mac_inst[module_idP].UE_mode[eNB_index] = PRACH;
//ra_failed(module_idP,CC_id,eNB_index);UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
}
else{
ra_failed(module_idP, CC_id, eNB_index);
}
UE_mac_inst
[module_idP].
RA_contention_resolution_timer_active = 0;
@@ -469,7 +500,14 @@ ue_send_sdu(module_id_t module_idP,
UE_mac_inst
[module_idP].
RA_contention_resolution_timer_active = 0;
ra_succeeded(module_idP, CC_id, eNB_index);
if(nfapi_mode == 3) // phy_stub mode
{
//Panos: Modification for phy_stub mode operation here. We only need to change the ue_mode to PUSCH
UE_mac_inst[module_idP].UE_mode[eNB_index] = PUSCH;
}
else { // Full stack mode
ra_succeeded(module_idP,CC_id,eNB_index);
}
}
payload_ptr += 6;
@@ -480,9 +518,14 @@ ue_send_sdu(module_id_t module_idP,
LOG_D(MAC, "[UE] CE %d : UE Timing Advance : %d\n", i,
payload_ptr[0]);
#endif
process_timing_advance(module_idP, CC_id, payload_ptr[0]);
payload_ptr++;
break;
// Panos: Eliminate call to process_timing_advance for the phy_stub UE operation mode. Is this correct?
if (nfapi_mode!=3)
{
process_timing_advance(module_idP,CC_id,payload_ptr[0]);
}
payload_ptr++;
break;
case DRX_CMD:
#ifdef DEBUG_HEADER_PARSING
@@ -498,7 +541,6 @@ ue_send_sdu(module_id_t module_idP,
LOG_D(MAC, "[UE] SDU %d : LCID %d, length %d\n", i,
rx_lcids[i], rx_lengths[i]);
#endif
if (rx_lcids[i] == CCCH) {
LOG_D(MAC,
@@ -515,6 +557,7 @@ ue_send_sdu(module_id_t module_idP,
LOG_T(MAC, "\n");
#endif
mac_rrc_data_ind_ue(module_idP,
CC_id,
frameP, subframeP,
@@ -646,7 +689,7 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
}
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
unsigned char *parse_mch_header(unsigned char *mac_header,
unsigned char *num_sdu,
unsigned char *rx_lcids,
@@ -778,9 +821,93 @@ ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
#endif
}
int8_t
ue_get_mbsfn_sf_alloction(module_id_t module_idP,
uint8_t mbsfn_sync_area, unsigned char eNB_index)
void ue_send_sl_sdu(module_id_t module_idP,
uint8_t CC_id,
frame_t frameP,
sub_frame_t subframeP,
uint8_t* sdu,
uint16_t sdu_len,
uint8_t eNB_index,
sl_discovery_flag_t sl_discovery_flag
) {
int rlc_sdu_len;
char *rlc_sdu;
uint32_t destinationL2Id =0x00000000;
if (sl_discovery_flag == SL_DISCOVERY_FLAG_NO) {
// Notes: 1. no control elements are supported yet
// 2. we exit with error if LCID != 3
// 3. we exit with error if E=1 (more than one SDU/CE)
// extract header
SLSCH_SUBHEADER_24_Bit_DST_LONG *longh = (SLSCH_SUBHEADER_24_Bit_DST_LONG *)sdu;
AssertFatal(longh->E==0,"E is non-zero\n");
AssertFatal(((longh->LCID==3)|(longh->LCID==10)),"LCID is %d (not 3 or 10)\n",longh->LCID);
//filter incoming packet based on destination address
destinationL2Id = (longh->DST07<<16) | (longh->DST815 <<8) | (longh->DST1623);
LOG_I( MAC, "[DestinationL2Id: 0x%08x] \n", destinationL2Id );
//in case of 1-n communication, verify that UE belongs to that group
int i=0;
for (i=0; i< MAX_NUM_DEST; i++)
if (UE_mac_inst[module_idP].destinationList[i] == destinationL2Id) break;
//match the destinationL2Id with UE L2Id or groupL2ID
if (!((destinationL2Id == UE_mac_inst[module_idP].sourceL2Id) | (i < MAX_NUM_DEST))){
LOG_I( MAC, "[Destination Id is neither matched with Source Id nor with Group Id, drop the packet!!! \n");
return;
}
if (longh->F==1) {
rlc_sdu_len = ((longh->L_MSB<<8)&0x7F00)|(longh->L_LSB&0xFF);
rlc_sdu = (char *)sdu+sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG);
}
else {
rlc_sdu_len = ((SLSCH_SUBHEADER_24_Bit_DST_SHORT *)sdu)->L;
rlc_sdu = (char *)sdu+sizeof(SLSCH_SUBHEADER_24_Bit_DST_SHORT);
}
mac_rlc_data_ind(
module_idP,
0x1234,
eNB_index,
frameP,
ENB_FLAG_NO,
MBMS_FLAG_NO,
longh->LCID, //3/10
rlc_sdu,
rlc_sdu_len,
1,
NULL);
} else { //SL_DISCOVERY
uint16_t len = sdu_len;
LOG_I( MAC, "SL DISCOVERY \n");
// Panos: Ask TTN if we should be calling mac_rrc_data_ind_ue() instead of mac_rrc_data_ind() now!
/*mac_rrc_data_ind(module_idP,
CC_id,
frameP,subframeP,
UE_mac_inst[module_idP].crnti,
SL_DISCOVERY,
sdu, //(uint8_t*)&UE_mac_inst[Mod_id].SL_Discovery[0].Rx_buffer.Payload[0],
len,
ENB_FLAG_NO,
eNB_index,
0);*/
mac_rrc_data_ind_ue(module_idP,
CC_id,
frameP,subframeP,
UE_mac_inst[module_idP].crnti,
SL_DISCOVERY,
sdu, //(uint8_t*)&UE_mac_inst[Mod_id].SL_Discovery[0].Rx_buffer.Payload[0],
len,
eNB_index,
0);
}
}
int8_t ue_get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_area, unsigned char eNB_index)
{
// currently there is one-to-one mapping between sf allocation pattern and sync area
if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
@@ -1496,6 +1623,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t * ulsch_buffer, uint16_t buflen, uint8_t * access_mode)
{
//LOG_I(MAC, "Panos-D: UE[%d] In ue_get_sdu() 1 \n", module_idP);
uint8_t total_rlc_pdu_header_len = 0, rlc_pdu_header_len_last = 0;
uint16_t buflen_remain = 0;
uint8_t bsr_len = 0, bsr_ce_len = 0, bsr_header_len = 0;
@@ -1724,9 +1852,13 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
MBMS_FLAG_NO,
lcid,
buflen_remain,
(char *)
&ulsch_buff
[sdu_length_total]);
(char *)&ulsch_buff[sdu_length_total]
#ifdef Rel14
,0,
0
#endif
);
AssertFatal(buflen_remain >= sdu_lengths[num_sdus],
@@ -1864,7 +1996,15 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
}
// build PHR and update the timers
if (phr_ce_len == sizeof(POWER_HEADROOM_CMD)) {
phr_p->PH = get_phr_mapping(module_idP, CC_id, eNB_index);
if(nfapi_mode ==3){
//Panos: Substitute with a static value for the MAC layer abstraction (phy_stub mode)
phr_p->PH = 40;
}
else{
phr_p->PH = get_phr_mapping(module_idP, CC_id, eNB_index);
}
phr_p->R = 0;
LOG_D(MAC,
"[UE %d] Frame %d report PHR with mapping (%d->%d) for LCID %d\n",
@@ -1878,7 +2018,6 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
LOG_T(MAC, "[UE %d] Frame %d: bsr s %p bsr_l %p, phr_p %p\n",
module_idP, frameP, bsr_s, bsr_l, phr_p);
// Check BSR padding: it is done after PHR according to Logical Channel Prioritization order
// Check for max padding size, ie MAC Hdr for last RLC PDU = 1
/* For Padding BSR:
@@ -2073,6 +2212,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
buflen - sdu_length_total - payload_offset);
// cycle through SDUs and place in ulsch_buffer
if (sdu_length_total) {
//LOG_I(MAC, "Panos-D: [UE %d] ue_get_sdu() 2 before copying to ulsch_buffer, SFN/SF: %d/%d \n \n \n", module_idP, frameP, subframe);
memcpy(&ulsch_buffer[payload_offset], ulsch_buff,
sdu_length_total);
}
@@ -2139,6 +2279,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
}
}
//------------------------------------------------------------------------------
// called at each subframe
// Performs :
@@ -2300,6 +2442,7 @@ ue_scheduler(const module_id_t module_idP,
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].ue_scheduler);
#endif
//return(RRC_OK);
}
@@ -2323,7 +2466,17 @@ ue_scheduler(const module_id_t module_idP,
LOG_E(MAC,
"Module id %u Contention resolution timer expired, RA failed\n",
module_idP);
ra_failed(module_idP, 0, eNB_indexP);
if(nfapi_mode == 3) { // Panos: phy_stub mode
// Panos: Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
// PRACH state.
LOG_I(MAC, "nfapi_mode3: Setting UE_mode to PRACH 2 \n");
UE_mac_inst[module_idP].UE_mode[eNB_indexP] = PRACH;
//ra_failed(module_idP,CC_id,eNB_index);UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
}
else{
ra_failed(module_idP, CC_id, eNB_indexP);
}
//ra_failed(module_idP, 0, eNB_indexP);
}
}
// Get RLC status info and update Bj for all lcids that are active
@@ -2641,92 +2794,92 @@ update_bsr(module_id_t module_idP, frame_t frameP,
sub_frame_t subframeP, eNB_index_t eNB_index)
{
mac_rlc_status_resp_t rlc_status;
boolean_t bsr_regular_triggered = FALSE;
uint8_t lcid;
uint8_t lcgid;
uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
uint16_t lcgid_buffer_remain[MAX_NUM_LCGID] = { 0, 0, 0, 0 };
int32_t lcid_bytes_in_buffer[MAX_NUM_LCID];
/* Array for ordering LCID with data per decreasing priority order */
uint8_t lcid_reordered_array[MAX_NUM_LCID] =
{ MAX_NUM_LCID, MAX_NUM_LCID, MAX_NUM_LCID, MAX_NUM_LCID,
MAX_NUM_LCID, MAX_NUM_LCID, MAX_NUM_LCID, MAX_NUM_LCID,
MAX_NUM_LCID,
MAX_NUM_LCID, MAX_NUM_LCID
};
uint8_t pos_next = 0;
uint8_t highest_priority = 16;
uint8_t array_index = 0;
mac_rlc_status_resp_t rlc_status;
boolean_t bsr_regular_triggered = FALSE;
uint8_t lcid;
uint8_t lcgid;
uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
uint16_t lcgid_buffer_remain[MAX_NUM_LCGID] = {0,0,0,0};
int32_t lcid_bytes_in_buffer[MAX_NUM_LCID];
/* Array for ordering LCID with data per decreasing priority order */
uint8_t lcid_reordered_array[MAX_NUM_LCID]=
{MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID,MAX_NUM_LCID};
uint8_t pos_next = 0;
uint8_t highest_priority = 16;
uint8_t array_index = 0;
// Reset All BSR Infos
lcid_bytes_in_buffer[0] = 0;
for (lcid = DCCH; lcid < MAX_NUM_LCID; lcid++) {
// Reset transmission status
lcid_bytes_in_buffer[lcid] = 0;
UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] =
LCID_EMPTY;
}
// Reset All BSR Infos
lcid_bytes_in_buffer[0] = 0;
for (lcid=DCCH; lcid < MAX_NUM_LCID; lcid++)
{
// Reset transmission status
lcid_bytes_in_buffer[lcid] = 0;
UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid]=LCID_EMPTY;
}
for (lcgid = 0; lcgid < MAX_NUM_LCGID; lcgid++) {
// Reset Buffer Info
UE_mac_inst[module_idP].scheduling_info.BSR[lcgid] = 0;
UE_mac_inst[module_idP].scheduling_info.BSR_bytes[lcgid] = 0;
}
for (lcgid=0; lcgid < MAX_NUM_LCGID; lcgid++)
{
// Reset Buffer Info
UE_mac_inst[module_idP].scheduling_info.BSR[lcgid]=0;
UE_mac_inst[module_idP].scheduling_info.BSR_bytes[lcgid]=0;
}
//Get Buffer Occupancy and fill lcid_reordered_array
for (lcid = DCCH; lcid < MAX_NUM_LCID; lcid++) {
if (UE_mac_inst[module_idP].logicalChannelConfig[lcid]) {
lcgid = UE_mac_inst[module_idP].scheduling_info.LCGID[lcid];
//Get Buffer Occupancy and fill lcid_reordered_array
for (lcid=DCCH; lcid < MAX_NUM_LCID; lcid++)
{
if (UE_mac_inst[module_idP].logicalChannelConfig[lcid])
{
lcgid = UE_mac_inst[module_idP].scheduling_info.LCGID[lcid];
// Store already available data to transmit per Group
if (lcgid < MAX_NUM_LCGID) {
lcgid_buffer_remain[lcgid] +=
UE_mac_inst[module_idP].
scheduling_info.LCID_buffer_remain[lcid];
}
// Store already available data to transmit per Group
if (lcgid < MAX_NUM_LCGID)
{
lcgid_buffer_remain[lcgid] += UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[lcid];
}
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti, eNB_index, frameP, subframeP, ENB_FLAG_NO, MBMS_FLAG_NO, lcid, 0xFFFF); //TBS is not used in RLC at this step, set a special value for debug
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
lcid,
0xFFFF //TBS is not used in RLC at this step, set a special value for debug
#ifdef Rel14
,0, 0
#endif
);
lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer;
lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer;
if (rlc_status.bytes_in_buffer > 0) {
LOG_D(MAC,
"[UE %d] PDCCH Tick : LCID%d LCGID%d has data to transmit =%d bytes at frame %d subframe %d\n",
module_idP, lcid, lcgid, rlc_status.bytes_in_buffer,
frameP, subframeP);
if (rlc_status.bytes_in_buffer > 0)
{
LOG_D(MAC,"[UE %d] PDCCH Tick : LCID%d LCGID%d has data to transmit =%d bytes at frame %d subframe %d\n",
module_idP, lcid,lcgid,rlc_status.bytes_in_buffer,frameP,subframeP);
UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] =
LCID_NOT_EMPTY;
//Update BSR_bytes and position in lcid_reordered_array only if Group is defined
if (lcgid < MAX_NUM_LCGID) {
num_lcid_with_data++;
// sum lcid buffer which has same lcgid
UE_mac_inst[module_idP].scheduling_info.
BSR_bytes[lcgid] += rlc_status.bytes_in_buffer;
UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] = LCID_NOT_EMPTY;
//Update BSR_bytes and position in lcid_reordered_array only if Group is defined
if (lcgid < MAX_NUM_LCGID)
{
num_lcid_with_data ++;
// sum lcid buffer which has same lcgid
UE_mac_inst[module_idP].scheduling_info.BSR_bytes[lcgid] += rlc_status.bytes_in_buffer;
//Fill in the array
array_index = 0;
do {
if (UE_mac_inst[module_idP].logicalChannelConfig
[lcid]->ul_SpecificParameters->priority <=
highest_priority) {
//Insert if priority is higher or equal (lower or equal in value)
for (pos_next = num_lcid_with_data - 1;
pos_next > array_index; pos_next--) {
lcid_reordered_array[pos_next] =
lcid_reordered_array[pos_next - 1];
//Fill in the array
array_index = 0;
do
{
if (UE_mac_inst[module_idP].logicalChannelConfig[lcid]->ul_SpecificParameters->priority <= highest_priority)
{
//Insert if priority is higher or equal (lower or equal in value)
for (pos_next=num_lcid_with_data-1; pos_next > array_index; pos_next--)
{
lcid_reordered_array[pos_next] = lcid_reordered_array[pos_next - 1];
}
lcid_reordered_array[array_index] = lcid;
break;
}
lcid_reordered_array[array_index] = lcid;
break;
}
array_index++;
}
while ((array_index < num_lcid_with_data)
&& (array_index < MAX_NUM_LCID));
}
}
array_index ++;
}
while ((array_index < num_lcid_with_data) && (array_index < MAX_NUM_LCID));
}
}
}
@@ -3037,3 +3190,164 @@ int get_db_dl_PathlossChange(uint8_t dl_PathlossChange)
break;
}
}
SLSS_t *ue_get_slss(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t subframe_tx) {
return((SLSS_t*)NULL);
}
SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t subframe_tx) {
//UE_MAC_INST *ue = &UE_mac_inst[Mod_id];
SLDCH_t *sldch = &UE_mac_inst[Mod_id].sldch;
// Panos: Ask TTN if we should be calling mac_rrc_data_req_ue() instead of mac_rrc_data_req() now!
/*sldch->payload_length = mac_rrc_data_req(Mod_id,
CC_id,
frame_tx,
SL_DISCOVERY,
1,
(char*)(sldch->payload), //&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0],
0,
0, //eNB_indexP
0);*/
sldch->payload_length = mac_rrc_data_req_ue(Mod_id,
CC_id,
frame_tx,
SL_DISCOVERY,
1,
(uint8_t*)(sldch->payload), //&UE_mac_inst[Mod_id].SL_Discovery[0].Tx_buffer.Payload[0],
0, //eNB_indexP
0);
if (sldch->payload_length >0 ) {
LOG_I(MAC,"Got %d bytes from RRC for SLDCH @ %p\n",sldch->payload_length,sldch);
return (sldch);
}
else
return((SLDCH_t*)NULL);
}
SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) {
mac_rlc_status_resp_t rlc_status; //, rlc_status_data;
uint32_t absSF = (frameP*10)+subframeP;
UE_MAC_INST *ue = &UE_mac_inst[module_idP];
int rvtab[4] = {0,2,3,1};
int sdu_length;
//uint8_t sl_lcids[2] = {3, 10}; //list of lcids for SL - hardcoded
int i = 0;
// Note: this is hard-coded for now for the default SL configuration (4 SF PSCCH, 36 SF PSSCH)
SLSCH_t *slsch = &UE_mac_inst[module_idP].slsch;
LOG_D(MAC,"Checking SLSCH for absSF %d\n",absSF);
if ((absSF%40) == 0) { // fill PSCCH data later in first subframe of SL period
ue->sltx_active = 0;
for (i = 0; i < MAX_NUM_LCID; i++){
if (ue->SL_LCID[i] > 0) {
for (int j = 0; j < ue->numCommFlows; j++){
if ((ue->sourceL2Id > 0) && (ue->destinationList[j] >0) ){
rlc_status = mac_rlc_status_ind(module_idP, 0x1234,0,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
ue->SL_LCID[i], 0xFFFF, ue->sourceL2Id, ue->destinationList[j]);
if (rlc_status.bytes_in_buffer > 2){
LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status.bytes_in_buffer);
// Fill in group id for off-network communications
ue->sltx_active = 1;
//store LCID, destinationL2Id
ue->slsch_lcid = ue->SL_LCID[i];
ue->destinationL2Id = ue->destinationList[j];
break;
}
}
}
}
if ( ue->sltx_active == 1) break;
}
} // we're not in the SCCH period
else if (((absSF & 3) == 0 ) &&
(ue->sltx_active == 1)) { // every 4th subframe, check for new data from RLC
// 10 PRBs, mcs 19
int TBS = 4584/8;
int req;
if (TBS <= rlc_status.bytes_in_buffer) req = TBS;
else req = rlc_status.bytes_in_buffer;
if (req>0) {
sdu_length = mac_rlc_data_req(module_idP,
0x1234,
0,
frameP,
ENB_FLAG_NO,
MBMS_FLAG_NO,
ue->slsch_lcid,
req,
(char*)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG))
#ifdef Rel14
,ue->sourceL2Id,
ue->destinationL2Id
#endif
);
// Notes: 1. hard-coded to 24-bit destination format for now
if (sdu_length > 0) {
LOG_I(MAC,"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)\n",frameP,subframeP,sdu_length,req);
LOG_I(MAC,"sourceL2Id: 0x%08x \n",ue->sourceL2Id);
LOG_I(MAC,"groupL2Id/destinationL2Id: 0x%08x \n",ue->destinationL2Id);
slsch->payload = (unsigned char*)ue->slsch_pdu.payload;
if (sdu_length < 128) {
slsch->payload++;
SLSCH_SUBHEADER_24_Bit_DST_SHORT *shorth= (SLSCH_SUBHEADER_24_Bit_DST_SHORT *)slsch->payload;
shorth->F = 0;
shorth->L = sdu_length;
shorth->E = 0;
shorth->LCID = ue->slsch_lcid;
shorth->SRC07 = (ue->sourceL2Id>>16) & 0x000000ff;
shorth->SRC815 = (ue->sourceL2Id>>8) & 0x000000ff;
shorth->SRC1623 = ue->sourceL2Id & 0x000000ff;
shorth->DST07 = (ue->destinationL2Id >>16) & 0x000000ff;
shorth->DST815 = (ue->destinationL2Id >>8) & 0x000000ff;
shorth->DST1623 = ue->destinationL2Id & 0x000000ff;
shorth->V = 0x1;
}
else {
SLSCH_SUBHEADER_24_Bit_DST_LONG *longh= (SLSCH_SUBHEADER_24_Bit_DST_LONG *)slsch->payload;
longh->F = 1;
longh->L_LSB = sdu_length&0xff;
longh->L_MSB = (sdu_length>>8)&0x7f;
longh->E = 0;
longh->LCID = ue->slsch_lcid;
longh->SRC07 = (ue->sourceL2Id >>16) & 0x000000ff;
longh->SRC815 = (ue->sourceL2Id>>8) & 0x000000ff;
longh->SRC1623 = ue->sourceL2Id & 0x000000ff;
longh->DST07 = (ue->destinationL2Id >>16) & 0x000000ff;
longh->DST815 = (ue->destinationL2Id>>8) & 0x000000ff;
longh->DST1623 = ue->destinationL2Id & 0x000000ff;
longh->V = 0x1;
}
slsch->rvidx = 0;
slsch->payload_length = TBS;
// fill in SLSCH configuration
return(&ue->slsch);
}
else ue->sltx_active = 0;
}
} else if ((absSF%40)>3 && ue->sltx_active == 1) { // handle retransmission of SDU
LOG_I(MAC,"SFN.SF %d.%d : retransmission\n",frameP,subframeP);
slsch->rvidx = rvtab[absSF&3];
return(&ue->slsch);
}
return(NULL);
}
+51 -30
View File
@@ -36,8 +36,8 @@
#include "pdcp_util.h"
#include "pdcp_sequence_manager.h"
#include "LAYER2/RLC/rlc.h"
#include "LAYER2/MAC/extern.h"
#include "RRC/LITE/proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "RRC/LTE/rrc_proto.h"
#include "pdcp_primitives.h"
#include "OCG.h"
#include "OCG_extern.h"
@@ -83,6 +83,10 @@ boolean_t pdcp_data_req(
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP
#ifdef Rel14
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
)
//-----------------------------------------------------------------------------
{
@@ -165,7 +169,11 @@ boolean_t pdcp_data_req(
(unsigned char*)&pdcp_pdu_p->data[0],
sdu_buffer_sizeP);
#endif
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p);
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p
#ifdef Rel14
,NULL, NULL
#endif
);
} else {
rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES;
LOG_W(PDCP,PROTOCOL_CTXT_FMT" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n",
@@ -351,7 +359,12 @@ boolean_t pdcp_data_req(
LOG_F(PDCP,"\n");
#endif
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p);
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p
#ifdef Rel14
,sourceL2Id
,destinationL2Id
#endif
);
}
@@ -393,7 +406,7 @@ boolean_t pdcp_data_req(
* so we return TRUE afterwards
*/
for (pdcp_uid=0; pdcp_uid< NUMBER_OF_UE_MAX;pdcp_uid++){
for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB;pdcp_uid++){
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti )
break;
}
@@ -780,6 +793,8 @@ pdcp_data_ind(
} else {
((pdcp_data_ind_header_t*) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * maxDRB);
}
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
#ifdef DEBUG_PDCP_FIFO_FLUSH_SDU
static uint32_t pdcp_inst = 0;
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = pdcp_inst++;
@@ -808,7 +823,7 @@ pdcp_data_ind(
* XXX Following two actions are identical, is there a merge error?
*/
for (pdcp_uid=0; pdcp_uid< NUMBER_OF_UE_MAX;pdcp_uid++){
for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB;pdcp_uid++){
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti ){
break;
}
@@ -856,7 +871,7 @@ void pdcp_update_stats(const protocol_ctxt_t* const ctxt_pP){
// these stats are measured for both eNB and UE on per seond basis
for (rb_id =0; rb_id < NB_RB_MAX; rb_id ++){
for (pdcp_uid=0; pdcp_uid< NUMBER_OF_UE_MAX;pdcp_uid++){
for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB;pdcp_uid++){
//printf("frame %d and subframe %d \n", pdcp_enb[ctxt_pP->module_id].frame, pdcp_enb[ctxt_pP->module_id].subframe);
// tx stats
if (Pdcp_stats_tx_window_ms[ctxt_pP->module_id][pdcp_uid] > 0 &&
@@ -914,6 +929,7 @@ pdcp_run (
protocol_ctxt_t ctxt;
#endif
if (ctxt_pP->enb_flag) {
start_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_run);
@@ -965,7 +981,11 @@ pdcp_run (
RRC_DCCH_DATA_REQ (msg_p).confirmp,
RRC_DCCH_DATA_REQ (msg_p).sdu_size,
RRC_DCCH_DATA_REQ (msg_p).sdu_p,
RRC_DCCH_DATA_REQ (msg_p).mode);
RRC_DCCH_DATA_REQ (msg_p).mode
#ifdef Rel14
, NULL, NULL
#endif
);
if (result != TRUE)
LOG_E(PDCP, "PDCP data request failed!\n");
@@ -1060,14 +1080,14 @@ pdcp_run (
void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP){
int i, ue_flag=1; //, ret=-1; to be decied later
for (i=0; i < NUMBER_OF_UE_MAX; i++){
for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rnti) {
ue_flag=-1;
break;
}
}
if (ue_flag == 1 ){
for (i=0; i < NUMBER_OF_UE_MAX ; i++){
for (i=0; i < MAX_MOBILES_PER_ENB ; i++){
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == 0 ){
pdcp_enb[ctxt_pP->module_id].rnti[i]=ctxt_pP->rnti;
pdcp_enb[ctxt_pP->module_id].uid[i]=i;
@@ -1095,7 +1115,7 @@ pdcp_remove_UE(
int i;
// check and remove SRBs first
for(int i = 0;i<NUMBER_OF_UE_MAX;i++){
for(int i = 0;i<MAX_MOBILES_PER_ENB;i++){
if(pdcp_eNB_UE_instance_to_rnti[i] == ctxt_pP->rnti){
pdcp_eNB_UE_instance_to_rnti[i] = NOT_A_RNTI;
break;
@@ -1116,7 +1136,7 @@ pdcp_remove_UE(
(void)h_rc; /* remove gcc warning "set but not used" */
// remove ue for pdcp enb inst
for (i=0; i < NUMBER_OF_UE_MAX; i++) {
for (i=0; i < MAX_MOBILES_PER_ENB; i++) {
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rnti ) {
LOG_I(PDCP, "remove uid is %d/%d %x\n", i,
pdcp_enb[ctxt_pP->module_id].uid[i],
@@ -1143,7 +1163,7 @@ rrc_pdcp_config_asn1_req (
uint8_t *const kRRCenc_pP,
uint8_t *const kRRCint_pP,
uint8_t *const kUPenc_pP
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
,PMCH_InfoList_r9_t* const pmch_InfoList_r9_pP
#endif
,rb_id_t *const defaultDRB
@@ -1170,7 +1190,7 @@ rrc_pdcp_config_asn1_req (
hashtable_rc_t h_rc;
hash_key_t key_defaultDRB = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_defaultDRB_rc;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
int i,j;
MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
@@ -1468,7 +1488,7 @@ rrc_pdcp_config_asn1_req (
}
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
if (pmch_InfoList_r9_pP != NULL) {
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
@@ -1553,16 +1573,16 @@ pdcp_config_req_asn1 (
//pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti;
// pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
if( srb_flagP == SRB_FLAG_NO ) {
for(int i = 0;i<NUMBER_OF_UE_MAX;i++){
for(int i = 0;i<MAX_MOBILES_PER_ENB;i++){
if(pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] == NOT_A_RNTI){
break;
}
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % NUMBER_OF_UE_MAX;
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
}
pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % NUMBER_OF_UE_MAX;
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
}
//pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % NUMBER_OF_UE_MAX;
//pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
} else {
pdcp_pP->is_ue = TRUE;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
@@ -1678,7 +1698,7 @@ pdcp_config_req_asn1 (
memset(pdcp_pP, 0, sizeof(pdcp_t));
break;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
case CONFIG_ACTION_MBMS_ADD:
case CONFIG_ACTION_MBMS_MODIFY:
@@ -1794,6 +1814,7 @@ rrc_pdcp_config_req (
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
pdcp_p->is_ue = TRUE;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
} else {
pdcp_p->is_ue = FALSE;
}
@@ -1812,9 +1833,9 @@ rrc_pdcp_config_req (
}
pdcp_p->first_missing_pdu = -1;
LOG_D(PDCP,PROTOCOL_PDCP_CTXT_FMT" Config request : Action ADD: radio bearer id %d (already added) configured\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
rb_idP);
LOG_D(PDCP,PROTOCOL_PDCP_CTXT_FMT" Config request : Action ADD: radio bearer id %d (already added) configured\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
rb_idP);
break;
case CONFIG_ACTION_MODIFY:
@@ -1871,10 +1892,10 @@ rrc_pdcp_config_req (
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
pdcp_p->is_ue = TRUE;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
} else {
pdcp_p->is_ue = FALSE;
}
}
pdcp_p->next_pdcp_tx_sn = 0;
pdcp_p->next_pdcp_rx_sn = 0;
@@ -1998,7 +2019,7 @@ void pdcp_layer_init(void)
module_id_t instance;
int i,j;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
mbms_session_id_t session_id;
mbms_service_id_t service_id;
#endif
@@ -2009,8 +2030,8 @@ void pdcp_layer_init(void)
pdcp_coll_p = hashtable_create ((maxDRB + 2) * 16, NULL, pdcp_free);
AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed");
for (instance = 0; instance < NUMBER_OF_UE_MAX; instance++) {
#if defined(Rel10) || defined(Rel14)
for (instance = 0; instance < MAX_MOBILES_PER_ENB; instance++) {
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for (service_id = 0; service_id < maxServiceCount; service_id++) {
for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) {
@@ -2024,7 +2045,7 @@ void pdcp_layer_init(void)
for (instance = 0; instance < NUMBER_OF_eNB_MAX; instance++) {
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for (service_id = 0; service_id < maxServiceCount; service_id++) {
for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) {
@@ -2047,7 +2068,7 @@ void pdcp_layer_init(void)
memset(Pdcp_stats_tx_window_ms, 0, sizeof(Pdcp_stats_tx_window_ms));
memset(Pdcp_stats_rx_window_ms, 0, sizeof(Pdcp_stats_rx_window_ms));
for (i =0; i< MAX_NUM_CCs ; i ++){
for (j=0; j< NUMBER_OF_UE_MAX;j++){
for (j=0; j< MAX_MOBILES_PER_ENB;j++){
Pdcp_stats_tx_window_ms[i][j]=100;
Pdcp_stats_rx_window_ms[i][j]=100;
}
+93 -43
View File
@@ -67,14 +67,14 @@
#include "UTIL/LISTS/list.h"
#endif //NON_ACCESS_STRATUM
//-----------------------------------------------------------------------------
#include "RRC/LITE/defs.h"
#include "RRC/LTE/rrc_defs.h"
#include "COMMON/platform_constants.h"
#include "COMMON/platform_types.h"
#include "DRB-ToAddMod.h"
#include "DRB-ToAddModList.h"
#include "SRB-ToAddMod.h"
#include "SRB-ToAddModList.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "MBMS-SessionInfoList-r9.h"
#include "PMCH-InfoList-r9.h"
#endif
@@ -94,34 +94,34 @@ extern int pdcp_instance_cnt;
int init_pdcp_thread(void);
void cleanup_pdcp_thread(void);
public_pdcp(uint32_t Pdcp_stats_tx_window_ms[MAX_NUM_CCs][NUMBER_OF_UE_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_sn[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_throughput_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_iat[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_window_ms[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_sn[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_throughput_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_window_ms[MAX_NUM_CCs][NUMBER_OF_UE_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_sn[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_goodput_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_iat[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_outoforder[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_window_ms[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]);
public_pdcp(uint32_t Pdcp_stats_rx[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_sn[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_goodput_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_outoforder[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(void pdcp_update_perioidical_stats(const protocol_ctxt_t* const ctxt_pP));
@@ -131,8 +131,8 @@ public_pdcp(void pdcp_update_perioidical_stats(const protocol_ctxt_t* const ctx
//public_pdcp(uint64_t *pdcp_size_packet);
typedef struct pdcp_enb_s {
// used for eNB stats generation
uint16_t uid[NUMBER_OF_UE_MAX];
rnti_t rnti[NUMBER_OF_UE_MAX];
uint16_t uid[MAX_MOBILES_PER_ENB];
rnti_t rnti[MAX_MOBILES_PER_ENB];
uint16_t num_ues;
uint64_t sfn;
@@ -223,7 +223,7 @@ typedef struct pdcp_s {
} pdcp_t;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
typedef struct pdcp_mbms_s {
boolean_t instanciated_instance;
rb_id_t rb_id;
@@ -259,7 +259,12 @@ public_pdcp(boolean_t pdcp_data_req(
const confirm_t confirmP, \
const sdu_size_t sdu_buffer_size,
unsigned char* const sdu_buffer,
const pdcp_transmission_mode_t mode));
const pdcp_transmission_mode_t mode
#ifdef Rel14
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
));
/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
* \brief This functions handles data transfer indications coming from RLC
@@ -323,7 +328,7 @@ public_pdcp(
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
,PMCH_InfoList_r9_t *pmch_InfoList_r9
#endif
,rb_id_t *const defaultDRB
@@ -432,6 +437,10 @@ typedef struct pdcp_data_req_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t traffic_type;
#ifdef Rel14
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_req_header_t;
typedef struct pdcp_data_ind_header_s {
@@ -439,6 +448,10 @@ typedef struct pdcp_data_ind_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t dummy_traffic_type;
#ifdef Rel14
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_ind_header_t;
struct pdcp_netlink_element_s {
@@ -448,6 +461,43 @@ struct pdcp_netlink_element_s {
uint8_t *data;
};
//TTN for D2D (PC5S)
#ifdef Rel14
#define PDCP_SOCKET_PORT_NO 9999 //temporary value
#define PC5_SIGNALLING_PAYLOAD_SIZE 100 //should be updated with a correct value
int pdcp_pc5_sockfd;
struct sockaddr_in prose_ctrl_addr;
struct sockaddr_in prose_pdcp_addr;
struct sockaddr_in pdcp_sin;
void pdcp_pc5_socket_init(void);
typedef struct {
rb_id_t rb_id;
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t traffic_type;
uint32_t sourceL2Id;
uint32_t destinationL2Id;
} __attribute__((__packed__)) pc5s_header_t;
//new PC5S-message
typedef struct {
unsigned char bytes[PC5_SIGNALLING_PAYLOAD_SIZE];
} __attribute__((__packed__)) PC5SignallingMessage ;
//example of PC5-S messages
typedef struct {
pc5s_header_t pc5s_header;
union {
uint8_t status;
PC5SignallingMessage pc5_signalling_message;
} pc5sPrimitive;
} __attribute__((__packed__)) sidelink_pc5s_element;
#endif
#if 0
/*
* Missing PDU information struct, a copy of this will be enqueued
@@ -482,19 +532,19 @@ typedef struct pdcp_missing_pdu_info_t {
protected_pdcp(signed int pdcp_2_nas_irq;)
public_pdcp(pdcp_stats_t UE_pdcp_stats[NUMBER_OF_UE_MAX];)
public_pdcp(pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB];)
public_pdcp(pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];)
//protected_pdcp(pdcp_t pdcp_array_srb_ue[NUMBER_OF_UE_MAX][2];)
//protected_pdcp(pdcp_t pdcp_array_drb_ue[NUMBER_OF_UE_MAX][maxDRB];)
//public_pdcp(pdcp_t pdcp_array_srb_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][2];)
//protected_pdcp(pdcp_t pdcp_array_drb_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][maxDRB];)
//protected_pdcp(pdcp_t pdcp_array_srb_ue[MAX_MOBILES_PER_ENB][2];)
//protected_pdcp(pdcp_t pdcp_array_drb_ue[MAX_MOBILES_PER_ENB][maxDRB];)
//public_pdcp(pdcp_t pdcp_array_srb_eNB[NUMBER_OF_eNB_MAX][MAX_MOBILES_PER_ENB][2];)
//protected_pdcp(pdcp_t pdcp_array_drb_eNB[NUMBER_OF_eNB_MAX][MAX_MOBILES_PER_ENB][maxDRB];)
// for UE code conly
protected_pdcp(rnti_t pdcp_UE_UE_module_id_to_rnti[NUMBER_OF_UE_MAX];)
protected_pdcp(rnti_t pdcp_eNB_UE_instance_to_rnti[NUMBER_OF_UE_MAX];) // for noS1 mode
protected_pdcp(rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];)
protected_pdcp(rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB];) // for noS1 mode
protected_pdcp(unsigned int pdcp_eNB_UE_instance_to_rnti_index;)
#if defined(Rel10) || defined(Rel14)
public_pdcp(pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
public_pdcp(pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_pdcp(pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
#endif
protected_pdcp(sdu_size_t pdcp_output_sdu_bytes_to_write;)
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -55,7 +55,7 @@
#include "UTIL/LOG/log.h"
#include "UTIL/OCG/OCG.h"
#include "UTIL/OCG/OCG_extern.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "pdcp.h"
#include "pdcp_primitives.h"
@@ -52,7 +52,12 @@ extern int reception_from_rohc_bs(void);
#else
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP, uint8_t is_data_plane);
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer,
uint8_t is_data_pdu);
uint8_t is_data_pdu
#ifdef Rel14
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
);
//extern BOOL pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
extern void control_pdcp (struct pdcp_entity *pdcpP);
@@ -63,4 +68,7 @@ extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP);
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
extern void *pdcp_tx (void *argP);
#endif
extern void pdcp_pc5_socket_init(void);
#endif
+1 -1
View File
@@ -34,7 +34,7 @@
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "pdcp.h"
#include "msc.h"
+3 -3
View File
@@ -37,7 +37,7 @@
#include "mac_primitives.h"
#include "rlc_primitives.h"
#include "list.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UL-AM-RLC.h"
#include "DL-AM-RLC.h"
@@ -240,7 +240,7 @@ config_req_rlc_am (
uint16_t pollPDU_tab[PollPDU_pInfinity+1]= {4,8,16,32,64,128,256,RLC_AM_POLL_PDU_INFINITE}; //PollPDU_pInfinity is chosen to 0xFFFF for now
uint32_t maxRetxThreshold_tab[UL_AM_RLC__maxRetxThreshold_t32+1]= {1,2,3,4,6,8,16,32};
uint32_t pollByte_tab[PollByte_spare1]= {25000,50000,75000,100000,125000,250000,375000,500000,750000,1000000,1250000,1500000,2000000,3000000,RLC_AM_POLL_BYTE_INFINITE}; // PollByte_kBinfinity is chosen to 0xFFFFFFFF for now
#if defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint32_t PollRetransmit_tab[T_PollRetransmit_spare5]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,2000,4000};
uint32_t am_t_Reordering_tab[32]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
uint32_t t_StatusProhibit_tab[T_StatusProhibit_spare2]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,1200,1600,2000,2400};
@@ -271,7 +271,7 @@ void config_req_rlc_am_asn1 (
if ((config_am_pP->ul_AM_RLC.maxRetxThreshold <= UL_AM_RLC__maxRetxThreshold_t32) &&
(config_am_pP->ul_AM_RLC.pollPDU<=PollPDU_pInfinity) &&
(config_am_pP->ul_AM_RLC.pollByte<PollByte_spare1) &&
#if defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
(config_am_pP->ul_AM_RLC.t_PollRetransmit<T_PollRetransmit_spare5) &&
(config_am_pP->dl_AM_RLC.t_Reordering<32) &&
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare2) ) {
+1
View File
@@ -71,6 +71,7 @@
# include "rlc_am_reassembly.h"
# include "rlc_am_init.h"
# include "RLC-Config.h"
# include "assertions.h"
//# include "rlc_am_test.h"
@@ -30,7 +30,7 @@
#define RLC_AM_IN_SDU_C 1
//-----------------------------------------------------------------------------
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#define TRACE_RLC_AM_FREE_SDU 0
+1 -1
View File
@@ -24,7 +24,7 @@
#include <string.h>
//-----------------------------------------------------------------------------
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
//-----------------------------------------------------------------------------
void
+1 -1
View File
@@ -55,7 +55,7 @@
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
#include "PHY/defs.h"
//#include "PHY/defs.h"
/*! \struct rlc_am_info_t
@@ -30,7 +30,7 @@
#include "rlc.h"
#include "rlc_am.h"
#include "list.h"
#include "LAYER2/MAC/extern.h"
//#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#include "msc.h"
@@ -28,7 +28,7 @@
#include "rlc.h"
#include "rlc_am.h"
#include "list.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
@@ -26,7 +26,7 @@
//-----------------------------------------------------------------------------
#include "rlc_am.h"
#include "rlc.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "msc.h"
//-----------------------------------------------------------------------------
@@ -27,7 +27,7 @@
#include "assertions.h"
#include "list.h"
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
@@ -56,7 +56,7 @@
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
#include "PHY/defs.h"
//#include "PHY/defs.h"
//-----------------------------------------------------------------------------
/*! \fn rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* const rlc_pP,mem_block_t* const tb_pP)
@@ -29,7 +29,7 @@
#include "msc.h"
#include "list.h"
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
//-----------------------------------------------------------------------------
@@ -32,7 +32,6 @@
#include "assertions.h"
#include "list.h"
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
# if ENABLE_ITTI
@@ -55,7 +55,7 @@
//-----------------------------------------------------------------------------
#include "platform_types.h"
#include "platform_constants.h"
#include "PHY/defs.h"
//#include "PHY/defs.h"
//-----------------------------------------------------------------------------
/*! \fn uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, const signed int bits_to_readP)
@@ -27,7 +27,7 @@
#include "platform_constants.h"
//-----------------------------------------------------------------------------
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "msc.h"
//-----------------------------------------------------------------------------
@@ -26,7 +26,7 @@
#include "platform_constants.h"
//-----------------------------------------------------------------------------
#include "rlc_am.h"
# include "LAYER2/MAC/extern.h"
# include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "msc.h"
//-----------------------------------------------------------------------------
@@ -26,7 +26,7 @@
#include "platform_constants.h"
//-----------------------------------------------------------------------------
#include "rlc_am.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "msc.h"
//-----------------------------------------------------------------------------
+1 -1
View File
@@ -29,7 +29,7 @@
#include "mac_primitives.h"
#include "rlc_primitives.h"
#include "list.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
//-----------------------------------------------------------------------------
void
rlc_tm_send_sdu (
+1 -1
View File
@@ -23,7 +23,7 @@
#define RLC_TM_INIT_C 1
//-----------------------------------------------------------------------------
#include "rlc_tm.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
//-----------------------------------------------------------------------------
void config_req_rlc_tm (
const protocol_ctxt_t* const ctxt_pP,
+1 -1
View File
@@ -35,7 +35,7 @@
#include "list.h"
#include "rlc_primitives.h"
#include "mac_primitives.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
@@ -28,7 +28,7 @@
#include "rlc_primitives.h"
#include "list.h"
#include "rrm_config_structs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "rlc_um_control_primitives.h"
@@ -78,7 +78,7 @@ void config_req_rlc_um (
}
}
//-----------------------------------------------------------------------------
#if defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
const uint32_t t_Reordering_tab[32] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
#else
const uint32_t t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
@@ -93,7 +93,12 @@ void config_req_rlc_um_asn1 (
const UL_UM_RLC_t * const ul_rlc_pP,
const DL_UM_RLC_t * const dl_rlc_pP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
const logical_chan_id_t chan_idP
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
)
{
uint32_t ul_sn_FieldLength = 0;
uint32_t dl_sn_FieldLength = 0;
@@ -103,7 +108,7 @@ void config_req_rlc_um_asn1 (
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
hashtable_rc_t h_rc;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (mbms_flagP) {
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
@@ -117,10 +122,14 @@ void config_req_rlc_um_asn1 (
mbms_service_idP,
mbms_session_idP);
rlc_p = &rlc_union_p->rlc.um;
}
if ((sourceL2Id >0 ) && (destinationL2Id >0)){
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
} else
#endif
{
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
}
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
ctxt_pP->module_id,
@@ -129,7 +138,6 @@ void config_req_rlc_um_asn1 (
rb_idP,
srb_flagP);
rlc_p = &rlc_union_p->rlc.um;
}
//-----------------------------------------------------------------------------
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" CONFIG_REQ timer_reordering=%dms sn_field_length= RB %u \n",
@@ -198,7 +206,7 @@ void config_req_rlc_um_asn1 (
return;
}
#if defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (dl_rlc_pP->t_Reordering<32) {
#else
if (dl_rlc_pP->t_Reordering<T_Reordering_spare1) {
@@ -115,7 +115,12 @@ public_rlc_um_control_primitives( void config_req_rlc_um_asn1 (
const UL_UM_RLC_t * const ul_rlc_pP,
const DL_UM_RLC_t * const dl_rlc_pP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
const logical_chan_id_t chan_idP
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
);)
/*! \fn void rlc_um_init (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
* \brief Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
+1 -1
View File
@@ -24,7 +24,7 @@
#include "platform_types.h"
//-----------------------------------------------------------------------------
#include "rlc_um.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
@@ -33,7 +33,7 @@
#include "rlc_um.h"
#include "rlc_primitives.h"
#include "list.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "msc.h"
+20 -11
View File
@@ -29,7 +29,7 @@
#define RLC_C
#include "rlc.h"
#include "mem_block.h"
#include "../MAC/extern.h"
#include "../MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/OCG/OCG_vars.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
@@ -314,7 +314,12 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
const mui_t muiP,
confirm_t confirmP,
sdu_size_t sdu_sizeP,
mem_block_t *sdu_pP)
mem_block_t *sdu_pP
#ifdef Rel14
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
)
{
//-----------------------------------------------------------------------------
mem_block_t *new_sdu_p = NULL;
@@ -323,7 +328,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
rlc_mbms_id_t *mbms_id_p = NULL;
logical_chan_id_t log_ch_id = 0;
#endif
@@ -337,7 +342,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
sdu_sizeP,
sdu_pP);
#endif
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#else
AssertFatal(MBMS_flagP == 0, "MBMS_flagP %u", MBMS_flagP);
#endif
@@ -356,13 +361,13 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
DevAssert(sdu_pP != NULL);
DevCheck(sdu_sizeP > 0, sdu_sizeP, 0, 0);
#if !defined(Rel10) && !defined(Rel14)
#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (MBMS_flagP == TRUE) {
if (ctxt_pP->enb_flag) {
@@ -374,6 +379,10 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
}
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
}
if (sourceL2Id && destinationL2Id){
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
//key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
} else
#endif
{
@@ -386,7 +395,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
rlc_mode = rlc_union_p->mode;
} else {
rlc_mode = RLC_MODE_NONE;
AssertFatal (0 , "RLC not configured key %ju\n", key);
//AssertFatal (0 , "RLC not configured key %ju\n", key);
}
if (MBMS_flagP == 0) {
@@ -498,7 +507,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
} else { /* MBMS_flag != 0 */
// LOG_I(RLC,"DUY rlc_data_req: mbms_rb_id in RLC instant is: %d\n", mbms_rb_id);
if (sdu_pP != NULL) {
@@ -615,8 +624,8 @@ rlc_module_init (void)
rlc_coll_p = hashtable_create ((maxDRB + 2) * 16, NULL, rb_free_rlc_union);
AssertFatal(rlc_coll_p != NULL, "UNRECOVERABLE error, RLC hashtable_create failed");
for (module_id1=0; module_id1 < NUMBER_OF_UE_MAX; module_id1++) {
#if defined(Rel10) || defined(Rel14)
for (module_id1=0; module_id1 < MAX_MOBILES_PER_ENB; module_id1++) {
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
rlc_mbms_lcid2service_session_id_ue[module_id1][k].service_id = 0;
@@ -631,7 +640,7 @@ rlc_module_init (void)
}
for (module_id1=0; module_id1 < NUMBER_OF_eNB_MAX; module_id1++) {
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
rlc_mbms_lcid2service_session_id_eNB[module_id1][k].service_id = 0;
+54 -15
View File
@@ -47,7 +47,7 @@
# include "asn1_constants.h"
# include "UTIL/LOG/log.h"
# include "mem_block.h"
# include "PHY/defs.h"
//# include "PHY/defs.h"
# include "RLC-Config.h"
# include "DRB-ToAddMod.h"
# include "DRB-ToAddModList.h"
@@ -55,7 +55,7 @@
# include "SRB-ToAddModList.h"
# include "DRB-ToReleaseList.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "PMCH-InfoList-r9.h"
#endif
@@ -174,7 +174,7 @@ typedef struct {
//-----------------------------------------------------------------------------
#define RLC_MAX_MBMS_LC (maxSessionPerPMCH * maxServiceCount)
#define RLC_MAX_LC ((max_val_DRB_Identity+1)* NUMBER_OF_UE_MAX)
#define RLC_MAX_LC ((max_val_DRB_Identity+1)* MAX_MOBILES_PER_ENB)
protected_rlc(void (*rlc_rrc_data_ind)(
const protocol_ctxt_t* const ctxtP,
@@ -224,7 +224,7 @@ typedef struct rlc_mbms_id_s {
mbms_session_id_t session_id;
} rlc_mbms_id_t;
#if !defined(Rel10) && !defined(Rel14)
#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
# if !defined(maxServiceCount)
//unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB
# define maxServiceCount 1
@@ -234,10 +234,10 @@ typedef struct rlc_mbms_id_s {
# define maxSessionPerPMCH 1
# endif
#endif
//public_rlc(rlc_mbms_t rlc_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
//public_rlc(rlc_mbms_t rlc_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
//public_rlc(rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[NUMBER_OF_UE_MAX][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[NUMBER_OF_eNB_MAX][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
#define rlc_mbms_enb_get_lcid_by_rb_id(Enb_mOD,rB_iD) rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD]
;
@@ -253,8 +253,8 @@ public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[NUMBER_OF_e
rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD] = lOG_cH_iD; \
} while (0);
public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_ue [NUMBER_OF_UE_MAX][NB_RB_MBMS_MAX];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_eNB[NUMBER_OF_eNB_MAX][NB_RB_MBMS_MAX];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_ue [MAX_MOBILES_PER_ENB][NB_RB_MBMS_MAX];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_eNB[MAX_eNB][NB_RB_MBMS_MAX];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
#define RLC_COLL_KEY_VALUE(eNB_iD, rNTI, iS_eNB, rB_iD, iS_sRB) \
@@ -275,6 +275,23 @@ public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_eNB[NUMBER_OF_eNB_MAX][NB_RB_
(((hash_key_t)(iS_sRB)) << 33) | \
(((hash_key_t)(0x0a)) << 34))
#define RLC_COLL_KEY_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \
((hash_key_t)eNB_iD | \
(((hash_key_t)(rNTI)) << 8) | \
(((hash_key_t)(iS_eNB)) << 24) | \
(((hash_key_t)(lC_iD)) << 25) | \
(((hash_key_t)(dEST_iD)) << 33) | \
(((hash_key_t)(0x05)) << 57))
#define RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \
((hash_key_t)eNB_iD | \
(((hash_key_t)(rNTI)) << 8) | \
(((hash_key_t)(iS_eNB)) << 24) | \
(((hash_key_t)(lC_iD)) << 25) | \
(((hash_key_t)(dEST_iD)) << 33) | \
(((hash_key_t)(0x0a)) << 57))
// service id max val is maxServiceCount = 16 (asn1_constants.h)
#define RLC_COLL_KEY_MBMS_VALUE(eNB_iD, rNTI, iS_eNB, sERVICE_ID, sESSION_ID) \
@@ -309,7 +326,7 @@ private_rlc_mac(struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t,
//-----------------------------------------------------------------------------
// PUBLIC INTERFACE WITH RRC
//-----------------------------------------------------------------------------
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const SRB_ToAddMod_t* const srb2addmod, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP, const PMCH_InfoList_r9_t * const pmch_info_listP)
* \brief Function for RRC to configure a Radio Bearer.
* \param[in] ctxtP Running context.
@@ -324,7 +341,9 @@ public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
const SRB_ToAddModList_t* const ,
const DRB_ToAddModList_t* const ,
const DRB_ToReleaseList_t* const ,
const PMCH_InfoList_r9_t * const pmch_info_listP);)
const PMCH_InfoList_r9_t * const pmch_info_listP ,
const uint32_t ,
const uint32_t );)
#else
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const SRB_ToAddModList_t* const srb2add_listP, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP)
* \brief Function for RRC to configure a Radio Bearer.
@@ -379,7 +398,12 @@ public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* cons
* \param[in] rlc_modeP Mode of RLC (AM, UM, TM).
* \return A status about the processing, OK or error code.
*/
private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t);)
private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t
#ifdef Rel14
,const uint32_t sourceL2Id,
const uint32_t destinationL2Id
#endif
);)
/*! \fn rlc_op_status_t rrc_rlc_config_req (
const protocol_ctxt_t* const ctxtP,
@@ -440,7 +464,12 @@ public_rlc_rrc(void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_d
* \param [in,out] bufferP Memory area to fill with the bytes requested by MAC.
* \return A status about the processing, OK or error code.
*/
public_rlc_mac(tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char*);)
public_rlc_mac(tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char*
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
);)
/*! \fn void mac_rlc_data_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, uint32_t frameP, char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcs)
* \brief Interface with MAC layer, deserialize the transport blocks sent by MAC, then map data indication to the RLC instance corresponding to the radio bearer identifier.
@@ -470,7 +499,12 @@ public_rlc_mac(void mac_rlc_data_ind (const module_id_t, co
* \param[in] tb_sizeP Size of a transport block set in bytes.
* \return The maximum number of bytes that the RLC instance can send in the next transmission sequence.
*/
public_rlc_mac(mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t );)
public_rlc_mac(mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
);)
/*! \fn rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t module_idP, const rnti_t rntiP, const eNB_index_t eNB_index, const frame_t frameP, const sub_frame_t subframeP,const eNB_flag_t enb_flagP, const logical_chan_id_t channel_idP)
* \brief Interface with MAC layer, UE only: request and get the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
@@ -520,7 +554,12 @@ public_rlc(rlc_op_status_t rlc_data_req (
const mui_t ,
const confirm_t ,
const sdu_size_t ,
mem_block_t * const);)
mem_block_t * const
#ifdef Rel14
,const uint32_t * const
,const uint32_t * const
#endif
);)
/*! \fn void rlc_data_ind (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) {
* \brief Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance.
+31 -7
View File
@@ -30,7 +30,7 @@
//-----------------------------------------------------------------------------
#define RLC_MAC_C
#include "rlc.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/OCG/OCG_vars.h"
#include "hashtable.h"
@@ -126,7 +126,12 @@ tbs_size_t mac_rlc_data_req(
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP,
char *buffer_pP)
char *buffer_pP
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
)
{
//-----------------------------------------------------------------------------
struct mac_data_req data_request;
@@ -143,7 +148,7 @@ tbs_size_t mac_rlc_data_req(
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_IN);
#ifdef DEBUG_MAC_INTERFACE
LOG_D(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d, Num_tb %d\n",
LOG_D(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d\n",
PROTOCOL_CTXT_ARGS((&ctxt)),
channel_idP,
RLC_MAX_LC,
@@ -166,6 +171,10 @@ tbs_size_t mac_rlc_data_req(
}
} else {
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
#ifdef Rel14
if ((sourceL2Id > 0) && (destinationL2Id > 0))
key = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
#endif
}
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
@@ -189,7 +198,7 @@ tbs_size_t mac_rlc_data_req(
break;
case RLC_MODE_UM:
if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP);
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
break;
@@ -308,7 +317,12 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP)
const tb_size_t tb_sizeP
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
)
{
//-----------------------------------------------------------------------------
mac_rlc_status_resp_t mac_rlc_status_resp;
@@ -337,16 +351,26 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
key = RLC_COLL_KEY_MBMS_VALUE(module_idP, rntiP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
} else {
#ifdef Rel14
if ((sourceL2Id > 0) && (destinationL2Id > 0)) {
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
} else
#endif
{
//LOG_I(RLC, "Panos-D mac_rlc_status_ind 1 enb_flagP: %d, channel_idP: %d, srb_flag: %d \n", enb_flagP, channel_idP, srb_flag);
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
}
}
}
//LOG_I(RLC, "Panos-D mac_rlc_status_ind 2 enb_flagP: %d, channel_idP: %d, srb_flag: %d \n", enb_flagP, channel_idP, srb_flag);
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
if (h_rc == HASH_TABLE_OK) {
rlc_mode = rlc_union_p->mode;
} else {
rlc_mode = RLC_MODE_NONE;
//LOG_W(RLC , "[%s] RLC not configured rb id %u lcid %u module %u!\n", __FUNCTION__, rb_id, channel_idP, ue_module_idP);
//LOG_D(RLC , "Panos-D: mac_rlc_status_ind() In RLC_MODE_NONE \n");
//LOG_W(RLC , "[%s] RLC not configured lcid %u module %u!\n", __FUNCTION__, channel_idP, module_idP);
//LOG_D(RLC , "[%s] RLC not configured rb id %u lcid %u module %u!\n", __FUNCTION__, rb_id, channel_idP, ue_module_idP);
}
+5 -1
View File
@@ -40,6 +40,10 @@ rlc_op_status_t mpls_rlc_data_req (
{
//-----------------------------------------------------------------------------
// third arg should be set to 1 or 0
return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP);
return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP
#ifdef Rel14
,NULL, NULL
#endif
);
}
+126 -32
View File
@@ -39,19 +39,21 @@
#include "SRB-ToAddMod.h"
#include "SRB-ToAddModList.h"
#include "DL-UM-RLC.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "PMCH-InfoList-r9.h"
#endif
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "assertions.h"
//-----------------------------------------------------------------------------
rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP,
const SRB_ToAddModList_t * const srb2add_listP,
const DRB_ToAddModList_t * const drb2add_listP,
const DRB_ToReleaseList_t * const drb2release_listP
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
,const PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
)
{
@@ -66,7 +68,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
rlc_union_t *rlc_union_p = NULL;
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
int i, j;
MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
@@ -104,7 +106,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
break;
case RLC_Config_PR_am:
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM
#ifdef Rel14
,0,
0
#endif
) != NULL) {
config_req_rlc_am_asn1 (
ctxt_pP,
SRB_FLAG_YES,
@@ -119,7 +126,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
break;
case RLC_Config_PR_um_Bi_Directional:
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
#ifdef Rel14
,0,
0
#endif
) != NULL) {
config_req_rlc_um_asn1(
ctxt_pP,
SRB_FLAG_YES,
@@ -128,7 +140,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
UNUSED_PARAM_MBMS_SERVICE_ID,
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.ul_UM_RLC,
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.dl_UM_RLC,
rb_id, lc_id);
rb_id, lc_id
#ifdef Rel14
,0, 0
#endif
);
} else {
LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
@@ -138,7 +154,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
break;
case RLC_Config_PR_um_Uni_Directional_UL:
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
#ifdef Rel14
,0,
0
#endif
) != NULL) {
config_req_rlc_um_asn1(
ctxt_pP,
SRB_FLAG_YES,
@@ -147,7 +168,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
UNUSED_PARAM_MBMS_SERVICE_ID,
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_UL.ul_UM_RLC,
NULL,
rb_id, lc_id);
rb_id, lc_id
#ifdef Rel14
,0, 0
#endif
);
} else {
LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
@@ -157,7 +182,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
break;
case RLC_Config_PR_um_Uni_Directional_DL:
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
#ifdef Rel14
,0,
0
#endif
) != NULL) {
config_req_rlc_um_asn1(
ctxt_pP,
SRB_FLAG_YES,
@@ -166,7 +196,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
UNUSED_PARAM_MBMS_SERVICE_ID,
NULL,
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_DL.dl_UM_RLC,
rb_id, lc_id);
rb_id, lc_id
#ifdef Rel14
,0, 0
#endif
);
} else {
LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
@@ -195,7 +229,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
config_am_pP->ul_AM_RLC.pollByte = PollByte_kBinfinity;
config_am_pP->ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t4;
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM
#ifdef Rel14
,0,
0
#endif
) != NULL) {
config_req_rlc_am_asn1 (
ctxt_pP,
SRB_FLAG_YES,
@@ -252,7 +291,6 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
LOG_D(RLC, "Adding DRB %ld, lc_id %d\n",drb_id,lc_id);
if (drb_toaddmod_p->rlc_Config) {
switch (drb_toaddmod_p->rlc_Config->present) {
@@ -260,7 +298,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
break;
case RLC_Config_PR_am:
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM
#ifdef Rel14
,0,
0
#endif
) != NULL) {
config_req_rlc_am_asn1 (
ctxt_pP,
SRB_FLAG_NO,
@@ -271,7 +314,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
break;
case RLC_Config_PR_um_Bi_Directional:
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
#ifdef Rel14
,sourceL2Id,
destinationL2Id
#endif
) != NULL) {
config_req_rlc_um_asn1(
ctxt_pP,
SRB_FLAG_NO,
@@ -280,13 +328,23 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
UNUSED_PARAM_MBMS_SERVICE_ID,
&drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.ul_UM_RLC,
&drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.dl_UM_RLC,
drb_id, lc_id);
drb_id, lc_id
#ifdef Rel14
,sourceL2Id,
destinationL2Id
#endif
);
}
break;
case RLC_Config_PR_um_Uni_Directional_UL:
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
#ifdef Rel14
,0,
0
#endif
) != NULL) {
config_req_rlc_um_asn1(
ctxt_pP,
SRB_FLAG_NO,
@@ -295,13 +353,22 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
UNUSED_PARAM_MBMS_SERVICE_ID,
&drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_UL.ul_UM_RLC,
NULL,
drb_id, lc_id);
drb_id, lc_id
#ifdef Rel14
,0, 0
#endif
);
}
break;
case RLC_Config_PR_um_Uni_Directional_DL:
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
#ifdef Rel14
,0,
0
#endif
) != NULL) {
config_req_rlc_um_asn1(
ctxt_pP,
SRB_FLAG_NO,
@@ -310,7 +377,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
UNUSED_PARAM_MBMS_SERVICE_ID,
NULL,
&drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_DL.dl_UM_RLC,
drb_id, lc_id);
drb_id, lc_id
#ifdef Rel14
,0, 0
#endif
);
}
break;
@@ -335,7 +406,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
}
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (pmch_InfoList_r9_pP != NULL) {
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
@@ -372,7 +443,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
MBMS_FLAG_YES,
rb_id,
lc_id,
RLC_MODE_UM);
RLC_MODE_UM, 0, 0);
AssertFatal(rlc_union_p != NULL, "ADD MBMS RLC UM FAILED");
}
@@ -394,7 +465,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
mbms_service_id,
NULL,
&dl_um_rlc,
rb_id, lc_id);
rb_id, lc_id
#ifdef Rel14
,0, 0
#endif
);
}
}
}
@@ -478,14 +553,14 @@ rlc_op_status_t rrc_rlc_remove_rlc (
hash_key_t key_lcid = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_lcid_rc;
rlc_union_t *rlc_union_p = NULL;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
rlc_mbms_id_t *mbms_id_p = NULL;
#endif
/* for no gcc warnings */
(void)lcid;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (MBMS_flagP == TRUE) {
if (ctxt_pP->enb_flag) {
@@ -571,25 +646,32 @@ rlc_union_t* rrc_rlc_add_rlc (
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP,
const rlc_mode_t rlc_modeP)
const rlc_mode_t rlc_modeP
#ifdef Rel14
,const uint32_t sourceL2Id,
const uint32_t destinationL2Id
#endif
)
{
//-----------------------------------------------------------------------------
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
hash_key_t key_lcid = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_lcid_rc;
rlc_union_t *rlc_union_p = NULL;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
rlc_mbms_id_t *mbms_id_p = NULL;
logical_chan_id_t lcid = 0;
#endif
if (MBMS_flagP == FALSE) {
AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (MBMS_flagP == TRUE) {
if (ctxt_pP->enb_flag) {
@@ -608,6 +690,10 @@ rlc_union_t* rrc_rlc_add_rlc (
}
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
}
if ((sourceL2Id > 0) && (destinationL2Id > 0) ){
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, sourceL2Id, destinationL2Id, srb_flagP);
} else
#endif
{
@@ -631,7 +717,7 @@ rlc_union_t* rrc_rlc_add_rlc (
h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) {
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (MBMS_flagP == TRUE) {
LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n",
@@ -668,7 +754,6 @@ rlc_union_t* rrc_rlc_add_rlc (
rb_idP,
(srb_flagP) ? "SRB" : "DRB");
}
return NULL;
}
//-----------------------------------------------------------------------------
@@ -692,7 +777,12 @@ rlc_op_status_t rrc_rlc_config_req (
switch (actionP) {
case CONFIG_ACTION_ADD:
if (rrc_rlc_add_rlc(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode) != NULL) {
if (rrc_rlc_add_rlc(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode
#ifdef Rel14
,0,
0
#endif
) != NULL) {
return RLC_OP_STATUS_INTERNAL_ERROR;
}
@@ -766,7 +856,11 @@ rlc_op_status_t rrc_rlc_data_req (
if (sdu != NULL) {
memcpy (sdu->data, sduP, sdu_sizeP);
return rlc_data_req(ctxt_pP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu);
return rlc_data_req(ctxt_pP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu
#ifdef Rel14
,NULL, NULL
#endif
);
} else {
return RLC_OP_STATUS_INTERNAL_ERROR;
}
+2 -2
View File
@@ -32,8 +32,8 @@
#include <inttypes.h>
#include "LAYER2/RLC/rlc.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "UTIL/LOG/log.h"
#include "common/ran_context.h"
+38
View File
@@ -248,6 +248,13 @@ ue_ip_common_ip2wireless(
//---------------------------------------------------------------------------
struct pdcp_data_req_header_s pdcph;
ue_ip_priv_t *priv_p=netdev_priv(ue_ip_dev[instP]);
#ifdef Rel14
ipversion_t *ipv_p = NULL;
unsigned int hard_header_len = 0;
unsigned char *src_addr = 0;
unsigned char *dst_addr = 0;
#endif
#ifdef LOOPBACK_TEST
int i;
#endif
@@ -278,6 +285,37 @@ ue_ip_common_ip2wireless(
pdcph.inst = instP;
//pass source/destination IP addresses to PDCP header
hard_header_len = ue_ip_dev[instP]->hard_header_len;
ipv_p = (ipversion_t *)((void *)&(skb_pP->data[hard_header_len]));
switch (ipv_p->version) {
case 6:
printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
//TODO
break;
case 4:
src_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->saddr;
if (src_addr) {
printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, src_addr[0],src_addr[1],src_addr[2],src_addr[3]);
}
dst_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->daddr;
if (dst_addr) {
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
}
//get Ipv4 address and pass to PCDP header
printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
pdcph.sourceL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->saddr) & 0x00FFFFFF;
pdcph.destinationL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->daddr) & 0x00FFFFFF;
break;
default:
break;
}
bytes_wrote = ue_ip_netlink_send((char *)&pdcph,UE_IP_PDCPH_SIZE);
#ifdef OAI_DRV_DEBUG_SEND
+1 -1
View File
@@ -52,7 +52,7 @@
#define UE_IP_NB_INSTANCES_MAX NUMBER_OF_UE_MAX
#define UE_IP_NB_INSTANCES_MAX NUMBER_OF_UE_MAX /*MAX_MOBILES_PER_ENB*/
#endif
+8
View File
@@ -89,6 +89,10 @@ typedef struct pdcp_data_req_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t traffic_type;
#ifdef Rel14
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_req_header_t;
typedef struct pdcp_data_ind_header_s {
@@ -96,6 +100,10 @@ typedef struct pdcp_data_ind_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t dummy_traffic_type;
#ifdef Rel14
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_ind_header_t;
+6 -6
View File
@@ -1,8 +1,8 @@
#include "openair1/PHY/defs.h"
#include "openair1/PHY/defs_eNB.h"
#include "openair2/PHY_INTERFACE/IF_Module.h"
#include "openair1/PHY/extern.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
#include "openair1/PHY/phy_extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "common/ran_context.h"
#define MAX_IF_MODULES 100
@@ -33,13 +33,13 @@ void handle_rach(UL_IND_t *UL_info) {
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0
#endif
);
}
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (UL_info->rach_ind_br.rach_indication_body.number_of_preambles>0) {
AssertFatal(UL_info->rach_ind_br.rach_indication_body.number_of_preambles<5,"More than 4 preambles not supported\n");
+4 -3
View File
@@ -34,9 +34,10 @@
#include <stdint.h>
#include "openair1/PHY/LTE_TRANSPORT/defs.h"
//#include "openair1/PHY/LTE_TRANSPORT/transport_eNB.h"
#include "nfapi_interface.h"
#include "platform_constants.h"
#include "platform_types.h"
#define MAX_NUM_DL_PDU 100
#define MAX_NUM_UL_PDU 100
@@ -75,7 +76,7 @@ typedef struct{
/// RACH indication list
nfapi_rach_indication_t rach_ind;
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// RACH indication list for BR UEs
nfapi_rach_indication_t rach_ind_br;
#endif
+498
View File
@@ -0,0 +1,498 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/* This is the interface module between PHY
* Provided the FAPI style interface structures for P7.
*/
/*! \file openair2/PHY_INTERFACE/IF_Module.h
* \brief data structures for PHY/MAC interface modules
* \author EURECOM/NTUST
* \date 2017
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr
* \note
* \warning
*/
#ifndef __UE_MAC_INTERFACE__H__
#define __UE_MAC_INTERFACE__H__
#include "nfapi_interface.h"
#include "openair1/PHY/impl_defs_lte.h"
#include "targets/COMMON/openairinterface5g_limits.h"
#define MAX_NUM_DL_PDU 100
#define MAX_NUM_UL_PDU 100
#define MAX_NUM_HI_DCI0_PDU 100
#define MAX_NUM_TX_REQUEST_PDU 100
#define MAX_NUM_HARQ_IND 100
#define MAX_NUM_CRC_IND 100
#define MAX_NUM_SR_IND 100
#define MAX_NUM_CQI_IND 100
#define MAX_NUM_RACH_IND 100
#define MAX_NUM_SRS_IND 100
// UE_MAC enums
typedef enum {
UE_MAC_DL_IND_PDSCH_PDU_TYPE =0,
UE_MAC_DL_IND_SI_PDSCH_PDU_TYPE,
UE_MAC_DL_IND_P_PDSCH_PDU_TYPE,
UE_MAC_DL_IND_DLSCH_RAR_PDU_TYPE
} UE_MAC_dl_ind_pdu_type_e;
// UE_MAC enums
typedef enum {
UE_MAC_Tx_IND_Msg1_TYPE =0,
UE_MAC_Tx_IND_Msg3_TYPE
} UE_MAC_Tx_ind_type_e;
// *** UE_UL_Config.request related structures
typedef struct{
//module_id_t module_idP;
//int CC_id;
//frame_t frameP;
uint8_t eNB_id;
//uint16_t rnti;
//sub_frame_t subframe_tx;
uint32_t SR_payload; //0 or 1
}UE_MAC_ul_config_SR;
typedef struct{
//module_id_t module_idP;
//int CC_id;
//frame_t frameP;
uint8_t eNB_indexP;
//sub_frame_t subframeP;
uint8_t ra_RACH_MaskIndex;
int8_t ra_PREAMBLE_RECEIVED_TARGET_POWER;
uint8_t ra_TDD_map_index;
uint16_t ra_RNTI;
uint8_t *Msg3;
}UE_MAC_ul_config_rach;
typedef struct {
union {
UE_MAC_ul_config_rach ue_rach_config;
//UE_MAC_ul_config_ULSCH ue_ULSCH_pdu;
UE_MAC_ul_config_SR ue_SR_config;
};
} UE_MAC_ul_config_request_list;
typedef struct {
nfapi_tl_t tl;
uint16_t length_list;
UE_MAC_ul_config_request_list* ue_ul_config_list;
} UE_MAC_ul_config_request_body_t;
typedef struct {
//nfapi_p7_message_header_t header;
uint16_t sfn_sf;
UE_MAC_ul_config_request_body_t ue_ul_config_request_body; //nfapi_dl_config_request_body_t
} UE_MAC_ul_config_request_t;
// *** UE_Tx.request related structures
typedef struct {
uint16_t pdu_length;
uint16_t pdu_index;
uint8_t num_segments;
struct {
uint32_t segment_length;
uint8_t* segment_data;
} segments[NFAPI_TX_MAX_SEGMENTS];
} UE_MAC_tx_request_pdu_t;
typedef struct {
nfapi_tl_t tl;
uint16_t number_of_pdus;
UE_MAC_tx_request_pdu_t* ue_tx_pdu_list;
} UE_MAC_tx_request_body_t;
typedef struct {
//nfapi_p7_message_header_t header;
uint16_t sfn_sf;
UE_MAC_tx_request_body_t ue_tx_request_body;
} UE_MAC_tx_request_t;
typedef struct{
}UE_MAC_sl_config_request_Tx_t;
typedef struct{
}UE_MAC_sl_config_request_Rx_t;
typedef struct{
}UE_MAC_sl_tx_request_t;
// *** UE_DL.indication related structures
typedef struct{
unsigned char eNB_index;
uint8_t first_sync; //boolean 0 or 1
uint8_t sync; // boolean 0 or 1 to indicate whether rrc_out_of_sync_ind() or dl_phy_sync_success()
// should be called from the handler function of the interface respectively.
}UE_MAC_bch_indication_pdu_t;
typedef struct{
nfapi_tl_t tl;
UE_MAC_bch_indication_pdu_t* bch_ind_list;
}UE_MAC_BCH_indication_body_t;
// Panos: Corresponding to inputs of MAC functions: ue_send_sdu(), ue_decode_si(), ue_decode_p().
typedef struct{
uint8_t* data;
uint16_t data_len;
}UE_MAC_dlsch_pdu;
// Panos: Corresponding to inputs of MAC function: process_rar().
typedef struct{
rnti_t ra_rnti;
uint8_t* rar_input_buffer; // Originating from PHY
rnti_t* t_crnti;
uint8_t preamble_index;
uint8_t* rar_output_buffer; //should be returned to PHY: dlsch0->harq_processes[0]->b
}UE_MAC_dlsch_rar_pdu;
typedef struct{
uint8_t pdu_type;
uint8_t eNB_index;
union{
UE_MAC_dlsch_pdu dlsch_pdu_ind;
UE_MAC_dlsch_rar_pdu dlsch_rar_pdu_ind;
};
}UE_MAC_dlsch_indication_pdu_t;
typedef struct{
nfapi_tl_t tl;
uint16_t number_of_pdus;
UE_MAC_dlsch_indication_pdu_t* dlsch_ind_list;
}UE_MAC_DLSCH_indication_body_t;
// *** UE_SL.indication related structures
typedef struct{
}ue_sci_indication_body_t;
typedef struct{
}ue_SLSCH_indication_body_t;
typedef struct{
}ue_SLDCH_indication_body_t;
typedef struct{
}ue_SLBCH_indication_body_t;
// *** UE_Config_common.request related structures
typedef struct {
uint8_t subframeAssignment;
uint8_t specialSubframePatterns;
}UE_PHY_tdd_frame_structure_t;
typedef struct {
uint16_t rootSequenceIndex;
uint8_t prach_Config_enabled;
uint8_t prach_ConfigIndex;
uint8_t highSpeedFlag;
uint8_t zeroCorrelationZoneConfig;
uint8_t prach_FreqOffset;
}UE_PHY_prach_config_t;
typedef struct {
uint8_t deltaPUCCH_Shift;
uint8_t nRB_CQI;
uint8_t nCS_AN;
uint16_t n1PUCCH_AN;
}UE_PHY_pucch_config_t;
typedef struct {
int8_t referenceSignalPower;
uint8_t p_b;
}UE_PHY_pdsch_config_t;
typedef struct {
uint8_t n_SB;
PUSCH_HOPPING_t hoppingMode;
uint8_t pusch_HoppingOffset;
uint8_t enable64QAM;
uint8_t groupHoppingEnabled;
uint8_t groupAssignmentPUSCH;
uint8_t sequenceHoppingEnabled;
uint8_t cyclicShift;
}UE_PHY_pusch_config_t;
typedef struct{
uint8_t enabled_flag;
uint8_t srs_BandwidthConfig;
uint8_t srs_SubframeConfig;
uint8_t ackNackSRS_SimultaneousTransmission;
uint8_t srs_MaxUpPts;
}UE_PHY_SRS_config_t;
typedef struct{
int8_t p0_NominalPUSCH;
PUSCH_alpha_t alpha;
int8_t p0_NominalPUCCH;
int8_t deltaPreambleMsg3;
long deltaF_PUCCH_Format1;
long deltaF_PUCCH_Format1b;
long deltaF_PUCCH_Format2;
long deltaF_PUCCH_Format2a;
long deltaF_PUCCH_Format2b;
}UE_PHY_UL_power_control_config_t;
typedef struct{
uint8_t maxHARQ_Msg3Tx;
}UE_PHY_HARQ_Msg3_config_t;
typedef struct{
uint8_t nb_antennas_tx;
}UE_PHY_antenna_config_t;
typedef struct{
PHICH_RESOURCE_t phich_resource;
PHICH_DURATION_t phich_duration;
}UE_PHY_phich_config_t;
typedef struct {
UE_PHY_tdd_frame_structure_t ue_tdd_frame_structure_config;
UE_PHY_prach_config_t ue_prach_config;
UE_PHY_pucch_config_t ue_pucch_config;
UE_PHY_pdsch_config_t ue_pdsch_config;
UE_PHY_pusch_config_t ue_pusch_config;
UE_PHY_SRS_config_t ue_srs_config;
UE_PHY_UL_power_control_config_t ue_ul_pow_cntl_config;
UE_PHY_HARQ_Msg3_config_t ue_harq_msg3_config;
/* Where can we find the types and values of the configuration for the PCH?
UE_MAC_pusch_config_t ue_pch_config
radioResourceConfigCommon->pcch_Config.defaultPagingCycle, radioResourceConfigCommon->pcch_Config.nB*/
UE_PHY_antenna_config_t ue_ant_config;
UE_PHY_phich_config_t ue_phich_config;
/* MBSFN?*/
}UE_PHY_config_common_request_t;
// *** UE_Config_dedicated. request related structures
typedef struct{
PA_t p_a;
}UE_PHY_pdsch_config_dedicated_t;
typedef struct{
uint8_t ackNackRepetition;
ANFBmode_t tdd_AckNackFeedbackMode;
//ACKNAKREP_t repetitionFactor;
//uint16_t n1PUCCH_AN_Rep;
}UE_PHY_pucch_config_dedicated_t;
typedef struct{
uint16_t betaOffset_ACK_Index;
uint16_t betaOffset_RI_Index;
uint16_t betaOffset_CQI_Index;
}UE_PHY_pusch_config_dedicated_t;
typedef struct{
int8_t p0_UE_PUSCH;
uint8_t deltaMCS_Enabled;
uint8_t accumulationEnabled;
int8_t p0_UE_PUCCH;
int8_t pSRS_Offset;
uint8_t filterCoefficient;
}UE_PHY_ul_power_control_config_dedicated_t;
typedef struct{
uint16_t sr_PUCCH_ResourceIndex;
uint8_t sr_ConfigIndex;
DSR_TRANSMAX_t dsr_TransMax;
}UE_PHY_SR_config_dedicated_t;
typedef struct{
uint8_t srsConfigDedicatedSetup;
uint8_t duration;
uint8_t cyclicShift;
uint8_t freqDomainPosition;
uint8_t srs_Bandwidth;
uint16_t srs_ConfigIndex;
uint8_t srs_HoppingBandwidth;
uint8_t transmissionComb;
//uint8_t srsCellSubframe;
//uint8_t srsUeSubframe;
}UE_PHY_srs_ul_config_dedicated_t;
typedef struct{
CQI_REPORTMODEAPERIODIC cqi_ReportModeAperiodic;
CQI_REPORTPERIODIC CQI_ReportPeriodic;
//int8_t nomPDSCH_RS_EPRE_Offset;
}UE_PHY_cqi_report_config_dedicated_t;
typedef struct{
uint8_t transmission_mode [NUMBER_OF_CONNECTED_eNB_MAX];
UE_PHY_pdsch_config_dedicated_t ue_pdsch_config;
UE_PHY_pucch_config_dedicated_t ue_pucch_config;
UE_PHY_pusch_config_dedicated_t ue_pusch_config;
UE_PHY_ul_power_control_config_dedicated_t ue_ul_pow_cntrl_config;
UE_PHY_SR_config_dedicated_t ue_SR_config;
UE_PHY_srs_ul_config_dedicated_t ue_srs_ul_config;
UE_PHY_cqi_report_config_dedicated_t ue_cqi_report_config;
}UE_PHY_config_dedicated_request_t;
#endif
/*
typedef struct {
nfapi_p4_p5_message_header_t header;
uint8_t num_tlv;
nfapi_subframe_config_t subframe_config;
nfapi_rf_config_t rf_config;
nfapi_phich_config_t phich_config;
nfapi_sch_config_t sch_config;
nfapi_prach_config_t prach_config;
nfapi_pusch_config_t pusch_config;
nfapi_pucch_config_t pucch_config;
nfapi_srs_config_t srs_config;
nfapi_uplink_reference_signal_config_t uplink_reference_signal_config;
nfapi_laa_config_t laa_config;
nfapi_emtc_config_t emtc_config;
nfapi_tdd_frame_structure_t tdd_frame_structure_config;
nfapi_l23_config_t l23_config;
nfapi_nb_iot_config_t nb_iot_config;
// addition nfapi tlvs as per table 2-16 in idle or configure
nfapi_nfapi_t nfapi_config;
nfapi_vendor_extension_tlv_t vendor_extension;
} nfapi_config_request_t;
typedef struct {
nfapi_tl_t tl;
uint8_t dci_format;
uint8_t cce_index;
uint8_t aggregation_level;
uint16_t rnti;
uint8_t resource_block_start;
uint8_t number_of_resource_block;
uint8_t mcs_1;
uint8_t cyclic_shift_2_for_drms;
uint8_t frequency_hopping_enabled_flag;
uint8_t frequency_hopping_bits;
uint8_t new_data_indication_1;
uint8_t ue_tx_antenna_seleciton;
uint8_t tpc;
uint8_t cqi_csi_request;
uint8_t ul_index;
uint8_t dl_assignment_index;
uint32_t tpc_bitmap;
uint16_t transmission_power;
} nfapi_hi_dci0_dci_pdu_rel8_t;
*/
-373
View File
@@ -1,373 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY_INTERFACE/defs.h
* \brief mac phy interface primitives
* \author Raymond Knopp and Navid Nikaein
* \date 2011
* \version 0.5
* \mail navid.nikaein@eurecom.fr or openair_tech@eurecom.fr
*/
#ifndef __MAC_PHY_PRIMITIVES_H__
# define __MAC_PHY_PRIMITIVES_H__
#include "LAYER2/MAC/defs.h"
#define MAX_NUMBER_OF_MAC_INSTANCES 16
#define NULL_PDU 255
#define DCI 0
#define DLSCH 1
#define ULSCH 2
#define mac_exit_wrapper(sTRING) \
do { \
char temp[300]; \
snprintf(temp, sizeof(temp), "%s in file "__FILE__" at line %d\n", sTRING, __LINE__); \
mac_xface->macphy_exit(temp); \
} while(0)
/** @defgroup _phy_if MAC-PHY interface
* @ingroup _oai2
* @{
*/
/*! \brief MACPHY Interface */
/*
typedef struct {
/// Pointer function that initializes L2
int (*macphy_init)(int eMBMS_active, char *uecap_xer, uint8_t CBA_active,uint8_t HO_active);
/// Pointer function that stops the low-level scheduler due an exit condition
void (*macphy_exit)(const char *);
// eNB functions
/// Invoke dlsch/ulsch scheduling procedure for new subframe
void (*eNB_dlsch_ulsch_scheduler)(module_id_t Mod_id,uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP);//, int calibration_flag);
/// Fill random access response sdu, passing timing advance
uint16_t (*fill_rar)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t *dlsch_buffer,uint16_t N_RB_UL, uint8_t input_buffer_length);
/// Initiate the RA procedure upon reception (hypothetical) of a valid preamble
void (*initiate_ra_proc)(module_id_t Mod_id,int CC_id,frame_t frameP,uint16_t preamble,int16_t timing_offset,uint8_t sect_id,sub_frame_t subframe,uint8_t f_id);
/// cancel an ongoing RA procedure
void (*cancel_ra_proc)(module_id_t Mod_id,int CC_id,frame_t frameP,uint16_t preamble);
/// Inform MAC layer that an uplink is scheduled for Msg3 in given subframe.
/// This is used so that the MAC scheduler marks as busy the RBs used by the Msg3.
void (*set_msg3_subframe)(module_id_t Mod_id,
int CC_id,
int frame,
int subframe,
int rnti,
int Msg3_frame,
int Msg3_subframe);
/// Get DCI for current subframe from MAC
DCI_PDU* (*get_dci_sdu)(module_id_t Mod_id,int CC_id,frame_t frameP,sub_frame_t subframe);
/// Get DLSCH sdu for particular RNTI and Transport block index
uint8_t* (*get_dlsch_sdu)(module_id_t Mod_id,int CC_id,frame_t frameP,rnti_t rnti,uint8_t TB_index);
/// Send ULSCH sdu to MAC for given rnti
void (*rx_sdu)(module_id_t Mod_id,int CC_id,frame_t frameP, sub_frame_t sub_frameP,rnti_t rnti, uint8_t *sdu,uint16_t sdu_len, int harq_pid,uint8_t *msg3_flag);
/// Indicate failure to synch to external source
void (*mrbch_phy_sync_failure) (module_id_t Mod_id,frame_t frameP, uint8_t free_eNB_index);
/// Indicate Scheduling Request from UE
void (*SR_indication)(module_id_t Mod_id,int CC_id,frame_t frameP,rnti_t rnti,sub_frame_t subframe);
/// Indicate UL Failure to eNodeB MAC
void (*UL_failure_indication)(module_id_t Mod_id,int CC_id,frame_t frameP,rnti_t rnti,sub_frame_t subframe);
/// Configure Common PHY parameters from SIB1
void (*phy_config_mib_eNB)(module_id_t Mod_id,int CC_id,
int eutra_band,
int N_RB_DL,
PHICH_Config_t *phich_Config,
int Nid_cell,
int Ncp,
int p_eNB,
uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq);
/// Configure Common PHY parameters from SIB1
void (*phy_config_sib1_eNB)(module_id_t Mod_id,int CC_id,
TDD_Config_t *tdd_config,
uint8_t SIwindowsize,
uint16_t SIperiod);
/// Configure Common PHY parameters from SIB2
void (*phy_config_sib2_eNB)(module_id_t Mod_id, int CC_id,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
#if defined(Rel10) || defined(Rel14)
/// Configure Common PHY parameters from SIB13
void (*phy_config_sib13_eNB)(module_id_t Mod_id,int CC_id, int mbsfn_Area_idx,
long mbsfn_AreaId_r9);
void (*phy_config_dedicated_scell_eNB)(uint8_t Mod_id,
uint16_t rnti,
SCellToAddMod_r10_t *sCellToAddMod_r10,
int CC_id);
#endif
/// PHY-Config-Dedicated eNB
void (*phy_config_dedicated_eNB)(module_id_t Mod_id,int CC_id,rnti_t rnti,
struct PhysicalConfigDedicated *physicalConfigDedicated);
#if defined(Rel10) || defined(Rel14)
/// Get MCH sdu and corresponding MCS for particular MBSFN subframe
MCH_PDU* (*get_mch_sdu)(module_id_t Mod_id, int CC_id, frame_t frameP,sub_frame_t subframe);
#endif
// configure the cba rnti at the physical layer
void (*phy_config_cba_rnti)(module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, uint16_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups);
/// get delta mcs for fast UL AMC
int16_t (*estimate_ue_tx_power)(uint32_t tbs, uint32_t nb_rb, uint8_t control_only, lte_prefix_type_t ncp, uint8_t use_srs);
int (*mac_phy_remove_ue)(module_id_t Mod_idP,rnti_t rntiP);
/// UE functions
/// reset the ue phy
void (*phy_reset_ue)(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/// Indicate loss of synchronization of PBCH for this eNB to MAC layer
void (*out_of_sync_ind)(module_id_t Mod_id,frame_t frameP,uint16_t eNB_index);
/// Send a received SI sdu
void (*ue_decode_si)(module_id_t Mod_id,int CC_id,frame_t frameP, uint8_t CH_index, void *pdu, uint16_t len);
/// Send a received Paging sdu
void (*ue_decode_p)(module_id_t Mod_id,int CC_id,frame_t frameP, uint8_t CH_index, void *pdu, uint16_t len);
/// Send a received DLSCH sdu to MAC
void (*ue_send_sdu)(module_id_t Mod_id,uint8_t CC_id,frame_t frameP,sub_frame_t subframe,uint8_t *sdu,uint16_t sdu_len,uint8_t CH_index);
#if defined(Rel10) || defined(Rel14)
/// Send a received MCH sdu to MAC
void (*ue_send_mch_sdu)(module_id_t Mod_id,uint8_t CC_id, frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index,uint8_t sync_area);
/// Function to check if UE PHY needs to decode MCH for MAC
/// get the sync area id, and return MCS value if need to decode, otherwise -1
int (*ue_query_mch)(module_id_t Mod_id, uint8_t CC_id,frame_t frameP,sub_frame_t subframe,uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active);
#endif
/// Retrieve ULSCH sdu from MAC
void (*ue_get_sdu)(module_id_t Mod_id,int CC_id,frame_t frameP,sub_frame_t subframe, uint8_t CH_index,uint8_t *ulsch_buffer,uint16_t buflen,uint8_t *access_mode);
/// Retrieve RRCConnectionReq from MAC
PRACH_RESOURCES_t* (*ue_get_rach)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t Msg3_flag,sub_frame_t subframe);
/// Process Random-Access Response
uint16_t (*ue_process_rar)(module_id_t Mod_id,int CC_id,frame_t frameP, uint16_t ra_rnti, uint8_t *dlsch_buffer, uint16_t *t_crnti,uint8_t preamble_index, uint8_t* selected_rar_buffer);
/// Get SR payload (0,1) from UE MAC
uint32_t (*ue_get_SR)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t eNB_id,rnti_t rnti,sub_frame_t subframe);
/// Indicate synchronization with valid PBCH
void (*dl_phy_sync_success) (module_id_t Mod_id,frame_t frameP, uint8_t CH_index,uint8_t first_sync);
/// Only calls the PDCP for now
UE_L2_STATE_t (*ue_scheduler)(module_id_t Mod_id, frame_t rxFrameP,sub_frame_t rxSubframe, frame_t txFrameP,sub_frame_t txSubframe, lte_subframe_t direction, uint8_t eNB_id, int CC_id);
/// PHY-Config-Dedicated UE
void (*phy_config_dedicated_ue)(module_id_t Mod_id,int CC_id,uint8_t CH_index,
struct PhysicalConfigDedicated *physicalConfigDedicated);
/// PHY-Config-harq UE
void (*phy_config_harq_ue)(module_id_t Mod_id,int CC_id,uint8_t CH_index,
uint16_t max_harq_tx);
/// Configure Common PHY parameters from SIB1
void (*phy_config_sib1_ue)(module_id_t Mod_id,int CC_id,uint8_t CH_index,
TDD_Config_t *tdd_config,
uint8_t SIwindowsize,
uint16_t SIperiod);
/// Configure Common PHY parameters from SIB2
void (*phy_config_sib2_ue)(module_id_t Mod_id,int CC_id,uint8_t CH_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
#if defined(Rel10) || defined(Rel14)
/// Configure Common PHY parameters from SIB13
void (*phy_config_sib13_ue)(uint8_t Mod_id,int CC_id, uint8_t eNB_index,int mbsfn_Area_idx,
long mbsfn_AreaId_r9);
void (*phy_config_dedicated_scell_ue)(uint8_t Mod_id,
uint8_t eNB_index,
SCellToAddMod_r10_t *sCellToAddMod_r10,
int CC_id);
#endif
/// Configure Common PHY parameters from mobilityControlInfo
void (*phy_config_afterHO_ue)(module_id_t Mod_id,uint8_t CC_id,uint8_t CH_index,
MobilityControlInfo_t *mobilityControlInfo,
uint8_t ho_failed);
/// Function to indicate failure of contention resolution or RA procedure
void (*ra_failed)(module_id_t Mod_id, uint8_t CC_id,uint8_t eNB_index);
/// Function to indicate success of contention resolution or RA procedure
void (*ra_succeeded)(module_id_t Mod_id,uint8_t CC_id, uint8_t eNB_index);
/// Function to indicate the transmission of msg1/rach to MAC
void (*Msg1_transmitted)(module_id_t Mod_id,uint8_t CC_id,frame_t frameP,uint8_t eNB_id);
/// Function to indicate Msg3 transmission/retransmission which initiates/reset Contention Resolution Timer
void (*Msg3_transmitted)(module_id_t Mod_id,uint8_t CC_id,frame_t frameP,uint8_t eNB_id);
/// Function to pass inter-cell measurement parameters to PHY (cell Ids)
void (*phy_config_meas_ue)(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n_adj_cells,uint32_t *adj_cell_id);
// PHY Helper Functions
/// RIV computation from PHY
uint16_t (*computeRIV)(uint16_t N_RB_DL,uint16_t RBstart,uint16_t Lcrbs);
/// Downlink TBS table lookup from PHY
uint32_t (*get_TBS_DL)(uint8_t mcs, uint16_t nb_rb);
/// Uplink TBS table lookup from PHY
uint32_t (*get_TBS_UL)(uint8_t mcs, uint16_t nb_rb);
/// Function to retrieve the HARQ round index for a particular UL/DLSCH and harq_pid
int (*get_ue_active_harq_pid)(module_id_t Mod_id, uint8_t CC_id,rnti_t rnti, int frame, uint8_t subframe, uint8_t *harq_pid, uint8_t *round, uint8_t ul_flag);
/// Function to retrieve number of CCE
uint16_t (*get_nCCE_max)(module_id_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int subframe);
int (*get_nCCE_offset)(int *CCE_table,
const unsigned char L,
const int nCCE,
const int common_dci,
const unsigned short rnti,
const unsigned char subframe);
/// Function to retrieve number of PRB in an rb_alloc
uint32_t (*get_nb_rb)(uint8_t ra_header, uint32_t rb_alloc, int n_rb_dl);
/// Function to convert VRB to PRB for distributed allocation
uint32_t (*get_prb)(int N_RB_DL,int odd_slot,int vrb,int Ngap);
/// Function to retrieve transmission mode for UE
uint8_t (*get_transmission_mode)(module_id_t Mod_id,uint8_t CC_id,rnti_t rnti);
/// Function to retrieve rb_alloc bitmap from dci rballoc field and VRB type
uint32_t (*get_rballoc)(vrb_t vrb_type, uint16_t rb_alloc_dci);
/// Function for UE MAC to retrieve current PHY connectivity mode (PRACH,RA_RESPONSE,PUSCH)
UE_MODE_t (*get_ue_mode)(module_id_t Mod_id, uint8_t CC_id,uint8_t eNB_index);
/// Function for UE MAC to retrieve measured Path Loss
int16_t (*get_PL)(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/// Function for UE MAC to retrieve the rssi
uint32_t (*get_RSSI)(uint8_t Mod_id,uint8_t CC_id);
/// Function for UE MAC to retrieve the total gain
uint32_t (*get_rx_total_gain_dB)(uint8_t Mod_id,uint8_t CC_id);
/// Function for UE MAC to retrieve the number of adjustent cells
uint8_t (*get_n_adj_cells)(uint8_t Mod_id,uint8_t CC_id);
/// Function for UE MAC to retrieve RSRP/RSRQ measurements
uint32_t (*get_RSRP)(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/// Function for UE MAC to retrieve RSRP/RSRQ measurements
uint32_t (*get_RSRQ)(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/// Function for UE MAC to set the layer3 filtered RSRP/RSRQ measurements
uint8_t (*set_RSRP_filtered)(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,float rsrp);
/// Function for UE MAC to set the layer3 filtered RSRP/RSRQ measurements
uint8_t (*set_RSRQ_filtered)(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,float rsrp);
/// Function for UE/eNB MAC to retrieve number of PRACH in TDD
uint8_t (*get_num_prach_tdd)(LTE_DL_FRAME_PARMS *frame_parms);
/// Function for UE/eNB MAC to retrieve f_id of particular PRACH resource in TDD
uint8_t (*get_fid_prach_tdd)(LTE_DL_FRAME_PARMS *frame_parms,uint8_t tdd_map_index);
/// Function for eNB MAC to retrieve subframe direction
lte_subframe_t (*get_subframe_direction)(module_id_t Mod_id, uint8_t CC_id, uint8_t subframe);
// MAC Helper functions
/// Function for UE/PHY to compute PUSCH transmit power in power-control procedure (Po_NOMINAL_PUSCH parameter)
int8_t (*get_Po_NOMINAL_PUSCH)(module_id_t Mod_id,uint8_t CC_id);
/// Function for UE/PHY to compute PUSCH transmit power in power-control procedure (deltaP_rampup parameter)
int8_t (*get_deltaP_rampup)(module_id_t Mod_id,uint8_t CC_id);
/// Function for UE/PHY to compute PHR
int8_t (*get_PHR)(module_id_t Mod_id, uint8_t CC_id,uint8_t eNB_index);
/// Function for UE to process the timing advance command
void (*process_timing_advance)(module_id_t Mod_id,uint8_t CC_id, int16_t timing_advance);
/// Function for MAC to get the UE stats from the PHY
LTE_eNB_UE_stats* (*get_eNB_UE_stats)(module_id_t Mod_id, uint8_t CC_id, rnti_t rnti);
/// get the frame parameters from the PHY
LTE_DL_FRAME_PARMS* (*get_lte_frame_parms)(module_id_t Mod_id, uint8_t CC_id);
/// get the Multiuser mimo mode
MU_MIMO_mode* (*get_mu_mimo_mode) (module_id_t Mod_id, uint8_t CC_id, rnti_t rnti);
/// get the delta TF for Uplink Power Control Calculation
int16_t (*get_hundred_times_delta_TF) (module_id_t module_idP, uint8_t CC_id, rnti_t rnti, uint8_t harq_pid);
/// get target PUSCH received power
int16_t (*get_target_pusch_rx_power) (module_id_t module_idP, uint8_t CC_id);
/// get target PUSCH received power
int16_t (*get_target_pucch_rx_power) (module_id_t module_idP, uint8_t CC_id);
unsigned char is_cluster_head;
unsigned char is_primary_cluster_head;
unsigned char is_secondary_cluster_head;
unsigned char cluster_head_index;
/// PHY Frame Configuration
LTE_DL_FRAME_PARMS *frame_parms;
uint8_t (*get_prach_prb_offset)(LTE_DL_FRAME_PARMS *frame_parms, uint8_t tdd_mapindex, uint16_t Nf);
int (*is_prach_subframe)(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame, uint8_t subframe);
/// ICIC algos
uint8_t (*get_SB_size)(uint8_t n_rb_dl);
///end ALU's algo
} MAC_xface;
*/
#endif
/** @} */
+55
View File
@@ -0,0 +1,55 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY_INTERFACE/defs.h
* \brief mac phy interface primitives
* \author Raymond Knopp and Navid Nikaein
* \date 2011
* \version 0.5
* \mail navid.nikaein@eurecom.fr or openair_tech@eurecom.fr
*/
#ifndef __PHY_INTERFACE_H__
# define __PHY_INTERFACE_H__
#include "LAYER2/MAC/mac.h"
#define MAX_NUMBER_OF_MAC_INSTANCES 16
#define NULL_PDU 255
#define DCI 0
#define DLSCH 1
#define ULSCH 2
#define mac_exit_wrapper(sTRING) \
do { \
char temp[300]; \
snprintf(temp, sizeof(temp), "%s in file "__FILE__" at line %d\n", sTRING, __LINE__); \
mac_xface->macphy_exit(temp); \
} while(0)
#endif
/** @} */
@@ -23,7 +23,7 @@
#define __PHY_INTERFACE_VARS_H__
//#include "SIMULATION/PHY_EMULATION/spec_defs.h"
#include "defs.h"
#include "phy_interface.h"
#ifdef PHY_EMUL
#include "SIMULATION/PHY_EMULATION/DEVICE_DRIVER/defs.h"
File diff suppressed because it is too large Load Diff
+118
View File
@@ -0,0 +1,118 @@
/*
* phy_stub_UE.h
*
* Created on: Sep 14, 2017
* Author: montre
*/
#ifndef __PHY_STUB_UE__H__
#define __PHY_STUB_UE__H__
#include <stdint.h>
#include "openair2/PHY_INTERFACE/IF_Module.h"
#include "nfapi_interface.h"
#include "nfapi_pnf_interface.h"
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
//#include "openair1/PHY/defs.h"
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
UL_IND_t *UL_INFO;
nfapi_tx_request_pdu_t* tx_request_pdu_list;
// New
/// Panos: Pointers to config_request types. Used from nfapi callback functions.
nfapi_dl_config_request_t* dl_config_req;
nfapi_ul_config_request_t* ul_config_req;
nfapi_hi_dci0_request_t* hi_dci0_req;
int tx_req_num_elems;
int next_ra_frame;
module_id_t next_Mod_id;
eth_params_t stub_eth_params;
// Panos: This function should return all the sched_response config messages which concern a specific UE. Inside this
// function we should somehow make the translation of config message's rnti to Mod_ID.
Sched_Rsp_t get_nfapi_sched_response(uint8_t Mod_id);
// This function will be processing DL_config and Tx.requests and trigger all the MAC Rx related calls at the UE side,
// namely:ue_send_sdu(), or ue_decode_si(), or ue_decode_p(), or ue_process_rar() based on the rnti type.
//void handle_nfapi_UE_Rx(uint8_t Mod_id, Sched_Rsp_t *Sched_INFO, int eNB_id);
int pnf_ul_config_req_UE_MAC(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req);
// This function will be processing UL and HI_DCI0 config requests to trigger all the MAC Tx related calls
// at the UE side, namely: ue_get_SR(), ue_get_rach(), ue_get_sdu() based on the pdu configuration type.
// The output of these calls will be put to an UL_IND_t structure which will then be the input to
// send_nfapi_UL_indications().
UL_IND_t generate_nfapi_UL_indications(Sched_Rsp_t sched_response);
// This function should pass the UL indication messages to the eNB side through the socket interface.
void send_nfapi_UL_indications(UL_IND_t UL_INFO);
// This function should be filling the nfapi ULSCH indications at the MAC level of the UE in a similar manner
// as fill_rx_indication() does. It should get called from ue_get_SDU()
//void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe);
void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t *ulsch_buffer, uint16_t buflen, uint16_t rnti, int index);
// This function should be indicating directly to the eNB when there is a planned scheduling request at the MAC layer
// of the UE. It should get called from ue_get_SR()
void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint16_t rnti);
// In our case the this function will be always indicating ACK to the MAC of the eNB (i.e. always assuming)
// successful decoding.
void fill_crc_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t crc_flag, int index, uint16_t rnti);
void fill_rach_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t ra_PreambleIndex, uint16_t ra_RNTI);
void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, uint16_t frame,uint8_t subframe, UL_IND_t *UL_INFO, uint16_t rnti);
void fill_ulsch_harq_indication_UE_MAC(int Mod_id, int frame,int subframe, UL_IND_t *UL_INFO, nfapi_ul_config_ulsch_harq_information *harq_information, uint16_t rnti);
void fill_uci_harq_indication_UE_MAC(int Mod_id, int frame, int subframe, UL_IND_t *UL_INFO,nfapi_ul_config_harq_information *harq_information, uint16_t rnti
/*uint8_t tdd_mapping_mode,
uint16_t tdd_multiplexing_mask*/);
int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req, int frame, int subframe, module_id_t Mod_id);
void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,uint8_t subframe,uint8_t srs_present, int index);
//int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, nfapi_tx_request_pdu_t* tx_request_pdu_list);
int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, module_id_t Mod_id);
int tx_req_UE_MAC(nfapi_tx_request_t* req);
int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req, module_id_t Mod_id);
// The following set of memcpy functions should be getting called as callback functions from
// pnf_p7_subframe_ind.
int memcpy_dl_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request_t* req);
int memcpy_ul_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req);
int memcpy_tx_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req);
int memcpy_hi_dci0_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req);
void UE_config_stub_pnf(void);
#endif /* PHY_STUB_UE_H_ */
@@ -29,26 +29,14 @@
*/
#include "platform_types.h"
//#include "openair_defs.h"
//#include "openair_proto.h"
#include "defs.h"
#include "extern.h"
//#include "mac_lchan_interface.h"
//#include "openair_rrc_utils.h"
//#include "openair_rrc_main.h"
#include "rrc_defs.h"
#include "rrc_extern.h"
#include "UTIL/LOG/log.h"
#include "rrc_eNB_UE_context.h"
#include "pdcp.h"
#include "msc.h"
#include "common/ran_context.h"
#ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h"
extern EMULATION_VARS *Emul_vars;
extern eNB_MAC_INST *eNB_mac_inst;
extern UE_MAC_INST *UE_mac_inst;
#endif
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
@@ -285,7 +273,7 @@ mac_rrc_data_req(
return (Sdu_size);
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if((Srb_id & RAB_OFFSET) == MCCH) {
if(RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESS[mbsfn_sync_area].Active==0) {
@@ -338,9 +326,9 @@ mac_rrc_data_req(
//return(0);
}
#endif //Rel10 || Rel14
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#ifdef Rel14
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR){
memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_BR,
@@ -29,26 +29,14 @@
*/
#include "platform_types.h"
//#include "openair_defs.h"
//#include "openair_proto.h"
#include "defs.h"
#include "extern.h"
//#include "mac_lchan_interface.h"
//#include "openair_rrc_utils.h"
//#include "openair_rrc_main.h"
#include "rrc_defs.h"
#include "rrc_extern.h"
#include "UTIL/LOG/log.h"
#include "rrc_eNB_UE_context.h"
#include "pdcp.h"
#include "msc.h"
#include "common/ran_context.h"
#ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h"
extern EMULATION_VARS *Emul_vars;
extern eNB_MAC_INST *eNB_mac_inst;
extern UE_MAC_INST *UE_mac_inst;
#endif
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
@@ -29,13 +29,8 @@
*/
#include "platform_types.h"
//#include "openair_defs.h"
//#include "openair_proto.h"
#include "defs.h"
#include "extern.h"
//#include "mac_lchan_interface.h"
//#include "openair_rrc_utils.h"
//#include "openair_rrc_main.h"
#include "rrc_defs.h"
#include "rrc_extern.h"
#include "UTIL/LOG/log.h"
#include "rrc_eNB_UE_context.h"
#include "pdcp.h"
@@ -71,6 +66,21 @@ mac_rrc_data_req_ue(
LOG_I(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
#endif
#ifdef Rel14
LOG_D(RRC,"[UE %d] Frame %d Filling SL DISCOVERY SRB_ID %d\n",Mod_idP,frameP,Srb_id);
LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size);
//TTN (for D2D)
if (Srb_id == SL_DISCOVERY && UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size > 0){
memcpy(&buffer_pP[0],&UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.Payload[0],UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size);
uint8_t Ret_size=UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size;
LOG_I(RRC,"[UE %d] Sending SL_Discovery, size %d bytes\n",Mod_idP,Ret_size);
UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size = 0;
return(Ret_size);
}
#endif
LOG_D(RRC,"[UE %d] Frame %d Filling CCCH SRB_ID %d\n",Mod_idP,frameP,Srb_id);
LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size);
@@ -211,7 +221,7 @@ mac_rrc_data_ind_ue(
}
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if ((srb_idP & RAB_OFFSET) == MCCH) {
LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %d from eNB %d\n",
@@ -241,8 +251,13 @@ mac_rrc_data_ind_ue(
decode_MCCH_Message(&ctxt, eNB_indexP, sduP, sdu_lenP, mbsfn_sync_areaP);
#endif
}
//TTN (for D2D)
if(srb_idP == SL_DISCOVERY) {
LOG_I(RRC,"[UE %d] Received SDU (%d bytes) for SL_DISCOVERY on SRB %d from eNB %d\n",module_idP, sdu_lenP, srb_idP,eNB_indexP);
decode_SL_Discovery_Message(&ctxt, eNB_indexP, sduP, sdu_lenP);
}
#endif // Rel10 || Rel14
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
return(0);
@@ -315,7 +330,11 @@ rrc_data_req_ue(
confirmP,
sdu_sizeP,
buffer_pP,
modeP);
modeP
#ifdef Rel14
,NULL, NULL
#endif
);
#endif
}
@@ -384,6 +403,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt=0;
if (UE_rrc_inst[Mod_idP].Info[eNB_index].T310_active==1) {
LOG_D(RRC, "Panos-D: rrc_in_sync_ind 1 \n");
UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt++;
}
@@ -52,13 +52,13 @@
#include "RRCConnectionSetup.h"
#include "SRB-ToAddModList.h"
#include "DRB-ToAddModList.h"
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "MCCH-Message.h"
//#define MRB1 1
#endif
#include "RRC/LITE/defs.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/rrc_defs.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRCConnectionSetupComplete.h"
#include "RRCConnectionReconfigurationComplete.h"
#include "RRCConnectionReconfiguration.h"
@@ -70,8 +70,10 @@
#include "SIB-Type.h"
#include "BCCH-DL-SCH-Message.h"
#include "SBCCH-SL-BCH-MessageType.h"
#include "SBCCH-SL-BCH-Message.h"
#include "PHY/defs.h"
//#include "PHY/defs.h"
#include "MeasObjectToAddModList.h"
#include "ReportConfigToAddModList.h"
@@ -229,7 +231,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
mib->message.systemFrameNumber.size = 1;
mib->message.systemFrameNumber.bits_unused=0;
mib->message.spare.buf = (uint8_t *)spare;
#ifndef Rel14
#if (RRC_VERSION < MAKE_VERSION(14, 0, 0))
mib->message.spare.size = 2;
mib->message.spare.bits_unused = 6; // This makes a spare of 10 bits
#else
@@ -272,6 +274,67 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
return((enc_rval.encoded+7)/8);
}
//TTN for D2D
// 3GPP 36.331 (Section 5.10.7.4)
uint8_t do_MIB_SL(const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, uint32_t frame, uint8_t subframe, uint8_t in_coverage, uint8_t mode)
{
asn_enc_rval_t enc_rval;
SBCCH_SL_BCH_MessageType_t *mib_sl = &UE_rrc_inst[ctxt_pP->module_id].mib_sl[eNB_index];
uint8_t sfn = (uint8_t)((frame>>2)&0xff);
UE_rrc_inst[ctxt_pP->module_id].MIB = (uint8_t*) malloc16(4);
if (in_coverage > 0 ){
//in coverage
mib_sl->inCoverage_r12 = TRUE;
mib_sl->sl_Bandwidth_r12 = *UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_Bandwidth;
if (UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]->tdd_Config) {
mib_sl->tdd_ConfigSL_r12.subframeAssignmentSL_r12 = UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]->tdd_Config->subframeAssignment;
} else {
mib_sl->tdd_ConfigSL_r12.subframeAssignmentSL_r12 = TDD_ConfigSL_r12__subframeAssignmentSL_r12_none;
}
//if triggered by sl communication
if (UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index]->commConfig_r12->commSyncConfig_r12->list.array[0]->txParameters_r12->syncInfoReserved_r12){
mib_sl->reserved_r12 = *UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index]->commConfig_r12->commSyncConfig_r12->list.array[0]->txParameters_r12->syncInfoReserved_r12;
}
//if triggered by sl discovery
if (UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index]->discConfig_r12->discSyncConfig_r12->list.array[0]->txParameters_r12->syncInfoReserved_r12){
mib_sl->reserved_r12 = *UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index]->discConfig_r12->discSyncConfig_r12->list.array[0]->txParameters_r12->syncInfoReserved_r12;
}
//Todo - if triggered by v2x
} else {
//Todo - out of coverage for V2X
// Todo - UE has a selected SyncRef UE
mib_sl->inCoverage_r12 = FALSE;
//set sl-Bandwidth, subframeAssignmentSL and reserved from the pre-configured parameters
}
//set FrameNumber, subFrameNumber
mib_sl->directFrameNumber_r12.buf = &sfn;
mib_sl->directFrameNumber_r12.size = 1;
mib_sl->directFrameNumber_r12.bits_unused=0;
mib_sl->directSubframeNumber_r12 = subframe;
LOG_I(RRC,"[MIB-SL] sfn %x, subframe %x\n", (uint32_t)sfn, (uint8_t)subframe);
enc_rval = uper_encode_to_buffer(&asn_DEF_SBCCH_SL_BCH_Message,
(void*)mib_sl,
UE_rrc_inst[ctxt_pP->module_id].MIB,
24);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
if (enc_rval.encoded==-1) {
return(-1);
}
return((enc_rval.encoded+7)/8);
}
uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
int Mod_id,int CC_id
#if defined(ENABLE_ITTI)
@@ -414,6 +477,22 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,&sib_type);
ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,&schedulingInfo);
#if 0
/* TODO: this is disabled for the moment because OAI UE does
* not connect to OAI eNB with the current software.
* See also TODO comment in do_SIB23.
*/
//TTN - This is for SIB18
sib_type=SIB_Type_sibType18_v1250;
ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,&sib_type);
ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,&schedulingInfo);
//TTN - This is for SIB19
sib_type=SIB_Type_sibType19_v1250;
ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,&sib_type);
ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,&schedulingInfo);
#endif
// ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL);
#if defined(ENABLE_ITTI)
@@ -487,8 +566,22 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif
)
{
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part,*sib3_part;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//TTN - for D2D
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib18_part, *sib19_part, *sib21_part;
SL_CommRxPoolList_r12_t *SL_CommRxPoolList; //for SIB18
struct SL_CommResourcePool_r12 *SL_CommResourcePool; //for SIB18
SL_DiscRxPoolList_r12_t *SL_DiscRxPoolList; //for SIB19 (discRxPool)
struct SL_DiscResourcePool_r12 *SL_DiscResourcePool; //for SIB19 (discRxPool)
//SL_DiscRxPoolList_r12_t *SL_DiscRxPoolPSList; //for SIB19 (discRxPoolPS)
//struct SL_DiscResourcePool_r12 *SL_DiscResourcePoolPS; //for SIB19 (discRxPoolPS)
//struct SL_V2X_ConfigCommon_r14 *SL_V2X_ConfigCommon;
#endif
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib13_part;
MBSFN_SubframeConfigList_t *MBSFNSubframeConfigList;
MBSFN_AreaInfoList_r9_t *MBSFNArea_list;
@@ -500,11 +593,18 @@ uint8_t do_SIB23(uint8_t Mod_id,
BCCH_DL_SCH_Message_t *bcch_message = &RC.rrc[Mod_id]->carrier[CC_id].systemInformation;
SystemInformationBlockType2_t **sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2;
SystemInformationBlockType3_t **sib3 = &RC.rrc[Mod_id]->carrier[CC_id].sib3;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
SystemInformationBlockType13_r9_t **sib13 = &RC.rrc[Mod_id]->carrier[CC_id].sib13;
uint8_t MBMS_flag = RC.rrc[Mod_id]->carrier[CC_id].MBMS_flag;
#endif
#if defined(Rel10) || defined(Rel14)
//TTN - for D2D
SystemInformationBlockType18_r12_t **sib18 = &RC.rrc[Mod_id]->carrier[CC_id].sib18;
SystemInformationBlockType19_r12_t **sib19 = &RC.rrc[Mod_id]->carrier[CC_id].sib19;
SystemInformationBlockType21_r14_t **sib21 = &RC.rrc[Mod_id]->carrier[CC_id].sib21;
#endif
if (bcch_message) {
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
} else {
@@ -522,7 +622,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
exit(-1);
}
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
LOG_I(RRC,"[eNB %d] Configuration SIB2/3, MBMS = %d\n", Mod_id, MBMS_flag);
#else
LOG_I(RRC,"[eNB %d] Configuration SIB2/3\n", Mod_id);
@@ -538,7 +638,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
*sib2 = &sib2_part->choice.sib2;
*sib3 = &sib3_part->choice.sib3;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (MBMS_flag > 0) {
sib13_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
@@ -549,10 +649,30 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif
#if defined(Rel10) || defined(Rel14)
//TTN - for D2D
sib18_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
sib19_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
sib21_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
memset(sib18_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
memset(sib19_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
memset(sib21_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
sib18_part->present = SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250;
sib19_part->present = SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib19_v1250;
sib21_part->present = SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib21_v1430;
*sib18 = &sib18_part->choice.sib18_v1250;
*sib19 = &sib19_part->choice.sib19_v1250;
*sib21 = &sib21_part->choice.sib21_v1430;
#endif
// sib2
(*sib2)->ac_BarringInfo = NULL;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if 0
(*sib2)->ssac_BarringForMMTEL_Voice_r9 = NULL;
(*sib2)->ssac_BarringForMMTEL_Video_r9 = NULL;
@@ -641,7 +761,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
= configuration->pucch_nRB_CQI[CC_id];
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN
= configuration->pucch_nCS_AN[CC_id];
#if !defined(Rel10) && !defined(Rel14)
#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN
= configuration->pucch_n1_AN[CC_id];
#endif
@@ -799,7 +919,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib2)->freqInfo.ul_Bandwidth = NULL;
// (*sib2)->mbsfn_SubframeConfigList = NULL;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (MBMS_flag > 0) {
LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2\n");
@@ -848,7 +968,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib2)->timeAlignmentTimerCommon=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120;
/// (*SIB3)
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
(*sib3)->ext1 = NULL;
#if 0
(*sib3)->s_IntraSearch_v920=NULL;
@@ -883,7 +1003,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
// SIB13
// fill in all elements of SIB13 if present
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (MBMS_flag > 0 ) {
// Notification for mcch change
@@ -942,6 +1062,298 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif
#if defined(Rel10) || defined(Rel14)
//TTN - for D2D
// SIB18
//commRxPool_r12
(*sib18)->commConfig_r12 = CALLOC (1, sizeof(*(*sib18)->commConfig_r12));
SL_CommRxPoolList= &(*sib18)->commConfig_r12->commRxPool_r12;
memset(SL_CommRxPoolList,0,sizeof(*SL_CommRxPoolList));
SL_CommResourcePool = CALLOC(1, sizeof(*SL_CommResourcePool));
memset(SL_CommResourcePool,0,sizeof(*SL_CommResourcePool));
SL_CommResourcePool->sc_CP_Len_r12 = configuration->rxPool_sc_CP_Len[CC_id];
SL_CommResourcePool->sc_Period_r12 = configuration->rxPool_sc_Period[CC_id];
SL_CommResourcePool->data_CP_Len_r12 = configuration->rxPool_data_CP_Len[CC_id];
//sc_TF_ResourceConfig_r12
SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_Num_r12 = configuration->rxPool_ResourceConfig_prb_Num[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_Start_r12 = configuration->rxPool_ResourceConfig_prb_Start[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_End_r12 = configuration->rxPool_ResourceConfig_prb_End[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present = configuration->rxPool_ResourceConfig_offsetIndicator_present[CC_id];
if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_small_r12 ) {
SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = configuration->rxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
} else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_large_r12 ){
SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.large_r12 = configuration->rxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
}
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present = configuration->rxPool_ResourceConfig_subframeBitmap_present[CC_id];
if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs4_r12){
//for BS4
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.size = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf = (uint8_t *)configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.bits_unused = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
} else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs8_r12){
//for BS8
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.size = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.buf = (uint8_t *)configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.bits_unused = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
} else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs12_r12){
//for BS12
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.size = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.buf = (uint8_t *)configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.bits_unused = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs16_r12){
//for BS16
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.size = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf = (uint8_t *)configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.bits_unused = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs30_r12){
//for BS30
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.size = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.buf = (uint8_t *)configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.bits_unused = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs40_r12){
//for BS40
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.size = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf = (uint8_t *)configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.bits_unused = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs42_r12){
//for BS42
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.size = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.buf = (uint8_t *)configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_CommResourcePool->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.bits_unused = configuration->rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}
//dataHoppingConfig_r12
SL_CommResourcePool->dataHoppingConfig_r12.hoppingParameter_r12 = 0;
SL_CommResourcePool->dataHoppingConfig_r12.numSubbands_r12 = SL_HoppingConfigComm_r12__numSubbands_r12_ns1;
SL_CommResourcePool->dataHoppingConfig_r12.rb_Offset_r12 = 0;
//ue_SelectedResourceConfig_r12
SL_CommResourcePool->ue_SelectedResourceConfig_r12 = CALLOC (1, sizeof (*SL_CommResourcePool->ue_SelectedResourceConfig_r12));
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_Num_r12 = 20;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_Start_r12 = 5;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_End_r12 = 44;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.offsetIndicator_r12.present = SL_OffsetIndicator_r12_PR_small_r12;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = 0 ;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.present = SubframeBitmapSL_r12_PR_bs40_r12;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.size = 5;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf = CALLOC(1,5);
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.bits_unused = 0;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[0] = 0xF0;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[1] = 0xFF;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[2] = 0xFF;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[3] = 0xFF;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[4] = 0xFF;
//SL_CommResourcePool->ue_SelectedResourceConfig_r12->trpt_Subset_r12 = CALLOC (1, sizeof(*SL_CommResourcePool->ue_SelectedResourceConfig_r12->trpt_Subset_r12));
//rxParametersNCell_r12
SL_CommResourcePool->rxParametersNCell_r12 = CALLOC (1, sizeof (*SL_CommResourcePool->rxParametersNCell_r12));
SL_CommResourcePool->rxParametersNCell_r12->tdd_Config_r12 = CALLOC (1, sizeof (*SL_CommResourcePool->rxParametersNCell_r12->tdd_Config_r12));
SL_CommResourcePool->rxParametersNCell_r12->tdd_Config_r12->subframeAssignment = 0 ;
SL_CommResourcePool->rxParametersNCell_r12->tdd_Config_r12->specialSubframePatterns = 0;
SL_CommResourcePool->rxParametersNCell_r12->syncConfigIndex_r12 = 0;
//txParameters_r12
SL_CommResourcePool->txParameters_r12 = CALLOC (1, sizeof (*SL_CommResourcePool->txParameters_r12));
SL_CommResourcePool->txParameters_r12->sc_TxParameters_r12.alpha_r12 = Alpha_r12_al0;
SL_CommResourcePool->txParameters_r12->sc_TxParameters_r12.p0_r12 = 0;
SL_CommResourcePool->ext1 = NULL ;
//end SL_CommResourcePool
//add SL_CommResourcePool to SL_CommRxPoolList
ASN_SEQUENCE_ADD(&SL_CommRxPoolList->list,SL_CommResourcePool);
//end commRxPool_r12
//TODO: commTxPoolNormalCommon_r12, similar to commRxPool_r12
//TODO: commTxPoolExceptional_r12
//TODO: commSyncConfig_r12
// may add commTxResourceUC-ReqAllowed with Ext1
(*sib18)->ext1 = NULL;
(*sib18)->lateNonCriticalExtension = NULL;
// end SIB18
// SIB19
// fill in all elements of SIB19 if present
//discConfig_r12
(*sib19)->discConfig_r12 = CALLOC (1, sizeof(*(*sib19)->discConfig_r12));
SL_DiscRxPoolList = &(*sib19)->discConfig_r12->discRxPool_r12;
memset(SL_DiscRxPoolList,0,sizeof(*SL_DiscRxPoolList));
//fill SL_DiscResourcePool
SL_DiscResourcePool = CALLOC(1, sizeof(*SL_DiscResourcePool));
SL_DiscResourcePool->cp_Len_r12 = configuration->discRxPool_cp_Len[CC_id];
SL_DiscResourcePool->discPeriod_r12 = configuration->discRxPool_discPeriod[CC_id];
//sc_TF_ResourceConfig_r12
SL_DiscResourcePool->numRetx_r12 = configuration->discRxPool_numRetx[CC_id];
SL_DiscResourcePool->numRepetition_r12 = configuration->discRxPool_numRepetition[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.prb_Num_r12 = configuration->discRxPool_ResourceConfig_prb_Num[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.prb_Start_r12 = configuration->discRxPool_ResourceConfig_prb_Start[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.prb_End_r12 = configuration->discRxPool_ResourceConfig_prb_End[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.present = configuration->discRxPool_ResourceConfig_offsetIndicator_present[CC_id];
if (SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_small_r12 ) {
SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = configuration->discRxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
} else if (SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_large_r12 ){
SL_DiscResourcePool->tf_ResourceConfig_r12.offsetIndicator_r12.choice.large_r12 = configuration->discRxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
}
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present = configuration->discRxPool_ResourceConfig_subframeBitmap_present[CC_id];
if (SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs4_r12){
//for BS4
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.size = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf = (uint8_t *)configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.bits_unused = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
} else if (SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs8_r12){
//for BS8
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.size = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.buf = (uint8_t *)configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.bits_unused = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
} else if (SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs12_r12){
//for BS12
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.size = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.buf = (uint8_t *)configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.bits_unused = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs16_r12){
//for BS16
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.size = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf = (uint8_t *)configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.bits_unused = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs30_r12){
//for BS30
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.size = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.buf = (uint8_t *)configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.bits_unused = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs40_r12){
//for BS40
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.size = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf = (uint8_t *)configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.bits_unused = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs42_r12){
//for BS42
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.size = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.buf = (uint8_t *)configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePool->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.bits_unused = configuration->discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}
//add SL_DiscResourcePool to SL_DiscRxPoolList
ASN_SEQUENCE_ADD(&SL_DiscRxPoolList->list,SL_DiscResourcePool);
/*
//for DiscRxPoolPS
(*sib19)->ext1 = CALLOC (1, sizeof(*(*sib19)->ext1));
(*sib19)->ext1->discConfigPS_13 = CALLOC (1, sizeof(*((*sib19)->ext1->discConfigPS_13)));
SL_DiscRxPoolPSList = &(*sib19)->ext1->discConfigPS_13->discRxPoolPS_r13;
memset(SL_DiscRxPoolPSList,0,sizeof(*SL_DiscRxPoolPSList));
//fill SL_DiscResourcePool
SL_DiscResourcePoolPS = CALLOC(1, sizeof(*SL_DiscResourcePoolPS));
SL_DiscResourcePoolPS->cp_Len_r12 = configuration->discRxPoolPS_cp_Len[CC_id];
SL_DiscResourcePoolPS->discPeriod_r12 = configuration->discRxPoolPS_discPeriod[CC_id];
//sc_TF_ResourceConfig_r12
SL_DiscResourcePoolPS->numRetx_r12 = configuration->discRxPoolPS_numRetx[CC_id];
SL_DiscResourcePoolPS->numRepetition_r12 = configuration->discRxPoolPS_numRepetition[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.prb_Num_r12 = configuration->discRxPoolPS_ResourceConfig_prb_Num[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.prb_Start_r12 = configuration->discRxPoolPS_ResourceConfig_prb_Start[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.prb_End_r12 = configuration->discRxPoolPS_ResourceConfig_prb_End[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.present = configuration->discRxPoolPS_ResourceConfig_offsetIndicator_present[CC_id];
if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_small_r12 ) {
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = configuration->discRxPoolPS_ResourceConfig_offsetIndicator_choice[CC_id] ;
} else if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_large_r12 ){
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.offsetIndicator_r12.choice.large_r12 = configuration->discRxPoolPS_ResourceConfig_offsetIndicator_choice[CC_id] ;
}
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_present[CC_id];
if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs4_r12){
//for BS4
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.size = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.bits_unused = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
} else if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs8_r12){
//for BS8
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.size = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.buf = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs8_r12.bits_unused = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
} else if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs12_r12){
//for BS12
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.size = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.buf = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs12_r12.bits_unused = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs16_r12){
//for BS16
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.size = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.bits_unused = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs30_r12){
//for BS30
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.size = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.buf = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs30_r12.bits_unused = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs40_r12){
//for BS40
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.size = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.bits_unused = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}else if (SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.present == SubframeBitmapSL_r12_PR_bs42_r12){
//for BS42
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.size = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[CC_id];
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.buf = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[CC_id];;
SL_DiscResourcePoolPS->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs42_r12.bits_unused = configuration->discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[CC_id];
}
//add SL_DiscResourcePool to SL_DiscRxPoolList
ASN_SEQUENCE_ADD(&SL_DiscRxPoolPSList->list,SL_DiscResourcePoolPS);
*/
(*sib19)->lateNonCriticalExtension = NULL;
//end SIB19
//SIB21
(*sib21)->sl_V2X_ConfigCommon_r14 = CALLOC (1, sizeof(*(*sib21)->sl_V2X_ConfigCommon_r14));
//SL_V2X_ConfigCommon= (*sib21)->sl_V2X_ConfigCommon_r14;
memset((*sib21)->sl_V2X_ConfigCommon_r14,0,sizeof(*(*sib21)->sl_V2X_ConfigCommon_r14));
struct SL_CommRxPoolListV2X_r14 *SL_CommRxPoolListV2X;
struct SL_CommResourcePoolV2X_r14 *SL_CommResourcePoolV2X;
(*sib21)->sl_V2X_ConfigCommon_r14->v2x_CommRxPool_r14 = CALLOC(1, sizeof(*(*sib21)->sl_V2X_ConfigCommon_r14->v2x_CommRxPool_r14));
SL_CommRxPoolListV2X = (*sib21)->sl_V2X_ConfigCommon_r14->v2x_CommRxPool_r14;
SL_CommResourcePoolV2X = CALLOC(1, sizeof(*SL_CommResourcePoolV2X));
memset(SL_CommResourcePoolV2X,0,sizeof(*SL_CommResourcePoolV2X));
SL_CommResourcePoolV2X->sl_OffsetIndicator_r14 = CALLOC(1, sizeof(*SL_CommResourcePoolV2X->sl_OffsetIndicator_r14));
SL_CommResourcePoolV2X->sl_OffsetIndicator_r14->present = SL_OffsetIndicator_r12_PR_small_r12;
SL_CommResourcePoolV2X->sl_OffsetIndicator_r14->choice.small_r12 = 0;
SL_CommResourcePoolV2X->sl_Subframe_r14.present = SubframeBitmapSL_r14_PR_bs40_r14;
SL_CommResourcePoolV2X->sl_Subframe_r14.choice.bs40_r14.size = 5;
SL_CommResourcePoolV2X->sl_Subframe_r14.choice.bs40_r14.buf = CALLOC(1,5);
SL_CommResourcePoolV2X->sl_Subframe_r14.choice.bs40_r14.bits_unused = 0;
SL_CommResourcePoolV2X->sl_Subframe_r14.choice.bs40_r14.buf[0] = 0xF0;
SL_CommResourcePoolV2X->sl_Subframe_r14.choice.bs40_r14.buf[1] = 0xFF;
SL_CommResourcePoolV2X->sl_Subframe_r14.choice.bs40_r14.buf[2] = 0xFF;
SL_CommResourcePoolV2X->sl_Subframe_r14.choice.bs40_r14.buf[3] = 0xFF;
SL_CommResourcePoolV2X->sl_Subframe_r14.choice.bs40_r14.buf[4] = 0xFF;
SL_CommResourcePoolV2X->adjacencyPSCCH_PSSCH_r14 = 1;
SL_CommResourcePoolV2X->sizeSubchannel_r14 = 10;
SL_CommResourcePoolV2X->numSubchannel_r14 = 5;
SL_CommResourcePoolV2X->startRB_Subchannel_r14 = 10;
//rxParametersNCell_r12
SL_CommResourcePoolV2X->rxParametersNCell_r14 = CALLOC (1, sizeof (*SL_CommResourcePoolV2X->rxParametersNCell_r14));
SL_CommResourcePoolV2X->rxParametersNCell_r14->tdd_Config_r14 = CALLOC (1, sizeof (*SL_CommResourcePoolV2X->rxParametersNCell_r14->tdd_Config_r14));
SL_CommResourcePoolV2X->rxParametersNCell_r14->tdd_Config_r14->subframeAssignment = 0 ;
SL_CommResourcePoolV2X->rxParametersNCell_r14->tdd_Config_r14->specialSubframePatterns = 0;
SL_CommResourcePoolV2X->rxParametersNCell_r14->syncConfigIndex_r14 = 0;
ASN_SEQUENCE_ADD(&SL_CommRxPoolListV2X->list,SL_CommResourcePoolV2X);
//end SIB21
#endif
bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1;
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformation;
@@ -950,7 +1362,6 @@ uint8_t do_SIB23(uint8_t Mod_id,
sizeof(SystemInformation_t));*/
bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.present = SystemInformation__criticalExtensions_PR_systemInformation_r8;
bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
// asn_set_empty(&systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list);//.size=0;
@@ -959,14 +1370,26 @@ uint8_t do_SIB23(uint8_t Mod_id,
sib2_part);
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,
sib3_part);
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
if (MBMS_flag > 0) {
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib13_part);
}
#if 0
/* TODO: this is disabled for the moment.
* Maybe we shouldn't put this together with SIBs 2/3.
* The problem is that the MAC message is now 92 bytes, which
* is too much in the SIB scheduler (the scheduler allocates
* 4 RBs with max MCS 8).
*/
//for D2D
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib18_part);
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib19_part);
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib21_part);
#endif
#endif
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
@@ -1091,6 +1514,176 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
}
//TTN for D2D - 3GPP TS 36.331 (Section 5.10.2.3)
uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq, SL_TRIGGER_t mode)
{
asn_enc_rval_t enc_rval;
UL_DCCH_Message_t ul_dcch_msg;
SidelinkUEInformation_r12_t *sidelinkUEInformation;
ARFCN_ValueEUTRA_r9_t carrierFreq = 25655;//sidelink communication frequency (hardcoded - should come from SIB2)
memset((void *)&ul_dcch_msg,0,sizeof(UL_DCCH_Message_t));
ul_dcch_msg.message.present = UL_DCCH_MessageType_PR_messageClassExtension;
ul_dcch_msg.message.choice.messageClassExtension.present = UL_DCCH_MessageType__messageClassExtension_PR_c2;
ul_dcch_msg.message.choice.messageClassExtension.choice.c2.present = UL_DCCH_MessageType__messageClassExtension__c2_PR_sidelinkUEInformation_r12;
sidelinkUEInformation = &ul_dcch_msg.message.choice.messageClassExtension.choice.c2.choice.sidelinkUEInformation_r12;
//3GPP TS 36.331 (Section 5.10.2.3)
sidelinkUEInformation->criticalExtensions.present = SidelinkUEInformation_r12__criticalExtensions_PR_c1;
sidelinkUEInformation->criticalExtensions.choice.c1.present = SidelinkUEInformation_r12__criticalExtensions__c1_PR_sidelinkUEInformation_r12;
switch(mode) {
//if SIB18 is available
case SL_RECEIVE_COMMUNICATION: // to receive sidelink communication
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commRxInterestedFreq_r12 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commRxInterestedFreq_r12));
memcpy((void*)sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commRxInterestedFreq_r12, (void*)&carrierFreq,
sizeof(ARFCN_ValueEUTRA_r9_t));
break;
case SL_TRANSMIT_NON_RELAY_ONE_TO_MANY: //to transmit non-relay related one-to-many sidelink communication
//commTxResourceReq
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commTxResourceReq_r12 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commTxResourceReq_r12));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commTxResourceReq_r12->carrierFreq_r12 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commTxResourceReq_r12->carrierFreq_r12));
memcpy((void*)sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commTxResourceReq_r12->carrierFreq_r12, (void*)&carrierFreq,
sizeof(ARFCN_ValueEUTRA_r9_t));
memcpy(&sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.commTxResourceReq_r12->destinationInfoList_r12,
destinationInfoList,
sizeof(SL_DestinationInfoList_r12_t));
break;
case SL_TRANSMIT_NON_RELAY_ONE_TO_ONE://transmit non-relay related one-to-one sidelink communication
//if commTxResourceUC-ReqAllowed is included in SIB18
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceReqUC_r13 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceReqUC_r13));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceReqUC_r13->carrierFreq_r12 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceReqUC_r13->carrierFreq_r12));
memcpy((void*)sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceReqUC_r13->carrierFreq_r12, (void*)&carrierFreq,
sizeof (ARFCN_ValueEUTRA_r9_t));
memcpy(&sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceReqUC_r13->destinationInfoList_r12,
destinationInfoList,
sizeof(SL_DestinationInfoList_r12_t));
break;
case SL_TRANSMIT_RELAY_ONE_TO_ONE: //transmit relay related one-to-one sidelink communication
//if SIB19 includes discConfigRelay and UE acts a relay or UE has a selected relay
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13= CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13));
memcpy(&sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12,
destinationInfoList,
sizeof(*destinationInfoList));
//set ue-type to relayUE or remoteUE
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->ue_Type_r13 =SidelinkUEInformation_v1310_IEs__commTxResourceInfoReqRelay_r13__ue_Type_r13_relayUE;
//sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12->nonCriticalExtension->commTxResourceInfoReqRelay_r13->ue_Type_r13 =SidelinkUEInformation_v1310_IEs__commTxResourceInfoReqRelay_r13__ue_Type_r13_remoteUE;
break;
case SL_TRANSMIT_RELAY_ONE_TO_MANY: //transmit relay related one-to-many sidelink communication
//if SIB19 includes discConfigRelay and UE acts a relay
//set ue-type to relayUE
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13= CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->ue_Type_r13 =SidelinkUEInformation_v1310_IEs__commTxResourceInfoReqRelay_r13__ue_Type_r13_relayUE;
memcpy(&sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12,
destinationInfoList,
sizeof(*destinationInfoList));
break;
//if SIB19 is available
//we consider only one frequency - a serving frequency
case SL_RECEIVE_DISCOVERY: //receive sidelink discovery announcements
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.discRxInterest_r12 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.discRxInterest_r12));
*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.discRxInterest_r12 = SidelinkUEInformation_r12_IEs__discRxInterest_r12_true;
break;
case SL_TRANSMIT_NON_PS_DISCOVERY://to transmit non-PS related sidelink discovery announcements
//for the first frequency
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.discTxResourceReq_r12 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.discTxResourceReq_r12));
memcpy((void*)sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.discTxResourceReq_r12,
(void*)discTxResourceReq,
sizeof(long));
//for additional frequency
break;
case SL_TRANSMIT_PS_DISCOVERY://to transmit PS related sidelink discovery announcements
//if to transmit non-relay PS related discovery announcements and SIB19 includes discConfigPS
//if UE is acting as relay UE and SIB includes discConfigRelay (relay threshold condition)
//if relay UE/has a selected relay UE and if SIB19 includes discConfigRelay
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->discTxResourceReqPS_r13 = CALLOC(1,
sizeof(*sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->discTxResourceReqPS_r13));
sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->discTxResourceReqPS_r13->discTxResourceReq_r13 = *discTxResourceReq;
break;
//SIB21
case SL_RECEIVE_V2X:
//TODO
break;
case SL_TRANSMIT_V2X:
//TODO
break;
//TODO: request sidelink discovery transmission/reception gaps
//TODO: report the system information parameters related to sidelink discovery of carriers other than the primary
default:
break;
}
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
(void*)&ul_dcch_msg,
buffer,
100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
char message_string[20000];
size_t message_string_size;
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_DCCH_Message, (void *) &ul_dcch_msg)) > 0) {
MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized (TASK_RRC_UE, RRC_UL_DCCH, message_string_size + sizeof (IttiMsgText));
msg_p->ittiMsg.rrc_ul_dcch.size = message_string_size;
memcpy(&msg_p->ittiMsg.rrc_ul_dcch.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, NB_eNB_INST + Mod_id, msg_p);
}
}
# endif
#endif
#ifdef USER_MODE
LOG_D(RRC,"SidelinkUEInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif
return((enc_rval.encoded+7)/8);
}
uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS)
{
@@ -1411,7 +2004,7 @@ do_RRCConnectionSetup(
// CQI ReportConfig
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic=CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic));
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic= CQI_ReportModeAperiodic_rm30;
#else
*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportModeAperiodic=CQI_ReportConfig__cqi_ReportModeAperiodic_rm30; // HLC CQI, no PMI
@@ -1798,11 +2391,13 @@ do_RRCConnectionReconfiguration(
RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList
*dedicatedInfoNASList
#if defined(Rel10) || defined(Rel14)
*dedicatedInfoNASList,
SL_CommConfig_r12_t *sl_CommConfig,
SL_DiscConfig_r12_t *sl_DiscConfig
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
, SCellToAddMod_r10_t *SCell_config
#endif
)
//------------------------------------------------------------------------------
{
@@ -1894,6 +2489,45 @@ do_RRCConnectionReconfiguration(
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.dedicatedInfoNASList = dedicatedInfoNASList;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL;
//TTN for D2D
//allocate dedicated resource pools for SL communication (sl_CommConfig_r12)
if (sl_CommConfig != NULL) {
LOG_I(RRC,"[RRCConnectionReconfiguration] allocating a dedicated resource pool for SL communication \n");
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_CommConfig_r12 = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_CommConfig_r12));
memcpy((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_CommConfig_r12, (void*)sl_CommConfig,
sizeof(SL_CommConfig_r12_t));
}
//allocate dedicated resource pools for SL discovery (sl_DiscConfig)
if (sl_DiscConfig != NULL){
LOG_I(RRC,"[RRCConnectionReconfiguration] allocating a dedicated resource pool for SL discovery \n");
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension));
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_DiscConfig_r12 = CALLOC(1,
sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_DiscConfig_r12));
memcpy((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->sl_DiscConfig_r12, (void*)sl_DiscConfig,
sizeof(SL_DiscConfig_r12_t));
}
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
(void*)&dl_dcch_msg,
buffer,
@@ -2297,7 +2931,7 @@ uint8_t do_RRCConnectionRelease(
uint8_t TMGI[5] = {4,3,2,1,0};//TMGI is a string of octet, ref. TS 24.008 fig. 10.5.4a
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
uint8_t sync_area,
uint8_t *buffer,
@@ -2469,7 +3103,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension));
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measId=measid;
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrpResult=rsrp_s;
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultPCell.rsrqResult=rsrq_s;
#else
@@ -39,7 +39,8 @@
#include <asn_application.h>
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
#include "RRC/LITE/defs.h"
#include "RRC/LTE/rrc_defs.h"
#include "SL-DestinationInfoList-r12.h"
/*
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
@@ -103,6 +104,14 @@ routine only generates an mo-data establishment cause.
uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv);
/**
\brief Generate an SidelinkUEInformation UL-DCCH-Message (UE).
@param destinationInfoList Pointer to a list of destination for which UE requests E-UTRAN to assign dedicated resources
@param discTxResourceReq Pointer to number of discovery messages for discovery announcements for which UE requests E-UTRAN to assign dedicated resources
@param mode Indicates different requests from upper layers
@returns Size of encoded bit stream in bytes*/
uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq, SL_TRIGGER_t mode);
/** \brief Generate an RRCConnectionSetupComplete UL-DCCH-Message (UE)
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@returns Size of encoded bit stream in bytes*/
@@ -186,8 +195,10 @@ do_RRCConnectionReconfiguration(
struct MeasConfig__speedStatePars *speedStatePars,
RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList
#if defined(Rel10) || defined(Rel14)
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList,
SL_CommConfig_r12_t *sl_CommConfig,
SL_DiscConfig_r12_t *sl_DiscConfig
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
, SCellToAddMod_r10_t *SCell_config
#endif
);
@@ -250,7 +261,7 @@ uint8_t do_RRCConnectionRelease(uint8_t Mod_id, uint8_t *buffer,int Transaction_
* @returns Size of encoded bit stream in bytes
*/
uint8_t do_MCCHMessage(uint8_t *buffer);
#if defined(Rel10) || defined(Rel14)
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/***
* \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data)
* @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU
@@ -53,7 +53,7 @@
#include "RRCConnectionSetup-NB.h"
#include "SRB-ToAddModList-NB-r13.h"
#include "DRB-ToAddModList-NB-r13.h"
#include "RRC/LITE/defs_NB_IoT.h"
#include "RRC/LTE/defs_NB_IoT.h"
#include "RRCConnectionSetupComplete-NB.h"
#include "RRCConnectionReconfigurationComplete-NB.h"
#include "RRCConnectionReconfiguration-NB.h"

Some files were not shown because too many files have changed in this diff Show More