GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
galileo_e1_dll_pll_veml_tracking_fpga.h
Go to the documentation of this file.
1 /*!
2  * \file galileo_e1_dll_pll_veml_tracking_fpga.h
3  * \brief Adapts a DLL+PLL VEML (Very Early Minus Late) tracking loop block
4  * to a TrackingInterface for Galileo E1 signals for the FPGA
5  * \author Marc Majoral, 2019. mmajoral(at)cttc.cat
6  *
7  * Code DLL + carrier PLL according to the algorithms described in:
8  * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
9  * A Software-Defined GPS and Galileo Receiver. A Single-Frequency
10  * Approach, Birkhauser, 2007
11  *
12  * -----------------------------------------------------------------------------
13  *
14  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
15  * This file is part of GNSS-SDR.
16  *
17  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
18  * SPDX-License-Identifier: GPL-3.0-or-later
19  *
20  * -----------------------------------------------------------------------------
21  */
22 
23 #ifndef GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_FPGA_H
24 #define GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_FPGA_H
25 
27 #include "tracking_interface.h"
28 #include <string>
29 
30 /** \addtogroup Tracking
31  * \{ */
32 /** \addtogroup Tracking_adapters
33  * \{ */
34 
35 
37 
38 /*!
39  * \brief This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking
40  * loop block to a TrackingInterface for Galileo E1 signals
41  */
43 {
44 public:
45  /*!
46  * \brief Constructor
47  */
49  const ConfigurationInterface* configuration,
50  const std::string& role,
51  unsigned int in_streams,
52  unsigned int out_streams);
53 
54  /*!
55  * \brief Destructor
56  */
58 
59  /*!
60  * \brief Role
61  */
62  inline std::string role() override
63  {
64  return role_;
65  }
66 
67  /*!
68  * \brief Returns "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga"
69  */
70  inline std::string implementation() override
71  {
72  return "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga";
73  }
74 
75  /*!
76  * \brief Returns size of lv_16sc_t
77  */
78  size_t item_size() override
79  {
80  return sizeof(int16_t);
81  }
82 
83  /*!
84  * \brief Connect
85  */
86  void connect(gr::top_block_sptr top_block) override;
87 
88  /*!
89  * \brief Disconnect
90  */
91  void disconnect(gr::top_block_sptr top_block) override;
92 
93  /*!
94  * \brief Get left block
95  */
96  gr::basic_block_sptr get_left_block() override;
97 
98  /*!
99  * \brief Get right block
100  */
101  gr::basic_block_sptr get_right_block() override;
102 
103  /*!
104  * \brief Set tracking channel unique ID
105  */
106  void set_channel(unsigned int channel) override;
107 
108  /*!
109  * \brief Set acquisition/tracking common Gnss_Synchro object pointer
110  * to efficiently exchange synchronization data between acquisition and
111  * tracking blocks
112  */
113  void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
114 
115  /*!
116  * \brief Start the tracking process in the FPGA
117  */
118  void start_tracking() override;
119 
120  /*!
121  * \brief Stop the tracking process in the FPGA
122  */
123  void stop_tracking() override;
124 
125 private:
126  const std::string default_device_name_Galileo_E1 = "multicorrelator_resampler_5_1_AXI"; // UIO device name
127  const std::string default_device_name_GPS_L1 = "multicorrelator_resampler_S00_AXI"; // UIO device name
128 
129  // the following flags are FPGA-specific and they are using arrange the values of the local code in the way the FPGA
130  // expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
131  static const int32_t LOCAL_CODE_FPGA_ENABLE_WRITE_MEMORY = 0x0C000000; // flag that enables WE (Write Enable) of the local code FPGA
132  static const int32_t LOCAL_CODE_FPGA_CORRELATOR_SELECT_COUNT = 0x20000000; // flag that selects the writing of the pilot code in the FPGA (as opposed to the data code)
133 
134  dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc_sptr_;
135  std::string role_;
136  std::string device_name_;
137  int32_t* prn_codes_ptr_;
138  int32_t* data_codes_ptr_;
139  uint32_t num_prev_assigned_ch_;
140  uint32_t channel_;
141  uint32_t in_streams_;
142  uint32_t out_streams_;
143  bool track_pilot_;
144 };
145 
146 
147 /** \} */
148 /** \} */
149 #endif // GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_FPGA_H
std::string implementation() override
Returns "Galileo_E1_DLL_PLL_VEML_Tracking_Fpga".
void start_tracking() override
Start the tracking process in the FPGA.
gr::basic_block_sptr get_right_block() override
Get right block.
size_t item_size() override
Returns size of lv_16sc_t.
Implementation of a code DLL + carrier PLL tracking block using an FPGA.
virtual ~GalileoE1DllPllVemlTrackingFpga()
Destructor.
void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro) override
Set acquisition/tracking common Gnss_Synchro object pointer to efficiently exchange synchronization d...
void stop_tracking() override
Stop the tracking process in the FPGA.
This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking loop block to a TrackingInterface f...
This is the class that contains the information that is shared by the processing blocks.
Definition: gnss_synchro.h:38
This abstract class represents an interface to configuration parameters.
void disconnect(gr::top_block_sptr top_block) override
Disconnect.
gr::basic_block_sptr get_left_block() override
Get left block.
void set_channel(unsigned int channel) override
Set tracking channel unique ID.
void connect(gr::top_block_sptr top_block) override
Connect.
This abstract class represents an interface to a tracking block.
GalileoE1DllPllVemlTrackingFpga(const ConfigurationInterface *configuration, const std::string &role, unsigned int in_streams, unsigned int out_streams)
Constructor.
This class represents an interface to a tracking block.