Expose in-sync and out-of-sync constants to ue.conf

master
Ismael Gomez 5 years ago committed by Andre Puschmann
parent cc7dfefa1a
commit 17f9ff326b

@ -522,6 +522,11 @@ typedef struct {
bool pregenerate_signals = false; bool pregenerate_signals = false;
float force_ul_amplitude = 0.0f; float force_ul_amplitude = 0.0f;
float in_sync_rsrp_dbm_th = -130.0f;
float in_sync_snr_db_th = 1.0f;
uint32_t nof_in_sync_events = 10;
uint32_t nof_out_of_sync_events = 20;
srslte::channel::args_t dl_channel_args; srslte::channel::args_t dl_channel_args;
srslte::channel::args_t ul_channel_args; srslte::channel::args_t ul_channel_args;
} phy_args_t; } phy_args_t;

@ -202,9 +202,6 @@ private:
uint32_t out_of_sync_cnt = 0; uint32_t out_of_sync_cnt = 0;
uint32_t in_sync_cnt = 0; uint32_t in_sync_cnt = 0;
const static uint32_t NOF_OUT_OF_SYNC_SF = 20;
const static uint32_t NOF_IN_SYNC_SF = 10;
// State machine for SYNC thread // State machine for SYNC thread
class sync_state class sync_state
{ {

@ -337,6 +337,22 @@ static int parse_args(all_args_t* args, int argc, char* argv[])
bpo::value<float>(&args->phy.force_ul_amplitude)->default_value(0.0), bpo::value<float>(&args->phy.force_ul_amplitude)->default_value(0.0),
"Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling)") "Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling)")
("phy.in_sync_rsrp_dbm_th",
bpo::value<float>(&args->phy.in_sync_rsrp_dbm_th)->default_value(-130.0f),
"RSRP threshold (in dBm) above which the UE considers to be in-sync")
("phy.in_sync_snr_db_th",
bpo::value<float>(&args->phy.in_sync_snr_db_th)->default_value(1.0f),
"SNR threshold (in dB) above which the UE considers to be in-sync")
("phy.nof_in_sync_events",
bpo::value<uint32_t>(&args->phy.nof_in_sync_events)->default_value(10),
"Number of PHY in-sync events before sending an in-sync event to RRC")
("phy.nof_out_of_sync_events",
bpo::value<uint32_t>(&args->phy.nof_out_of_sync_events)->default_value(20),
"Number of PHY out-sync events before sending an out-sync event to RRC")
/* general options */ /* general options */
("general.metrics_period_secs", ("general.metrics_period_secs",
bpo::value<float>(&args->general.metrics_period_secs)->default_value(1.0), bpo::value<float>(&args->general.metrics_period_secs)->default_value(1.0),

@ -333,7 +333,7 @@ void sf_worker::update_measurements()
} }
// Check in-sync / out-sync conditions // Check in-sync / out-sync conditions
if (phy->avg_rsrp_dbm[0] > -130.0 && phy->avg_snr_db_cqi[0] > -6.0) { if (phy->avg_rsrp_dbm[0] > phy->args->in_sync_rsrp_dbm_th && phy->avg_snr_db_cqi[0] > phy->args->in_sync_snr_db_th) {
log_h->debug("SNR=%.1f dB, RSRP=%.1f dBm sync=in-sync from channel estimator\n", log_h->debug("SNR=%.1f dB, RSRP=%.1f dBm sync=in-sync from channel estimator\n",
phy->avg_snr_db_cqi[0], phy->avg_snr_db_cqi[0],
phy->avg_rsrp_dbm[0]); phy->avg_rsrp_dbm[0]);

@ -681,7 +681,7 @@ void sync::in_sync()
{ {
in_sync_cnt++; in_sync_cnt++;
// Send RRC in-sync signal after 100 ms consecutive subframes // Send RRC in-sync signal after 100 ms consecutive subframes
if (in_sync_cnt == NOF_IN_SYNC_SF) { if (in_sync_cnt == worker_com->args->nof_in_sync_events) {
stack->in_sync(); stack->in_sync();
in_sync_cnt = 0; in_sync_cnt = 0;
out_of_sync_cnt = 0; out_of_sync_cnt = 0;
@ -692,9 +692,9 @@ void sync::in_sync()
void sync::out_of_sync() void sync::out_of_sync()
{ {
// Send RRC out-of-sync signal after NOF_OUT_OF_SYNC_SF consecutive subframes // Send RRC out-of-sync signal after NOF_OUT_OF_SYNC_SF consecutive subframes
Info("Out-of-sync %d/%d\n", out_of_sync_cnt, NOF_OUT_OF_SYNC_SF); Info("Out-of-sync %d/%d\n", out_of_sync_cnt, worker_com->args->nof_out_of_sync_events);
out_of_sync_cnt++; out_of_sync_cnt++;
if (out_of_sync_cnt == NOF_OUT_OF_SYNC_SF) { if (out_of_sync_cnt == worker_com->args->nof_out_of_sync_events) {
Info("Sending to RRC\n"); Info("Sending to RRC\n");
stack->out_of_sync(); stack->out_of_sync();
out_of_sync_cnt = 0; out_of_sync_cnt = 0;

@ -306,6 +306,11 @@ enable = false
# pdsch_8bit_decoder: Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental) # pdsch_8bit_decoder: Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental)
# force_ul_amplitude: Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling) # force_ul_amplitude: Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling)
# #
# in_sync_rsrp_dbm_th: RSRP threshold (in dBm) above which the UE considers to be in-sync
# in_sync_snr_db_th: SNR threshold (in dB) above which the UE considers to be in-sync
# nof_in_sync_events: Number of PHY in-sync events before sending an in-sync event to RRC
# nof_out_of_sync_events: Number of PHY out-sync events before sending an out-sync event to RRC
#
##################################################################### #####################################################################
[phy] [phy]
#rx_gain_offset = 62 #rx_gain_offset = 62
@ -331,6 +336,11 @@ enable = false
#pdsch_8bit_decoder = false #pdsch_8bit_decoder = false
#force_ul_amplitude = 0 #force_ul_amplitude = 0
#in_sync_rsrp_dbm_th = -130.0
#in_sync_snr_db_th = 1.0
#nof_in_sync_events = 10
#nof_out_of_sync_events = 20
##################################################################### #####################################################################
# General configuration options # General configuration options
# #

Loading…
Cancel
Save