PRACH TA base default to 0 and apply clang-format

master
Xavier Arteaga 5 years ago
parent e8f9bfc6ba
commit 65711d06dc

@ -38,9 +38,9 @@
#include "srslte/common/security.h"
#include "srslte/common/stack_procedure.h"
#include "srslte/interfaces/rrc_interface_types.h"
#include "srslte/upper/pdcp_config.h"
#include "srslte/phy/channel/channel.h"
#include "srslte/phy/rf/rf.h"
#include "srslte/upper/pdcp_config.h"
#include "srslte/upper/pdcp_entity_base.h"
namespace srsue {
@ -220,8 +220,8 @@ public:
virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking) = 0;
virtual void add_bearer(uint32_t lcid, srslte::pdcp_config_t cnfg) = 0;
virtual void change_lcid(uint32_t old_lcid, uint32_t new_lcid) = 0;
virtual void config_security(uint32_t lcid, srslte::as_security_config_t sec_cfg) = 0;
virtual void config_security_all(srslte::as_security_config_t sec_cfg) = 0;
virtual void config_security(uint32_t lcid, srslte::as_security_config_t sec_cfg) = 0;
virtual void config_security_all(srslte::as_security_config_t sec_cfg) = 0;
virtual void enable_integrity(uint32_t lcid, srslte::srslte_direction_t direction) = 0;
virtual void enable_encryption(uint32_t lcid,
srslte::srslte_direction_t direction = srslte::srslte_direction_t::DIRECTION_TXRX) = 0;
@ -463,40 +463,40 @@ typedef struct {
int worker_cpu_mask = -1;
int sync_cpu_affinity = -1;
uint32_t nof_carriers = 1;
uint32_t nof_rx_ant = 1;
std::string equalizer_mode = "mmse";
int cqi_max = 15;
int cqi_fixed = -1;
float snr_ema_coeff = 0.1f;
std::string snr_estim_alg = "refs";
bool agc_enable = true;
bool correct_sync_error = false;
bool cfo_is_doppler = false;
bool cfo_integer_enabled = false;
float cfo_correct_tol_hz = 1.0f;
float cfo_pss_ema = DEFAULT_CFO_EMA_TRACK;
float cfo_loop_bw_pss = DEFAULT_CFO_BW_PSS;
float cfo_loop_bw_ref = DEFAULT_CFO_BW_REF;
float cfo_loop_ref_min = DEFAULT_CFO_REF_MIN;
float cfo_loop_pss_tol = DEFAULT_CFO_PSS_MIN;
float sfo_ema = DEFAULT_SFO_EMA_COEFF;
uint32_t sfo_correct_period = DEFAULT_SAMPLE_OFFSET_CORRECT_PERIOD;
uint32_t cfo_loop_pss_conv = DEFAULT_PSS_STABLE_TIMEOUT;
uint32_t cfo_ref_mask = 1023;
bool interpolate_subframe_enabled = false;
bool estimator_fil_auto = false;
float estimator_fil_stddev = 1.0f;
uint32_t estimator_fil_order = 4;
float snr_to_cqi_offset = 0.0f;
std::string sss_algorithm = "full";
float rx_gain_offset = 62;
bool pdsch_csi_enabled = true;
bool pdsch_8bit_decoder = false;
uint32_t intra_freq_meas_len_ms = 20;
uint32_t intra_freq_meas_period_ms = 200;
bool pregenerate_signals = false;
float force_ul_amplitude = 0.0f;
uint32_t nof_carriers = 1;
uint32_t nof_rx_ant = 1;
std::string equalizer_mode = "mmse";
int cqi_max = 15;
int cqi_fixed = -1;
float snr_ema_coeff = 0.1f;
std::string snr_estim_alg = "refs";
bool agc_enable = true;
bool correct_sync_error = false;
bool cfo_is_doppler = false;
bool cfo_integer_enabled = false;
float cfo_correct_tol_hz = 1.0f;
float cfo_pss_ema = DEFAULT_CFO_EMA_TRACK;
float cfo_loop_bw_pss = DEFAULT_CFO_BW_PSS;
float cfo_loop_bw_ref = DEFAULT_CFO_BW_REF;
float cfo_loop_ref_min = DEFAULT_CFO_REF_MIN;
float cfo_loop_pss_tol = DEFAULT_CFO_PSS_MIN;
float sfo_ema = DEFAULT_SFO_EMA_COEFF;
uint32_t sfo_correct_period = DEFAULT_SAMPLE_OFFSET_CORRECT_PERIOD;
uint32_t cfo_loop_pss_conv = DEFAULT_PSS_STABLE_TIMEOUT;
uint32_t cfo_ref_mask = 1023;
bool interpolate_subframe_enabled = false;
bool estimator_fil_auto = false;
float estimator_fil_stddev = 1.0f;
uint32_t estimator_fil_order = 4;
float snr_to_cqi_offset = 0.0f;
std::string sss_algorithm = "full";
float rx_gain_offset = 62;
bool pdsch_csi_enabled = true;
bool pdsch_8bit_decoder = false;
uint32_t intra_freq_meas_len_ms = 20;
uint32_t intra_freq_meas_period_ms = 200;
bool pregenerate_signals = false;
float force_ul_amplitude = 0.0f;
float in_sync_rsrp_dbm_th = -130.0f;
float in_sync_snr_db_th = 1.0f;
@ -544,8 +544,9 @@ public:
/* Configure PRACH using parameters written by RRC */
virtual void configure_prach_params() = 0;
virtual void prach_send(uint32_t preamble_idx, int allowed_subframe, float target_power_dbm, float ta_base_sec) = 0;
virtual prach_info_t prach_get_info() = 0;
virtual void
prach_send(uint32_t preamble_idx, int allowed_subframe, float target_power_dbm, float ta_base_sec = 0.0f) = 0;
virtual prach_info_t prach_get_info() = 0;
/* Indicates the transmission of a SR signal in the next opportunity */
virtual void sr_send() = 0;

@ -274,7 +274,6 @@ void ra_proc::initialization()
// Instruct phy to configure PRACH
state = WAITING_PHY_CONFIG;
stack->start_prach_configuration();
}
/* Resource selection as defined in 5.1.2 */
@ -343,7 +342,7 @@ void ra_proc::preamble_transmission()
received_target_power_dbm = rach_cfg.iniReceivedTargetPower + delta_preamble_db +
(preambleTransmissionCounter - 1) * rach_cfg.powerRampingStep;
phy_h->prach_send(sel_preamble, sel_maskIndex - 1, received_target_power_dbm, 0.0f);
phy_h->prach_send(sel_preamble, sel_maskIndex - 1, received_target_power_dbm);
rntis->rar_rnti = 0;
ra_tti = 0;
rar_received = false;
@ -623,11 +622,11 @@ void ra_proc::update_rar_window(int& rar_window_start, int& rar_window_length)
{
if (state != RESPONSE_RECEPTION) {
// reset RAR window params to default values to disable RAR search
rar_window_start = -1;
rar_window_start = -1;
rar_window_length = -1;
} else {
rar_window_length = rach_cfg.responseWindowSize;
rar_window_start = rar_window_st;
rar_window_start = rar_window_st;
}
rDebug("rar_window_start=%d, rar_window_length=%d\n", rar_window_start, rar_window_length);
}

@ -501,7 +501,7 @@ int main(int argc, char** argv)
// 3. Transmit PRACH
phy_test->get_phy_interface_mac()->configure_prach_params();
phy_test->get_phy_interface_mac()->prach_send(0, -1, 0.0f, 0.0f);
phy_test->get_phy_interface_mac()->prach_send(0, -1, 0.0f);
TESTASSERT(phy_test->get_radio()->wait_tx(default_timeout, false));
// 4. Configure RNTI with PUCCH and check transmission

Loading…
Cancel
Save