Commit 563109a8 authored by Guido Casati's avatar Guido Casati

Cleanup of unused and outdated legacy RFSIM code

- deleted:    ../../../executables/rfsim.c
- removed unused command line options to set SINR and SNR
- removed unused functions to get SINR and SNR
- removed unused RFSIM struct members
parent c599e172
...@@ -179,9 +179,6 @@ extern void init_UE(int nb_inst, ...@@ -179,9 +179,6 @@ extern void init_UE(int nb_inst,
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char *name); extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char *name);
extern void init_ocm(void);
extern void init_ue_devices(PHY_VARS_UE *);
PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms, uint8_t UE_id, uint8_t abstraction_flag); PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms, uint8_t UE_id, uint8_t abstraction_flag);
void init_eNB_afterRU(void); void init_eNB_afterRU(void);
......
...@@ -118,7 +118,6 @@ unsigned char NB_gNB_INST = 1; ...@@ -118,7 +118,6 @@ unsigned char NB_gNB_INST = 1;
char *uecap_file; char *uecap_file;
runmode_t mode = normal_txrx; runmode_t mode = normal_txrx;
static double snr_dB=20;
#if MAX_NUM_CCs == 1 #if MAX_NUM_CCs == 1
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}}; rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
{"U" , CONFIG_HLP_ULBM_PHYTEST, 0, .u64ptr=&ulsch_slot_bitmap, .defintval=0, TYPE_UINT64, 0}, \ {"U" , CONFIG_HLP_ULBM_PHYTEST, 0, .u64ptr=&ulsch_slot_bitmap, .defintval=0, TYPE_UINT64, 0}, \
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, .iptr=&usrp_tx_thread, .defstrval=0, TYPE_INT, 0}, \ {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, .iptr=&usrp_tx_thread, .defstrval=0, TYPE_INT, 0}, \
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, .strptr=&uecap_file, .defstrval="./uecap_ports1.xml", TYPE_STRING, 0}, \ {"uecap_file", CONFIG_HLP_UECAP_FILE, 0, .strptr=&uecap_file, .defstrval="./uecap_ports1.xml", TYPE_STRING, 0}, \
{"s" , CONFIG_HLP_SNR, 0, .dblptr=&snr_dB, .defdblval=25, TYPE_DOUBLE, 0}, \
} }
// clang-format on // clang-format on
......
This diff is collapsed.
...@@ -14,7 +14,6 @@ int8_t threequarter_fs; ...@@ -14,7 +14,6 @@ int8_t threequarter_fs;
uint64_t downlink_frequency[MAX_NUM_CCs][4]; uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
int opp_enabled; int opp_enabled;
static double snr_dB=20;
THREAD_STRUCT thread_struct; THREAD_STRUCT thread_struct;
uint32_t target_ul_mcs = 9; uint32_t target_ul_mcs = 9;
uint32_t target_dl_mcs = 9; uint32_t target_dl_mcs = 9;
......
...@@ -551,9 +551,6 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { ...@@ -551,9 +551,6 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
int max_eNB_id, max_sync_pos; int max_eNB_id, max_sync_pos;
/// ///
int N_TA_offset; ///timing offset used in TDD int N_TA_offset; ///timing offset used in TDD
/// \brief sinr for all subcarriers of the current link (used only for abstraction).
/// first index: ? [0..N_RB_DL*12[
double *sinr_dB;
/// N0 (used for abstraction) /// N0 (used for abstraction)
double N0; double N0;
/// ///
...@@ -888,9 +885,6 @@ typedef struct { ...@@ -888,9 +885,6 @@ typedef struct {
int mac_enabled; int mac_enabled;
/// Flag to initialize averaging of PHY measurements /// Flag to initialize averaging of PHY measurements
int init_averaging; int init_averaging;
/// \brief sinr for all subcarriers of the current link (used only for abstraction).
/// - first index: ? [0..12*N_RB_DL[
double *sinr_dB;
/// \brief sinr for all subcarriers of first symbol for the CQI Calculation. /// \brief sinr for all subcarriers of first symbol for the CQI Calculation.
/// - first index: ? [0..12*N_RB_DL[ /// - first index: ? [0..12*N_RB_DL[
double *sinr_CQI_dB; double *sinr_CQI_dB;
......
...@@ -739,10 +739,6 @@ typedef struct { ...@@ -739,10 +739,6 @@ typedef struct {
/// Flag to initialize averaging of PHY measurements /// Flag to initialize averaging of PHY measurements
int init_averaging; int init_averaging;
/// \brief sinr for all subcarriers of the current link (used only for abstraction).
/// - first index: ? [0..12*N_RB_DL[
double *sinr_dB;
/// \brief sinr for all subcarriers of first symbol for the CQI Calculation. /// \brief sinr for all subcarriers of first symbol for the CQI Calculation.
/// - first index: ? [0..12*N_RB_DL[ /// - first index: ? [0..12*N_RB_DL[
double *sinr_CQI_dB; double *sinr_CQI_dB;
......
...@@ -616,10 +616,6 @@ typedef struct PHY_VARS_eNB_s { ...@@ -616,10 +616,6 @@ typedef struct PHY_VARS_eNB_s {
uint32_t max_peak_val; uint32_t max_peak_val;
int max_eNB_id, max_sync_pos; int max_eNB_id, max_sync_pos;
/// \brief sinr for all subcarriers of the current link (used only for abstraction).
/// first index: ? [0..N_RB_DL*12[
double *sinr_dB;
/// N0 (used for abstraction) /// N0 (used for abstraction)
double N0; double N0;
......
...@@ -512,10 +512,6 @@ typedef struct PHY_VARS_NR_UE_s { ...@@ -512,10 +512,6 @@ typedef struct PHY_VARS_NR_UE_s {
/// Flag to initialize averaging of PHY measurements /// Flag to initialize averaging of PHY measurements
int init_averaging; int init_averaging;
/// \brief sinr for all subcarriers of the current link (used only for abstraction).
/// - first index: ? [0..12*N_RB_DL[
double *sinr_dB;
/// sinr_effective used for CQI calulcation /// sinr_effective used for CQI calulcation
double sinr_eff; double sinr_eff;
......
...@@ -72,8 +72,6 @@ static telnetshell_cmddef_t channelmod_cmdarray[] = { ...@@ -72,8 +72,6 @@ static telnetshell_cmddef_t channelmod_cmdarray[] = {
static telnetshell_vardef_t channelmod_vardef[] = {{"", 0, 0, NULL}}; static telnetshell_vardef_t channelmod_vardef[] = {{"", 0, 0, NULL}};
static double snr_dB=25;
static double sinr_dB=0;
static unsigned int max_chan; static unsigned int max_chan;
static channel_desc_t **defined_channels; static channel_desc_t **defined_channels;
static char *modellist_name; static char *modellist_name;
...@@ -2261,14 +2259,6 @@ int modelid_fromstrtype(char *modeltype) { ...@@ -2261,14 +2259,6 @@ int modelid_fromstrtype(char *modeltype) {
return modelid; return modelid;
} }
double channelmod_get_snr_dB(void) {
return snr_dB;
}
double channelmod_get_sinr_dB(void) {
return sinr_dB;
}
void init_channelmod(void) { void init_channelmod(void) {
paramdef_t channelmod_params[] = CHANNELMOD_PARAMS_DESC; paramdef_t channelmod_params[] = CHANNELMOD_PARAMS_DESC;
int numparams = sizeofArray(channelmod_params); int numparams = sizeofArray(channelmod_params);
......
...@@ -264,8 +264,6 @@ typedef enum { ...@@ -264,8 +264,6 @@ typedef enum {
#define CHANNELMOD_HELP_MODELLIST "<list name> channel list name in config file describing the model type and its parameters\n" #define CHANNELMOD_HELP_MODELLIST "<list name> channel list name in config file describing the model type and its parameters\n"
// clang-format off // clang-format off
#define CHANNELMOD_PARAMS_DESC { \ #define CHANNELMOD_PARAMS_DESC { \
{"s" , CONFIG_HLP_SNR, PARAMFLAG_CMDLINE_NOPREFIXENABLED, .dblptr=&snr_dB, .defdblval=25, TYPE_DOUBLE, 0}, \
{"sinr_dB", NULL, 0, .dblptr=&sinr_dB, .defdblval=0 , TYPE_DOUBLE, 0}, \
{"max_chan", "Max number of runtime models", 0, .uptr=&max_chan, .defintval=10, TYPE_UINT, 0}, \ {"max_chan", "Max number of runtime models", 0, .uptr=&max_chan, .defintval=10, TYPE_UINT, 0}, \
{CHANNELMOD_MODELLIST_PARANAME, CHANNELMOD_HELP_MODELLIST, 0, .strptr=&modellist_name, .defstrval="DefaultChannelList", TYPE_STRING, 0}, \ {CHANNELMOD_MODELLIST_PARANAME, CHANNELMOD_HELP_MODELLIST, 0, .strptr=&modellist_name, .defstrval="DefaultChannelList", TYPE_STRING, 0}, \
} }
...@@ -302,18 +300,11 @@ typedef struct { ...@@ -302,18 +300,11 @@ typedef struct {
double r_re_UL[NUMBER_OF_eNB_MAX][2][30720]; double r_re_UL[NUMBER_OF_eNB_MAX][2][30720];
double r_im_UL[NUMBER_OF_eNB_MAX][2][30720]; double r_im_UL[NUMBER_OF_eNB_MAX][2][30720];
int RU_output_mask[NUMBER_OF_UE_MAX]; int RU_output_mask[NUMBER_OF_UE_MAX];
int UE_output_mask[NUMBER_OF_RU_MAX];
pthread_mutex_t RU_output_mutex[NUMBER_OF_UE_MAX]; pthread_mutex_t RU_output_mutex[NUMBER_OF_UE_MAX];
pthread_mutex_t UE_output_mutex[NUMBER_OF_RU_MAX]; pthread_mutex_t UE_output_mutex[NUMBER_OF_RU_MAX];
pthread_mutex_t subframe_mutex;
int subframe_ru_mask;
int subframe_UE_mask;
openair0_timestamp current_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs]; openair0_timestamp current_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
openair0_timestamp current_UE_rx_timestamp[MAX_MOBILES_PER_ENB][MAX_NUM_CCs]; openair0_timestamp current_UE_rx_timestamp[MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
openair0_timestamp last_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
openair0_timestamp last_UE_rx_timestamp[MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
double ru_amp[NUMBER_OF_RU_MAX]; double ru_amp[NUMBER_OF_RU_MAX];
pthread_t rfsim_thread;
} sim_t; } sim_t;
......
...@@ -206,17 +206,6 @@ static int allocCirBuf(rfsimulator_state_t *bridge, int sock) ...@@ -206,17 +206,6 @@ static int allocCirBuf(rfsimulator_state_t *bridge, int sock)
if ( bridge->channelmod > 0) { if ( bridge->channelmod > 0) {
// create channel simulation model for this mode reception // create channel simulation model for this mode reception
// snr_dB is pure global, coming from configuration paramter "-s"
// Fixme: referenceSignalPower should come from the right place
// but the datamodel is inconsistant
// legacy: RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower
// (must not come from ru[]->frame_parms as it doesn't belong to ru !!!)
// Legacy sets it as:
// ptr->channel_model->path_loss_dB = -132.24 + snr_dB - RC.ru[0]->frame_parms->pdsch_config_common.referenceSignalPower;
// we use directly the paramter passed on the command line ("-s")
// the value channel_model->path_loss_dB seems only a storage place (new_channel_desc_scm() only copy the passed value)
// Legacy changes directlty the variable channel_model->path_loss_dB place to place
// while calling new_channel_desc_scm() with path losses = 0
static bool init_done=false; static bool init_done=false;
if (!init_done) { if (!init_done) {
......
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