mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	saving temporary changes before merging with usptream next branch
added functions that allow the tests to read the scaling factor used by the FFT and the IFFT during acquisition
This commit is contained in:
		| @@ -491,6 +491,12 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::reset_acquisition(void) | ||||
| 	acquisition_fpga_->reset_acquisition(); | ||||
| } | ||||
|  | ||||
| // this function is only used for the unit tests | ||||
| void GalileoE1PcpsAmbiguousAcquisitionFpga::read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor) | ||||
| { | ||||
| 	acquisition_fpga_->read_fpga_total_scale_factor(total_scale_factor, fw_scale_factor); | ||||
| } | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisitionFpga::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|   //  printf("top acq connect\n"); | ||||
|   | ||||
| @@ -151,6 +151,11 @@ public: | ||||
|       */ | ||||
|      void reset_acquisition(void); | ||||
|  | ||||
|      /*! | ||||
|       * \brief This function is only used in the unit tests | ||||
|       */ | ||||
|      void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); | ||||
|  | ||||
| private: | ||||
|     ConfigurationInterface* configuration_; | ||||
|     //pcps_acquisition_sptr acquisition_; | ||||
|   | ||||
| @@ -375,6 +375,12 @@ void GalileoE5aPcpsAcquisitionFpga::reset_acquisition(void) | ||||
| 	acquisition_fpga_->reset_acquisition(); | ||||
| } | ||||
|  | ||||
| // this function is only used for the unit tests | ||||
| void GalileoE5aPcpsAcquisitionFpga::read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor) | ||||
| { | ||||
| 	acquisition_fpga_->read_fpga_total_scale_factor(total_scale_factor, fw_scale_factor); | ||||
| } | ||||
|  | ||||
| void GalileoE5aPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
| //    if (item_type_.compare("gr_complex") == 0) | ||||
|   | ||||
| @@ -139,6 +139,11 @@ public: | ||||
|      */ | ||||
|     void reset_acquisition(void); | ||||
|  | ||||
|     /*! | ||||
|      * \brief This function is only used in the unit tests | ||||
|      */ | ||||
|     void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); | ||||
|  | ||||
| private: | ||||
|     //float calculate_threshold(float pfa); | ||||
|  | ||||
|   | ||||
| @@ -278,6 +278,13 @@ void GpsL1CaPcpsAcquisitionFpga::reset_acquisition(void) | ||||
| 	acquisition_fpga_->reset_acquisition(); | ||||
| } | ||||
|  | ||||
| // this function is only used for the unit tests | ||||
| void GpsL1CaPcpsAcquisitionFpga::read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor) | ||||
| { | ||||
| 	acquisition_fpga_->read_fpga_total_scale_factor(total_scale_factor, fw_scale_factor); | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     // nothing to connect | ||||
|   | ||||
| @@ -149,6 +149,11 @@ public: | ||||
|      */ | ||||
|     void reset_acquisition(void); | ||||
|  | ||||
|     /*! | ||||
|      * \brief This function is only used in the unit tests | ||||
|      */ | ||||
|     void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); | ||||
|  | ||||
| private: | ||||
|     ConfigurationInterface* configuration_; | ||||
|     pcps_acquisition_fpga_sptr acquisition_fpga_; | ||||
|   | ||||
| @@ -342,6 +342,11 @@ void GpsL5iPcpsAcquisitionFpga::reset_acquisition(void) | ||||
| 	acquisition_fpga_->reset_acquisition(); | ||||
| } | ||||
|  | ||||
| // this function is only used for the unit tests | ||||
| void GpsL5iPcpsAcquisitionFpga::read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor) | ||||
| { | ||||
| 	acquisition_fpga_->read_fpga_total_scale_factor(total_scale_factor, fw_scale_factor); | ||||
| } | ||||
|  | ||||
| void GpsL5iPcpsAcquisitionFpga::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|   | ||||
| @@ -149,6 +149,11 @@ public: | ||||
|      */ | ||||
|     void reset_acquisition(void); | ||||
|  | ||||
|     /*! | ||||
|      * \brief This function is only used in the unit tests | ||||
|      */ | ||||
|     void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); | ||||
|  | ||||
| private: | ||||
|     ConfigurationInterface* configuration_; | ||||
|     //pcps_acquisition_sptr acquisition_; | ||||
|   | ||||
| @@ -406,4 +406,7 @@ void pcps_acquisition_fpga::reset_acquisition(void) | ||||
| 	acquisition_fpga->reset_acquisition(); | ||||
| } | ||||
|  | ||||
|  | ||||
| void pcps_acquisition_fpga::read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor) | ||||
| { | ||||
| 	acquisition_fpga->read_fpga_total_scale_factor(total_scale_factor, fw_scale_factor); | ||||
| } | ||||
|   | ||||
| @@ -246,6 +246,11 @@ public: | ||||
|      * \brief This funciton is only used for the unit tests | ||||
|      */ | ||||
|     void reset_acquisition(void); | ||||
|  | ||||
|     /*! | ||||
|      * \brief This funciton is only used for the unit tests | ||||
|      */ | ||||
|     void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); | ||||
| }; | ||||
|  | ||||
| #endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/ | ||||
|   | ||||
| @@ -509,3 +509,12 @@ void fpga_acquisition::set_single_doppler_flag(unsigned int single_doppler_flag) | ||||
| 	d_single_doppler_flag = single_doppler_flag; | ||||
| } | ||||
|  | ||||
| // this function is only used for the unit tests | ||||
| void fpga_acquisition::read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor) | ||||
| { | ||||
| 	uint32_t readval = 0; | ||||
| 	readval = d_map_base[7]; | ||||
| 	*total_scale_factor = readval; | ||||
| 	readval = d_map_base[8]; | ||||
| 	*fw_scale_factor = readval; | ||||
| } | ||||
|   | ||||
| @@ -98,6 +98,11 @@ public: | ||||
|      */ | ||||
|     void reset_acquisition(void); | ||||
|  | ||||
|     /*! | ||||
|      * \brief this function is only used in the unit test | ||||
|      */ | ||||
|     void read_fpga_total_scale_factor(uint32_t *total_scale_factor, uint32_t *fw_scale_factor); | ||||
|  | ||||
| private: | ||||
|     int64_t d_fs_in; | ||||
|     // data related to the hardware module and the driver | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Marc Majoral
					Marc Majoral