2018-08-01 13:55:40 +00:00
/*!
2019-03-01 09:11:36 +00:00
* \ file gps_l5_dll_pll_tracking_fpga . h
2018-08-01 13:55:40 +00:00
* \ brief Interface of an adapter of a DLL + PLL tracking loop block
2019-03-06 20:54:39 +00:00
* for GPS L5 to a TrackingInterface for the FPGA
2019-02-26 18:30:08 +00:00
* \ author Marc Majoral , 2019. mmajoral ( at ) cttc . cat
2019-03-01 09:11:36 +00:00
* Javier Arribas , 2019. jarribas ( at ) cttc . es
2018-08-01 13:55:40 +00:00
*
* Code DLL + carrier PLL according to the algorithms described in :
* K . Borre , D . M . Akos , N . Bertelsen , P . Rinder , and S . H . Jensen ,
* A Software - Defined GPS and Galileo Receiver . A Single - Frequency
* Approach , Birkhauser , 2007
*
2020-07-28 14:57:15 +00:00
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2018-08-01 13:55:40 +00:00
*
2020-12-30 12:35:06 +00:00
* GNSS - SDR is a Global Navigation Satellite System software - defined receiver .
2018-08-01 13:55:40 +00:00
* This file is part of GNSS - SDR .
*
2020-12-30 12:35:06 +00:00
* Copyright ( C ) 2010 - 2020 ( see AUTHORS file for a list of contributors )
2020-02-08 00:20:02 +00:00
* SPDX - License - Identifier : GPL - 3.0 - or - later
2018-08-01 13:55:40 +00:00
*
2020-07-28 14:57:15 +00:00
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2018-08-01 13:55:40 +00:00
*/
2020-02-08 09:10:46 +00:00
# ifndef GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_FPGA_H
# define GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_FPGA_H
2018-08-01 13:55:40 +00:00
# include "dll_pll_veml_tracking_fpga.h"
2018-12-09 21:00:09 +00:00
# include "tracking_interface.h"
2018-08-01 13:55:40 +00:00
# include <string>
2020-11-01 12:37:19 +00:00
/** \addtogroup Tracking
* \ { */
/** \addtogroup Tracking_adapters
* \ { */
2018-08-01 13:55:40 +00:00
class ConfigurationInterface ;
/*!
* \ brief This class implements a code DLL + carrier PLL tracking loop
*/
class GpsL5DllPllTrackingFpga : public TrackingInterface
{
public :
2019-07-23 17:05:43 +00:00
/*!
* \ brief Constructor
*/
2020-06-29 07:07:41 +00:00
GpsL5DllPllTrackingFpga (
const ConfigurationInterface * configuration ,
2018-12-10 21:59:10 +00:00
const std : : string & role ,
2018-08-01 13:55:40 +00:00
unsigned int in_streams ,
unsigned int out_streams ) ;
2019-07-23 17:05:43 +00:00
/*!
* \ brief Destructor
*/
2018-08-01 13:55:40 +00:00
virtual ~ GpsL5DllPllTrackingFpga ( ) ;
2019-07-23 17:05:43 +00:00
/*!
* \ brief Role
*/
2018-08-01 13:55:40 +00:00
inline std : : string role ( ) override
{
return role_ ;
}
2019-07-23 17:05:43 +00:00
/*!
* \ brief Returns " GPS_L5_DLL_PLL_Tracking_Fpga "
*/
2018-08-01 13:55:40 +00:00
inline std : : string implementation ( ) override
{
2019-03-06 20:54:39 +00:00
return " GPS_L5_DLL_PLL_Tracking_Fpga " ;
2018-08-01 13:55:40 +00:00
}
2019-07-23 17:05:43 +00:00
/*!
* \ brief Returns size of lv_16sc_t
*/
size_t item_size ( ) override
2018-08-01 13:55:40 +00:00
{
2019-07-23 17:05:43 +00:00
return sizeof ( int16_t ) ;
2018-08-01 13:55:40 +00:00
}
2019-07-23 17:05:43 +00:00
/*!
* \ brief Connect
*/
2018-08-01 13:55:40 +00:00
void connect ( gr : : top_block_sptr top_block ) override ;
2019-07-23 17:05:43 +00:00
/*!
* \ brief Disconnect
*/
2018-08-01 13:55:40 +00:00
void disconnect ( gr : : top_block_sptr top_block ) override ;
2019-07-23 17:05:43 +00:00
/*!
* \ brief Get left block
*/
2018-08-01 13:55:40 +00:00
gr : : basic_block_sptr get_left_block ( ) override ;
2019-07-23 17:05:43 +00:00
/*!
* \ brief Get right block
*/
2018-08-01 13:55:40 +00:00
gr : : basic_block_sptr get_right_block ( ) override ;
/*!
* \ brief Set tracking channel unique ID
*/
void set_channel ( unsigned int channel ) override ;
/*!
* \ brief Set acquisition / tracking common Gnss_Synchro object pointer
* to efficiently exchange synchronization data between acquisition and tracking blocks
*/
void set_gnss_synchro ( Gnss_Synchro * p_gnss_synchro ) override ;
2019-07-23 17:05:43 +00:00
/*!
* \ brief Start the tracking process in the FPGA
*/
2018-08-01 13:55:40 +00:00
void start_tracking ( ) override ;
2019-07-23 17:05:43 +00:00
2018-10-28 10:07:53 +00:00
/*!
2019-07-23 17:05:43 +00:00
* \ brief Stop the tracking process in the FPGA
2018-10-28 10:07:53 +00:00
*/
void stop_tracking ( ) override ;
2018-08-01 13:55:40 +00:00
private :
2022-12-08 16:39:16 +00:00
const std : : string default_device_name_GPS_L5_ = " multicorrelator_resampler_3_1_AXI " ; // UIO device name
2020-11-27 09:51:06 +00:00
2019-07-23 13:20:59 +00:00
static const uint32_t NUM_PRNs = 32 ; // total number of PRNs
2019-07-19 15:23:00 +00:00
// the following flags are FPGA-specific and they are using arrange the values of the local code in the way the FPGA
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
static const int32_t LOCAL_CODE_FPGA_ENABLE_WRITE_MEMORY = 0x0C000000 ; // flag that enables WE (Write Enable) of the local code FPGA
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)
2022-12-08 16:39:16 +00:00
dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc_sptr_ ;
2018-08-01 13:55:40 +00:00
std : : string role_ ;
2022-12-08 16:39:16 +00:00
std : : string device_name_ ;
int32_t * prn_codes_ptr_ ;
int32_t * data_codes_ptr_ ;
uint32_t channel_ ;
uint32_t num_prev_assigned_ch_ ;
2019-02-27 13:37:07 +00:00
uint32_t in_streams_ ;
uint32_t out_streams_ ;
2022-12-08 16:39:16 +00:00
bool track_pilot_ ;
2018-08-01 13:55:40 +00:00
} ;
2020-11-01 12:37:19 +00:00
/** \} */
/** \} */
2020-02-08 09:10:46 +00:00
# endif // GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_FPGA_H