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