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