21 #ifndef GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H 22 #define GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H 50 const std::string &role,
unsigned int in_stream,
55 void start()
override;
57 inline size_t item_size()
override 62 void connect(gr::top_block_sptr top_block)
override;
63 void disconnect(gr::top_block_sptr top_block)
override;
64 gr::basic_block_sptr get_left_block()
override;
65 gr::basic_block_sptr get_right_block()
override;
68 const std::string switch_device_name = std::string(
"AXIS_Switch_v1_0_0");
69 const std::string dyn_bit_sel_device_name = std::string(
"dynamic_bits_selector");
70 const std::string buffer_monitor_device_name = std::string(
"buffer_monitor");
71 const std::string default_dump_filename = std::string(
"FPGA_buffer_monitor_dump.dat");
72 const std::string default_rf_port_select = std::string(
"A_BALANCED");
73 const std::string default_gain_mode = std::string(
"slow_attack");
74 const double default_tx_attenuation_db = -10.0;
75 const double default_manual_gain_rx1 = 64.0;
76 const double default_manual_gain_rx2 = 64.0;
77 const uint64_t default_bandwidth = 12500000;
80 const uint32_t Gain_control_period_ms = 500;
82 const uint32_t buffer_monitor_period_ms = 1000;
84 const uint32_t buffer_monitoring_initial_delay_ms = 2000;
86 const int sample_block_size = 16384;
88 void run_DMA_process(
const std::string &filename0,
89 const std::string &filename1,
90 uint64_t &samples_to_skip,
94 uint32_t &dma_buff_offset_pos,
97 void run_dynamic_bit_selection_process();
98 void run_buffer_monitor_process();
100 std::thread thread_file_to_dma;
101 std::thread thread_dynamic_bit_selection;
102 std::thread thread_buffer_monitor;
104 std::shared_ptr<Fpga_Switch> switch_fpga;
105 std::shared_ptr<Fpga_dynamic_bit_selection> dynamic_bit_selection_fpga;
106 std::shared_ptr<Fpga_buffer_monitor> buffer_monitor_fpga;
108 std::mutex dma_mutex;
109 std::mutex dynamic_bit_selection_mutex;
110 std::mutex buffer_monitor_mutex;
115 std::string gain_mode_rx1_;
116 std::string gain_mode_rx2_;
117 std::string rf_port_select_;
118 std::string filter_file_;
119 std::string filter_source_;
120 std::string filter_filename_;
121 std::string filename0;
122 std::string filename1;
127 uint64_t sample_rate_;
129 uint64_t samples_to_skip_;
133 uint32_t num_freq_bands_;
134 uint32_t dma_buff_offset_pos_;
137 double scale_dds_dbfs_;
138 double phase_dds_deg_;
139 double tx_attenuation_db_;
140 uint64_t freq_dds_tx_hz_;
141 uint64_t freq_rf_tx_hz_;
142 uint64_t tx_bandwidth_;
145 uint32_t out_stream_;
146 int32_t switch_position_;
156 bool enable_dynamic_bit_selection_;
157 bool enable_ovf_check_buffer_monitor_active_;
166 #endif // GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H
Interface of a thread-safe std::queue.
void start() override
Start the flow of samples if needed.
Header file of the base class to signal_source GNSS blocks.
Check receiver buffer overflow and monitor the status of the receiver buffers.
This interface represents a GNSS block.
This abstract class represents an interface to configuration parameters.
Switch that connects the HW accelerator queues to the analog front end or the DMA.
Dynamic bit selection in the received signal.