Commit f423ba69 authored by sumit's avatar sumit Committed by Thomas Schlichter

t_reassembly timer as clp and also provision as per 38.821 7.2.2.1 when harq...

t_reassembly timer as clp and also provision as per 38.821 7.2.2.1 when harq is enabled, scheduling_offset yet to be added
parent 1cde65bb
...@@ -103,6 +103,11 @@ extern "C" ...@@ -103,6 +103,11 @@ extern "C"
#define CONFIG_L1_EMULATOR "Run in L1 emulated mode (disable PHY layer)\n" #define CONFIG_L1_EMULATOR "Run in L1 emulated mode (disable PHY layer)\n"
#define CONFIG_HLP_CONTINUOUS_TX "perform continuous transmission, even in TDD mode (to work around USRP issues)\n" #define CONFIG_HLP_CONTINUOUS_TX "perform continuous transmission, even in TDD mode (to work around USRP issues)\n"
#define CONFIG_HLP_STATS_DISABLE "disable globally the stats generation and persistence" #define CONFIG_HLP_STATS_DISABLE "disable globally the stats generation and persistence"
#define CONFIG_HLP_NTN_TRS "softmodem params for ntn t-Reassembly timer"
#define CONFIG_HLP_NTN_TRS_OFFSET "softmodem params for ntn t-Reassembly timer offset in ms"
#define CONFIG_HLP_NTN_TRD "softmodem params for ntn t-Reordering timer"
#define CONFIG_HLP_NTN_TRD_OFFSET "softmodem params for ntn t-Reordering timer offset in ms"
#define CONFIG_HLP_NTN_RTD "softmodem params for ntn round trip delay ms"
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters common to eNodeB and UE */ /* command line parameters common to eNodeB and UE */
...@@ -134,6 +139,11 @@ extern "C" ...@@ -134,6 +139,11 @@ extern "C"
#define NON_STOP softmodem_params.non_stop #define NON_STOP softmodem_params.non_stop
#define EMULATE_L1 softmodem_params.emulate_l1 #define EMULATE_L1 softmodem_params.emulate_l1
#define CONTINUOUS_TX softmodem_params.continuous_tx #define CONTINUOUS_TX softmodem_params.continuous_tx
#define NTN_TRS softmodem_params.ntn_trs
#define NTN_TRS_OFFSET softmodem_params.ntn_trs_offset
#define NTN_TRD softmodem_params.ntn_trd
#define NTN_TRD_OFFSET softmodem_params.ntn_trd_offset
#define NTN_RTD softmodem_params.ntn_rtd
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat"; #define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
...@@ -176,6 +186,11 @@ extern int usrp_tx_thread; ...@@ -176,6 +186,11 @@ extern int usrp_tx_thread;
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}, \ {"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}, \
{"continuous-tx", CONFIG_HLP_CONTINUOUS_TX,PARAMFLAG_BOOL, iptr:&CONTINUOUS_TX, defintval:0, TYPE_INT, 0}, \ {"continuous-tx", CONFIG_HLP_CONTINUOUS_TX,PARAMFLAG_BOOL, iptr:&CONTINUOUS_TX, defintval:0, TYPE_INT, 0}, \
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, iptr:&stats_disabled, defintval:0, TYPE_INT, 0}, \ {"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, iptr:&stats_disabled, defintval:0, TYPE_INT, 0}, \
{"ntn-trs", CONFIG_HLP_NTN_TRS, 0, u8ptr:&NTN_TRS, defintval:15, TYPE_UINT8, 0}, \
{"ntn-trs-offset", CONFIG_HLP_NTN_TRS_OFFSET,0, u16ptr:&NTN_TRS_OFFSET, defintval:0, TYPE_UINT16, 0}, \
{"ntn-trd", CONFIG_HLP_NTN_TRD, 0, u8ptr:&NTN_TRD, defintval:36, TYPE_UINT8, 0}, \
{"ntn-trd-offset", CONFIG_HLP_NTN_TRD_OFFSET,0, u16ptr:&NTN_TRD_OFFSET, defintval:0, TYPE_UINT16, 0}, \
{"ntn-rtd", CONFIG_HLP_NTN_RTD, 0, u16ptr:&NTN_RTD, defintval:0, TYPE_UINT16, 0}, \
} }
#define CONFIG_HLP_NSA "Enable NSA mode \n" #define CONFIG_HLP_NSA "Enable NSA mode \n"
...@@ -273,6 +288,11 @@ typedef struct { ...@@ -273,6 +288,11 @@ typedef struct {
int non_stop; int non_stop;
int emulate_l1; int emulate_l1;
int continuous_tx; int continuous_tx;
uint8_t ntn_trs;
uint16_t ntn_trs_offset;
uint8_t ntn_trd;
uint16_t ntn_trd_offset;
uint16_t ntn_rtd;
} softmodem_params_t; } softmodem_params_t;
extern uint64_t get_softmodem_optmask(void); extern uint64_t get_softmodem_optmask(void);
......
...@@ -107,7 +107,9 @@ void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config ...@@ -107,7 +107,9 @@ void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config
*rlc_Config->choice.um_Bi_Directional->ul_UM_RLC.sn_FieldLength = NR_SN_FieldLengthUM_size12; *rlc_Config->choice.um_Bi_Directional->ul_UM_RLC.sn_FieldLength = NR_SN_FieldLengthUM_size12;
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = calloc(1, sizeof(*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength)); rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = calloc(1, sizeof(*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength));
*rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = NR_SN_FieldLengthUM_size12; *rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength = NR_SN_FieldLengthUM_size12;
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.t_Reassembly = NR_T_Reassembly_ms15; // rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.t_Reassembly = NR_T_Reassembly_ms15;
rlc_Config->choice.um_Bi_Directional->dl_UM_RLC.t_Reassembly = get_softmodem_params()->ntn_trs; // GETTING ENUM INDEX OF T_REASSEMBLY TIMER FROM THE CL
break; break;
case NR_RLC_Config_PR_am: case NR_RLC_Config_PR_am:
// RLC AM Bearer configuration // RLC AM Bearer configuration
...@@ -890,9 +892,30 @@ static void add_drb_um(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_ ...@@ -890,9 +892,30 @@ static void add_drb_um(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_
switch (r->present) { switch (r->present) {
case NR_RLC_Config_PR_um_Bi_Directional: { case NR_RLC_Config_PR_um_Bi_Directional: {
//printf("\n\n\n\n ENB_NAS_USE_TUN %ld enb_flag %d\n\n\n\n",ENB_NAS_USE_TUN, enb_flag);
struct NR_RLC_Config__um_Bi_Directional *um; struct NR_RLC_Config__um_Bi_Directional *um;
um = r->choice.um_Bi_Directional; um = r->choice.um_Bi_Directional;
t_reassembly = decode_t_reassembly(um->dl_UM_RLC.t_Reassembly); // FOLLOWING TO BE USED WHEN HARQ IS DISABLED
{
t_reassembly = decode_t_reassembly(um->dl_UM_RLC.t_Reassembly); // THIS WILL COLLECT THE VALUE FROM ENUM CORRESPONDING
// TO THE INDEX PROVIDED FROM CLP
t_reassembly = t_reassembly + get_softmodem_params()->ntn_trs_offset; // THIS WILL ADD THE OFFSET VALUE PROVIDED FROM CLP
}
// FOLLOWING TO BE USED WHEN HARQ IS ENABLED DO AS 7.2.2.1 FROM 38.821
/*
{
if(ENB_NAS_USE_TUN) // IF THE FUNCTION IS CALLED BY GNB
{
t_reassembly = t_reassembly + (get_softmodem_params()->ntn_rtd)*NR_MAX_DLSCH_HARQ_PROCESSES;
}
else // IF THE FUNCTION IS CALLED BY UE
{
t_reassembly = t_reassembly + (get_softmodem_params()->ntn_rtd)*NR_MAX_ULSCH_HARQ_PROCESSES;
}
}
*/
if (*um->dl_UM_RLC.sn_FieldLength != *um->ul_UM_RLC.sn_FieldLength) { if (*um->dl_UM_RLC.sn_FieldLength != *um->ul_UM_RLC.sn_FieldLength) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1); exit(1);
...@@ -961,6 +984,8 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt ...@@ -961,6 +984,8 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
int rnti = ctxt_pP->rnti; int rnti = ctxt_pP->rnti;
int i; int i;
int j; int j;
//printf("\n\n\n\n ctxt_pP->enb_flag in gnb is %d \n\n\n\n", ctxt_pP->enb_flag);
//printf("\n\n\n\n ENB_NAS_USE_TUN %ld \n\n\n\n",ENB_NAS_USE_TUN);
if (/*ctxt_pP->enb_flag != 1 ||*/ ctxt_pP->module_id != 0 /*|| if (/*ctxt_pP->enb_flag != 1 ||*/ ctxt_pP->module_id != 0 /*||
ctxt_pP->instance != 0 || ctxt_pP->eNB_index != 0 || ctxt_pP->instance != 0 || ctxt_pP->eNB_index != 0 ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment