From 427d2d397738d94baa99668fbea9e56730d69dae Mon Sep 17 00:00:00 2001 From: cig <guido.casati@iis.fraunhofer.de> Date: Sun, 6 Dec 2020 17:01:41 +0100 Subject: [PATCH] Cleanup nr-uesoftmodem - moved configuration of UE parameters to set_options function - removed redundant loop over CCs --- executables/nr-uesoftmodem.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 08834ed7402..1d3288862dd 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -151,6 +151,7 @@ double cpuf; runmode_t mode = normal_txrx; int UE_scan = 0; int chain_offset = 0; +int card_offset = 0; uint64_t num_missed_slots = 0; // counter for the number of missed slots int transmission_mode = 1; int numerology = 0; @@ -306,6 +307,9 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){ UE->rx_total_gain_dB = (int)rx_gain[CC_id][0] + rx_gain_off; UE->tx_total_gain_dB = (int)tx_gain[CC_id][0]; UE->tx_power_max_dBm = tx_max_power[CC_id]; + UE->rf_map.card = card_offset; + UE->rf_map.chain = CC_id + chain_offset; + UE->timing_advance = timing_advance; LOG_I(PHY,"Set UE mode %d, UE_fo_compensation %d, UE_scan %d, UE_scan_carrier %d, UE_no_timing_correction %d \n", mode, UE_fo_compensation, UE_scan, UE_scan_carrier, UE_no_timing_correction); @@ -575,12 +579,6 @@ int main( int argc, char **argv ) { load_softscope("nr",PHY_vars_UE_g[0][0]); } - for(int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { - PHY_vars_UE_g[0][CC_id]->rf_map.card=0; - PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset; - PHY_vars_UE_g[0][CC_id]->timing_advance = timing_advance; - } - init_NR_UE_threads(1); printf("UE threads created by %ld\n", gettid()); -- GitLab