Merge remote-tracking branch 'origin/develop-nr' into nr_fapi_for_push
This commit is contained in:
@@ -20,15 +20,14 @@
|
||||
*/
|
||||
|
||||
#ifndef __MAC_RRC_PRIMITIVES_H__
|
||||
# define __MAC_RRC_PRIMITIVES_H__
|
||||
|
||||
|
||||
#define __MAC_RRC_PRIMITIVES_H__
|
||||
|
||||
#ifndef OPENAIR2_IN
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#endif
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "openair2/RRC/LTE/rrc_defs.h"
|
||||
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
@@ -398,5 +397,3 @@ typedef struct {
|
||||
#define REMOVE_LC 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -274,6 +274,7 @@ typedef struct RrcConfigurationReq_s {
|
||||
long *pdsch_maxNumRepetitionCEmodeB_r13 [MAX_NUM_CCs];
|
||||
long *pusch_maxNumRepetitionCEmodeA_r13 [MAX_NUM_CCs];
|
||||
long *pusch_maxNumRepetitionCEmodeB_r13 [MAX_NUM_CCs];
|
||||
long *pusch_repetitionLevelCEmodeA_r13 [MAX_NUM_CCs];
|
||||
long *pusch_HoppingOffset_v1310 [MAX_NUM_CCs];
|
||||
|
||||
//SIB18
|
||||
@@ -428,9 +429,9 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
long DL_absoluteFrequencyPointA[MAX_NUM_CCs];
|
||||
|
||||
//NR DL SCS-SpecificCarrier
|
||||
uint32_t DL_offsetToCarrier[MAX_NUM_CCs];
|
||||
long DL_offsetToCarrier[MAX_NUM_CCs];
|
||||
long DL_SCS_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
uint32_t DL_carrierBandwidth[MAX_NUM_CCs];
|
||||
long DL_carrierBandwidth[MAX_NUM_CCs];
|
||||
|
||||
//NR BWP-DownlinkCommon
|
||||
uint32_t DL_locationAndBandwidth[MAX_NUM_CCs];
|
||||
|
||||
@@ -55,11 +55,8 @@
|
||||
#include "RRC_config_tools.h"
|
||||
#include "enb_paramdef.h"
|
||||
#include "proto_agent.h"
|
||||
#include "executables/thread-common.h"
|
||||
|
||||
extern void set_parallel_conf(char *parallel_conf);
|
||||
extern void set_worker_conf(char *worker_conf);
|
||||
//extern PARALLEL_CONF_t get_thread_parallel_conf(void);
|
||||
//extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw);
|
||||
extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t bw);
|
||||
extern char *parallel_config;
|
||||
|
||||
@@ -859,6 +859,21 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
|
||||
config_fname);
|
||||
}
|
||||
|
||||
RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = CALLOC(1, sizeof(long));
|
||||
if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l1")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = 0;
|
||||
} else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l2")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = 1;
|
||||
} else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l3")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = 2;
|
||||
} else if (!strcmp(eMTCconfig->pusch_repetitionLevelCEmodeA_r13, "l4")) {
|
||||
*RRC_CONFIGURATION_REQ(msg_p).pusch_repetitionLevelCEmodeA_r13[cc_idx] = 3;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, pusch_repetitionLevelCEmodeA_r13 unknown value!\n",
|
||||
config_fname);
|
||||
}
|
||||
|
||||
char rachCELevelInfoListPath[MAX_OPTNAME_SIZE * 2];
|
||||
config_getlist(&rachcelevellist, NULL, 0, brparamspath);
|
||||
RRC_CONFIGURATION_REQ (msg_p).rach_CE_LevelInfoList_r13_size[cc_idx] = rachcelevellist.numelt;
|
||||
|
||||
+332
-334
@@ -245,7 +245,7 @@ typedef enum {
|
||||
#define ENB_ENABLE_X2 17
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define ENBPARAMS_CHECK { \
|
||||
#define ENBPARAMS_CHECK { \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
@@ -394,6 +394,7 @@ typedef enum {
|
||||
|
||||
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pusch_maxNumRepetitionCEmodeA_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pusch_maxNumRepetitionCEmodeB_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_REPETITION_LEVEL_CE_MODE_A_R13 "pusch_repetitionLevelCEmodeA_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_HOPPING_OFFSET_V1310 "pusch_HoppingOffset_v1310"
|
||||
|
||||
|
||||
@@ -536,289 +537,288 @@ typedef struct ccparams_lte_s {
|
||||
int32_t srb1_max_retx_threshold;
|
||||
} ccparams_lte_t;
|
||||
|
||||
#define CCPARAMS_CHECK { \
|
||||
{ .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 }} , \
|
||||
{ .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 }} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} , \
|
||||
{ .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 }} , \
|
||||
{ .s5= {NULL }} \
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* component carriers configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt checked_param */
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CCPARAMS_CHECK { \
|
||||
{ .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 } } , \
|
||||
{ .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 } } , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} ,\
|
||||
{ .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 } } , \
|
||||
{ .s5 = { NULL } } \
|
||||
}
|
||||
|
||||
#define CCPARAMS_DESC(ccparams) { \
|
||||
{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&ccparams.frame_type, defstrval:"FDD", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&ccparams.tdd_config, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:&ccparams.tdd_config_s, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:&ccparams.prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, strptr:&ccparams.pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:&ccparams.eutra_band, defintval:7, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:(int64_t *)&ccparams.downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:&ccparams.uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:&ccparams.Nid_cell, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:&ccparams.N_RB_DL, defintval:25, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, iptr:&ccparams.Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, iptr:&ccparams.nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&ccparams.prach_root, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&ccparams.prach_config_index, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&ccparams.prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&ccparams.prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&ccparams.prach_freq_offset, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&ccparams.pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&ccparams.pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&ccparams.pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&ccparams.pucch_n1_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&ccparams.pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&ccparams.pdsch_p_b, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&ccparams.pusch_n_SB, defintval:1, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&ccparams.pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&ccparams.pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&ccparams.pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&ccparams.pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&ccparams.pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&ccparams.phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&ccparams.phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&ccparams.srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&ccparams.srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&ccparams.srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&ccparams.srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&ccparams.srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&ccparams.pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&ccparams.msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&ccparams.rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&ccparams.rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&ccparams.rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&ccparams.rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&ccparams.rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&ccparams.rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&ccparams.rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&ccparams.rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* component carriers configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CCPARAMS_DESC(ccparams) { \
|
||||
{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&ccparams.frame_type, defstrval:"FDD", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&ccparams.tdd_config, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:&ccparams.tdd_config_s, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:&ccparams.prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, strptr:&ccparams.pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:&ccparams.eutra_band, defintval:7, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:(int64_t *)&ccparams.downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:&ccparams.uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:&ccparams.Nid_cell, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:&ccparams.N_RB_DL, defintval:25, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, iptr:&ccparams.Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, iptr:&ccparams.nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&ccparams.prach_root, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&ccparams.prach_config_index, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&ccparams.prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&ccparams.prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&ccparams.prach_freq_offset, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&ccparams.pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&ccparams.pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&ccparams.pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&ccparams.pucch_n1_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&ccparams.pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&ccparams.pdsch_p_b, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&ccparams.pusch_n_SB, defintval:1, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&ccparams.pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&ccparams.pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&ccparams.pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&ccparams.pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&ccparams.pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&ccparams.phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&ccparams.phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&ccparams.srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&ccparams.srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&ccparams.srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&ccparams.srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&ccparams.srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&ccparams.pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&ccparams.msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&ccparams.rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&ccparams.rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&ccparams.rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&ccparams.rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&ccparams.rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&ccparams.rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&ccparams.rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&ccparams.rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define ENB_CONFIG_FRAME_TYPE_IDX 0
|
||||
#define ENB_CONFIG_TDD_CONFIG_IDX 1
|
||||
#define ENB_CONFIG_TDD_CONFIG_S_IDX 2
|
||||
#define ENB_CONFIG_PREFIX_TYPE_IDX 3
|
||||
#define ENB_CONFIG_PBCH_REPETITION_IDX 4
|
||||
#define ENB_CONFIG_EUTRA_BAND_IDX 5
|
||||
#define ENB_CONFIG_DOWNLINK_FREQUENCY_IDX 6
|
||||
#define ENB_CONFIG_UPLINK_FREQUENCY_OFFSET_IDX 7
|
||||
#define ENB_CONFIG_NID_CELL_IDX 8
|
||||
#define ENB_CONFIG_N_RB_DL_IDX 9
|
||||
#define ENB_CONFIG_CELL_MBSFN_IDX 10
|
||||
#define ENB_CONFIG_NB_ANT_PORTS_IDX 11
|
||||
#define ENB_CONFIG_PRACH_ROOT_IDX 12
|
||||
#define ENB_CONFIG_PRACH_CONFIG_INDEX_IDX 13
|
||||
#define ENB_CONFIG_PRACH_HIGH_SPEED_IDX 14
|
||||
#define ENB_CONFIG_PRACH_ZERO_CORRELATION_IDX 15
|
||||
#define ENB_CONFIG_PRACH_FREQ_OFFSET_IDX 16
|
||||
#define ENB_CONFIG_PUCCH_DELTA_SHIFT_IDX 17
|
||||
#define ENB_CONFIG_PUCCH_NRB_CQI_IDX 18
|
||||
#define ENB_CONFIG_PUCCH_NCS_AN_IDX 19
|
||||
#define ENB_CONFIG_PUCCH_N1_AN_IDX 20
|
||||
#define ENB_CONFIG_PDSCH_RS_EPRE_IDX 21
|
||||
#define ENB_CONFIG_PDSCH_PB_IDX 22
|
||||
#define ENB_CONFIG_PUSCH_N_SB_IDX 23
|
||||
#define ENB_CONFIG_PUSCH_HOPPINGMODE_IDX 24
|
||||
#define ENB_CONFIG_PUSCH_HOPPINGOFFSET_IDX 25
|
||||
#define ENB_CONFIG_PUSCH_ENABLE64QAM_IDX 26
|
||||
#define ENB_CONFIG_PUSCH_GROUP_HOPPING_EN_IDX 27
|
||||
#define ENB_CONFIG_PUSCH_GROUP_ASSIGNMENT_IDX 28
|
||||
#define ENB_CONFIG_PUSCH_SEQUENCE_HOPPING_EN_IDX 29
|
||||
#define ENB_CONFIG_PUSCH_NDMRS1_IDX 30
|
||||
#define ENB_CONFIG_PHICH_DURATION_IDX 31
|
||||
#define ENB_CONFIG_PHICH_RESOURCE_IDX 32
|
||||
#define ENB_CONFIG_SRS_ENABLE_IDX 33
|
||||
#define ENB_CONFIG_SRS_BANDWIDTH_CONFIG_IDX 34
|
||||
#define ENB_CONFIG_SRS_SUBFRAME_CONFIG_IDX 35
|
||||
#define ENB_CONFIG_SRS_ACKNACKST_CONFIG_IDX 36
|
||||
#define ENB_CONFIG_SRS_MAXUPPTS_IDX 37
|
||||
#define ENB_CONFIG_PUSCH_PO_NOMINAL_IDX 38
|
||||
#define ENB_CONFIG_PUSCH_ALPHA_IDX 39
|
||||
#define ENB_CONFIG_PUCCH_PO_NOMINAL_IDX 40
|
||||
#define ENB_CONFIG_MSG3_DELTA_PREAMBLE_IDX 41
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1_IDX 42
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1b_IDX 43
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2_IDX 44
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2A_IDX 45
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2B_IDX 46
|
||||
#define ENB_CONFIG_RACH_NUM_RA_PREAMBLES_IDX 47
|
||||
#define ENB_CONFIG_RACH_PREAMBLESGROUPACONFIG_IDX 48
|
||||
#define ENB_CONFIG_RACH_SIZEOFRA_PREAMBLESGROUPA_IDX 49
|
||||
#define ENB_CONFIG_RACH_MESSAGESIZEGROUPA_IDX 50
|
||||
#define ENB_CONFIG_RACH_MESSAGEPOWEROFFSETGROUPB_IDX 51
|
||||
#define ENB_CONFIG_RACH_POWERRAMPINGSTEP_IDX 52
|
||||
#define ENB_CONFIG_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_IDX 53
|
||||
#define ENB_CONFIG_RACH_PREAMBLETRANSMAX_IDX 54
|
||||
#define ENB_CONFIG_RACH_RARESPONSEWINDOWSIZE_IDX 55
|
||||
#define ENB_CONFIG_RACH_MACCONTENTIONRESOLUTIONTIMER_IDX 56
|
||||
#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX 57
|
||||
#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX 58
|
||||
#define ENB_CONFIG_PCCH_NB_IDX 59
|
||||
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT_IDX 60
|
||||
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER_IDX 61
|
||||
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER_IDX 62
|
||||
#define ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER_IDX 63
|
||||
#define ENB_CONFIG_FRAME_TYPE_IDX 0
|
||||
#define ENB_CONFIG_TDD_CONFIG_IDX 1
|
||||
#define ENB_CONFIG_TDD_CONFIG_S_IDX 2
|
||||
#define ENB_CONFIG_PREFIX_TYPE_IDX 3
|
||||
#define ENB_CONFIG_PBCH_REPETITION_IDX 4
|
||||
#define ENB_CONFIG_EUTRA_BAND_IDX 5
|
||||
#define ENB_CONFIG_DOWNLINK_FREQUENCY_IDX 6
|
||||
#define ENB_CONFIG_UPLINK_FREQUENCY_OFFSET_IDX 7
|
||||
#define ENB_CONFIG_NID_CELL_IDX 8
|
||||
#define ENB_CONFIG_N_RB_DL_IDX 9
|
||||
#define ENB_CONFIG_CELL_MBSFN_IDX 10
|
||||
#define ENB_CONFIG_NB_ANT_PORTS_IDX 11
|
||||
#define ENB_CONFIG_PRACH_ROOT_IDX 12
|
||||
#define ENB_CONFIG_PRACH_CONFIG_INDEX_IDX 13
|
||||
#define ENB_CONFIG_PRACH_HIGH_SPEED_IDX 14
|
||||
#define ENB_CONFIG_PRACH_ZERO_CORRELATION_IDX 15
|
||||
#define ENB_CONFIG_PRACH_FREQ_OFFSET_IDX 16
|
||||
#define ENB_CONFIG_PUCCH_DELTA_SHIFT_IDX 17
|
||||
#define ENB_CONFIG_PUCCH_NRB_CQI_IDX 18
|
||||
#define ENB_CONFIG_PUCCH_NCS_AN_IDX 19
|
||||
#define ENB_CONFIG_PUCCH_N1_AN_IDX 20
|
||||
#define ENB_CONFIG_PDSCH_RS_EPRE_IDX 21
|
||||
#define ENB_CONFIG_PDSCH_PB_IDX 22
|
||||
#define ENB_CONFIG_PUSCH_N_SB_IDX 23
|
||||
#define ENB_CONFIG_PUSCH_HOPPINGMODE_IDX 24
|
||||
#define ENB_CONFIG_PUSCH_HOPPINGOFFSET_IDX 25
|
||||
#define ENB_CONFIG_PUSCH_ENABLE64QAM_IDX 26
|
||||
#define ENB_CONFIG_PUSCH_GROUP_HOPPING_EN_IDX 27
|
||||
#define ENB_CONFIG_PUSCH_GROUP_ASSIGNMENT_IDX 28
|
||||
#define ENB_CONFIG_PUSCH_SEQUENCE_HOPPING_EN_IDX 29
|
||||
#define ENB_CONFIG_PUSCH_NDMRS1_IDX 30
|
||||
#define ENB_CONFIG_PHICH_DURATION_IDX 31
|
||||
#define ENB_CONFIG_PHICH_RESOURCE_IDX 32
|
||||
#define ENB_CONFIG_SRS_ENABLE_IDX 33
|
||||
#define ENB_CONFIG_SRS_BANDWIDTH_CONFIG_IDX 34
|
||||
#define ENB_CONFIG_SRS_SUBFRAME_CONFIG_IDX 35
|
||||
#define ENB_CONFIG_SRS_ACKNACKST_CONFIG_IDX 36
|
||||
#define ENB_CONFIG_SRS_MAXUPPTS_IDX 37
|
||||
#define ENB_CONFIG_PUSCH_PO_NOMINAL_IDX 38
|
||||
#define ENB_CONFIG_PUSCH_ALPHA_IDX 39
|
||||
#define ENB_CONFIG_PUCCH_PO_NOMINAL_IDX 40
|
||||
#define ENB_CONFIG_MSG3_DELTA_PREAMBLE_IDX 41
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1_IDX 42
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1b_IDX 43
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2_IDX 44
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2A_IDX 45
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2B_IDX 46
|
||||
#define ENB_CONFIG_RACH_NUM_RA_PREAMBLES_IDX 47
|
||||
#define ENB_CONFIG_RACH_PREAMBLESGROUPACONFIG_IDX 48
|
||||
#define ENB_CONFIG_RACH_SIZEOFRA_PREAMBLESGROUPA_IDX 49
|
||||
#define ENB_CONFIG_RACH_MESSAGESIZEGROUPA_IDX 50
|
||||
#define ENB_CONFIG_RACH_MESSAGEPOWEROFFSETGROUPB_IDX 51
|
||||
#define ENB_CONFIG_RACH_POWERRAMPINGSTEP_IDX 52
|
||||
#define ENB_CONFIG_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_IDX 53
|
||||
#define ENB_CONFIG_RACH_PREAMBLETRANSMAX_IDX 54
|
||||
#define ENB_CONFIG_RACH_RARESPONSEWINDOWSIZE_IDX 55
|
||||
#define ENB_CONFIG_RACH_MACCONTENTIONRESOLUTIONTIMER_IDX 56
|
||||
#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX 57
|
||||
#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX 58
|
||||
#define ENB_CONFIG_PCCH_NB_IDX 59
|
||||
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT_IDX 60
|
||||
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER_IDX 61
|
||||
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER_IDX 62
|
||||
#define ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER_IDX 63
|
||||
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT_IDX 64
|
||||
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_IDX 65
|
||||
#define ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE_IDX 66
|
||||
#define ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER_IDX 67
|
||||
#define ENB_CONFIG_BCCH_MODIFICATIONPERIODCOEFF_IDX 68
|
||||
#define ENB_CONFIG_UETIMERS_T300_IDX 69
|
||||
#define ENB_CONFIG_UETIMERS_T301_IDX 70
|
||||
#define ENB_CONFIG_UETIMERS_T310_IDX 71
|
||||
#define ENB_CONFIG_UETIMERS_T311_IDX 72
|
||||
#define ENB_CONFIG_UETIMERS_N310_IDX 73
|
||||
#define ENB_CONFIG_UETIMERS_N311_IDX 74
|
||||
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
|
||||
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 76
|
||||
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_IDX 65
|
||||
#define ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE_IDX 66
|
||||
#define ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER_IDX 67
|
||||
#define ENB_CONFIG_BCCH_MODIFICATIONPERIODCOEFF_IDX 68
|
||||
#define ENB_CONFIG_UETIMERS_T300_IDX 69
|
||||
#define ENB_CONFIG_UETIMERS_T301_IDX 70
|
||||
#define ENB_CONFIG_UETIMERS_T310_IDX 71
|
||||
#define ENB_CONFIG_UETIMERS_T311_IDX 72
|
||||
#define ENB_CONFIG_UETIMERS_N310_IDX 73
|
||||
#define ENB_CONFIG_UETIMERS_N311_IDX 74
|
||||
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
|
||||
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 76
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* SRB1 configuration parameters section name */
|
||||
@@ -867,15 +867,15 @@ typedef struct srb1_params_s {
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* MME configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define S1PARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL,TYPE_UINTARRAY, 6} \
|
||||
}
|
||||
{ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL, TYPE_UINTARRAY, 6} \
|
||||
}
|
||||
|
||||
#define ENB_MME_IPV4_ADDRESS_IDX 0
|
||||
#define ENB_MME_IPV6_ADDRESS_IDX 1
|
||||
@@ -896,14 +896,14 @@ typedef struct srb1_params_s {
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* X2 configuration parameters */
|
||||
/* X2 configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define X2PARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define ENB_X2_IPV4_ADDRESS_IDX 0
|
||||
#define ENB_X2_IPV6_ADDRESS_IDX 1
|
||||
@@ -939,8 +939,9 @@ typedef struct srb1_params_s {
|
||||
#define ENB_INTERFACE_NAME_FOR_S1U_IDX 2
|
||||
#define ENB_IPV4_ADDR_FOR_S1U_IDX 3
|
||||
#define ENB_PORT_FOR_S1U_IDX 4
|
||||
#define ENB_IPV4_ADDR_FOR_X2C_IDX 5
|
||||
#define ENB_PORT_FOR_X2C_IDX 6
|
||||
#define ENB_IPV4_ADDR_FOR_X2C_IDX 5
|
||||
#define ENB_PORT_FOR_X2C_IDX 6
|
||||
|
||||
|
||||
/* S1 interface configuration parameters names */
|
||||
#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME"
|
||||
@@ -967,8 +968,6 @@ typedef struct srb1_params_s {
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* GTPU configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -1018,54 +1017,53 @@ typedef struct srb1_params_s {
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* CU/DU configuration section names*/
|
||||
#define CONFIG_STRING_DU_LIST "DU"
|
||||
#define CONFIG_STRING_CU_LIST "CU"
|
||||
#define DU_TYPE_LTE 0
|
||||
#define DU_TYPE_WIFI 1
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG "CU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U "CU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U "CU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_PORT_FOR_F1U "CU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_TYPE "DU_TYPE"
|
||||
#define ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE "F1_U_CU_TRANSPORT_TYPE"
|
||||
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG "DU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U "DU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U "DU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_PORT_FOR_F1U "DU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE "F1_U_DU_TRANSPORT_TYPE"
|
||||
#define CONFIG_STRING_DU_LIST "DU"
|
||||
#define CONFIG_STRING_CU_LIST "CU"
|
||||
#define DU_TYPE_LTE 0
|
||||
#define DU_TYPE_WIFI 1
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG "CU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U "CU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U "CU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_PORT_FOR_F1U "CU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_TYPE "DU_TYPE"
|
||||
#define ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE "F1_U_CU_TRANSPORT_TYPE"
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG "DU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U "DU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U "DU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_PORT_FOR_F1U "DU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE "F1_U_DU_TRANSPORT_TYPE"
|
||||
|
||||
#define CONFIG_STRING_CU_BALANCING "CU_BALANCING"
|
||||
|
||||
#define CUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define DUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CU_BAL_DESC { \
|
||||
{CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \
|
||||
}
|
||||
{CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CU_INTERFACE_F1U 0
|
||||
#define CU_ADDRESS_F1U 1
|
||||
#define CU_PORT_F1U 2
|
||||
#define CU_TYPE_F1U 3
|
||||
#define CU_INTERFACE_F1U 0
|
||||
#define CU_ADDRESS_F1U 1
|
||||
#define CU_PORT_F1U 2
|
||||
#define CU_TYPE_F1U 3
|
||||
|
||||
#define DU_INTERFACE_F1U 0
|
||||
#define DU_ADDRESS_F1U 1
|
||||
#define DU_PORT_F1U 2
|
||||
#define DU_TYPE_F1U 3
|
||||
#define DU_TECH 4
|
||||
#define DU_INTERFACE_F1U 0
|
||||
#define DU_ADDRESS_F1U 1
|
||||
#define DU_PORT_F1U 2
|
||||
#define DU_TYPE_F1U 3
|
||||
#define DU_TECH 4
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pdsch_maxNumRepetitionCEmodeB_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pusch_maxNumRepetitionCEmodeA_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pusch_maxNumRepetitionCEmodeB_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_REPETITION_LEVEL_CE_MODE_A_R13 "pusch_repetitionLevelCEmodeA_r13"
|
||||
#define ENB_CONFIG_STRING_PUSCH_HOPPING_OFFSET_V1310 "pusch_HoppingOffset_v1310"
|
||||
#define ENB_CONFIG_STRING_SYSTEM_INFO_VALUE_TAG_LIST "system_info_value_tag_SI"
|
||||
#define ENB_CONFIG_STRING_FIRST_PREAMBLE_R13 "firstPreamble_r13"
|
||||
@@ -161,6 +162,7 @@ typedef struct ccparams_eMTC_s {
|
||||
char *pdsch_maxNumRepetitionCEmodeB_r13;
|
||||
char *pusch_maxNumRepetitionCEmodeA_r13;
|
||||
char *pusch_maxNumRepetitionCEmodeB_r13;
|
||||
char *pusch_repetitionLevelCEmodeA_r13;
|
||||
} ccparams_eMTC_t;
|
||||
|
||||
|
||||
@@ -230,6 +232,7 @@ typedef struct ccparams_eMTC_s {
|
||||
{ENB_CONFIG_STRING_PRACH_HOPPING_OFFSET_R13, NULL, 0, iptr:&eMTCconfig->prach_HoppingOffset_r13, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_A_R13, NULL, 0, strptr:&eMTCconfig->pdsch_maxNumRepetitionCEmodeA_r13, defstrval:"r16", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_A_R13, NULL, 0, strptr:&eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, defstrval:"r8", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_REPETITION_LEVEL_CE_MODE_A_R13, NULL, 0, strptr:&eMTCconfig->pusch_repetitionLevelCEmodeA_r13, defstrval:"l1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_SELECTION_INFO_CE_R13, NULL, 0, strptr:&eMTCconfig->cellSelectionInfoCE_r13, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_Q_RX_LEV_MIN_CE_R13, NULL, 0, iptr:&eMTCconfig->q_RxLevMinCE_r13, defintval:-70, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_BANDWIDTH_REDUCED_ACCESS_RELATED_INFO_R13, NULL, 0, strptr:&eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
//#include "RRC_config_tools.h"
|
||||
#include "gnb_paramdef.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
#include "executables/thread-common.h"
|
||||
#include "NR_SCS-SpecificCarrier.h"
|
||||
#include "NR_TDD-UL-DL-ConfigCommon.h"
|
||||
#include "NR_FrequencyInfoUL.h"
|
||||
@@ -77,10 +77,7 @@
|
||||
#include "NR_EUTRA-MBSFN-SubframeConfig.h"
|
||||
|
||||
extern uint16_t sf_ahead;
|
||||
extern void set_parallel_conf(char *parallel_conf);
|
||||
extern void set_worker_conf(char *worker_conf);
|
||||
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
|
||||
extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
|
||||
extern int config_check_band_frequencies(int ind, int16_t band, uint32_t downlink_frequency,
|
||||
int32_t uplink_frequency_offset, uint32_t frame_type);
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
extern const uint8_t pusch_repetition_Table8_2_36213[3][4];
|
||||
|
||||
extern int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
|
||||
|
||||
@@ -98,6 +99,7 @@ void
|
||||
add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
sub_frame_t subframeP) {
|
||||
eNB_MAC_INST *mac = RC.mac[module_idP];
|
||||
eNB_RRC_INST *rrc = RC.rrc[module_idP];
|
||||
COMMON_channels_t *cc = &mac->common_channels[CC_id];
|
||||
uint8_t j;
|
||||
nfapi_ul_config_request_t *ul_req;
|
||||
@@ -108,6 +110,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
||||
uint8_t sf_ahead_dl;
|
||||
uint8_t rvseq[4] = {0, 2, 3, 1};
|
||||
uint8_t pusch_maxNumRepetitionCEmodeA_r13;
|
||||
ul_req = &mac->UL_req_tmp[CC_id][ra->Msg3_subframe];
|
||||
ul_req_body = &ul_req->ul_config_request_body;
|
||||
AssertFatal(ra->state != IDLE, "RA is not active for RA %X\n",
|
||||
@@ -139,7 +142,13 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.size = get_TBS_UL (ra->msg3_mcs, ra->msg3_nb_rb);
|
||||
// Re13 fields
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = ra->rach_resource_type > 2 ? 2 : 1;
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions = 1;
|
||||
if (ra->rach_resource_type > 0) {
|
||||
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels];
|
||||
}
|
||||
else{
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
|
||||
}
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1;
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe;
|
||||
ul_req_body->number_of_pdus++;
|
||||
@@ -235,6 +244,7 @@ void generate_Msg2(module_id_t module_idP,
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
eNB_MAC_INST *mac = RC.mac[module_idP];
|
||||
eNB_RRC_INST *rrc = RC.rrc[module_idP];
|
||||
COMMON_channels_t *cc = mac->common_channels;
|
||||
uint8_t *vrb_map = NULL;
|
||||
int first_rb = 0;
|
||||
@@ -246,6 +256,7 @@ void generate_Msg2(module_id_t module_idP,
|
||||
dl_req_body = &mac->DL_req[CC_idP].dl_config_request_body;
|
||||
dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu];
|
||||
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
|
||||
uint8_t PUSCH_Rep_Level;
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
@@ -257,6 +268,13 @@ void generate_Msg2(module_id_t module_idP,
|
||||
uint16_t absSF = (10 * frameP) + subframeP;
|
||||
uint16_t absSF_Msg2 = (10 * ra->Msg2_frame) + ra->Msg2_subframe;
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]);
|
||||
}
|
||||
else {
|
||||
PUSCH_Rep_Level= 0;
|
||||
}
|
||||
|
||||
if (absSF > absSF_Msg2) {
|
||||
return; // we're not ready yet
|
||||
}
|
||||
@@ -396,6 +414,8 @@ void generate_Msg2(module_id_t module_idP,
|
||||
ra->msg2_mpdcch_repetition_cnt++;
|
||||
}
|
||||
|
||||
ra->pusch_repetition_levels = PUSCH_Rep_Level;
|
||||
|
||||
if((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
|
||||
/* Program PDSCH */
|
||||
LOG_D(MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n",
|
||||
@@ -1218,6 +1238,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
UE_id = find_UE_id(module_idP, ra->rnti);
|
||||
DevAssert(UE_id != -1);
|
||||
mac->UE_list.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].configured = TRUE;
|
||||
mac->UE_list.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].pusch_repetition_levels=ra->pusch_repetition_levels;
|
||||
cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +200,8 @@ schedule_SIB1_MBMS(module_id_t module_idP,
|
||||
// Note: definition of k above and rvidx from 36.321 section 5.3.1
|
||||
rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
|
||||
i = cc->SIB1_BR_cnt & (m - 1);
|
||||
n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
|
||||
if(Sj)
|
||||
n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
|
||||
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 1, &cc->BCCH_BR_pdu[0].payload[0], 0); // not used in this case
|
||||
AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
|
||||
"schedulingInfoSIB1_BR_r13 %d > 18\n",
|
||||
@@ -429,7 +430,8 @@ schedule_SIB1_BR(module_id_t module_idP,
|
||||
// Note: definition of k above and rvidx from 36.321 section 5.3.1
|
||||
rvidx = (((3 * k) >> 1) + (k & 1)) & 3;
|
||||
i = cc->SIB1_BR_cnt & (m - 1);
|
||||
n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
|
||||
if(Sj)
|
||||
n_NB = Sj[((cc->physCellId % N_S_NB) + (i * N_S_NB / m)) % N_S_NB];
|
||||
bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, BCCH_SIB1_BR, 0xFFFF, 1, &cc->BCCH_BR_pdu[0].payload[0], 0); // not used in this case
|
||||
AssertFatal(cc->mib->message.schedulingInfoSIB1_BR_r13 < 19,
|
||||
"schedulingInfoSIB1_BR_r13 %d > 18\n",
|
||||
@@ -595,7 +597,7 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
||||
long si_Narrowband_r13 = schedulingInfoList_BR_r13->list.array[i]->si_Narrowband_r13;
|
||||
long si_TBS_r13 = si_TBS_r13tab[schedulingInfoList_BR_r13->list.array[i]->si_TBS_r13];
|
||||
// check if the SI is to be scheduled now
|
||||
int period_in_sf;
|
||||
int period_in_sf = 0;
|
||||
|
||||
if ((si_Periodicity >= 0) && (si_Periodicity < 25)) {
|
||||
// 2^i * 80 subframes, note: si_Periodicity is 2^i * 80ms
|
||||
|
||||
@@ -84,6 +84,14 @@ uint8_t rb_table[34] = {
|
||||
81, 90, 96, 100 // 30-33
|
||||
};
|
||||
|
||||
// This table hold the possible number of MTC repetition for CE ModeA
|
||||
const uint8_t pusch_repetition_Table8_2_36213[3][4]=
|
||||
{
|
||||
{1 , 2 , 4 , 8 },
|
||||
{1 , 4 , 8 , 16},
|
||||
{1 , 4 , 16, 32}
|
||||
};
|
||||
|
||||
extern mui_t rrc_eNB_mui;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -293,16 +301,22 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (ra->msg3_round >= mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||
} else {
|
||||
// first_rb = UE_template_ptr->first_rb_ul[harq_pid]; // UE_id = -1 !!!!
|
||||
ra->msg3_round++;
|
||||
/* Prepare handling of retransmission */
|
||||
get_Msg3allocret(&mac->common_channels[CC_idP],
|
||||
ra->Msg3_subframe,
|
||||
ra->Msg3_frame,
|
||||
&ra->Msg3_frame,
|
||||
&ra->Msg3_subframe);
|
||||
// prepare handling of retransmission
|
||||
add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP);
|
||||
if (ra->rach_resource_type > 0) {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // TODO: Currently we don't support retransmission of Msg3 ( If in error Cancel RA procedure and reattach)
|
||||
}
|
||||
else
|
||||
{
|
||||
// first_rb = UE_template_ptr->first_rb_ul[harq_pid]; // UE_id = -1 !!!!
|
||||
ra->msg3_round++;
|
||||
/* Prepare handling of retransmission */
|
||||
get_Msg3allocret(&mac->common_channels[CC_idP],
|
||||
ra->Msg3_subframe,
|
||||
ra->Msg3_frame,
|
||||
&ra->Msg3_frame,
|
||||
&ra->Msg3_subframe);
|
||||
// prepare handling of retransmission
|
||||
add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP);
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: program NACK for PHICH? */
|
||||
@@ -1925,10 +1939,13 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
int tpc = 0;
|
||||
int cqi_req = 0;
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
eNB_RRC_INST *rrc = RC.rrc[module_idP];
|
||||
COMMON_channels_t *cc = eNB->common_channels;
|
||||
UE_list_t *UE_list = &(eNB->UE_list);
|
||||
UE_TEMPLATE *UE_template = NULL;
|
||||
UE_sched_ctrl_t *UE_sched_ctrl = NULL;
|
||||
uint8_t Total_Num_Rep_ULSCH,pusch_maxNumRepetitionCEmodeA_r13;
|
||||
uint8_t UL_Scheduling_DCI_SF,UL_Scheduling_DCI_Frame_Even_Odd_Flag; //TODO: To be removed after scheduler relaxation Task
|
||||
|
||||
if (sched_subframeP < subframeP) {
|
||||
sched_frame++;
|
||||
@@ -1937,11 +1954,9 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req = &(eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body);
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = NULL;
|
||||
nfapi_ul_config_request_body_t *ul_req_tmp = &(eNB->UL_req_tmp[CC_id][sched_subframeP].ul_config_request_body);
|
||||
|
||||
/* If frameP odd don't schedule */
|
||||
if ((frameP & 1) == 1) {
|
||||
return;
|
||||
}
|
||||
nfapi_ul_config_request_body_t *ul_req_body_Rep;
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu;
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu_Rep;
|
||||
|
||||
/* Loop over all active UEs */
|
||||
for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
|
||||
@@ -1999,8 +2014,18 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->estimated_ul_buffer;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO, UE_template->estimated_ul_buffer);
|
||||
|
||||
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
||||
Total_Num_Rep_ULSCH = pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][UE_template->pusch_repetition_levels];
|
||||
UL_Scheduling_DCI_SF = (40-4 - Total_Num_Rep_ULSCH)%10; //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
UL_Scheduling_DCI_Frame_Even_Odd_Flag= ! (((40-4 - Total_Num_Rep_ULSCH)/10 )%2); //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
|
||||
/* If frameP odd don't schedule */
|
||||
if ((frameP&1) == UL_Scheduling_DCI_Frame_Even_Odd_Flag) //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
{
|
||||
|
||||
|
||||
//if ((UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0) && (subframeP == 5)) {
|
||||
if ((UE_template->ul_SR > 0 || round_UL > 0 || status < RRC_CONNECTED) && (subframeP == 5)) {
|
||||
if ((UE_template->ul_SR > 0 || round_UL > 0 || status < RRC_CONNECTED) && (subframeP == UL_Scheduling_DCI_SF)) {
|
||||
/*
|
||||
* if there is information on bsr of DCCH, DTCH,
|
||||
* or if there is UL_SR,
|
||||
@@ -2151,7 +2176,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB = 3
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = UE_template->pusch_repetition_levels;
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
||||
@@ -2201,7 +2226,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
);
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
UE_template->rach_resource_type > 2 ? 2 : 1,
|
||||
1, // total_number_of_repetitions
|
||||
Total_Num_Rep_ULSCH, // total_number_of_repetitions
|
||||
1, // repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
ul_req_tmp->number_of_pdus++;
|
||||
@@ -2330,5 +2355,24 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
}
|
||||
} // UE_is_to_be_scheduled
|
||||
} // ULCCs
|
||||
} // loop over UE_id
|
||||
} // loop over UE_id
|
||||
} // Schedule new ULSCH
|
||||
|
||||
// This section is to repeat ULSCH PDU for a number of MTC repetitions
|
||||
for(int i=0;i<ul_req_tmp->number_of_pdus;i++)
|
||||
{
|
||||
ul_config_pdu = &ul_req_tmp->ul_config_pdu_list[i];
|
||||
if (ul_config_pdu->pdu_type!=NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) // Repeat ULSCH PDUs only
|
||||
continue ;
|
||||
|
||||
if(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number < ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions)
|
||||
{
|
||||
ul_req_body_Rep = &eNB->UL_req_tmp[CC_id][(sched_subframeP+1)%10].ul_config_request_body;
|
||||
ul_config_pdu_Rep = &ul_req_body_Rep->ul_config_pdu_list[ul_req_body_Rep->number_of_pdus];
|
||||
memcpy ((void *) ul_config_pdu_Rep, ul_config_pdu, sizeof (nfapi_ul_config_request_pdu_t));
|
||||
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel8.handle = eNB->ul_handle++;
|
||||
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel13.repetition_number = ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number +1;
|
||||
ul_req_body_Rep->number_of_pdus++;
|
||||
} //repetition_number < total_number_of_repetitions
|
||||
} // For loop on PDUs
|
||||
}
|
||||
|
||||
@@ -904,9 +904,11 @@ typedef struct {
|
||||
uint16_t mpdcch_repetition_cnt;
|
||||
frame_t Msg2_frame;
|
||||
sub_frame_t Msg2_subframe;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// Repetition column in pusch_repetition Table 8.2.b in TS36.213
|
||||
uint8_t pusch_repetition_levels;
|
||||
#endif
|
||||
LTE_PhysicalConfigDedicated_t *physicalConfigDedicated;
|
||||
|
||||
} UE_TEMPLATE;
|
||||
|
||||
/*! \brief scheduling control information set through an API (not used)*/
|
||||
@@ -1113,7 +1115,10 @@ typedef struct {
|
||||
uint8_t msg2_narrowband;
|
||||
uint8_t msg34_narrowband;
|
||||
int msg4_rrc_sdu_length;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// Repetition column in pusch_repetition Table 8.2.b in TS36.213
|
||||
uint8_t pusch_repetition_levels;
|
||||
#endif
|
||||
int32_t crnti_rrc_mui;
|
||||
int8_t crnti_harq_pid;
|
||||
} RA_t;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
* \version 1.0
|
||||
* \email navid.nikaein@eurecom.fr
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -102,7 +101,6 @@ MAC_RLC_XFACE *Mac_rlc_xface;
|
||||
int pCC_id[NUMBER_OF_eNB_MAX];
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
@@ -126,7 +124,6 @@ DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
DCI1C_5MHz_t MCCH_alloc_pdu;
|
||||
|
||||
|
||||
DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
|
||||
|
||||
DCI1A_5MHz_FDD_t DLSCH_alloc_pdu1A_fdd;
|
||||
|
||||
@@ -125,7 +125,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
COMMON_channels_t *cc = &eNB->common_channels[CC_id];
|
||||
uint8_t *rar = (uint8_t *)(dlsch_buffer + 1);
|
||||
uint32_t rballoc = 0;
|
||||
uint32_t reps = 0;
|
||||
uint32_t ULdelay = 0;
|
||||
uint32_t cqireq = 0;
|
||||
uint32_t mpdcch_nb_index = 0;
|
||||
@@ -151,7 +150,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
input_buffer_length = 6;
|
||||
N_NB_index = get_numnarrowbandbits(cc->mib->message.dl_Bandwidth);
|
||||
/* UL Grant */
|
||||
reps = 0;
|
||||
ra->msg3_mcs = 7;
|
||||
TPC = 3; // no power increase
|
||||
ULdelay = 0;
|
||||
@@ -161,7 +159,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
uint32_t buffer = 0;
|
||||
buffer |= ra->msg34_narrowband << (16 + (4 - N_NB_index));
|
||||
buffer |= ((rballoc & 0x0F) << (12 + (4 - N_NB_index)));
|
||||
buffer |= ((reps & 0x03) << (10 + (4 - N_NB_index)));
|
||||
buffer |= ((ra->pusch_repetition_levels & 0x03) << (10 + (4 - N_NB_index)));
|
||||
buffer |= ((ra->msg3_mcs & 0x07) << (7 + (4 - N_NB_index)));
|
||||
buffer |= ((TPC & 0x07) << (4 + (4 - N_NB_index)));
|
||||
buffer |= ((cqireq & 0x01) << (3 + (4 - N_NB_index)));
|
||||
|
||||
@@ -134,5 +134,7 @@ void nr_ue_process_mac_pdu(
|
||||
|
||||
int8_t nr_ue_process_dlsch(module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_nr_dci_indication_t *dci_ind, void *pduP, uint32_t pdu_len);
|
||||
|
||||
void nr_ue_send_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);
|
||||
|
||||
#endif
|
||||
/** @}*/
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
//#include "defs.h"
|
||||
#include "mac_proto.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
|
||||
static NR_UE_MAC_INST_t *nr_ue_mac_inst;
|
||||
|
||||
@@ -45,6 +46,14 @@ nr_l2_init_ue(void)
|
||||
//init mac here
|
||||
nr_ue_mac_inst = (NR_UE_MAC_INST_t *)malloc(sizeof(NR_UE_MAC_INST_t)*NB_NR_UE_MAC_INST);
|
||||
|
||||
if (IS_SOFTMODEM_NOS1){
|
||||
if (rlc_module_init() != 0) {
|
||||
LOG_I(RLC, "Problem at RLC initiation \n");
|
||||
}
|
||||
pdcp_layer_init();
|
||||
nr_ip_over_LTE_DRB_preconfiguration();
|
||||
}
|
||||
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -36,10 +36,27 @@
|
||||
#include "assertions.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "openair2/LAYER2/MAC/mac.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
//#define ENABLE_MAC_PAYLOAD_DEBUG 1
|
||||
|
||||
extern void mac_rlc_data_ind (
|
||||
const module_id_t module_idP,
|
||||
const rnti_t rntiP,
|
||||
const eNB_index_t eNB_index,
|
||||
const frame_t frameP,
|
||||
const eNB_flag_t enb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const logical_chan_id_t channel_idP,
|
||||
char *buffer_pP,
|
||||
const tb_size_t tb_sizeP,
|
||||
num_tb_t num_tbP,
|
||||
crc_t *crcs_pP);
|
||||
|
||||
|
||||
uint32_t get_ssb_slot(uint32_t ssb_index){
|
||||
// this function now only support f <= 3GHz
|
||||
return ssb_index & 0x3 ;
|
||||
@@ -81,7 +98,9 @@ int8_t nr_ue_process_dlsch(module_id_t module_id,
|
||||
// First we need to verify if DCI ind contains a ul-sch to be perfomred. If it does, we will handle a PUSCH in the UL_CONFIG_REQ.
|
||||
ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUCCH;
|
||||
for (int i=0; i<10; i++) {
|
||||
if (dci_ind->dci_list[i].dci_format < 2) ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
|
||||
if(dci_ind!=NULL){
|
||||
if (dci_ind->dci_list[i].dci_format < 2) ul_config->ul_config_list[ul_config->number_pdus].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
|
||||
}
|
||||
}
|
||||
if (ul_config->ul_config_list[ul_config->number_pdus].pdu_type == FAPI_NR_UL_CONFIG_TYPE_PUSCH) {
|
||||
// fill in the elements in config request inside P5 message
|
||||
@@ -2182,3 +2201,213 @@ void nr_ue_process_mac_pdu(
|
||||
AssertFatal(pdu_len >= 0, "[MAC] nr_ue_process_mac_pdu, residual mac pdu length < 0!\n");
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
|
||||
unsigned char *parse_header(unsigned char *mac_header,
|
||||
unsigned char *num_ce,
|
||||
unsigned char *num_sdu,
|
||||
unsigned char *rx_ces,
|
||||
unsigned char *rx_lcids,
|
||||
unsigned short *rx_lengths,
|
||||
unsigned short tb_length)
|
||||
{
|
||||
|
||||
unsigned char not_done = 1, num_ces = 0, num_cont_res =
|
||||
0, num_padding = 0, num_sdus = 0, lcid, num_sdu_cnt;
|
||||
unsigned char *mac_header_ptr = mac_header;
|
||||
unsigned short length, ce_len = 0;
|
||||
|
||||
while (not_done == 1) {
|
||||
|
||||
if (((SCH_SUBHEADER_FIXED *) mac_header_ptr)->E == 0) {
|
||||
// printf("E=0\n");
|
||||
not_done = 0;
|
||||
}
|
||||
|
||||
lcid = ((SCH_SUBHEADER_FIXED *) mac_header_ptr)->LCID;
|
||||
|
||||
if (lcid < UE_CONT_RES) {
|
||||
//printf("[MAC][UE] header %x.%x.%x\n",mac_header_ptr[0],mac_header_ptr[1],mac_header_ptr[2]);
|
||||
if (not_done == 0) { // last MAC SDU, length is implicit
|
||||
mac_header_ptr++;
|
||||
length =
|
||||
tb_length - (mac_header_ptr - mac_header) - ce_len;
|
||||
|
||||
for (num_sdu_cnt = 0; num_sdu_cnt < num_sdus;
|
||||
num_sdu_cnt++) {
|
||||
length -= rx_lengths[num_sdu_cnt];
|
||||
}
|
||||
} else {
|
||||
if (((SCH_SUBHEADER_LONG *) mac_header_ptr)->F == 1) {
|
||||
length =
|
||||
((((SCH_SUBHEADER_LONG *) mac_header_ptr)->
|
||||
L_MSB & 0x7f)
|
||||
<< 8) | (((SCH_SUBHEADER_LONG *) mac_header_ptr)->
|
||||
L_LSB & 0xff);
|
||||
mac_header_ptr += 3;
|
||||
#ifdef DEBUG_HEADER_PARSING
|
||||
LOG_D(MAC, "[UE] parse long sdu, size %x \n", length);
|
||||
#endif
|
||||
|
||||
} else { //if (((SCH_SUBHEADER_SHORT *)mac_header_ptr)->F == 0) {
|
||||
length = ((SCH_SUBHEADER_SHORT *) mac_header_ptr)->L;
|
||||
mac_header_ptr += 2;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_HEADER_PARSING
|
||||
LOG_D(MAC, "[UE] sdu %d lcid %d length %d (offset now %ld)\n",
|
||||
num_sdus, lcid, length, mac_header_ptr - mac_header);
|
||||
#endif
|
||||
rx_lcids[num_sdus] = lcid;
|
||||
rx_lengths[num_sdus] = length;
|
||||
num_sdus++;
|
||||
} else { // This is a control element subheader
|
||||
if (lcid == SHORT_PADDING) {
|
||||
num_padding++;
|
||||
mac_header_ptr++;
|
||||
} else {
|
||||
rx_ces[num_ces] = lcid;
|
||||
num_ces++;
|
||||
mac_header_ptr++;
|
||||
|
||||
if (lcid == TIMING_ADV_CMD) {
|
||||
ce_len++;
|
||||
} else if (lcid == UE_CONT_RES) {
|
||||
|
||||
// FNA: check MAC Header is one of thoses defined in Annex B of 36.321
|
||||
// Check there is only 1 Contention Resolution
|
||||
if (num_cont_res) {
|
||||
LOG_W(MAC,
|
||||
"[UE] Msg4 Wrong received format: More than 1 Contention Resolution\n");
|
||||
// exit parsing
|
||||
return NULL;
|
||||
|
||||
}
|
||||
// UE_CONT_RES shall never be the last subheader unless this is the only MAC subheader
|
||||
if ((not_done == 0)
|
||||
&& ((num_sdus) || (num_ces > 1) || (num_padding))) {
|
||||
LOG_W(MAC,
|
||||
"[UE] Msg4 Wrong received format: Contention Resolution after num_ces=%d num_sdus=%d num_padding=%d\n",
|
||||
num_ces, num_sdus, num_padding);
|
||||
// exit parsing
|
||||
return NULL;
|
||||
}
|
||||
num_cont_res++;
|
||||
ce_len += 6;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_HEADER_PARSING
|
||||
LOG_D(MAC, "[UE] ce %d lcid %d (offset now %ld)\n", num_ces,
|
||||
lcid, mac_header_ptr - mac_header);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
*num_ce = num_ces;
|
||||
*num_sdu = num_sdus;
|
||||
|
||||
return (mac_header_ptr);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
nr_ue_send_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)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
unsigned char rx_ces[MAX_NUM_CE], num_ce, num_sdu, i, *payload_ptr;
|
||||
unsigned char rx_lcids[NB_RB_MAX];
|
||||
unsigned short rx_lengths[NB_RB_MAX];
|
||||
|
||||
|
||||
//LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
|
||||
|
||||
|
||||
payload_ptr =
|
||||
parse_header(sdu, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths,
|
||||
sdu_len);
|
||||
|
||||
#ifdef DEBUG_HEADER_PARSING
|
||||
LOG_D(MAC,
|
||||
"[UE %d] ue_send_sdu : Frame %d eNB_index %d : num_ce %d num_sdu %d\n",
|
||||
module_idP, frameP, eNB_index, num_ce, num_sdu);
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
|
||||
LOG_T(MAC, "[UE %d] First 32 bytes of DLSCH : \n", module_idP);
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
LOG_T(MAC, "%x.", sdu[i]);
|
||||
}
|
||||
|
||||
LOG_T(MAC, "\n");
|
||||
#endif
|
||||
|
||||
if (payload_ptr != NULL) {
|
||||
|
||||
for (i = 0; i < num_ce; i++) {
|
||||
// printf("ce %d : %d\n",i,rx_ces[i]);
|
||||
switch (rx_ces[i]) {
|
||||
case UE_CONT_RES:
|
||||
|
||||
break;
|
||||
|
||||
case TIMING_ADV_CMD:
|
||||
|
||||
break;
|
||||
|
||||
case DRX_CMD:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < num_sdu; i++) {
|
||||
#ifdef DEBUG_HEADER_PARSING
|
||||
LOG_I(MAC, "[UE] SDU %d : LCID %d, length %d\n", i,
|
||||
rx_lcids[i], rx_lengths[i]);
|
||||
#endif
|
||||
if ((rx_lcids[i] < NB_RB_MAX) && (rx_lcids[i] > DCCH1)) {
|
||||
|
||||
LOG_D(MAC,
|
||||
"[UE %d] Frame %d : DLSCH -> DL-DTCH%d (eNB %d, %d bytes)\n",
|
||||
module_idP, frameP, rx_lcids[i], eNB_index,
|
||||
rx_lengths[i]);
|
||||
|
||||
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
|
||||
LOG_I(MAC, "Printing MAC PDU contents at slot: %d \n", subframeP);
|
||||
int j;
|
||||
for (j = 0; j < 20; j++) //rx_lengths[i]
|
||||
LOG_I(MAC, "%x.", (unsigned char) payload_ptr[j]);
|
||||
LOG_I(MAC, "\n");
|
||||
#endif
|
||||
mac_rlc_data_ind(module_idP,
|
||||
4660, //UE_mac_inst[module_idP].crnti //hardcode value corresponding to the one from the eNB
|
||||
eNB_index,
|
||||
frameP,
|
||||
ENB_FLAG_NO,
|
||||
MBMS_FLAG_NO,
|
||||
rx_lcids[i],
|
||||
(char *) payload_ptr, rx_lengths[i], 1,
|
||||
NULL);
|
||||
} else {
|
||||
LOG_E(MAC, "[UE %d] Frame %d : unknown LCID %d (eNB %d)\n",
|
||||
module_idP, frameP, rx_lcids[i], eNB_index);
|
||||
}
|
||||
payload_ptr += rx_lengths[i];
|
||||
}
|
||||
} // end if (payload_ptr != NULL)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -70,9 +70,9 @@ extern uint8_t nfapi_mode;
|
||||
|
||||
uint16_t nr_pdcch_order_table[6] = { 31, 31, 511, 2047, 2047, 8191 };
|
||||
|
||||
void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
||||
void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
||||
int CC_idP,
|
||||
frame_t frameP,
|
||||
frame_t frameP,
|
||||
sub_frame_t slotP){
|
||||
|
||||
nfapi_nr_dl_config_request_t *DL_req = &gNB->DL_req[0];
|
||||
@@ -103,10 +103,10 @@ void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
||||
}
|
||||
}
|
||||
/*
|
||||
void check_nr_ul_failure(module_id_t module_idP,
|
||||
int CC_id,
|
||||
void check_nr_ul_failure(module_id_t module_idP,
|
||||
int CC_id,
|
||||
int UE_id,
|
||||
frame_t frameP,
|
||||
frame_t frameP,
|
||||
sub_frame_t slotP) {
|
||||
|
||||
UE_list_t *UE_list = &RC.nrmac[module_idP]->UE_list;
|
||||
@@ -192,13 +192,13 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram
|
||||
uint8_t TSFC;
|
||||
uint16_t deltaTSFC; // bitmap
|
||||
uint8_t srs_SubframeConfig;
|
||||
|
||||
|
||||
// table for TSFC (Period) and deltaSFC (offset)
|
||||
const uint16_t deltaTSFCTabType1[15][2] = { {1, 1}, {1, 2}, {2, 2}, {1, 5}, {2, 5}, {4, 5}, {8, 5}, {3, 5}, {12, 5}, {1, 10}, {2, 10}, {4, 10}, {8, 10}, {351, 10}, {383, 10} }; // Table 5.5.3.3-2 3GPP 36.211 FDD
|
||||
const uint16_t deltaTSFCTabType2[14][2] = { {2, 5}, {6, 5}, {10, 5}, {18, 5}, {14, 5}, {22, 5}, {26, 5}, {30, 5}, {70, 10}, {74, 10}, {194, 10}, {326, 10}, {586, 10}, {210, 10} }; // Table 5.5.3.3-2 3GPP 36.211 TDD
|
||||
|
||||
|
||||
uint16_t srsPeriodicity, srsOffset;
|
||||
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
soundingRS_UL_ConfigCommon = &cc[CC_id].radioResourceConfigCommon->soundingRS_UL_ConfigCommon;
|
||||
// check if SRS is enabled in this frame/subframe
|
||||
@@ -213,7 +213,7 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram
|
||||
}
|
||||
// Sounding reference signal subframes are the subframes satisfying ns/2 mod TSFC (- deltaTSFC
|
||||
uint16_t tmp = (subframeP % TSFC);
|
||||
|
||||
|
||||
if ((1 << tmp) & deltaTSFC) {
|
||||
// This is an SRS subframe, loop over UEs
|
||||
for (UE_id = 0; UE_id < MAX_MOBILES_PER_GNB; UE_id++) {
|
||||
@@ -221,11 +221,11 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram
|
||||
ul_req = &RC.nrmac[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;
|
||||
|
||||
|
||||
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated != NULL,
|
||||
"physicalConfigDedicated is null for UE %d\n",
|
||||
UE_id);
|
||||
|
||||
|
||||
if ((soundingRS_UL_ConfigDedicated = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->soundingRS_UL_ConfigDedicated) != NULL) {
|
||||
if (soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
get_srs_pos(&cc[CC_id],
|
||||
@@ -257,7 +257,7 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram
|
||||
} // if ((soundingRS_UL_ConfigDedicated = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->soundingRS_UL_ConfigDedicated)!=NULL)
|
||||
} // for (UE_id ...
|
||||
} // if((1<<tmp) & deltaTSFC)
|
||||
|
||||
|
||||
} // SRS config
|
||||
}
|
||||
}
|
||||
@@ -338,8 +338,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
coreset,
|
||||
frame_txP,
|
||||
slot_txP,
|
||||
*cfg))
|
||||
*cfg)){
|
||||
nr_schedule_uss_dlsch_phytest(module_idP, frame_txP, slot_txP);
|
||||
}
|
||||
|
||||
rnti = UE_RNTI(module_idP, i);
|
||||
CC_id = UE_PCCID(module_idP, i);
|
||||
@@ -373,11 +374,13 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
// Phytest scheduling
|
||||
|
||||
if (slot_rxP==2)
|
||||
if (slot_rxP==2){
|
||||
nr_schedule_uss_ulsch_phytest(&RC.nrmac[module_idP]->UL_tti_req[0], frame_rxP, slot_rxP);
|
||||
|
||||
if (slot_txP==1)
|
||||
}
|
||||
|
||||
if (slot_txP==1){
|
||||
nr_schedule_uss_dlsch_phytest(module_idP, frame_txP, slot_txP);
|
||||
}
|
||||
|
||||
/*
|
||||
// Allocate CCEs for good after scheduling is done
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
#include "mac_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dci.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
extern RAN_CONTEXT_t RC;
|
||||
//#define ENABLE_MAC_PAYLOAD_DEBUG 1
|
||||
|
||||
/*Scheduling of DLSCH with associated DCI in common search space
|
||||
* current version has only a DCI for type 1 PDCCH for C_RNTI*/
|
||||
@@ -168,151 +170,349 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
|
||||
nr_mac->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
nr_mac->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*Scheduling of DLSCH with associated DCI in user specific search space
|
||||
* current version has only a DCI for type 1 PDCCH for C_RNTI*/
|
||||
int configure_fapi_dl_Tx(nfapi_nr_dl_config_request_body_t *dl_req,
|
||||
nfapi_tx_request_pdu_t *TX_req,
|
||||
nfapi_nr_config_request_t *cfg,
|
||||
nfapi_nr_coreset_t* coreset,
|
||||
nfapi_nr_search_space_t* search_space,
|
||||
int16_t pdu_index){
|
||||
|
||||
nfapi_nr_dl_config_request_pdu_t *dl_config_dci_pdu;
|
||||
nfapi_nr_dl_config_request_pdu_t *dl_config_dlsch_pdu;
|
||||
int TBS;
|
||||
uint16_t rnti = 0x1234;
|
||||
int dl_carrier_bandwidth = cfg->rf_config.dl_carrier_bandwidth.value;
|
||||
|
||||
|
||||
dl_config_dci_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void*)dl_config_dci_pdu,0,sizeof(nfapi_nr_dl_config_request_pdu_t));
|
||||
dl_config_dci_pdu->pdu_type = NFAPI_NR_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
dl_config_dci_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_nr_dl_config_dci_dl_pdu));
|
||||
|
||||
dl_config_dlsch_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu+1];
|
||||
memset((void*)dl_config_dlsch_pdu,0,sizeof(nfapi_nr_dl_config_request_pdu_t));
|
||||
dl_config_dlsch_pdu->pdu_type = NFAPI_NR_DL_CONFIG_DLSCH_PDU_TYPE;
|
||||
dl_config_dlsch_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_nr_dl_config_dlsch_pdu));
|
||||
|
||||
nfapi_nr_dl_config_dci_dl_pdu_rel15_t *pdu_rel15 = &dl_config_dci_pdu->dci_dl_pdu.dci_dl_pdu_rel15;
|
||||
nfapi_nr_dl_config_pdcch_parameters_rel15_t *params_rel15 = &dl_config_dci_pdu->dci_dl_pdu.pdcch_params_rel15;
|
||||
nfapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_pdu_rel15 = &dl_config_dlsch_pdu->dlsch_pdu.dlsch_pdu_rel15;
|
||||
|
||||
dlsch_pdu_rel15->start_prb = 0;
|
||||
dlsch_pdu_rel15->n_prb = 50;
|
||||
dlsch_pdu_rel15->start_symbol = 2;
|
||||
dlsch_pdu_rel15->nb_symbols = 9;
|
||||
dlsch_pdu_rel15->rnti = rnti;
|
||||
dlsch_pdu_rel15->nb_layers =1;
|
||||
dlsch_pdu_rel15->nb_codewords = 1;
|
||||
dlsch_pdu_rel15->mcs_idx = 9;
|
||||
dlsch_pdu_rel15->ndi = 1;
|
||||
dlsch_pdu_rel15->redundancy_version = 0;
|
||||
|
||||
nr_configure_dci_from_pdcch_config(params_rel15,
|
||||
coreset,
|
||||
search_space,
|
||||
*cfg,
|
||||
dl_carrier_bandwidth);
|
||||
|
||||
pdu_rel15->frequency_domain_assignment = get_RIV(dlsch_pdu_rel15->start_prb, dlsch_pdu_rel15->n_prb, cfg->rf_config.dl_carrier_bandwidth.value);
|
||||
pdu_rel15->time_domain_assignment = 3; // row index used here instead of SLIV;
|
||||
pdu_rel15->vrb_to_prb_mapping = 1;
|
||||
pdu_rel15->mcs = 9;
|
||||
pdu_rel15->tb_scaling = 1;
|
||||
|
||||
pdu_rel15->ra_preamble_index = 25;
|
||||
pdu_rel15->format_indicator = 1;
|
||||
pdu_rel15->ndi = 1;
|
||||
pdu_rel15->rv = 0;
|
||||
pdu_rel15->harq_pid = 0;
|
||||
pdu_rel15->dai = 2;
|
||||
pdu_rel15->tpc = 2;
|
||||
pdu_rel15->pucch_resource_indicator = 7;
|
||||
pdu_rel15->pdsch_to_harq_feedback_timing_indicator = 7;
|
||||
|
||||
LOG_D(MAC, "[gNB scheduler phytest] DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d ndi %d rv %d\n",
|
||||
pdu_rel15->frequency_domain_assignment,
|
||||
pdu_rel15->time_domain_assignment,
|
||||
pdu_rel15->vrb_to_prb_mapping,
|
||||
pdu_rel15->mcs,
|
||||
pdu_rel15->tb_scaling,
|
||||
pdu_rel15->ndi,
|
||||
pdu_rel15->rv);
|
||||
|
||||
params_rel15->rnti = rnti;
|
||||
params_rel15->rnti_type = NFAPI_NR_RNTI_C;
|
||||
params_rel15->dci_format = NFAPI_NR_DL_DCI_FORMAT_1_0;
|
||||
|
||||
//params_rel15->aggregation_level = 1;
|
||||
LOG_D(MAC, "DCI params: rnti %d, rnti_type %d, dci_format %d, config type %d\n \
|
||||
coreset params: mux_pattern %d, n_rb %d, n_symb %d, rb_offset %d \n \
|
||||
ss params : first symb %d, ss type %d\n",
|
||||
params_rel15->rnti,
|
||||
params_rel15->rnti_type,
|
||||
params_rel15->config_type,
|
||||
params_rel15->dci_format,
|
||||
params_rel15->mux_pattern,
|
||||
params_rel15->n_rb,
|
||||
params_rel15->n_symb,
|
||||
params_rel15->rb_offset,
|
||||
params_rel15->first_symbol,
|
||||
params_rel15->search_space_type);
|
||||
nr_get_tbs(&dl_config_dlsch_pdu->dlsch_pdu, dl_config_dci_pdu->dci_dl_pdu, *cfg);
|
||||
// Hardcode it for now
|
||||
TBS = dl_config_dlsch_pdu->dlsch_pdu.dlsch_pdu_rel15.transport_block_size;
|
||||
LOG_D(MAC, "DLSCH PDU: start PRB %d n_PRB %d start symbol %d nb_symbols %d nb_layers %d nb_codewords %d mcs %d TBS: %d\n",
|
||||
dlsch_pdu_rel15->start_prb,
|
||||
dlsch_pdu_rel15->n_prb,
|
||||
dlsch_pdu_rel15->start_symbol,
|
||||
dlsch_pdu_rel15->nb_symbols,
|
||||
dlsch_pdu_rel15->nb_layers,
|
||||
dlsch_pdu_rel15->nb_codewords,
|
||||
dlsch_pdu_rel15->mcs_idx,
|
||||
TBS);
|
||||
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdsch_rnti++;
|
||||
dl_req->number_pdu+=2;
|
||||
|
||||
TX_req->pdu_length = dlsch_pdu_rel15->transport_block_size/8;
|
||||
TX_req->pdu_index = pdu_index++;
|
||||
TX_req->num_segments = 1;
|
||||
|
||||
return TBS/8; //Return TBS in bytes
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t slotP)
|
||||
{
|
||||
LOG_D(MAC, "In nr_schedule_uss_dlsch_phytest \n");
|
||||
uint8_t CC_id;
|
||||
|
||||
gNB_MAC_INST *nr_mac = RC.nrmac[module_idP];
|
||||
//NR_COMMON_channels_t *cc = nr_mac->common_channels;
|
||||
nfapi_nr_dl_config_request_body_t *dl_req;
|
||||
nfapi_nr_dl_config_request_pdu_t *dl_config_dci_pdu;
|
||||
nfapi_nr_dl_config_request_pdu_t *dl_config_dlsch_pdu;
|
||||
gNB_MAC_INST *nr_mac = RC.nrmac[module_idP];
|
||||
//NR_COMMON_channels_t *cc = nr_mac->common_channels;
|
||||
nfapi_nr_dl_config_request_body_t *dl_req;
|
||||
nfapi_tx_request_pdu_t *TX_req;
|
||||
|
||||
nfapi_nr_config_request_t *cfg = &nr_mac->config[0];
|
||||
uint16_t rnti = 0x1234;
|
||||
|
||||
nfapi_nr_config_request_t *cfg = &nr_mac->config[0];
|
||||
|
||||
uint16_t sfn_sf = frameP << 7 | slotP;
|
||||
int dl_carrier_bandwidth = cfg->rf_config.dl_carrier_bandwidth.value;
|
||||
|
||||
// everything here is hard-coded to 30 kHz
|
||||
//int scs = get_dlscs(cfg);
|
||||
//int slots_per_frame = get_spf(cfg);
|
||||
|
||||
int TBS;
|
||||
int TBS_bytes;
|
||||
int lcid;
|
||||
int ta_len = 0;
|
||||
int header_length_total=0;
|
||||
int header_length_last;
|
||||
int sdu_length_total = 0;
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
uint16_t sdu_lengths[NB_RB_MAX];
|
||||
int num_sdus = 0;
|
||||
unsigned char dlsch_buffer[MAX_DLSCH_PAYLOAD_BYTES];
|
||||
int offset;
|
||||
int UE_id = 0;
|
||||
unsigned char sdu_lcids[NB_RB_MAX];
|
||||
int padding = 0, post_padding = 0;
|
||||
UE_list_t *UE_list = &nr_mac->UE_list;
|
||||
|
||||
DLSCH_PDU DLSCH_pdu;
|
||||
//DLSCH_PDU *DLSCH_pdu = (DLSCH_PDU*) malloc(sizeof(DLSCH_PDU));
|
||||
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
LOG_D(MAC, "Scheduling UE specific search space DCI type 1 for CC_id %d\n",CC_id);
|
||||
|
||||
nfapi_nr_coreset_t* coreset = &nr_mac->coreset[CC_id][1];
|
||||
nfapi_nr_search_space_t* search_space = &nr_mac->search_space[CC_id][1];
|
||||
LOG_D(MAC, "Scheduling UE specific search space DCI type 1 for CC_id %d\n",CC_id);
|
||||
|
||||
dl_req = &nr_mac->DL_req[CC_id].dl_config_request_body;
|
||||
dl_config_dci_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void*)dl_config_dci_pdu,0,sizeof(nfapi_nr_dl_config_request_pdu_t));
|
||||
dl_config_dci_pdu->pdu_type = NFAPI_NR_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
dl_config_dci_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_nr_dl_config_dci_dl_pdu));
|
||||
dl_req = &nr_mac->DL_req[CC_id].dl_config_request_body;
|
||||
TX_req = &nr_mac->TX_req[CC_id].tx_request_body.tx_pdu_list[nr_mac->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||
|
||||
dl_config_dlsch_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu+1];
|
||||
memset((void*)dl_config_dlsch_pdu,0,sizeof(nfapi_nr_dl_config_request_pdu_t));
|
||||
dl_config_dlsch_pdu->pdu_type = NFAPI_NR_DL_CONFIG_DLSCH_PDU_TYPE;
|
||||
dl_config_dlsch_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_nr_dl_config_dlsch_pdu));
|
||||
//The --NOS1 use case currently schedules DLSCH transmissions only when there is IP traffic arriving
|
||||
//through the LTE stack
|
||||
if (IS_SOFTMODEM_NOS1){
|
||||
|
||||
nfapi_nr_dl_config_dci_dl_pdu_rel15_t *dci_dl_pdu_rel15 = &dl_config_dci_pdu->dci_dl_pdu.dci_dl_pdu_rel15;
|
||||
nfapi_nr_dl_config_pdcch_parameters_rel15_t *pdcch_params_rel15 = &dl_config_dci_pdu->dci_dl_pdu.pdcch_params_rel15;
|
||||
nfapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_pdu_rel15 = &dl_config_dlsch_pdu->dlsch_pdu.dlsch_pdu_rel15;
|
||||
memset(&DLSCH_pdu, 0, sizeof(DLSCH_pdu));
|
||||
int ta_update = 31;
|
||||
ta_len = 0;
|
||||
|
||||
|
||||
dlsch_pdu_rel15->start_prb = 0;
|
||||
dlsch_pdu_rel15->n_prb = 50;
|
||||
dlsch_pdu_rel15->start_symbol = 2;
|
||||
dlsch_pdu_rel15->nb_symbols = 9;
|
||||
dlsch_pdu_rel15->rnti = rnti;
|
||||
dlsch_pdu_rel15->nb_layers =1;
|
||||
dlsch_pdu_rel15->nb_codewords = 1;
|
||||
dlsch_pdu_rel15->mcs_idx = 9;
|
||||
dlsch_pdu_rel15->ndi = 1;
|
||||
dlsch_pdu_rel15->redundancy_version = 0;
|
||||
// Hardcode it for now
|
||||
TBS = 6784/8; //TBS in bytes
|
||||
//nr_get_tbs(&dl_config_dlsch_pdu->dlsch_pdu, dl_config_dci_pdu->dci_dl_pdu, *cfg);
|
||||
//TBS = dl_config_dlsch_pdu->dlsch_pdu.dlsch_pdu_rel15.transport_block_size;
|
||||
|
||||
nr_configure_dci_from_pdcch_config(pdcch_params_rel15,
|
||||
coreset,
|
||||
search_space,
|
||||
*cfg,
|
||||
dl_carrier_bandwidth);
|
||||
for (lcid = NB_RB_MAX - 1; lcid >= DTCH; lcid--) {
|
||||
// TODO: check if the lcid is active
|
||||
|
||||
dci_dl_pdu_rel15->frequency_domain_assignment = get_RIV(dlsch_pdu_rel15->start_prb, dlsch_pdu_rel15->n_prb, cfg->rf_config.dl_carrier_bandwidth.value);
|
||||
dci_dl_pdu_rel15->time_domain_assignment = 3; // row index used here instead of SLIV;
|
||||
dci_dl_pdu_rel15->vrb_to_prb_mapping = 1;
|
||||
dci_dl_pdu_rel15->mcs = 9;
|
||||
dci_dl_pdu_rel15->tb_scaling = 1;
|
||||
LOG_D(MAC, "[eNB %d], Frame %d, DTCH%d->DLSCH, Checking RLC status (tbs %d, len %d)\n",
|
||||
module_idP, frameP, lcid, TBS,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3);
|
||||
|
||||
dci_dl_pdu_rel15->ra_preamble_index = 25;
|
||||
dci_dl_pdu_rel15->format_indicator = 1;
|
||||
dci_dl_pdu_rel15->ndi = 1;
|
||||
dci_dl_pdu_rel15->rv = 0;
|
||||
dci_dl_pdu_rel15->harq_pid = 0;
|
||||
dci_dl_pdu_rel15->dai = 2;
|
||||
dci_dl_pdu_rel15->tpc = 2;
|
||||
dci_dl_pdu_rel15->pucch_resource_indicator = 7;
|
||||
dci_dl_pdu_rel15->pdsch_to_harq_feedback_timing_indicator = 7;
|
||||
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP,
|
||||
rnti,
|
||||
module_idP,
|
||||
frameP,
|
||||
slotP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3,
|
||||
0,
|
||||
0);
|
||||
|
||||
LOG_D(MAC, "[gNB scheduler phytest] DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d ndi %d rv %d\n",
|
||||
dci_dl_pdu_rel15->frequency_domain_assignment,
|
||||
dci_dl_pdu_rel15->time_domain_assignment,
|
||||
dci_dl_pdu_rel15->vrb_to_prb_mapping,
|
||||
dci_dl_pdu_rel15->mcs,
|
||||
dci_dl_pdu_rel15->tb_scaling,
|
||||
dci_dl_pdu_rel15->ndi,
|
||||
dci_dl_pdu_rel15->rv);
|
||||
if (rlc_status.bytes_in_buffer > 0) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting %d bytes from RLC (lcid %d total hdr len %d), TBS: %d \n \n",
|
||||
module_idP, frameP,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3,
|
||||
lcid,
|
||||
header_length_total,
|
||||
TBS);
|
||||
|
||||
pdcch_params_rel15->rnti = rnti;
|
||||
pdcch_params_rel15->rnti_type = NFAPI_NR_RNTI_C;
|
||||
pdcch_params_rel15->dci_format = NFAPI_NR_DL_DCI_FORMAT_1_0;
|
||||
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,
|
||||
rnti,
|
||||
module_idP,
|
||||
frameP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS,
|
||||
(char *)&dlsch_buffer[sdu_length_total],
|
||||
0,
|
||||
0);
|
||||
|
||||
//pdcch_params_rel15->aggregation_level = 1;
|
||||
LOG_D(MAC, "DCI params: rnti %d, rnti_type %d, dci_format %d, config type %d\n \
|
||||
coreset params: mux_pattern %d, n_rb %d, n_symb %d, rb_offset %d \n \
|
||||
ss params : first symb %d, ss type %d\n",
|
||||
pdcch_params_rel15->rnti,
|
||||
pdcch_params_rel15->rnti_type,
|
||||
pdcch_params_rel15->config_type,
|
||||
pdcch_params_rel15->dci_format,
|
||||
pdcch_params_rel15->mux_pattern,
|
||||
pdcch_params_rel15->n_rb,
|
||||
pdcch_params_rel15->n_symb,
|
||||
pdcch_params_rel15->rb_offset,
|
||||
pdcch_params_rel15->first_symbol,
|
||||
pdcch_params_rel15->search_space_type);
|
||||
nr_get_tbs(&dl_config_dlsch_pdu->dlsch_pdu, dl_config_dci_pdu->dci_dl_pdu, *cfg);
|
||||
LOG_D(MAC, "DLSCH PDU: start PRB %d n_PRB %d start symbol %d nb_symbols %d nb_layers %d nb_codewords %d mcs %d\n",
|
||||
dlsch_pdu_rel15->start_prb,
|
||||
dlsch_pdu_rel15->n_prb,
|
||||
dlsch_pdu_rel15->start_symbol,
|
||||
dlsch_pdu_rel15->nb_symbols,
|
||||
dlsch_pdu_rel15->nb_layers,
|
||||
dlsch_pdu_rel15->nb_codewords,
|
||||
dlsch_pdu_rel15->mcs_idx);
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n",
|
||||
module_idP, sdu_lengths[num_sdus], lcid);
|
||||
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdsch_rnti++;
|
||||
dl_req->number_pdu+=2;
|
||||
sdu_lcids[num_sdus] = lcid;
|
||||
sdu_length_total += sdu_lengths[num_sdus];
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid]++;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].lcid_sdu[num_sdus] = lcid;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[lcid] = sdu_lengths[num_sdus];
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[lcid] += sdu_lengths[num_sdus];
|
||||
|
||||
TX_req = &nr_mac->TX_req[CC_id].tx_request_body.tx_pdu_list[nr_mac->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||
TX_req->pdu_length = dlsch_pdu_rel15->transport_block_size;
|
||||
TX_req->pdu_index = nr_mac->pdu_index[CC_id]++;
|
||||
TX_req->num_segments = 1;
|
||||
header_length_last = 1 + 1 + (sdu_lengths[num_sdus] >= 128);
|
||||
header_length_total += header_length_last;
|
||||
|
||||
// HOT FIX for all zero pdu problem
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
for(int i = 0; i < dlsch_pdu_rel15->transport_block_size/8; i++) {
|
||||
((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i] = (unsigned char) rand();
|
||||
}
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
num_sdus++;
|
||||
|
||||
TX_req->segments[0].segment_data = nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0];
|
||||
TX_req->segments[0].segment_length = dlsch_pdu_rel15->transport_block_size+2;
|
||||
nr_mac->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
nr_mac->TX_req[CC_id].sfn_sf = sfn_sf;
|
||||
nr_mac->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
nr_mac->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
}
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
}
|
||||
} else {
|
||||
// no TBS left
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// last header does not have length field
|
||||
if (header_length_total) {
|
||||
header_length_total -= header_length_last;
|
||||
header_length_total++;
|
||||
}
|
||||
|
||||
|
||||
if (ta_len + sdu_length_total + header_length_total > 0) {
|
||||
|
||||
|
||||
if (TBS - header_length_total - sdu_length_total - ta_len <= 2) {
|
||||
padding = TBS - header_length_total - sdu_length_total - ta_len;
|
||||
post_padding = 0;
|
||||
} else {
|
||||
padding = 0;
|
||||
post_padding = 1;
|
||||
}
|
||||
|
||||
offset = generate_dlsch_header((unsigned char *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0], //DLSCH_pdu.payload[0],
|
||||
num_sdus, //num_sdus
|
||||
sdu_lengths, //
|
||||
sdu_lcids, 255, // no drx
|
||||
ta_update, // timing advance
|
||||
NULL, // contention res id
|
||||
padding, post_padding);
|
||||
LOG_D(MAC, "Offset bits: %d \n", offset);
|
||||
|
||||
// Probably there should be other actions done before that
|
||||
// cycle through SDUs and place in dlsch_buffer
|
||||
|
||||
//memcpy(&UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset], dlsch_buffer, sdu_length_total);
|
||||
memcpy(&nr_mac->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0][offset], dlsch_buffer, sdu_length_total);
|
||||
|
||||
|
||||
// fill remainder of DLSCH with 0
|
||||
for (int j = 0; j < (TBS - sdu_length_total - offset); j++) {
|
||||
//UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = 0;
|
||||
nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0][offset + sdu_length_total + j] = 0;
|
||||
}
|
||||
|
||||
TBS_bytes = configure_fapi_dl_Tx(dl_req, TX_req, cfg, &nr_mac->coreset[CC_id][1], &nr_mac->search_space[CC_id][1], nr_mac->pdu_index[CC_id]);
|
||||
|
||||
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
|
||||
LOG_I(MAC, "Printing first 10 payload bytes at the gNB side, Frame: %d, slot: %d, , TBS size: %d \n \n", frameP, slotP, TBS_bytes);
|
||||
for(int i = 0; i < 10; i++) { // TBS_bytes dlsch_pdu_rel15->transport_block_size/8 6784/8
|
||||
LOG_I(MAC, "%x. ", ((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
//TX_req->segments[0].segment_length = 8;
|
||||
TX_req->segments[0].segment_length = TBS_bytes +2;
|
||||
TX_req->segments[0].segment_data = nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0];
|
||||
|
||||
|
||||
nr_mac->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
nr_mac->TX_req[CC_id].sfn_sf = sfn_sf;
|
||||
nr_mac->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
nr_mac->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
} //if (ta_len + sdu_length_total + header_length_total > 0)
|
||||
} //if (IS_SOFTMODEM_NOS1)
|
||||
|
||||
//When the --NOS1 option is not enabled, DLSCH transmissions with random data
|
||||
//occur every time that the current function is called (dlsch phytest mode)
|
||||
else{
|
||||
TBS_bytes = configure_fapi_dl_Tx(dl_req, TX_req, cfg, &nr_mac->coreset[CC_id][1], &nr_mac->search_space[CC_id][1], nr_mac->pdu_index[CC_id]);
|
||||
// HOT FIX for all zero pdu problem
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
for(int i = 0; i < TBS_bytes; i++) { //
|
||||
((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i] = (unsigned char) rand();
|
||||
//LOG_I(MAC, "%x. ", ((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i]);
|
||||
}
|
||||
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
|
||||
if (frameP%100 == 0){
|
||||
LOG_I(MAC, "Printing first 10 payload bytes at the gNB side, Frame: %d, slot: %d, TBS size: %d \n", frameP, slotP, TBS_bytes);
|
||||
for(int i = 0; i < 10; i++) {
|
||||
LOG_I(MAC, "%x. ", ((uint8_t *)nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0])[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//TX_req->segments[0].segment_length = 8;
|
||||
TX_req->segments[0].segment_length = TBS_bytes +2;
|
||||
TX_req->segments[0].segment_data = nr_mac->UE_list.DLSCH_pdu[CC_id][0][0].payload[0];
|
||||
|
||||
nr_mac->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
nr_mac->TX_req[CC_id].sfn_sf = sfn_sf;
|
||||
nr_mac->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
nr_mac->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
}
|
||||
} //for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++)
|
||||
}
|
||||
|
||||
|
||||
void nr_schedule_uss_ulsch_phytest(nfapi_nr_ul_tti_request_t *UL_tti_req,
|
||||
frame_t frameP,
|
||||
sub_frame_t slotP)
|
||||
|
||||
@@ -74,6 +74,13 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
int configure_fapi_dl_Tx(nfapi_nr_dl_config_request_body_t *dl_req,
|
||||
nfapi_tx_request_pdu_t *TX_req,
|
||||
nfapi_nr_config_request_t *cfg,
|
||||
nfapi_nr_coreset_t* coreset,
|
||||
nfapi_nr_search_space_t* search_space,
|
||||
int16_t pdu_index);
|
||||
|
||||
void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t slotP);
|
||||
@@ -116,7 +123,7 @@ int to_absslot(nfapi_nr_config_request_t *cfg,int frame,int slot);
|
||||
|
||||
int get_symbolsperslot(nfapi_nr_config_request_t *cfg);
|
||||
|
||||
void get_band(uint32_t downlink_frequency, uint8_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type);
|
||||
void get_band(uint32_t downlink_frequency, uint16_t *current_band, int32_t *current_offset, lte_frame_type_t *current_type);
|
||||
|
||||
uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn);
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
//#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -82,27 +83,27 @@ void mac_top_init_gNB(void)
|
||||
LOG_I(MAC, "[MAIN] Init function start:nb_nr_macrlc_inst=%d\n",RC.nb_nr_macrlc_inst);
|
||||
|
||||
if (RC.nb_nr_macrlc_inst > 0) {
|
||||
|
||||
|
||||
RC.nrmac = (gNB_MAC_INST **) malloc16(RC.nb_nr_macrlc_inst *sizeof(gNB_MAC_INST *));
|
||||
|
||||
AssertFatal(RC.nrmac != NULL,"can't ALLOCATE %zu Bytes for %d gNB_MAC_INST with size %zu \n",
|
||||
RC.nb_nr_macrlc_inst * sizeof(gNB_MAC_INST *),
|
||||
RC.nb_nr_macrlc_inst, sizeof(gNB_MAC_INST));
|
||||
|
||||
|
||||
for (i = 0; i < RC.nb_nr_macrlc_inst; i++) {
|
||||
RC.nrmac[i] = (gNB_MAC_INST *) malloc16(sizeof(gNB_MAC_INST));
|
||||
|
||||
AssertFatal(RC.nrmac != NULL,"can't ALLOCATE %zu Bytes for %d gNB_MAC_INST with size %zu \n",
|
||||
RC.nb_nr_macrlc_inst * sizeof(gNB_MAC_INST *),
|
||||
RC.nb_nr_macrlc_inst, sizeof(gNB_MAC_INST));
|
||||
|
||||
|
||||
LOG_D(MAC,"[MAIN] ALLOCATE %zu Bytes for %d gNB_MAC_INST @ %p\n",sizeof(gNB_MAC_INST), RC.nb_nr_macrlc_inst, RC.mac);
|
||||
|
||||
bzero(RC.nrmac[i], sizeof(gNB_MAC_INST));
|
||||
|
||||
RC.nrmac[i]->Mod_id = i;
|
||||
|
||||
|
||||
|
||||
for (j = 0; j < MAX_NUM_CCs; j++) {
|
||||
RC.nrmac[i]->DL_req[j].dl_config_request_body.dl_config_pdu_list = RC.nrmac[i]->dl_config_pdu_list[j];
|
||||
|
||||
@@ -120,7 +121,7 @@ void mac_top_init_gNB(void)
|
||||
nr_init_coreset(&RC.nrmac[i]->coreset[j][1]);
|
||||
nr_init_search_space(&RC.nrmac[i]->search_space[j][1]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
|
||||
|
||||
@@ -129,6 +130,9 @@ void mac_top_init_gNB(void)
|
||||
// These should be out of here later
|
||||
pdcp_layer_init();
|
||||
|
||||
if(IS_SOFTMODEM_NOS1)
|
||||
nr_ip_over_LTE_DRB_preconfiguration();
|
||||
|
||||
rrc_init_nr_global_param();
|
||||
|
||||
}else {
|
||||
@@ -137,7 +141,7 @@ void mac_top_init_gNB(void)
|
||||
|
||||
// Initialize Linked-List for Active UEs
|
||||
for (i = 0; i < RC.nb_nr_macrlc_inst; i++) {
|
||||
|
||||
|
||||
nrmac = RC.nrmac[i];
|
||||
nrmac->if_inst = NR_IF_Module_init(i);
|
||||
|
||||
@@ -154,6 +158,11 @@ void mac_top_init_gNB(void)
|
||||
|
||||
UE_list->next[list_el] = -1;
|
||||
UE_list->next_ul[list_el] = -1;
|
||||
/*memset(UE_list->DLSCH_pdu, 0, sizeof(UE_list->DLSCH_pdu));
|
||||
memset(UE_list->UE_template, 0, sizeof(UE_list->UE_template));
|
||||
memset(UE_list->eNB_UE_stats, 0, sizeof(UE_list->eNB_UE_stats));
|
||||
memset(UE_list->UE_sched_ctrl, 0, sizeof(UE_list->UE_sched_ctrl));
|
||||
memset(UE_list->active, 0, sizeof(UE_list->active));*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ nr_bandentry_t nr_bandtable[] = {
|
||||
#define NR_BANDTABLE_SIZE (sizeof(nr_bandtable)/sizeof(nr_bandentry_t))
|
||||
|
||||
void get_band(uint32_t downlink_frequency,
|
||||
uint8_t *current_band,
|
||||
uint16_t *current_band,
|
||||
int32_t *current_offset,
|
||||
lte_frame_type_t *current_type)
|
||||
{
|
||||
|
||||
@@ -358,7 +358,16 @@ boolean_t pdcp_data_req(
|
||||
LOG_D(PDCP, "pdcp data req on drb %d, size %d, rnti %x, node_type %d \n",
|
||||
rb_idP, pdcp_pdu_size, ctxt_pP->rnti, RC.rrc[ctxt_pP->module_id]->node_type);
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_YES && NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||
// The check on nos1 is done only for the use case of LTE stack running over 5g-nr PHY. This should be changed
|
||||
// before future merge of develop with develop-nr and instead of a check of IS_SOFTMODEM_NOS1, we should use a check
|
||||
// with a new execution option capturing the nr-ip-over-LTE-stack use case.
|
||||
ngran_node_t node_type;
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
node_type = ngran_gNB;
|
||||
else
|
||||
node_type = RC.rrc[ctxt_pP->module_id]->node_type;
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_YES && NODE_IS_DU(node_type)) { //RC.rrc[ctxt_pP->module_id]->node_type
|
||||
LOG_E(PDCP, "Can't be DU, bad node type %d \n", RC.rrc[ctxt_pP->module_id]->node_type);
|
||||
ret=FALSE;
|
||||
} else {
|
||||
@@ -510,6 +519,7 @@ pdcp_data_ind(
|
||||
hashtable_rc_t h_rc;
|
||||
uint8_t rb_offset= (srb_flagP == 0) ? DTCH -1 :0;
|
||||
uint16_t pdcp_uid=0;
|
||||
|
||||
MessageDef *message_p = NULL;
|
||||
uint8_t *gtpu_buffer_p = NULL;
|
||||
uint32_t rx_hfn_for_count;
|
||||
@@ -518,6 +528,8 @@ pdcp_data_ind(
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN);
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)sdu_buffer_pP->data,sdu_buffer_sizeP,
|
||||
"[MSG] PDCP UL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
|
||||
if (ctxt_pP->enb_flag != ENB_FLAG_NO)
|
||||
@@ -1040,6 +1052,13 @@ pdcp_data_ind(
|
||||
memcpy(&new_sdu_p->data[sizeof (pdcp_data_ind_header_t)],
|
||||
&sdu_buffer_pP->data[payload_offset],
|
||||
sdu_buffer_sizeP - payload_offset);
|
||||
|
||||
#if defined(ENABLE_PDCP_PAYLOAD_DEBUG)
|
||||
LOG_I(PDCP, "Printing first bytes of PDCP SDU before adding it to the list: \n");
|
||||
for (int i=0; i<30; i++){
|
||||
LOG_I(PDCP, "%x", sdu_buffer_pP->data[i]);
|
||||
}
|
||||
#endif
|
||||
list_add_tail_eurecom (new_sdu_p, sdu_list_p);
|
||||
}
|
||||
|
||||
@@ -1062,6 +1081,7 @@ pdcp_data_ind(
|
||||
Pdcp_stats_rx_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
|
||||
Pdcp_stats_rx_bytes[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(sdu_buffer_sizeP - payload_offset);
|
||||
Pdcp_stats_rx_bytes_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(sdu_buffer_sizeP - payload_offset);
|
||||
|
||||
Pdcp_stats_rx_sn[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=sequence_number;
|
||||
Pdcp_stats_rx_aiat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+= (pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
|
||||
Pdcp_stats_rx_aiat_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
|
||||
@@ -1772,6 +1792,7 @@ pdcp_config_req_asn1 (
|
||||
uint8_t *const kUPenc_pP)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
switch (actionP) {
|
||||
case CONFIG_ACTION_ADD:
|
||||
DevAssert(pdcp_pP != NULL);
|
||||
@@ -2170,6 +2191,9 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
|
||||
if(UE_NAS_USE_TUN) {
|
||||
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )?MAX_NUMBER_NETIF:1;
|
||||
netlink_init_tun("ue",num_if);
|
||||
//Add --nr-ip-over-lte option check for next line
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
nas_config(1, 1, 2, "ue");
|
||||
LOG_I(PDCP, "UE pdcp will use tun interface\n");
|
||||
} else if(ENB_NAS_USE_TUN) {
|
||||
netlink_init_tun("enb",1);
|
||||
@@ -2217,6 +2241,103 @@ void pdcp_module_cleanup (void)
|
||||
{
|
||||
}
|
||||
|
||||
void nr_ip_over_LTE_DRB_preconfiguration(void){
|
||||
|
||||
// Addition for the use-case of 4G stack on top of 5G-NR.
|
||||
// We need to configure pdcp and rlc instances without having an actual
|
||||
// UE RRC Connection. In order to be able to test the NR PHY with some injected traffic
|
||||
// on top of the LTE stack.
|
||||
protocol_ctxt_t ctxt;
|
||||
LTE_DRB_ToAddModList_t* DRB_configList=NULL;
|
||||
DRB_configList = CALLOC(1, sizeof(LTE_DRB_ToAddModList_t));
|
||||
struct LTE_LogicalChannelConfig *DRB_lchan_config = NULL;
|
||||
struct LTE_RLC_Config *DRB_rlc_config = NULL;
|
||||
struct LTE_PDCP_Config *DRB_pdcp_config = NULL;
|
||||
struct LTE_PDCP_Config__rlc_UM *PDCP_rlc_UM = NULL;
|
||||
|
||||
struct LTE_DRB_ToAddMod *DRB_config = NULL;
|
||||
struct LTE_LogicalChannelConfig__ul_SpecificParameters *DRB_ul_SpecificParameters = NULL;
|
||||
long *logicalchannelgroup_drb;
|
||||
|
||||
|
||||
//Static preconfiguration of DRB
|
||||
DRB_config = CALLOC(1, sizeof(*DRB_config));
|
||||
|
||||
DRB_config->eps_BearerIdentity = CALLOC(1, sizeof(long));
|
||||
// allowed value 5..15, value : x+4
|
||||
*(DRB_config->eps_BearerIdentity) = 1; //ue_context_pP->ue_context.e_rab[i].param.e_rab_id;//+ 4; // especial case generation
|
||||
// DRB_config->drb_Identity = 1 + drb_identity_index + e_rab_done;// + i ;// (DRB_Identity_t) ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
|
||||
// 1 + drb_identiy_index;
|
||||
DRB_config->drb_Identity = 1;
|
||||
DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long));
|
||||
*(DRB_config->logicalChannelIdentity) = DRB_config->drb_Identity + 2; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
|
||||
|
||||
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
|
||||
DRB_config->rlc_Config = DRB_rlc_config;
|
||||
|
||||
DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
|
||||
DRB_config->pdcp_Config = DRB_pdcp_config;
|
||||
DRB_pdcp_config->discardTimer = CALLOC(1, sizeof(long));
|
||||
*DRB_pdcp_config->discardTimer = LTE_PDCP_Config__discardTimer_infinity;
|
||||
DRB_pdcp_config->rlc_AM = NULL;
|
||||
DRB_pdcp_config->rlc_UM = NULL;
|
||||
|
||||
DRB_rlc_config->present = LTE_RLC_Config_PR_um_Bi_Directional;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = LTE_T_Reordering_ms35;
|
||||
// PDCP
|
||||
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
|
||||
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
|
||||
PDCP_rlc_UM->pdcp_SN_Size = LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
|
||||
|
||||
DRB_pdcp_config->headerCompression.present = LTE_PDCP_Config__headerCompression_PR_notUsed;
|
||||
|
||||
DRB_lchan_config = CALLOC(1, sizeof(*DRB_lchan_config));
|
||||
DRB_config->logicalChannelConfig = DRB_lchan_config;
|
||||
DRB_ul_SpecificParameters = CALLOC(1, sizeof(*DRB_ul_SpecificParameters));
|
||||
DRB_lchan_config->ul_SpecificParameters = DRB_ul_SpecificParameters;
|
||||
|
||||
DRB_ul_SpecificParameters->priority= 4;
|
||||
|
||||
DRB_ul_SpecificParameters->prioritisedBitRate = LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps8;
|
||||
//LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
DRB_ul_SpecificParameters->bucketSizeDuration =
|
||||
LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
|
||||
logicalchannelgroup_drb = CALLOC(1, sizeof(long));
|
||||
*logicalchannelgroup_drb = 1;//(i+1) % 3;
|
||||
DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
|
||||
|
||||
ASN_SEQUENCE_ADD(&DRB_configList->list,DRB_config);
|
||||
|
||||
if (ENB_NAS_USE_TUN){
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_YES, 0x1234, 0, 0,0);
|
||||
}
|
||||
else{
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, 0x1234, 0, 0,0);
|
||||
}
|
||||
|
||||
rrc_pdcp_config_asn1_req(&ctxt,
|
||||
(LTE_SRB_ToAddModList_t *) NULL,
|
||||
DRB_configList,
|
||||
(LTE_DRB_ToReleaseList_t *) NULL,
|
||||
0xff, NULL, NULL, NULL
|
||||
//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
, (LTE_PMCH_InfoList_r9_t *) NULL
|
||||
//#endif
|
||||
,NULL);
|
||||
|
||||
rrc_rlc_config_asn1_req(&ctxt,
|
||||
(LTE_SRB_ToAddModList_t*)NULL,
|
||||
DRB_configList,
|
||||
(LTE_DRB_ToReleaseList_t*)NULL
|
||||
//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
,(LTE_PMCH_InfoList_r9_t *)NULL
|
||||
, 0, 0
|
||||
//#endif
|
||||
);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void pdcp_layer_init(void)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -92,6 +92,8 @@ extern int pdcp_instance_cnt;
|
||||
#define PROTOCOL_PDCP_CTXT_ARGS(CTXT_Pp, pDCP_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp),\
|
||||
(pDCP_Pp->is_srb) ? "SRB" : "DRB",\
|
||||
pDCP_Pp->rb_id
|
||||
//#define ENABLE_PDCP_PAYLOAD_DEBUG 1
|
||||
|
||||
int init_pdcp_thread(void);
|
||||
void cleanup_pdcp_thread(void);
|
||||
|
||||
@@ -397,6 +399,7 @@ void pdcp_run (
|
||||
const protocol_ctxt_t *const ctxt_pP);
|
||||
uint64_t pdcp_module_init (uint64_t pdcp_optmask);
|
||||
void pdcp_module_cleanup (void);
|
||||
void nr_ip_over_LTE_DRB_preconfiguration (void);
|
||||
void pdcp_layer_init (void);
|
||||
void pdcp_layer_cleanup (void);
|
||||
#define PDCP2NW_DRIVER_FIFO 21
|
||||
|
||||
@@ -111,7 +111,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
|
||||
int ret=0;
|
||||
|
||||
while ((sdu_p = list_get_head (&pdcp_sdu_list)) != NULL && ((pdcp_data_ind_header_t *)(sdu_p->data))->inst == ctxt_pP->module_id) {
|
||||
((pdcp_data_ind_header_t *)(sdu_p->data))->inst = 0;
|
||||
((pdcp_data_ind_header_t *)(sdu_p->data))->inst = 0;
|
||||
int rb_id = ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id;
|
||||
int sizeToWrite= sizeof (pdcp_data_ind_header_t) +
|
||||
((pdcp_data_ind_header_t *) sdu_p->data)->data_size;
|
||||
@@ -135,6 +135,13 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
|
||||
} // PDCP_USE_NETLINK
|
||||
|
||||
AssertFatal(ret >= 0,"[PDCP_FIFOS] pdcp_fifo_flush_sdus (errno: %d %s)\n", errno, strerror(errno));
|
||||
|
||||
#if defined(ENABLE_PDCP_PAYLOAD_DEBUG)
|
||||
LOG_I(PDCP, "Printing first bytes of PDCP SDU before removing it from the list: \n");
|
||||
for (int i=0; i<30; i++){
|
||||
LOG_I(PDCP, "%x", sdu_p->data[i]);
|
||||
}
|
||||
#endif
|
||||
list_remove_head (&pdcp_sdu_list);
|
||||
free_mem_block (sdu_p, __func__);
|
||||
pdcp_nb_sdu_sent ++;
|
||||
@@ -166,7 +173,7 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) {
|
||||
ctxt.rnti=pdcp_eNB_UE_instance_to_rnti[0];
|
||||
ctxt.enb_flag=ENB_FLAG_YES;
|
||||
ctxt.module_id=0;
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_YES);
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||
}
|
||||
|
||||
@@ -276,12 +283,13 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
LOG_D(PDCP, "[FRAME %5u][eNB][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %zu) on Rab %d \n",
|
||||
LOG_D(PDCP, "[FRAME %5u][eNB][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %zu) on Rab %d for rnti: %d \n",
|
||||
ctxt.frame,
|
||||
pdcp_read_header_g.inst,
|
||||
len,
|
||||
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
||||
pdcp_read_header_g.rb_id);
|
||||
pdcp_read_header_g.rb_id,
|
||||
ctxt.rnti);
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
|
||||
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
|
||||
|
||||
@@ -723,7 +723,6 @@ void rlc_um_check_timer_dar_time_out(
|
||||
signed int in_window;
|
||||
rlc_usn_t old_vr_ur;
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_CHECK_TIMER_DAR_TIME_OUT,VCD_FUNCTION_IN);
|
||||
|
||||
if ((rlc_pP->t_reordering.running)) {
|
||||
@@ -1130,12 +1129,12 @@ rlc_um_receive_process_dar (
|
||||
if (in_window < 0) {
|
||||
in_window = in_window + rlc_pP->rx_sn_modulo;
|
||||
}
|
||||
|
||||
rlc_um_try_reassembly(ctxt_pP, rlc_pP, rlc_pP->vr_ur, in_window);
|
||||
}
|
||||
|
||||
|
||||
if (rlc_um_in_reordering_window(ctxt_pP, rlc_pP, rlc_pP->vr_ur) < 0) {
|
||||
//LOG_I(RLC, "[rlc_um_receive_process_dar] Problematic case 4 \n");
|
||||
#if TRACE_RLC_UM_DAR
|
||||
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" VR(UR) %d OUTSIDE REORDERING WINDOW SET TO VR(UH) – UM_Window_Size = %d\n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||
@@ -1158,9 +1157,8 @@ rlc_um_receive_process_dar (
|
||||
do {
|
||||
rlc_pP->vr_ur = (rlc_pP->vr_ur+1) % rlc_pP->rx_sn_modulo;
|
||||
} while (rlc_um_get_pdu_from_dar_buffer(ctxt_pP, rlc_pP, rlc_pP->vr_ur) && (rlc_pP->vr_ur != rlc_pP->vr_uh));
|
||||
|
||||
rlc_um_try_reassembly(ctxt_pP, rlc_pP, sn, rlc_pP->vr_ur);
|
||||
}
|
||||
}
|
||||
|
||||
// -if t-Reordering is running:
|
||||
// -if VR(UX) <= VR(UR); or
|
||||
|
||||
@@ -597,7 +597,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst) {
|
||||
#ifdef NAS_DEBUG_SEND
|
||||
printk("[NAS][CLASS][SEND] Got packet from kernel:\n");
|
||||
|
||||
for (i=0; i<256; i++)
|
||||
for (int i=0; i<256; i++)
|
||||
printk("%2x ",((unsigned char *)skb->data)[i]);
|
||||
|
||||
printk("\n");
|
||||
|
||||
@@ -110,13 +110,12 @@ void nas_COMMON_receive(uint16_t dlen,
|
||||
#ifdef NAS_ADDRESS_FIX
|
||||
// Make the third byte of both the source and destination equal to the fourth of the destination
|
||||
|
||||
|
||||
unsigned char * ifaddr, *saddr, daddr;
|
||||
uint32_t odaddr = 0, osaddr;
|
||||
daddr = (unsigned char *)&((struct iphdr *)skb->data)->daddr;
|
||||
odaddr = ((struct iphdr *)skb->data)->daddr;
|
||||
// sn = addr[3];
|
||||
//sn = addr[3];
|
||||
saddr = (unsigned char *)&((struct iphdr *)skb->data)->saddr;
|
||||
uint32_t odaddr,osaddr;
|
||||
osaddr = ((struct iphdr *)skb->data)->saddr;
|
||||
|
||||
if (daddr[0] == saddr[0]) {// same network
|
||||
@@ -387,6 +386,9 @@ void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct class
|
||||
pdcph.data_size = skb->len;
|
||||
pdcph.rb_id = (gc->rb)->rab_id;
|
||||
pdcph.inst = inst;
|
||||
pdcph.sourceL2Id = 0;
|
||||
pdcph.destinationL2Id = 0;
|
||||
|
||||
|
||||
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
|
||||
@@ -161,7 +161,7 @@ int nas_netlink_send(unsigned char *data,unsigned int len)
|
||||
int status;
|
||||
|
||||
|
||||
// printk("[NAS][NETLINK] Sending %d bytes (%d)\n",len,NLMSG_SPACE(len));
|
||||
//printk("[NAS][NETLINK] Sending %d bytes (%d)\n",len,NLMSG_SPACE(len));
|
||||
skb_put(nl_skb, NLMSG_SPACE(len));
|
||||
memcpy(NLMSG_DATA(nlh),data,len);
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "assertions.h"
|
||||
#include "LAYER2/NR_MAC_UE/mac_extern.h"
|
||||
#include "SCHED_NR_UE/fapi_nr_ue_l1.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -70,8 +71,14 @@ int handle_dci(module_id_t module_id, int cc_id, unsigned int gNB_index, fapi_nr
|
||||
|
||||
}
|
||||
// L2 Abstraction Layer
|
||||
int8_t handle_dlsch (module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_nr_dci_indication_t *dci_ind, uint8_t *pduP, uint32_t pdu_len){
|
||||
int8_t handle_dlsch (module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_nr_dci_indication_t *dci_ind, uint8_t *pduP, uint32_t pdu_len, frame_t frame, int slot){
|
||||
|
||||
LOG_I(MAC, "handle_dlsch at MAC layer \n");
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
nr_ue_send_sdu(module_id, 0, frame, slot,
|
||||
pduP,
|
||||
pdu_len,
|
||||
0);
|
||||
return 0;
|
||||
/*
|
||||
return nr_ue_process_dlsch( module_id,
|
||||
@@ -209,7 +216,7 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info){
|
||||
}
|
||||
|
||||
if(dl_info->rx_ind != NULL){
|
||||
LOG_I(MAC,"[L2][IF MODULE][DL INDICATION][RX_IND]\n");
|
||||
LOG_I(MAC,"[L2][IF MODULE][DL INDICATION][RX_IND], Number of PDUs: %d \n", dl_info->rx_ind->number_pdus);
|
||||
for(i=0; i<dl_info->rx_ind->number_pdus; ++i){
|
||||
switch(dl_info->rx_ind->rx_indication_body[i].pdu_type){
|
||||
case FAPI_NR_RX_PDU_TYPE_MIB:
|
||||
@@ -220,6 +227,14 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info){
|
||||
(dl_info->rx_ind->rx_indication_body+i)->mib_pdu.ssb_index,
|
||||
(dl_info->rx_ind->rx_indication_body+i)->mib_pdu.ssb_length,
|
||||
(dl_info->rx_ind->rx_indication_body+i)->mib_pdu.cell_id )) << FAPI_NR_RX_PDU_TYPE_MIB;
|
||||
LOG_I(MAC,"[L2][IF MODULE][DL INDICATION][RX_IND], MIB case Number of PDUs: %d \n", dl_info->rx_ind->number_pdus);
|
||||
/*ret_mask |= (handle_bcch_bch( dl_info->proc,
|
||||
dl_info->module_id, dl_info->cc_id, dl_info->gNB_index,
|
||||
dl_info->rx_ind->rx_indication_body[i].mib_pdu.pdu,
|
||||
dl_info->rx_ind->rx_indication_body[i].mib_pdu.additional_bits,
|
||||
dl_info->rx_ind->rx_indication_body[i].mib_pdu.ssb_index,
|
||||
dl_info->rx_ind->rx_indication_body[i].mib_pdu.ssb_length,
|
||||
dl_info->rx_ind->rx_indication_body[i].mib_pdu.cell_id )) << FAPI_NR_RX_PDU_TYPE_MIB;*/
|
||||
break;
|
||||
case FAPI_NR_RX_PDU_TYPE_SIB:
|
||||
ret_mask |= (handle_bcch_dlsch(dl_info->module_id, dl_info->cc_id, dl_info->gNB_index,
|
||||
@@ -231,8 +246,21 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info){
|
||||
// ret_mask |= (0) << FAPI_NR_RX_PDU_TYPE_DLSCH;
|
||||
ret_mask |= (handle_dlsch(dl_info->module_id, dl_info->cc_id, dl_info->gNB_index, dl_info->dci_ind,
|
||||
(dl_info->rx_ind->rx_indication_body+i)->pdsch_pdu.pdu,
|
||||
(dl_info->rx_ind->rx_indication_body+i)->pdsch_pdu.pdu_length)) << FAPI_NR_RX_PDU_TYPE_DLSCH;
|
||||
(dl_info->rx_ind->rx_indication_body+i)->pdsch_pdu.pdu_length, dl_info->frame, dl_info->slot)) << FAPI_NR_RX_PDU_TYPE_DLSCH;
|
||||
|
||||
LOG_I(MAC,"[L2][IF MODULE][DL INDICATION][RX_IND], DLSCH case Number of PDUs: %d \n", dl_info->rx_ind->number_pdus);
|
||||
|
||||
/*
|
||||
// dl_config structure just stores what was received - not really needed
|
||||
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH;
|
||||
dl_config->number_pdus = dl_config->number_pdus + 1;
|
||||
*/
|
||||
|
||||
/*ret_mask |= (handle_dlsch(dl_info->module_id, dl_info->cc_id, dl_info->gNB_index, dl_info->dci_ind,
|
||||
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu,
|
||||
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu_length, dl_info->frame, dl_info->slot)) << FAPI_NR_RX_PDU_TYPE_DLSCH;
|
||||
|
||||
*/
|
||||
break;
|
||||
default:
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ void fn_rrc (void) {
|
||||
|
||||
case RRCI_CX_ESTABLISH_RESP: {
|
||||
rrci_cx_establish_resp_t *p = (rrci_cx_establish_resp_t *) Data;
|
||||
unsigned char CH_index,i;
|
||||
unsigned char i, CH_index = 0;
|
||||
msg( "[RRCI]>[RRC][Inst %d]:RRCI_CX_ESTABLISH_RESP\n",Header->inst);
|
||||
|
||||
for(i=0; i<NB_SIG_CNX_UE; i++)
|
||||
@@ -185,6 +185,3 @@ void fn_rrc (void) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, char *ifname)
|
||||
returnValue= setInterfaceParameter(interfaceName, broadcastAddress,SIOCSIFBRDADDR);
|
||||
|
||||
if(!returnValue)
|
||||
bringInterfaceUp(interfaceName, 1);
|
||||
returnValue=bringInterfaceUp(interfaceName, 1);
|
||||
|
||||
if(!returnValue)
|
||||
LOG_I(OIP,"Interface %s successfuly configured, ip address %s, mask %s broadcast address %s\n",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* \date 2011, 2018
|
||||
* \version 1.0
|
||||
* \company Eurecom, NTUST
|
||||
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr, kroempa@gmail.com
|
||||
* \email: {raymond.knopp, navid.nikaein}@eurecom.fr and kroempa@gmail.com
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -216,7 +216,6 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
uint32_t subCarrierSpacingCommon,
|
||||
uint32_t dmrs_TypeA_Position)
|
||||
{
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
|
||||
NR_BCCH_BCH_Message_t *mib = &carrier->mib;
|
||||
@@ -260,9 +259,10 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown subCarrierSpacingCommon %d\n",subCarrierSpacingCommon);
|
||||
AssertFatal(1==0, "Unknown subCarrierSpacingCommon %u\n", subCarrierSpacingCommon);
|
||||
}
|
||||
mib->message.choice.mib->subCarrierSpacingCommon = 1;
|
||||
|
||||
mib->message.choice.mib->subCarrierSpacingCommon = 1;
|
||||
switch (dmrs_TypeA_Position) {
|
||||
case 2:
|
||||
mib->message.choice.mib->dmrs_TypeA_Position = NR_MIB__dmrs_TypeA_Position_pos2;
|
||||
@@ -273,8 +273,7 @@ mib->message.choice.mib->subCarrierSpacingCommon = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown dmrs_TypeA_Position %d\n",dmrs_TypeA_Position);
|
||||
|
||||
AssertFatal(1==0, "Unknown dmrs_TypeA_Position %u\n", dmrs_TypeA_Position);
|
||||
}
|
||||
|
||||
// assign_enum
|
||||
@@ -282,8 +281,6 @@ mib->message.choice.mib->subCarrierSpacingCommon = 1;
|
||||
// assign_enum
|
||||
mib->message.choice.mib->intraFreqReselection = NR_MIB__intraFreqReselection_notAllowed;
|
||||
|
||||
|
||||
|
||||
//encode MIB to data
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_BCCH_BCH_Message,
|
||||
NULL,
|
||||
@@ -293,7 +290,6 @@ mib->message.choice.mib->subCarrierSpacingCommon = 1;
|
||||
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);
|
||||
}
|
||||
@@ -301,6 +297,7 @@ mib->message.choice.mib->subCarrierSpacingCommon = 1;
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
|
||||
void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
#if defined(ENABLE_ITTI)
|
||||
@@ -308,21 +305,32 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
#endif
|
||||
int initial_flag
|
||||
)
|
||||
{
|
||||
NR_ServingCellConfigCommon_t **servingcellconfigcommon = &RC.nrrrc[Mod_id]->carrier[CC_id].servingcellconfigcommon;
|
||||
NR_FreqBandIndicatorNR_t *dl_frequencyBandList;
|
||||
struct NR_SCS_SpecificCarrier *dl_scs_SpecificCarrierList;
|
||||
NR_TCI_StateId_t *TCI_StateId;
|
||||
struct NR_ControlResourceSet *bwp_dl_controlresourceset;
|
||||
NR_SearchSpace_t *bwp_dl_searchspace;
|
||||
struct NR_PDSCH_TimeDomainResourceAllocation *bwp_dl_timedomainresourceallocation;
|
||||
NR_FreqBandIndicatorNR_t *ul_frequencyBandList;
|
||||
struct NR_SCS_SpecificCarrier *ul_scs_SpecificCarrierList;
|
||||
struct NR_PUSCH_TimeDomainResourceAllocation *pusch_configcommontimedomainresourceallocation;
|
||||
struct NR_RateMatchPattern *ratematchpattern;
|
||||
NR_RateMatchPatternId_t *ratematchpatternid;
|
||||
{
|
||||
NR_ServingCellConfigCommon_t **servingcellconfigcommon = &RC.nrrrc[Mod_id]->carrier[CC_id].servingcellconfigcommon;
|
||||
NR_FreqBandIndicatorNR_t *dl_frequencyBandList;
|
||||
NR_SCS_SpecificCarrier_t *dl_scs_SpecificCarrierList;
|
||||
NR_TCI_StateId_t *TCI_StateId;
|
||||
NR_ControlResourceSet_t *bwp_dl_controlresourceset;
|
||||
NR_SearchSpace_t *bwp_dl_searchspace;
|
||||
NR_PDSCH_TimeDomainResourceAllocation_t *bwp_dl_timedomainresourceallocation;
|
||||
NR_FreqBandIndicatorNR_t *ul_frequencyBandList;
|
||||
NR_SCS_SpecificCarrier_t *ul_scs_SpecificCarrierList;
|
||||
NR_PUSCH_TimeDomainResourceAllocation_t *pusch_configcommontimedomainresourceallocation;
|
||||
NR_RateMatchPattern_t *ratematchpattern;
|
||||
NR_RateMatchPatternId_t *ratematchpatternid;
|
||||
|
||||
if(initial_flag == 1){
|
||||
dl_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t));
|
||||
ul_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t));
|
||||
dl_scs_SpecificCarrierList = CALLOC(1,sizeof(NR_SCS_SpecificCarrier_t));
|
||||
ul_scs_SpecificCarrierList = CALLOC(1,sizeof(NR_SCS_SpecificCarrier_t));
|
||||
TCI_StateId = CALLOC(1,sizeof(NR_TCI_StateId_t));
|
||||
bwp_dl_searchspace = CALLOC(1,sizeof(NR_SearchSpace_t));
|
||||
bwp_dl_timedomainresourceallocation = CALLOC(1,sizeof(NR_PDSCH_TimeDomainResourceAllocation_t));
|
||||
pusch_configcommontimedomainresourceallocation = CALLOC(1,sizeof(NR_PUSCH_TimeDomainResourceAllocation_t));
|
||||
ratematchpattern = CALLOC(1,sizeof(NR_RateMatchPattern_t));
|
||||
ratematchpatternid = CALLOC(1,sizeof(NR_RateMatchPatternId_t));
|
||||
|
||||
if(initial_flag == 1) {
|
||||
(*servingcellconfigcommon) = CALLOC(1,sizeof(NR_ServingCellConfigCommon_t));
|
||||
(*servingcellconfigcommon)->physCellId = CALLOC(1,sizeof(NR_PhysCellId_t));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon = CALLOC(1,sizeof(struct NR_DownlinkConfigCommon));
|
||||
@@ -342,16 +350,14 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
|
||||
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB = CALLOC(1,sizeof(NR_ARFCN_ValueNR_t));
|
||||
|
||||
dl_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t));
|
||||
dl_scs_SpecificCarrierList = CALLOC(1,sizeof(struct NR_SCS_SpecificCarrier));
|
||||
|
||||
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->genericParameters.cyclicPrefix = CALLOC(1,sizeof(long));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon = CALLOC(1,sizeof(struct NR_SetupRelease_PDCCH_ConfigCommon));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero = CALLOC(1,sizeof(long));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero = CALLOC(1,sizeof(long));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = CALLOC(1,sizeof(struct NR_ControlResourceSet));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = CALLOC(1,sizeof(NR_ControlResourceSet_t));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpaceList));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = CALLOC(1,sizeof(NR_SearchSpaceId_t));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation = CALLOC(1,sizeof(NR_SearchSpaceId_t));
|
||||
@@ -361,7 +367,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PDSCH_ConfigCommon));
|
||||
(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList = CALLOC(1,sizeof(struct NR_PDSCH_TimeDomainResourceAllocationList));
|
||||
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->frequencyBandList = CALLOC(1,sizeof(struct NR_MultiFrequencyBandListNR));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->frequencyBandList = CALLOC(1,sizeof(NR_MultiFrequencyBandListNR_t));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA = CALLOC(1,sizeof(NR_ARFCN_ValueNR_t));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->additionalSpectrumEmission = CALLOC(1,sizeof(NR_AdditionalSpectrumEmission_t));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->p_Max = CALLOC(1,sizeof(NR_P_Max_t));
|
||||
@@ -381,7 +387,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUSCH_ConfigCommon));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = CALLOC(1,sizeof(long));
|
||||
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList = CALLOC(1,sizeof(struct NR_PUSCH_TimeDomainResourceAllocationList));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList = CALLOC(1,sizeof(NR_PUSCH_TimeDomainResourceAllocationList_t));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble = CALLOC(1,sizeof(long));
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->p0_NominalWithGrant = CALLOC(1,sizeof(long));
|
||||
|
||||
@@ -402,8 +408,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
bwp_dl_controlresourceset->tci_StatesPDCCH_ToAddList = CALLOC(1,sizeof(struct NR_ControlResourceSet__tci_StatesPDCCH_ToAddList));
|
||||
bwp_dl_controlresourceset->tci_PresentInDCI = CALLOC(1,sizeof(long));
|
||||
bwp_dl_controlresourceset->pdcch_DMRS_ScramblingID = CALLOC(1,sizeof(long));
|
||||
TCI_StateId = CALLOC(1,sizeof(NR_TCI_StateId_t));
|
||||
bwp_dl_searchspace = CALLOC(1,sizeof(NR_SearchSpace_t));
|
||||
|
||||
bwp_dl_searchspace->controlResourceSetId = CALLOC(1,sizeof(NR_ControlResourceSetId_t));
|
||||
bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset = CALLOC(1,sizeof(struct NR_SearchSpace__monitoringSlotPeriodicityAndOffset));
|
||||
bwp_dl_searchspace->duration = CALLOC(1,sizeof(long));
|
||||
@@ -412,33 +417,26 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
bwp_dl_searchspace->nrofCandidates = CALLOC(1,sizeof(struct NR_SearchSpace__nrofCandidates));
|
||||
bwp_dl_searchspace->searchSpaceType = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.ue_Specific = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__ue_Specific));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.ue_Specific = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__ue_Specific));
|
||||
|
||||
bwp_dl_timedomainresourceallocation = CALLOC(1,sizeof(struct NR_PDSCH_TimeDomainResourceAllocation));
|
||||
bwp_dl_timedomainresourceallocation->k0 = CALLOC(1,sizeof(long));
|
||||
|
||||
ul_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t));
|
||||
ul_scs_SpecificCarrierList = CALLOC(1,sizeof(struct NR_SCS_SpecificCarrier));
|
||||
bwp_dl_timedomainresourceallocation->k0 = CALLOC(1,sizeof(long));
|
||||
|
||||
pusch_configcommontimedomainresourceallocation = CALLOC(1,sizeof(struct NR_PUSCH_TimeDomainResourceAllocation));
|
||||
pusch_configcommontimedomainresourceallocation->k2 = CALLOC(1,sizeof(long));
|
||||
|
||||
ratematchpattern = CALLOC(1,sizeof(struct NR_RateMatchPattern));
|
||||
ratematchpattern->patternType.choice.bitmaps = CALLOC(1,sizeof(struct NR_RateMatchPattern__patternType__bitmaps));
|
||||
ratematchpattern->patternType.choice.bitmaps->resourceBlocks.buf = MALLOC(35);
|
||||
ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.oneSlot.buf = MALLOC(2);
|
||||
ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.buf = MALLOC(4);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern = CALLOC(1,sizeof(struct NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern));
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n2.buf = MALLOC(1);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n4.buf = MALLOC(1);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n5.buf = MALLOC(1);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n8.buf = MALLOC(1);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n10.buf = MALLOC(2);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.buf = MALLOC(3);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf = MALLOC(5);
|
||||
ratematchpattern->subcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
|
||||
ratematchpatternid = CALLOC(1,sizeof(NR_RateMatchPatternId_t));
|
||||
}else{
|
||||
ratematchpattern->patternType.choice.bitmaps = CALLOC(1,sizeof(struct NR_RateMatchPattern__patternType__bitmaps));
|
||||
ratematchpattern->patternType.choice.bitmaps->resourceBlocks.buf = MALLOC(35);
|
||||
ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.oneSlot.buf = MALLOC(2);
|
||||
ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.buf = MALLOC(4);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern = CALLOC(1,sizeof(struct NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern));
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n2.buf = MALLOC(1);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n4.buf = MALLOC(1);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n5.buf = MALLOC(1);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n8.buf = MALLOC(1);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n10.buf = MALLOC(2);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.buf = MALLOC(3);
|
||||
ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf = MALLOC(5);
|
||||
ratematchpattern->subcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t));
|
||||
} else {
|
||||
bwp_dl_controlresourceset =(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet;
|
||||
}
|
||||
|
||||
@@ -447,7 +445,7 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
//physCellId
|
||||
*((*servingcellconfigcommon)->physCellId) = configuration->Nid_cell[CC_id];
|
||||
|
||||
//NR_DownlinkConfigCommon
|
||||
//NR_DownlinkConfigCommon
|
||||
*((*servingcellconfigcommon)->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) = configuration->absoluteFrequencySSB[CC_id];
|
||||
|
||||
*(dl_frequencyBandList) = configuration->DL_FreqBandIndicatorNR[CC_id];
|
||||
@@ -549,37 +547,37 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl2560 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id];
|
||||
}
|
||||
|
||||
*(bwp_dl_searchspace->duration) = configuration->SearchSpace_duration[CC_id];
|
||||
*(bwp_dl_searchspace->duration) = configuration->SearchSpace_duration[CC_id];
|
||||
|
||||
bwp_dl_searchspace->monitoringSymbolsWithinSlot->size=2;
|
||||
bwp_dl_searchspace->monitoringSymbolsWithinSlot->bits_unused=2;
|
||||
bwp_dl_searchspace->monitoringSymbolsWithinSlot->buf[0]=0x3f;
|
||||
bwp_dl_searchspace->monitoringSymbolsWithinSlot->buf[1]=0xff;
|
||||
bwp_dl_searchspace->monitoringSymbolsWithinSlot->size = 2;
|
||||
bwp_dl_searchspace->monitoringSymbolsWithinSlot->bits_unused = 2;
|
||||
bwp_dl_searchspace->monitoringSymbolsWithinSlot->buf[0] = 0x3f;
|
||||
bwp_dl_searchspace->monitoringSymbolsWithinSlot->buf[1] = 0xff;
|
||||
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel1 = configuration->SearchSpace_nrofCandidates_aggregationLevel1[CC_id];
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel2 = configuration->SearchSpace_nrofCandidates_aggregationLevel2[CC_id];
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel4 = configuration->SearchSpace_nrofCandidates_aggregationLevel4[CC_id];
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel8 = configuration->SearchSpace_nrofCandidates_aggregationLevel8[CC_id];
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel1 = configuration->SearchSpace_nrofCandidates_aggregationLevel1[CC_id];
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel2 = configuration->SearchSpace_nrofCandidates_aggregationLevel2[CC_id];
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel4 = configuration->SearchSpace_nrofCandidates_aggregationLevel4[CC_id];
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel8 = configuration->SearchSpace_nrofCandidates_aggregationLevel8[CC_id];
|
||||
bwp_dl_searchspace->nrofCandidates->aggregationLevel16 = configuration->SearchSpace_nrofCandidates_aggregationLevel16[CC_id];
|
||||
|
||||
bwp_dl_searchspace->searchSpaceType->present = configuration->SearchSpace_searchSpaceType[CC_id];
|
||||
|
||||
if(bwp_dl_searchspace->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common){
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_0));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_3));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_0));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16 = CALLOC(1,sizeof(long));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_3));
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1 = CALLOC(1,sizeof(long));
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id];
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy2 = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id];
|
||||
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id];
|
||||
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy2 = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id];
|
||||
}else if (bwp_dl_searchspace->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_ue_Specific){
|
||||
bwp_dl_searchspace->searchSpaceType->choice.ue_Specific->dci_Formats = configuration->ue_Specific__dci_Formats[CC_id];
|
||||
}
|
||||
@@ -692,9 +690,9 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = NR_PUSCH_ConfigCommon__groupHoppingEnabledTransformPrecoding_enabled;
|
||||
}
|
||||
|
||||
*(pusch_configcommontimedomainresourceallocation->k2) = configuration->PUSCH_TimeDomainResourceAllocation_k2[CC_id];
|
||||
pusch_configcommontimedomainresourceallocation->mappingType = configuration->PUSCH_TimeDomainResourceAllocation_mappingType[CC_id];
|
||||
pusch_configcommontimedomainresourceallocation->startSymbolAndLength = configuration->PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[CC_id];
|
||||
*(pusch_configcommontimedomainresourceallocation->k2) = configuration->PUSCH_TimeDomainResourceAllocation_k2[CC_id];
|
||||
pusch_configcommontimedomainresourceallocation->mappingType = configuration->PUSCH_TimeDomainResourceAllocation_mappingType[CC_id];
|
||||
pusch_configcommontimedomainresourceallocation->startSymbolAndLength = configuration->PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[CC_id];
|
||||
ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list,&pusch_configcommontimedomainresourceallocation);
|
||||
|
||||
*((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble) = configuration->msg3_DeltaPreamble[CC_id];
|
||||
@@ -846,11 +844,12 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
|
||||
}
|
||||
|
||||
|
||||
void do_RLC_BEARER(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_BearerToAddModList,
|
||||
rlc_bearer_config_t *rlc_config){
|
||||
|
||||
rlc_bearer_config_t *rlc_config)
|
||||
{
|
||||
struct NR_RLC_BearerConfig *rlc_bearer;
|
||||
rlc_bearer = CALLOC(1,sizeof(struct NR_RLC_BearerConfig));
|
||||
|
||||
@@ -945,11 +944,12 @@ void do_RLC_BEARER(uint8_t Mod_id,
|
||||
ASN_SEQUENCE_ADD(&(rlc_BearerToAddModList->list),&rlc_bearer);
|
||||
}
|
||||
|
||||
void do_MAC_CELLGROUP(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_MAC_CellGroupConfig *mac_CellGroupConfig,
|
||||
mac_cellgroup_t *mac_cellgroup_config){
|
||||
|
||||
void do_MAC_CELLGROUP(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
|
||||
mac_cellgroup_t *mac_cellgroup_config)
|
||||
{
|
||||
mac_CellGroupConfig->drx_Config = CALLOC(1,sizeof(struct NR_SetupRelease_DRX_Config));
|
||||
mac_CellGroupConfig->schedulingRequestConfig = CALLOC(1,sizeof(struct NR_SchedulingRequestConfig));
|
||||
mac_CellGroupConfig->bsr_Config = CALLOC(1,sizeof(struct NR_BSR_Config));
|
||||
@@ -1059,11 +1059,12 @@ void do_MAC_CELLGROUP(uint8_t Mod_id,
|
||||
|
||||
}
|
||||
|
||||
|
||||
void do_PHYSICALCELLGROUP(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig,
|
||||
physicalcellgroup_t *physicalcellgroup_config){
|
||||
|
||||
NR_PhysicalCellGroupConfig_t *physicalCellGroupConfig,
|
||||
physicalcellgroup_t *physicalcellgroup_config)
|
||||
{
|
||||
physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH = CALLOC(1,sizeof(long));
|
||||
physicalCellGroupConfig->harq_ACK_SpatialBundlingPUSCH = CALLOC(1,sizeof(long));
|
||||
physicalCellGroupConfig->p_NR_FR1 = CALLOC(1,sizeof(NR_P_Max_t));
|
||||
@@ -1090,10 +1091,11 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id,
|
||||
|
||||
}
|
||||
|
||||
void do_SpCellConfig(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_SpCellConfig *spconfig){
|
||||
|
||||
void do_SpCellConfig(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
NR_SpCellConfig_t *spconfig)
|
||||
{
|
||||
//spconfig->servCellIndex = CALLOC(1,sizeof(NR_ServCellIndex_t));
|
||||
//*(spconfig->servCellIndex)=
|
||||
|
||||
|
||||
@@ -91,21 +91,21 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
#endif
|
||||
int initial_flag);
|
||||
|
||||
void do_RLC_BEARER(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_BearerToAddModList,
|
||||
rlc_bearer_config_t *rlc_config);
|
||||
void do_RLC_BEARER(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_BearerToAddModList,
|
||||
rlc_bearer_config_t *rlc_config);
|
||||
|
||||
void do_MAC_CELLGROUP(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_MAC_CellGroupConfig *mac_CellGroupConfig,
|
||||
mac_cellgroup_t *mac_cellgroup_config);
|
||||
|
||||
void do_PHYSICALCELLGROUP(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig,
|
||||
physicalcellgroup_t *physicalcellgroup_config);
|
||||
|
||||
void do_SpCellConfig(uint8_t Mod_id,
|
||||
void do_MAC_CELLGROUP(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_SpCellConfig *spconfig);
|
||||
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
|
||||
mac_cellgroup_t *mac_cellgroup_config);
|
||||
|
||||
void do_PHYSICALCELLGROUP(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
NR_PhysicalCellGroupConfig_t *physicalCellGroupConfig,
|
||||
physicalcellgroup_t *physicalcellgroup_config);
|
||||
|
||||
void do_SpCellConfig(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
NR_SpCellConfig_t *spconfig);
|
||||
|
||||
@@ -74,8 +74,8 @@ typedef guint8 gboolean;
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define OPT_PARAMS_DESC { \
|
||||
{"type" , CONFIG_HLP_TYPEMON, 0, strptr:&in_type, defstrval:"none", TYPE_STRING, 0}, \
|
||||
{"ip" , CONFIG_HLP_L2MONIP, 0, strptr:&in_ip, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{"path" , CONFIG_HLP_L2MONPATH, 0, strptr:&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, 0}, \
|
||||
{"ip" , CONFIG_HLP_L2MONIP, 0, strptr:(char**)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{"path" , CONFIG_HLP_L2MONPATH, 0, strptr:(char**)&in_path,defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define OPTTYPE_IDX 0
|
||||
|
||||
+10
-13
@@ -224,9 +224,9 @@ int size_dist(
|
||||
return size_data;
|
||||
}
|
||||
|
||||
|
||||
int adjust_size(int size)
|
||||
{
|
||||
|
||||
if (size<PAYLOAD_MIN) {
|
||||
LOG_W(OTG,"Packet Size=%d out of range, size=%d \n", size, PAYLOAD_MIN);
|
||||
size=PAYLOAD_MIN;
|
||||
@@ -239,9 +239,6 @@ int adjust_size(int size)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
unsigned char *packet_gen(
|
||||
const int src_instance,
|
||||
const int dst_instance,
|
||||
@@ -391,22 +388,20 @@ unsigned char *packet_gen(
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned char *packet_gen_multicast(
|
||||
const int src_instance,
|
||||
const int dst_instance,
|
||||
const int ctime,
|
||||
unsigned int * const pkt_size)
|
||||
{
|
||||
|
||||
*pkt_size =0;
|
||||
unsigned int size=0;
|
||||
unsigned int buffer_size =0;
|
||||
*pkt_size = 0;
|
||||
unsigned int size = 0;
|
||||
unsigned int buffer_size = 0;
|
||||
char *payload=NULL;
|
||||
char *header=NULL;
|
||||
unsigned int flag;
|
||||
int app,seq_num=0;
|
||||
int otg_hdr_size= sizeof(otg_hdr_info_t) + sizeof(otg_hdr_t);
|
||||
unsigned int flag = 0;
|
||||
int app, seq_num = 0;
|
||||
int otg_hdr_size = sizeof(otg_hdr_info_t) + sizeof(otg_hdr_t);
|
||||
|
||||
set_ctime(ctime); // fixme: this should be done separetly from packet_gen and packet_gen_multicast
|
||||
|
||||
@@ -488,7 +483,9 @@ unsigned char *packet_gen_multicast(
|
||||
payload,
|
||||
buffer_size,
|
||||
0/*g_otg_multicast->application_type[src_instance][dst][app]*/,
|
||||
flag, 0, ctime,
|
||||
flag,
|
||||
0,
|
||||
ctime,
|
||||
seq_num,
|
||||
0,
|
||||
HDR_IP_v4_MIN+HDR_UDP,
|
||||
|
||||
Reference in New Issue
Block a user