21 #ifndef GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H 22 #define GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H 51 const std::string &role,
unsigned int in_stream,
56 void start()
override;
58 inline size_t item_size()
override 63 void connect(gr::top_block_sptr top_block)
override;
64 void disconnect(gr::top_block_sptr top_block)
override;
65 gr::basic_block_sptr get_left_block()
override;
66 gr::basic_block_sptr get_right_block()
override;
69 const std::string switch_device_name = std::string(
"AXIS_Switch_v1_0_0");
70 const std::string dyn_bit_sel_device_name = std::string(
"dynamic_bits_selector");
71 const std::string buffer_monitor_device_name = std::string(
"buffer_monitor");
72 const std::string default_dump_filename = std::string(
"FPGA_buffer_monitor_dump.dat");
73 const std::string default_rf_port_select = std::string(
"A_BALANCED");
74 const std::string default_gain_mode = std::string(
"slow_attack");
75 const std::string empty_string;
76 const double default_tx_attenuation_db = -10.0;
77 const double default_manual_gain_rx1 = 64.0;
78 const double default_manual_gain_rx2 = 64.0;
79 const uint64_t default_bandwidth = 12500000;
82 const uint32_t Gain_control_period_ms = 500;
84 const uint32_t buffer_monitor_period_ms = 1000;
86 const uint32_t buffer_monitoring_initial_delay_ms = 2000;
88 const int sample_block_size = 16384;
90 void run_DMA_process(
const std::string &filename0,
91 const std::string &filename1,
92 uint64_t &samples_to_skip,
96 uint32_t &dma_buff_offset_pos,
99 void run_dynamic_bit_selection_process();
100 void run_buffer_monitor_process();
102 std::thread thread_file_to_dma;
103 std::thread thread_dynamic_bit_selection;
104 std::thread thread_buffer_monitor;
106 std::shared_ptr<Fpga_Switch> switch_fpga;
107 std::shared_ptr<Fpga_dynamic_bit_selection> dynamic_bit_selection_fpga;
108 std::shared_ptr<Fpga_buffer_monitor> buffer_monitor_fpga;
109 std::shared_ptr<Fpga_DMA> dma_fpga;
111 std::mutex dma_mutex;
112 std::mutex dynamic_bit_selection_mutex;
113 std::mutex buffer_monitor_mutex;
117 std::string gain_mode_rx1_;
118 std::string gain_mode_rx2_;
119 std::string rf_port_select_;
120 std::string filter_file_;
121 std::string filter_source_;
122 std::string filter_filename_;
123 std::string filename0_;
124 std::string filename1_;
128 double scale_dds_dbfs_;
129 double phase_dds_deg_;
130 double tx_attenuation_db_;
134 uint64_t sample_rate_;
136 uint64_t samples_to_skip_;
138 uint64_t freq_dds_tx_hz_;
139 uint64_t freq_rf_tx_hz_;
140 uint64_t tx_bandwidth_;
144 uint32_t num_input_files_;
145 uint32_t dma_buff_offset_pos_;
147 uint32_t out_stream_;
148 int32_t switch_position_;
160 bool enable_dynamic_bit_selection_;
161 bool enable_ovf_check_buffer_monitor_active_;
170 #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.
FPGA DMA control. This code is based in the Xilinx DMA proxy test application: https://github.com/Xilinx-Wiki-Projects/software-prototypes/tree/master/linux-user-space-dma/Software.
Switch that connects the HW accelerator queues to the analog front end or the DMA.
Dynamic bit selection in the received signal.