1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-16 12:12:57 +00:00

Adding channel modifications for FPGA acceleration

This commit is contained in:
Javier Arribas 2019-03-22 16:03:09 +01:00
parent 52aa4290d8
commit f9b450bc80
3 changed files with 28 additions and 5 deletions

View File

@ -56,6 +56,7 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::s
channel_fsm_ = std::make_shared<ChannelFsm>(); channel_fsm_ = std::make_shared<ChannelFsm>();
flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false); flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false);
acq_->set_channel(channel_); acq_->set_channel(channel_);
acq_->set_channel_fsm(channel_fsm_); acq_->set_channel_fsm(channel_fsm_);
trk_->set_channel(channel_); trk_->set_channel(channel_);
@ -236,7 +237,15 @@ void Channel::start_acquisition()
{ {
std::lock_guard<std::mutex> lk(mx); std::lock_guard<std::mutex> lk(mx);
bool result = false; bool result = false;
if (!flag_enable_fpga)
{
result = channel_fsm_->Event_start_acquisition(); result = channel_fsm_->Event_start_acquisition();
}
else
{
result = channel_fsm_->Event_start_acquisition_fpga();
channel_fsm_->start_acquisition();
}
if (!result) if (!result)
{ {
LOG(WARNING) << "Invalid channel event"; LOG(WARNING) << "Invalid channel event";

View File

@ -1,7 +1,8 @@
/*! /*!
* \file channel_fsm.cc * \file channel_fsm.cc
* \brief Implementation of a State Machine for channel * \brief Implementation of a State Machine for channel
* \authors Antonio Ramos, 2017. antonio.ramos(at)cttc.es * \authors Javier Arribas, 2019. javiarribas@gmail.com
* Antonio Ramos, 2017. antonio.ramos(at)cttc.es
* Luis Esteve, 2011. luis(at)epsilon-formacion.com * Luis Esteve, 2011. luis(at)epsilon-formacion.com
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
@ -74,6 +75,18 @@ bool ChannelFsm::Event_stop_channel()
} }
bool ChannelFsm::Event_start_acquisition_fpga()
{
std::lock_guard<std::mutex> lk(mx);
if ((d_state == 1) || (d_state == 2))
{
return false;
}
d_state = 1;
DLOG(INFO) << "CH = " << channel_ << ". Ev start acquisition FPGA";
return true;
}
bool ChannelFsm::Event_start_acquisition() bool ChannelFsm::Event_start_acquisition()
{ {
std::lock_guard<std::mutex> lk(mx); std::lock_guard<std::mutex> lk(mx);

View File

@ -1,7 +1,8 @@
/*! /*!
* \file channel_fsm.h * \file channel_fsm.h
* \brief Interface of the State Machine for channel * \brief Interface of the State Machine for channel
* \authors Antonio Ramos, 2017. antonio.ramos(at)cttc.es * \authors Javier Arribas, 2019. javiarribas@gmail.com
* Antonio Ramos, 2017. antonio.ramos(at)cttc.es
* Luis Esteve, 2011. luis(at)epsilon-formacion.com * Luis Esteve, 2011. luis(at)epsilon-formacion.com
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
@ -55,9 +56,10 @@ public:
void set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry); void set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry);
void set_queue(gr::msg_queue::sptr queue); void set_queue(gr::msg_queue::sptr queue);
void set_channel(uint32_t channel); void set_channel(uint32_t channel);
void start_acquisition();
// FSM EVENTS // FSM EVENTS
bool Event_start_acquisition(); bool Event_start_acquisition();
bool Event_start_acquisition_fpga();
bool Event_valid_acquisition(); bool Event_valid_acquisition();
bool Event_stop_channel(); bool Event_stop_channel();
bool Event_failed_acquisition_repeat(); bool Event_failed_acquisition_repeat();
@ -65,7 +67,6 @@ public:
bool Event_failed_tracking_standby(); bool Event_failed_tracking_standby();
private: private:
void start_acquisition();
void start_tracking(); void start_tracking();
void stop_acquisition(); void stop_acquisition();
void stop_tracking(); void stop_tracking();