Commit 09293090 authored by Marwan Hammouda's avatar Marwan Hammouda

Added: command-line options for time drift and frequency offset simulations in RfSimulator

parent 7fd1a1e2
...@@ -115,6 +115,11 @@ ...@@ -115,6 +115,11 @@
#define CONFIG_HLP_UEK2 "Set the additional k2 for NTN at UE\n" #define CONFIG_HLP_UEK2 "Set the additional k2 for NTN at UE\n"
#define CONFIG_HLP_GNBK2 "Set the additional k2 for NTN at gNB\n" #define CONFIG_HLP_GNBK2 "Set the additional k2 for NTN at gNB\n"
#define CONFIG_HLP_ULSCHEDF "Set the maximum number of buffered UL scheduled frames at gNB\n" #define CONFIG_HLP_ULSCHEDF "Set the maximum number of buffered UL scheduled frames at gNB\n"
#define CONFIG_HLP_FDoppler "Set the maximum Doppler frequency shift\n"
#define CONFIG_HLP_FDopplerComp "Execute continous frequency offset compensation\n"
#define CONFIG_HLP_TDRIFT "Set the timing offset/drift per frame in the RF simulator (expressed in number of samples per frame)\n"
#define CONFIG_HLP_FDopplerRate "Set the Doppler rate in Hz/s\n"
#define CONFIG_HLP_FDopplerVar "Set Doppler variance, [fdoppler +/- fdopplerVar]\n"
/*--------------------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters for LOG utility */ /* command line parameters for LOG utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
...@@ -164,5 +169,10 @@ extern uint16_t NTN_UE_slot_Rx_to_Tx; //the additional Rx to Tx slot number at U ...@@ -164,5 +169,10 @@ extern uint16_t NTN_UE_slot_Rx_to_Tx; //the additional Rx to Tx slot number at U
extern uint16_t NTN_UE_k2; //the additional k2 value at UE extern uint16_t NTN_UE_k2; //the additional k2 value at UE
extern uint16_t NTN_gNB_k2; //the additional k2 value at gNB extern uint16_t NTN_gNB_k2; //the additional k2 value at gNB
extern uint16_t max_ul_sched_frame; //Set the maximum number of buffered UL scheduled frames at gNB, for UL_tti_req_ahead and vrb_map_UL extern uint16_t max_ul_sched_frame; //Set the maximum number of buffered UL scheduled frames at gNB, for UL_tti_req_ahead and vrb_map_UL
extern int fdoppler; //maximum Doppler frequency shift in Hz
extern int fdopplerComp; // flag to activate/deactivate continous frequency offset compensation
extern int RFsim_DriftPerFrame; //the timing offset/drift per frame in the RF simulator (expressed in number of samples per frame)
extern int32_t fdopplerRate; //Doppler rate in Hz/s
extern uint32_t fdopplerVar; //Doppler variance, [fdoppler +/- fdopplerVar]
#endif #endif
...@@ -571,6 +571,11 @@ void init_pdcp(void) { ...@@ -571,6 +571,11 @@ void init_pdcp(void) {
uint64_t RFsim_PropDelay = 0; uint64_t RFsim_PropDelay = 0;
uint16_t NTN_gNB_k2 = 0; uint16_t NTN_gNB_k2 = 0;
uint16_t max_ul_sched_frame = 1; uint16_t max_ul_sched_frame = 1;
int fdoppler = 0;
int fdopplerComp = 1;
int RFsim_DriftPerFrame = 0;
int32_t fdopplerRate;
uint32_t fdopplerVar;
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
int ru_id, CC_id = 0; int ru_id, CC_id = 0;
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
{"P" , CONFIG_HLP_PROPD, 0, .u64ptr=&RFsim_PropDelay, .defintval=0, TYPE_UINT64, 0}, \ {"P" , CONFIG_HLP_PROPD, 0, .u64ptr=&RFsim_PropDelay, .defintval=0, TYPE_UINT64, 0}, \
{"gnb_k2" , CONFIG_HLP_GNBK2, 0, .u16ptr=&NTN_gNB_k2, .defintval=0, TYPE_UINT16, 0}, \ {"gnb_k2" , CONFIG_HLP_GNBK2, 0, .u16ptr=&NTN_gNB_k2, .defintval=0, TYPE_UINT16, 0}, \
{"ul_sched_f" , CONFIG_HLP_ULSCHEDF, 0, .u16ptr=&max_ul_sched_frame, .defintval=1, TYPE_UINT16, 0}, \ {"ul_sched_f" , CONFIG_HLP_ULSCHEDF, 0, .u16ptr=&max_ul_sched_frame, .defintval=1, TYPE_UINT16, 0}, \
{"FD" , CONFIG_HLP_FDoppler, 0, .iptr=&fdoppler, .defintval=0, TYPE_INT, 0}, \
{"TD" , CONFIG_HLP_TDRIFT, 0, .iptr=&RFsim_DriftPerFrame, .defintval=0, TYPE_INT, 0}, \
{"DSR" , CONFIG_HLP_FDopplerRate, 0, .iptr=&fdopplerRate, .defintval=0, TYPE_INT32, 0}, \
{"DSV" , CONFIG_HLP_FDopplerVar, 0, .uptr=&fdopplerVar, .defintval=0, TYPE_UINT32, 0}, \
} }
// clang-format on // clang-format on
......
...@@ -427,6 +427,12 @@ int NB_UE_INST = 1; ...@@ -427,6 +427,12 @@ int NB_UE_INST = 1;
uint64_t RFsim_PropDelay = 0; uint64_t RFsim_PropDelay = 0;
uint16_t NTN_UE_k2 = 0; uint16_t NTN_UE_k2 = 0;
uint16_t NTN_UE_slot_Rx_to_Tx = 0; uint16_t NTN_UE_slot_Rx_to_Tx = 0;
int RFsim_DriftPerFrame = 0;
int32_t fdoppler = 0; //center Doppler frequency shift
int32_t fdopplerRate; //Doppler rate in Hz/s
uint32_t fdopplerVar; //Doppler variance, [fdoppler +/- fdopplerVar]
int fdopplerComp = 1; // flag to activate continous frequency offset compensation (=0 deacticated, =1 activated (default case))
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
int set_exe_prio = 1; int set_exe_prio = 1;
......
...@@ -66,6 +66,11 @@ ...@@ -66,6 +66,11 @@
{"P" , CONFIG_HLP_PROPD, 0, .u64ptr=&RFsim_PropDelay, .defintval=0, TYPE_UINT64, 0}, \ {"P" , CONFIG_HLP_PROPD, 0, .u64ptr=&RFsim_PropDelay, .defintval=0, TYPE_UINT64, 0}, \
{"ue_slot_Rx_Tx" , CONFIG_HLP_UESLOTRXTX, 0, .u16ptr=&NTN_UE_slot_Rx_to_Tx, .defintval=0, TYPE_UINT16, 0}, \ {"ue_slot_Rx_Tx" , CONFIG_HLP_UESLOTRXTX, 0, .u16ptr=&NTN_UE_slot_Rx_to_Tx, .defintval=0, TYPE_UINT16, 0}, \
{"ue_k2" , CONFIG_HLP_UEK2, 0, .u16ptr=&NTN_UE_k2, .defintval=0, TYPE_UINT16, 0}, \ {"ue_k2" , CONFIG_HLP_UEK2, 0, .u16ptr=&NTN_UE_k2, .defintval=0, TYPE_UINT16, 0}, \
{"FD" , CONFIG_HLP_FDoppler, 0, .iptr=&fdoppler, .defintval=0, TYPE_INT, 0}, \
{"FC" , CONFIG_HLP_FDopplerComp, 0, .iptr=&fdopplerComp, .defintval=1, TYPE_INT, 0}, \
{"D" , CONFIG_HLP_TDRIFT, 0, .iptr=&RFsim_DriftPerFrame, .defintval=0, TYPE_INT, 0}, \
{"DSR" , CONFIG_HLP_FDopplerRate,0, .iptr=&fdopplerRate, .defintval=0, TYPE_INT32, 0}, \
{"DSV" , CONFIG_HLP_FDopplerVar, 0, .uptr=&fdopplerVar, .defintval=0, TYPE_UINT32, 0}, \
} }
// clang-format on // clang-format on
......
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