赞
踩
这里用的是UHD的B210代码,我们编译过了之后在替换掉UHD里面提供的B210 IMAGE,看运行FPGA功能是否正常,如果正常,以后的试验和改进就在这个些代码上进行了。
使用的UHD版本是3.15,没有替换固件之前,我运行了一下UHD_USRP_PORBE 显示如下
- a@z:~/uhd-3.15.0.0/host/build/examples$ uhd_usrp_probe
- [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-0-unknown
- [INFO] [B200] Loading firmware image: /usr/local/share/uhd/images/usrp_b200_fw.hex...
- [INFO] [B200] Detected Device: B210
- [INFO] [B200] Loading FPGA image: /usr/local/share/uhd/images/usrp_b210_fpga.bin...
- [INFO] [B200] Operating over USB 3.
- [INFO] [B200] Detecting internal GPSDO....
- [INFO] [GPS] No GPSDO found
- [INFO] [B200] Initialize CODEC control...
- [INFO] [B200] Initialize Radio control...
- [INFO] [B200] Performing register loopback test...
- [INFO] [B200] Register loopback test passed
- [INFO] [B200] Performing register loopback test...
- [INFO] [B200] Register loopback test passed
- [INFO] [B200] Setting master clock rate selection to 'automatic'.
- [INFO] [B200] Asking for clock rate 16.000000 MHz...
- [INFO] [B200] Actually got clock rate 16.000000 MHz.
- _____________________________________________________
- /
- | Device: B-Series Device
- | _____________________________________________________
- | /
- | | Mboard: B210
- | | serial: 180007
- | | name: MyB210
- | | product: 2
- | | revision: 4
- | | FW Version: 8.0
- | | FPGA Version: 16.0
- | |
- | | Time sources: none, internal, external, gpsdo
- | | Clock sources: internal, external, gpsdo
- | | Sensors: ref_locked
- | | _____________________________________________________
- | | /
- | | | RX DSP: 0
- | | |
- | | | Freq range: -8.000 to 8.000 MHz
- | | _____________________________________________________
- | | /
- | | | RX DSP: 1
- | | |
- | | | Freq range: -8.000 to 8.000 MHz
- | | _____________________________________________________
- | | /
- | | | RX Dboard: A
- | | | _____________________________________________________
- | | | /
- | | | | RX Frontend: A
- | | | | Name: FE-RX2
- | | | | Antennas: TX/RX, RX2
- | | | | Sensors: temp, rssi, lo_locked
- | | | | Freq range: 50.000 to 6000.000 MHz
- | | | | Gain range PGA: 0.0 to 76.0 step 1.0 dB
- | | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz
- | | | | Connection Type: IQ
- | | | | Uses LO offset: No
- | | | _____________________________________________________
- | | | /
- | | | | RX Frontend: B
- | | | | Name: FE-RX1
- | | | | Antennas: TX/RX, RX2
- | | | | Sensors: temp, rssi, lo_locked
- | | | | Freq range: 50.000 to 6000.000 MHz
- | | | | Gain range PGA: 0.0 to 76.0 step 1.0 dB
- | | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz
- | | | | Connection Type: IQ
- | | | | Uses LO offset: No
- | | | _____________________________________________________
- | | | /
- | | | | RX Codec: A
- | | | | Name: B210 RX dual ADC
- | | | | Gain Elements: None
- | | _____________________________________________________
- | | /
- | | | TX DSP: 0
- | | |
- | | | Freq range: -8.000 to 8.000 MHz
- | | _____________________________________________________
- | | /
- | | | TX DSP: 1
- | | |
- | | | Freq range: -8.000 to 8.000 MHz
- | | _____________________________________________________
- | | /
- | | | TX Dboard: A
- | | | _____________________________________________________
- | | | /
- | | | | TX Frontend: A
- | | | | Name: FE-TX2
- | | | | Antennas: TX/RX
- | | | | Sensors: temp, lo_locked
- | | | | Freq range: 50.000 to 6000.000 MHz
- | | | | Gain range PGA: 0.0 to 89.8 step 0.2 dB
- | | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz
- | | | | Connection Type: IQ
- | | | | Uses LO offset: No
- | | | _____________________________________________________
- | | | /
- | | | | TX Frontend: B
- | | | | Name: FE-TX1
- | | | | Antennas: TX/RX
- | | | | Sensors: temp, lo_locked
- | | | | Freq range: 50.000 to 6000.000 MHz
- | | | | Gain range PGA: 0.0 to 89.8 step 0.2 dB
- | | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz
- | | | | Connection Type: IQ
- | | | | Uses LO offset: No
- | | | _____________________________________________________
- | | | /
- | | | | TX Codec: A
- | | | | Name: B210 TX dual DAC
- | | | | Gain Elements: None
-
- a@z:~/uhd-3.15.0.0/host/build/examples$ ^C
我们看到下载的固件是/usr/local/share/uhd/images/usrp_b210_fpga.bin
这里我们把自己编译生成的FPGA配置文件B200.BIN拷贝替换这个文件,替换前先备份一下。
替换之后我们再运行uhd_usrp_probe一下看看结果:
- a@z:~/uhd-3.15.0.0/host/build/examples$ sudo uhd_usrp_probe
- [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-0-unknown
- [INFO] [B200] Loading firmware image: /usr/local/share/uhd/images/usrp_b200_fw.hex...
- [INFO] [B200] Detected Device: B210
- [INFO] [B200] Loading FPGA image: /usr/local/share/uhd/images/usrp_b210_fpga.bin...
- [INFO] [B200] Operating over USB 3.
- [INFO] [B200] Detecting internal GPSDO....
- [INFO] [GPS] No GPSDO found
- [INFO] [B200] Initialize CODEC control...
- [INFO] [B200] Initialize Radio control...
- [INFO] [B200] Performing register loopback test...
- [INFO] [B200] Register loopback test passed
- [INFO] [B200] Performing register loopback test...
- [INFO] [B200] Register loopback test passed
- [INFO] [B200] Setting master clock rate selection to 'automatic'.
- [INFO] [B200] Asking for clock rate 16.000000 MHz...
- [INFO] [B200] Actually got clock rate 16.000000 MHz.
- _____________________________________________________
- /
- | Device: B-Series Device
- | _____________________________________________________
- | /
- | | Mboard: B210
- | | serial: 180007
- | | name: MyB210
- | | product: 2
- | | revision: 4
- | | FW Version: 8.0
- | | FPGA Version: 16.0
- | |
- | | Time sources: none, internal, external, gpsdo
- | | Clock sources: internal, external, gpsdo
- | | Sensors: ref_locked
- | | _____________________________________________________
- | | /
- | | | RX DSP: 0
- | | |
- | | | Freq range: -8.000 to 8.000 MHz
- | | _____________________________________________________
- | | /
- | | | RX DSP: 1
- | | |
- | | | Freq range: -8.000 to 8.000 MHz
- | | _____________________________________________________
- | | /
- | | | RX Dboard: A
- | | | _____________________________________________________
- | | | /
- | | | | RX Frontend: A
- | | | | Name: FE-RX2
- | | | | Antennas: TX/RX, RX2
- | | | | Sensors: temp, rssi, lo_locked
- | | | | Freq range: 50.000 to 6000.000 MHz
- | | | | Gain range PGA: 0.0 to 76.0 step 1.0 dB
- | | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz
- | | | | Connection Type: IQ
- | | | | Uses LO offset: No
- | | | _____________________________________________________
- | | | /
- | | | | RX Frontend: B
- | | | | Name: FE-RX1
- | | | | Antennas: TX/RX, RX2
- | | | | Sensors: temp, rssi, lo_locked
- | | | | Freq range: 50.000 to 6000.000 MHz
- | | | | Gain range PGA: 0.0 to 76.0 step 1.0 dB
- | | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz
- | | | | Connection Type: IQ
- | | | | Uses LO offset: No
- | | | _____________________________________________________
- | | | /
- | | | | RX Codec: A
- | | | | Name: B210 RX dual ADC
- | | | | Gain Elements: None
- | | _____________________________________________________
- | | /
- | | | TX DSP: 0
- | | |
- | | | Freq range: -8.000 to 8.000 MHz
- | | _____________________________________________________
- | | /
- | | | TX DSP: 1
- | | |
- | | | Freq range: -8.000 to 8.000 MHz
- | | _____________________________________________________
- | | /
- | | | TX Dboard: A
- | | | _____________________________________________________
- | | | /
- | | | | TX Frontend: A
- | | | | Name: FE-TX2
- | | | | Antennas: TX/RX
- | | | | Sensors: temp, lo_locked
- | | | | Freq range: 50.000 to 6000.000 MHz
- | | | | Gain range PGA: 0.0 to 89.8 step 0.2 dB
- | | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz
- | | | | Connection Type: IQ
- | | | | Uses LO offset: No
- | | | _____________________________________________________
- | | | /
- | | | | TX Frontend: B
- | | | | Name: FE-TX1
- | | | | Antennas: TX/RX
- | | | | Sensors: temp, lo_locked
- | | | | Freq range: 50.000 to 6000.000 MHz
- | | | | Gain range PGA: 0.0 to 89.8 step 0.2 dB
- | | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz
- | | | | Connection Type: IQ
- | | | | Uses LO offset: No
- | | | _____________________________________________________
- | | | /
- | | | | TX Codec: A
- | | | | Name: B210 TX dual DAC
- | | | | Gain Elements: None
-
接下来我简单试验下:
1,运行FFT程序,测试通过,uhd_fft ,界面如下:
2,运行双收双发程序,界面如下:
运行结果完全正确,如下:
这里看到一切正常,我们最好也测试一下GPSDO 是否正常WORK。
这里是测试的PYTHON代码:
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
-
- #
- # SPDX-License-Identifier: GPL-3.0
- #
- # GNU Radio Python Flow Graph
- # Title: Top Block
- # GNU Radio version: 3.8.0.0
-
- from distutils.version import StrictVersion
-
- if __name__ == '__main__':
- import ctypes
- import sys
- if sys.platform.startswith('linux'):
- try:
- x11 = ctypes.cdll.LoadLibrary('libX11.so')
- x11.XInitThreads()
- except:
- print("Warning: failed to XInitThreads()")
-
- from PyQt5 import Qt
- from gnuradio import qtgui
- from gnuradio.filter import firdes
- import sip
- from gnuradio import analog
- from gnuradio import blocks
- from gnuradio import gr
- import sys
- import signal
- from argparse import ArgumentParser
- from gnuradio.eng_arg import eng_float, intx
- from gnuradio import eng_notation
- from gnuradio import uhd
- import time
- from gnuradio import qtgui
-
- class top_block(gr.top_block, Qt.QWidget):
-
- def __init__(self):
- gr.top_block.__init__(self, "Top Block")
- Qt.QWidget.__init__(self)
- self.setWindowTitle("Top Block")
- qtgui.util.check_set_qss()
- try:
- self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
- except:
- pass
- self.top_scroll_layout = Qt.QVBoxLayout()
- self.setLayout(self.top_scroll_layout)
- self.top_scroll = Qt.QScrollArea()
- self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
- self.top_scroll_layout.addWidget(self.top_scroll)
- self.top_scroll.setWidgetResizable(True)
- self.top_widget = Qt.QWidget()
- self.top_scroll.setWidget(self.top_widget)
- self.top_layout = Qt.QVBoxLayout(self.top_widget)
- self.top_grid_layout = Qt.QGridLayout()
- self.top_layout.addLayout(self.top_grid_layout)
-
- self.settings = Qt.QSettings("GNU Radio", "top_block")
-
- try:
- if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
- self.restoreGeometry(self.settings.value("geometry").toByteArray())
- else:
- self.restoreGeometry(self.settings.value("geometry"))
- except:
- pass
-
- ##################################################
- # Variables
- ##################################################
- self.samp_rate = samp_rate = 32000
- self.RF_FRQ = RF_FRQ = 2.7E9
-
- ##################################################
- # Blocks
- ##################################################
- self.uhd_usrp_source_1 = uhd.usrp_source(
- ",".join(("", "")),
- uhd.stream_args(
- cpu_format="fc32",
- args='',
- channels=[0,1],
- ),
- )
- self.uhd_usrp_source_1.set_center_freq(RF_FRQ, 0)
- self.uhd_usrp_source_1.set_normalized_gain(1, 0)
- self.uhd_usrp_source_1.set_antenna('RX2', 0)
- self.uhd_usrp_source_1.set_center_freq(RF_FRQ, 1)
- self.uhd_usrp_source_1.set_normalized_gain(1, 1)
- self.uhd_usrp_source_1.set_antenna('RX2', 1)
- self.uhd_usrp_source_1.set_samp_rate(samp_rate)
- self.uhd_usrp_source_1.set_time_unknown_pps(uhd.time_spec())
- self.uhd_usrp_sink_0 = uhd.usrp_sink(
- ",".join(("", "")),
- uhd.stream_args(
- cpu_format="fc32",
- args='',
- channels=[0,1],
- ),
- '',
- )
- self.uhd_usrp_sink_0.set_center_freq(RF_FRQ, 0)
- self.uhd_usrp_sink_0.set_normalized_gain(0.8, 0)
- self.uhd_usrp_sink_0.set_antenna('TX/RX', 0)
- self.uhd_usrp_sink_0.set_center_freq(RF_FRQ, 1)
- self.uhd_usrp_sink_0.set_normalized_gain(0.8, 1)
- self.uhd_usrp_sink_0.set_antenna('TX/RX', 1)
- self.uhd_usrp_sink_0.set_samp_rate(samp_rate)
- self.uhd_usrp_sink_0.set_time_unknown_pps(uhd.time_spec())
- self.qtgui_time_sink_x_0_0 = qtgui.time_sink_c(
- 1024, #size
- samp_rate, #samp_rate
- "B", #name
- 1 #number of inputs
- )
- self.qtgui_time_sink_x_0_0.set_update_time(0.10)
- self.qtgui_time_sink_x_0_0.set_y_axis(-1, 1)
-
- self.qtgui_time_sink_x_0_0.set_y_label('Amplitude', "")
-
- self.qtgui_time_sink_x_0_0.enable_tags(True)
- self.qtgui_time_sink_x_0_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "")
- self.qtgui_time_sink_x_0_0.enable_autoscale(False)
- self.qtgui_time_sink_x_0_0.enable_grid(False)
- self.qtgui_time_sink_x_0_0.enable_axis_labels(True)
- self.qtgui_time_sink_x_0_0.enable_control_panel(False)
- self.qtgui_time_sink_x_0_0.enable_stem_plot(False)
-
-
- labels = ['', '', '', '', '',
- '', '', '', '', '']
- widths = [1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1]
- colors = ['blue', 'red', 'green', 'black', 'cyan',
- 'magenta', 'yellow', 'dark red', 'dark green', 'dark blue']
- alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0]
- styles = [1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1]
- markers = [-1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1]
-
-
- for i in range(2):
- if len(labels[i]) == 0:
- if (i % 2 == 0):
- self.qtgui_time_sink_x_0_0.set_line_label(i, "Re{{Data {0}}}".format(i/2))
- else:
- self.qtgui_time_sink_x_0_0.set_line_label(i, "Im{{Data {0}}}".format(i/2))
- else:
- self.qtgui_time_sink_x_0_0.set_line_label(i, labels[i])
- self.qtgui_time_sink_x_0_0.set_line_width(i, widths[i])
- self.qtgui_time_sink_x_0_0.set_line_color(i, colors[i])
- self.qtgui_time_sink_x_0_0.set_line_style(i, styles[i])
- self.qtgui_time_sink_x_0_0.set_line_marker(i, markers[i])
- self.qtgui_time_sink_x_0_0.set_line_alpha(i, alphas[i])
-
- self._qtgui_time_sink_x_0_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0_0.pyqwidget(), Qt.QWidget)
- self.top_grid_layout.addWidget(self._qtgui_time_sink_x_0_0_win)
- self.qtgui_time_sink_x_0 = qtgui.time_sink_c(
- 1024, #size
- samp_rate, #samp_rate
- "A+", #name
- 1 #number of inputs
- )
- self.qtgui_time_sink_x_0.set_update_time(0.10)
- self.qtgui_time_sink_x_0.set_y_axis(-1, 1)
-
- self.qtgui_time_sink_x_0.set_y_label('Amplitude', "")
-
- self.qtgui_time_sink_x_0.enable_tags(True)
- self.qtgui_time_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "")
- self.qtgui_time_sink_x_0.enable_autoscale(False)
- self.qtgui_time_sink_x_0.enable_grid(False)
- self.qtgui_time_sink_x_0.enable_axis_labels(True)
- self.qtgui_time_sink_x_0.enable_control_panel(False)
- self.qtgui_time_sink_x_0.enable_stem_plot(False)
-
-
- labels = ['', '', '', '', '',
- '', '', '', '', '']
- widths = [1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1]
- colors = ['blue', 'red', 'green', 'black', 'cyan',
- 'magenta', 'yellow', 'dark red', 'dark green', 'dark blue']
- alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0]
- styles = [1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1]
- markers = [-1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1]
-
-
- for i in range(2):
- if len(labels[i]) == 0:
- if (i % 2 == 0):
- self.qtgui_time_sink_x_0.set_line_label(i, "Re{{Data {0}}}".format(i/2))
- else:
- self.qtgui_time_sink_x_0.set_line_label(i, "Im{{Data {0}}}".format(i/2))
- else:
- self.qtgui_time_sink_x_0.set_line_label(i, labels[i])
- self.qtgui_time_sink_x_0.set_line_width(i, widths[i])
- self.qtgui_time_sink_x_0.set_line_color(i, colors[i])
- self.qtgui_time_sink_x_0.set_line_style(i, styles[i])
- self.qtgui_time_sink_x_0.set_line_marker(i, markers[i])
- self.qtgui_time_sink_x_0.set_line_alpha(i, alphas[i])
-
- self._qtgui_time_sink_x_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0.pyqwidget(), Qt.QWidget)
- self.top_grid_layout.addWidget(self._qtgui_time_sink_x_0_win)
- self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c(
- 1024, #size
- firdes.WIN_BLACKMAN_hARRIS, #wintype
- 0, #fc
- samp_rate, #bw
- "蓝色+", #name
- 2
- )
- self.qtgui_freq_sink_x_0.set_update_time(0.10)
- self.qtgui_freq_sink_x_0.set_y_axis(-140, 10)
- self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB')
- self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "")
- self.qtgui_freq_sink_x_0.enable_autoscale(False)
- self.qtgui_freq_sink_x_0.enable_grid(False)
- self.qtgui_freq_sink_x_0.set_fft_average(1.0)
- self.qtgui_freq_sink_x_0.enable_axis_labels(True)
- self.qtgui_freq_sink_x_0.enable_control_panel(False)
-
-
-
- labels = ['', '', '', '', '',
- '', '', '', '', '']
- widths = [1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1]
- colors = ["blue", "red", "green", "black", "cyan",
- "magenta", "yellow", "dark red", "dark green", "dark blue"]
- alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0]
-
- for i in range(2):
- if len(labels[i]) == 0:
- self.qtgui_freq_sink_x_0.set_line_label(i, "Data {0}".format(i))
- else:
- self.qtgui_freq_sink_x_0.set_line_label(i, labels[i])
- self.qtgui_freq_sink_x_0.set_line_width(i, widths[i])
- self.qtgui_freq_sink_x_0.set_line_color(i, colors[i])
- self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i])
-
- self._qtgui_freq_sink_x_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget)
- self.top_grid_layout.addWidget(self._qtgui_freq_sink_x_0_win)
- self.blocks_null_source_0 = blocks.null_source(gr.sizeof_gr_complex*1)
- self.analog_sig_source_x_0 = analog.sig_source_c(samp_rate, analog.GR_COS_WAVE, 1000, 1, 0, 0)
-
-
-
- ##################################################
- # Connections
- ##################################################
- self.connect((self.analog_sig_source_x_0, 0), (self.uhd_usrp_sink_0, 0))
- self.connect((self.blocks_null_source_0, 0), (self.uhd_usrp_sink_0, 1))
- self.connect((self.uhd_usrp_source_1, 0), (self.qtgui_freq_sink_x_0, 0))
- self.connect((self.uhd_usrp_source_1, 1), (self.qtgui_freq_sink_x_0, 1))
- self.connect((self.uhd_usrp_source_1, 0), (self.qtgui_time_sink_x_0, 0))
- self.connect((self.uhd_usrp_source_1, 1), (self.qtgui_time_sink_x_0_0, 0))
-
- def closeEvent(self, event):
- self.settings = Qt.QSettings("GNU Radio", "top_block")
- self.settings.setValue("geometry", self.saveGeometry())
- event.accept()
-
- def get_samp_rate(self):
- return self.samp_rate
-
- def set_samp_rate(self, samp_rate):
- self.samp_rate = samp_rate
- self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate)
- self.qtgui_freq_sink_x_0.set_frequency_range(0, self.samp_rate)
- self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate)
- self.qtgui_time_sink_x_0_0.set_samp_rate(self.samp_rate)
- self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate)
- self.uhd_usrp_source_1.set_samp_rate(self.samp_rate)
-
- def get_RF_FRQ(self):
- return self.RF_FRQ
-
- def set_RF_FRQ(self, RF_FRQ):
- self.RF_FRQ = RF_FRQ
- self.uhd_usrp_sink_0.set_center_freq(self.RF_FRQ, 0)
- self.uhd_usrp_sink_0.set_center_freq(self.RF_FRQ, 1)
- self.uhd_usrp_source_1.set_center_freq(self.RF_FRQ, 0)
- self.uhd_usrp_source_1.set_center_freq(self.RF_FRQ, 1)
-
-
-
- def main(top_block_cls=top_block, options=None):
-
- if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
- style = gr.prefs().get_string('qtgui', 'style', 'raster')
- Qt.QApplication.setGraphicsSystem(style)
- qapp = Qt.QApplication(sys.argv)
-
- tb = top_block_cls()
- tb.start()
- tb.show()
-
- def sig_handler(sig=None, frame=None):
- Qt.QApplication.quit()
-
- signal.signal(signal.SIGINT, sig_handler)
- signal.signal(signal.SIGTERM, sig_handler)
-
- timer = Qt.QTimer()
- timer.start(500)
- timer.timeout.connect(lambda: None)
-
- def quitting():
- tb.stop()
- tb.wait()
- qapp.aboutToQuit.connect(quitting)
- qapp.exec_()
-
-
- if __name__ == '__main__':
- main()
3,测试GPSDO正常工作。这个后续再进行测试吧,手边没有可用GPSDO。
4,另外也要也要测试下外部PPS输入和外部10M REF_CLK的输入。
这里后续都要做做。
---------------------------------------------------------------------------------------------------------------------------------
下面要进行的是,关于ad9361的sample_rate的测量试验。其实思路也简单,就是将radio_clk分频后从一个IO上面引出来后用示波器测量。这样做的目的是为了验证GNURADIO里面采样率设置和实际SAMPLE_RATE的关系,后面详细讲。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。