19 #ifndef GNSS_SDR_MAX2771_EVKIT_SIGNAL_SOURCE_FPGA_H 20 #define GNSS_SDR_MAX2771_EVKIT_SIGNAL_SOURCE_FPGA_H 49 const std::string &role,
unsigned int in_stream,
54 std::vector<uint32_t> setup_regs(
void);
56 inline size_t item_size()
override 61 void connect(gr::top_block_sptr top_block)
override;
62 void disconnect(gr::top_block_sptr top_block)
override;
63 gr::basic_block_sptr get_left_block()
override;
64 gr::basic_block_sptr get_right_block()
override;
67 const std::string default_dump_filename = std::string(
"FPGA_buffer_monitor_dump.dat");
68 const uint64_t default_bandwidth = 2500000;
69 const uint32_t default_filter_order = 5;
70 const uint64_t default_sampling_rate = 4092000;
71 const uint32_t default_PGA_gain_value = 0x3A;
73 const uint32_t max_PGA_gain_value = 0x3F;
75 const uint32_t buffer_monitor_period_ms = 1000;
77 const uint32_t buffer_monitoring_initial_delay_ms = 2000;
79 const uint32_t MAX2771_NUM_REGS = 11;
81 const uint32_t NUM_FREQ_BANDS = 1;
82 const uint32_t IDLE = 0x0;
83 const uint32_t MIXPOLE = 0x0;
84 const uint32_t MIXERMODE = 0x0;
85 const uint32_t FCEN = 0x58;
86 const uint32_t FCENX = 0x0;
87 const uint32_t ANAIMON = 0x0;
88 const uint32_t IQEN = 0x1;
89 const uint32_t GAINREF = 0xAA;
90 const uint32_t SPI_SDIO_CONFIG = 0x0;
91 const uint32_t FORMAT = 0x1;
92 const uint32_t BITS = 0x2;
93 const uint32_t DRVCFG = 0x0;
94 const uint32_t DIEID = 0x0;
95 const uint32_t HILOADEN = 0x0;
96 const uint32_t FHIPEN = 0x1;
97 const uint32_t PGAIEN = 0x1;
98 const uint32_t PGAQEN = 0x1;
99 const uint32_t STRMEN = 0x0;
100 const uint32_t STRMSTART = 0x0;
101 const uint32_t STRMSTOP = 0x0;
102 const uint32_t STRMBITS = 0x1;
103 const uint32_t STAMPEN = 0x1;
104 const uint32_t TIMESYNCEN = 0x1;
105 const uint32_t DATASYNCEN = 0x0;
106 const uint32_t STRMRST = 0x0;
107 const uint32_t LOBAND = 0x0;
108 const uint32_t REFOUTEN = 0x1;
109 const uint32_t IXTAL = 0x1;
110 const uint32_t ICP = 0x0;
111 const uint32_t INT_PLL = 0x1;
112 const uint32_t PWRSAV = 0x0;
113 const uint32_t RDIV = 0x10;
114 const uint32_t FDIV = 0x80000;
115 const uint32_t EXTADCCLK = 0x0;
116 const uint32_t REFCLK_L_CNT = 0x100;
117 const uint32_t REFCLK_M_CNT = 0x61B;
118 const uint32_t FCLKIN = 0x0;
119 const uint32_t ADCCLK = 0x0;
120 const uint32_t MODE = 0x0;
121 const uint32_t ADCCLK_L_CNT = 0x100;
122 const uint32_t ADCCLK_M_CNT = 0x61B;
123 const uint32_t PRE_FRACDIV_SEL = 0x0;
124 const uint32_t CLKOUT_SEL = 0x1;
126 const uint32_t TEST_MODE_1_REG_VAL = 0x01E0F401;
127 const uint32_t TEST_MODE_2_REG_VAL = 0x00000002;
129 bool configure(std::vector<uint32_t> register_values);
130 void run_buffer_monitor_process();
132 mutable std::mutex buffer_monitor_mutex;
134 std::thread thread_buffer_monitor;
136 std::shared_ptr<Fpga_buffer_monitor> buffer_monitor_fpga;
137 std::shared_ptr<Fpga_spidev> spidev_fpga;
140 uint64_t sample_rate_;
143 uint32_t out_stream_;
145 uint32_t filter_order_;
151 bool if_filter_gain_;
154 bool enable_ovf_check_buffer_monitor_active_;
162 #endif // GNSS_SDR_MAX2771_EVKIT_SIGNAL_SOURCE_FPGA_H Interface of a thread-safe std::queue.
Header file of the base class to signal_source GNSS blocks.
Class that defines a receiver command event.
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.