From fe9b23f34698ebe238044504ba242c8e53d54351 Mon Sep 17 00:00:00 2001 From: Glenn Bradford <glenn.bradford@unimelb.edu.au> Date: Thu, 7 Dec 2023 19:03:18 +1100 Subject: [PATCH] remove CDC bladeRF blocks. add plutoSDR example --- examples/cdc_phy_bladeRF.grc | 184 +++++--- examples/cdc_phy_plutoSDR.grc | 783 +++++++++++++++++++++++++++++++ grc/CMakeLists.txt | 2 - grc/cdc_bladeRF_sink.block.yml | 151 ------ grc/cdc_bladeRF_source.block.yml | 232 --------- 5 files changed, 903 insertions(+), 449 deletions(-) create mode 100644 examples/cdc_phy_plutoSDR.grc delete mode 100644 grc/cdc_bladeRF_sink.block.yml delete mode 100644 grc/cdc_bladeRF_source.block.yml diff --git a/examples/cdc_phy_bladeRF.grc b/examples/cdc_phy_bladeRF.grc index 58d1f6b..2b000a4 100644 --- a/examples/cdc_phy_bladeRF.grc +++ b/examples/cdc_phy_bladeRF.grc @@ -11,7 +11,7 @@ options: gen_linking: dynamic generate_options: qt_gui hier_block_src_path: '.:' - id: cdc_phy_test_bRF + id: cdc_phy_bladeRF max_nouts: '0' output_language: python placement: (0,0) @@ -22,7 +22,7 @@ options: run_options: prompt sizing_mode: fixed thread_safe_setters: '' - title: Not titled yet + title: CDC bladeRF Loopback window_size: (1000,1000) states: bus_sink: false @@ -135,108 +135,163 @@ blocks: coordinate: [456, 116.0] rotation: 0 state: true -- name: blocks_message_debug_0 - id: blocks_message_debug +- name: bladeRF_sink_0 + id: bladeRF_sink parameters: affinity: '' alias: '' + bias_tee0: 'False' + bias_tee1: 'False' + buffers: '512' + buflen: '4096' + bw: '0' comment: '' - en_uvec: 'True' + dac: '10000' + dc_calibration: LPF_TUNING + device_id: '0' + feature: default + fpga_image: '' + fpga_reload: 'False' + freq: rf_freq + gain0: tx_gain + gain1: '10' + if_gain0: '20' + if_gain1: '20' + in_clk: ONBOARD + lpf_mode: disabled + maxoutbuf: '0' + metadata: 'False' + minoutbuf: '0' + nchan: '1' + out_clk: 'False' + ref_clk: 10e6 + sample_format: 16bit + sample_rate: samp_rate + sampling: internal + show_pmic: 'False' + smb: 38.4e6 + tamer: internal + trigger0: 'False' + trigger1: 'False' + trigger_role0: master + trigger_role1: master + trigger_signal0: J51_1 + trigger_signal1: J51_1 + use_dac: 'False' + use_ref_clk: 'False' + verbosity: warning + xb200: none states: bus_sink: false bus_source: false bus_structure: null - coordinate: [816, 168.0] - rotation: 180 - state: enabled -- name: blocks_message_strobe_0 - id: blocks_message_strobe + coordinate: [448, 260.0] + rotation: 0 + state: true +- name: bladeRF_source_0 + id: bladeRF_source parameters: affinity: '' alias: '' + bias_tee0: 'False' + bias_tee1: 'False' + buffers: '512' + buflen: '4096' + bw: '0' comment: '' + dac: '10000' + dc_calibration: LPF_TUNING + dc_offset_mode0: '2' + dc_offset_mode1: '0' + device_id: '0' + feature: default + fpga_image: '' + fpga_reload: 'False' + freq: rf_freq + gain0: rx_gain + gain1: '10' + gain_mode0: 'False' + gain_mode1: 'False' + if_gain0: '20' + if_gain1: '20' + in_clk: ONBOARD + iq_balance_mode0: '2' + iq_balance_mode1: '0' + lpf_mode: disabled maxoutbuf: '0' + metadata: 'False' minoutbuf: '0' - msg: pmt.cons(pmt.PMT_NIL, pmt.make_u8vector(nbytes, 0x00)) - period: '500' + nchan: '1' + out_clk: 'False' + ref_clk: 10e6 + sample_format: 16bit + sample_rate: samp_rate + sampling: internal + show_pmic: 'False' + smb: 38.4e6 + tamer: internal + trigger0: 'False' + trigger1: 'False' + trigger_role0: master + trigger_role1: master + trigger_signal0: J51_1 + trigger_signal1: J51_1 + use_dac: 'False' + use_ref_clk: 'False' + verbosity: warning + xb200: none states: bus_sink: false bus_source: false bus_structure: null - coordinate: [72, 252.0] - rotation: 180 + coordinate: [592, 264.0] + rotation: 0 state: true -- name: blocks_uchar_to_float_0 - id: blocks_uchar_to_float +- name: blocks_message_debug_0 + id: blocks_message_debug parameters: affinity: '' alias: '' comment: '' - maxoutbuf: '0' - minoutbuf: '0' + en_uvec: 'True' + log_level: info states: bus_sink: false bus_source: false bus_structure: null - coordinate: [1072, 424.0] - rotation: 0 - state: true -- name: cdc_bladeRF_sink_0 - id: cdc_bladeRF_sink + coordinate: [816, 168.0] + rotation: 180 + state: enabled +- name: blocks_message_strobe_0 + id: blocks_message_strobe parameters: affinity: '' alias: '' - buffers: '16' - buflen: '8192' - bw: '0' comment: '' - device_id: '0' - freq: rf_freq - gain0: tx_gain - gain1: '10' - metadata: 'False' - nchan: '1' - sample_rate: samp_rate - transfers: '8' - verbosity: warning + maxoutbuf: '0' + minoutbuf: '0' + msg: pmt.cons(pmt.PMT_NIL, pmt.make_u8vector(nbytes, 0x00)) + period: '500' states: bus_sink: false bus_source: false bus_structure: null - coordinate: [456, 276.0] - rotation: 0 + coordinate: [72, 252.0] + rotation: 180 state: true -- name: cdc_bladeRF_source_0 - id: cdc_bladeRF_source +- name: blocks_uchar_to_float_0 + id: blocks_uchar_to_float parameters: affinity: '' alias: '' - buffers: '16' - buflen: '8192' - bw: '0' comment: '' - dc_offset_mode0: '2' - dc_offset_mode1: '0' - device_id: '0' - freq: rf_freq - gain0: rx_gain - gain1: '10' - gain_mode0: 'False' - gain_mode1: 'False' - iq_balance_mode0: '2' - iq_balance_mode1: '0' maxoutbuf: '0' - metadata: 'False' minoutbuf: '0' - nchan: '1' - sample_rate: samp_rate - transfers: '8' - verbosity: warning states: bus_sink: false bus_source: false bus_structure: null - coordinate: [600, 276.0] + coordinate: [1072, 424.0] rotation: 0 state: true - name: cdc_insert_burst_c_0 @@ -251,7 +306,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [304, 328.0] + coordinate: [304, 368.0] rotation: 0 state: true - name: phy_rx_0 @@ -268,7 +323,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [808, 272.0] + coordinate: [816, 304.0] rotation: 0 state: true - name: phy_tx_0 @@ -286,7 +341,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [72, 324.0] + coordinate: [72, 360.0] rotation: 0 state: true - name: qtgui_const_sink_x_0_0 @@ -761,15 +816,15 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [792, 468.0] + coordinate: [800, 504.0] rotation: 180 state: true connections: +- [bladeRF_source_0, '0', phy_rx_0, '0'] - [blocks_message_strobe_0, strobe, phy_tx_0, sdu] - [blocks_uchar_to_float_0, '0', qtgui_time_sink_x_0_0, '0'] -- [cdc_bladeRF_source_0, '0', phy_rx_0, '0'] -- [cdc_insert_burst_c_0, '0', cdc_bladeRF_sink_0, '0'] +- [cdc_insert_burst_c_0, '0', bladeRF_sink_0, '0'] - [phy_rx_0, '0', qtgui_const_sink_x_0_0, '0'] - [phy_rx_0, '1', qtgui_const_sink_x_0_0_0, '0'] - [phy_rx_0, '2', blocks_uchar_to_float_0, '0'] @@ -780,3 +835,4 @@ connections: metadata: file_format: 1 + grc_version: 3.10.7.0 diff --git a/examples/cdc_phy_plutoSDR.grc b/examples/cdc_phy_plutoSDR.grc new file mode 100644 index 0000000..1324ee3 --- /dev/null +++ b/examples/cdc_phy_plutoSDR.grc @@ -0,0 +1,783 @@ +options: + parameters: + author: '' + catch_exceptions: 'True' + category: '[GRC Hier Blocks]' + cmake_opt: '' + comment: '' + copyright: '' + description: '' + gen_cmake: 'On' + gen_linking: dynamic + generate_options: qt_gui + hier_block_src_path: '.:' + id: cdc_phy_plutoSDR + max_nouts: '0' + output_language: python + placement: (0,0) + qt_qss_theme: '' + realtime_scheduling: '' + run: 'True' + run_command: '{python} -u {filename}' + run_options: prompt + sizing_mode: fixed + thread_safe_setters: '' + title: CDC plutoSDR Loopback + window_size: (1000,1000) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 8] + rotation: 0 + state: enabled + +blocks: +- name: excess_bw + id: variable + parameters: + comment: '' + value: '0.35' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [256, 12.0] + rotation: 0 + state: enabled +- name: nbytes + id: variable + parameters: + comment: '' + value: '32' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [168, 188.0] + rotation: 0 + state: enabled +- name: rf_freq + id: variable + parameters: + comment: '' + value: 915e6 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [352, 12.0] + rotation: 0 + state: enabled +- name: rx_gain + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: 0, 1, 1, 1 + label: Rx Gain (dB) + min_len: '200' + orient: QtCore.Qt.Horizontal + rangeType: float + start: '0.0' + step: '1' + stop: '66.0' + value: '30.0' + widget: counter_slider + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [600, 160.0] + rotation: 0 + state: true +- name: samp_rate + id: variable + parameters: + comment: '' + value: 1e6 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [440, 12.0] + rotation: 0 + state: enabled +- name: sps + id: variable + parameters: + comment: '' + value: '2' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [184, 12] + rotation: 0 + state: enabled +- name: tx_atten + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: 0, 0, 1, 1 + label: Tx Atten (dB) + min_len: '200' + orient: QtCore.Qt.Horizontal + rangeType: float + start: '0.0' + step: '0.25' + stop: '89.75' + value: '10.0' + widget: counter_slider + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [472, 160.0] + rotation: 0 + state: true +- name: blocks_message_debug_0 + id: blocks_message_debug + parameters: + affinity: '' + alias: '' + comment: '' + en_uvec: 'True' + log_level: info + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [816, 168.0] + rotation: 180 + state: enabled +- name: blocks_message_strobe_0 + id: blocks_message_strobe + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + msg: pmt.cons(pmt.PMT_NIL, pmt.make_u8vector(nbytes, 0x00)) + period: '500' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [72, 252.0] + rotation: 180 + state: true +- name: blocks_uchar_to_float_0 + id: blocks_uchar_to_float + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1072, 424.0] + rotation: 0 + state: true +- name: cdc_insert_burst_c_0 + id: cdc_insert_burst_c + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [304, 368.0] + rotation: 0 + state: true +- name: iio_pluto_sink_0 + id: iio_pluto_sink + parameters: + affinity: '' + alias: '' + attenuation1: tx_atten + bandwidth: int(samp_rate) + buffer_size: '32768' + comment: '' + cyclic: 'False' + filter: '' + filter_source: '''Auto''' + fpass: '0' + frequency: int(rf_freq) + fstop: '0' + len_tag_key: '' + samplerate: int(samp_rate) + type: fc32 + uri: '' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [440, 300.0] + rotation: 0 + state: true +- name: iio_pluto_source_0 + id: iio_pluto_source + parameters: + affinity: '' + alias: '' + bandwidth: '20000000' + bbdc: 'True' + buffer_size: '32768' + comment: '' + filter: '' + filter_source: '''Auto''' + fpass: '0' + frequency: int(rf_freq) + fstop: '0' + gain1: '''manual''' + len_tag_key: packet_len + manual_gain1: rx_gain + maxoutbuf: '0' + minoutbuf: '0' + quadrature: 'True' + rfdc: 'True' + samplerate: int(samp_rate) + type: fc32 + uri: '' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [600, 300.0] + rotation: 0 + state: true +- name: phy_rx_0 + id: phy_rx + parameters: + affinity: '' + alias: '' + comment: '' + excess_bw: excess_bw + maxoutbuf: '0' + minoutbuf: '0' + sps: sps + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [816, 304.0] + rotation: 0 + state: true +- name: phy_tx_0 + id: phy_tx + parameters: + affinity: '' + alias: '' + comment: '' + excess_bw: excess_bw + maxoutbuf: '0' + minoutbuf: '0' + phasing: '20' + sps: sps + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [72, 360.0] + rotation: 0 + state: true +- name: qtgui_const_sink_x_0_0 + id: qtgui_const_sink_x + parameters: + affinity: '' + alias: '' + alpha1: '1.0' + alpha10: '1.0' + alpha2: '1.0' + alpha3: '1.0' + alpha4: '1.0' + alpha5: '1.0' + alpha6: '1.0' + alpha7: '1.0' + alpha8: '1.0' + alpha9: '1.0' + autoscale: 'False' + axislabels: 'True' + color1: '"blue"' + color10: '"red"' + color2: '"red"' + color3: '"red"' + color4: '"red"' + color5: '"red"' + color6: '"red"' + color7: '"red"' + color8: '"red"' + color9: '"red"' + comment: '' + grid: 'False' + gui_hint: 3, 0, 1, 1 + label1: '' + label10: '' + label2: '' + label3: '' + label4: '' + label5: '' + label6: '' + label7: '' + label8: '' + label9: '' + legend: 'True' + marker1: '0' + marker10: '0' + marker2: '0' + marker3: '0' + marker4: '0' + marker5: '0' + marker6: '0' + marker7: '0' + marker8: '0' + marker9: '0' + name: '"Symbol Sync"' + nconnections: '1' + size: 64 + (4 + nbytes + 4)*8 + style1: '0' + style10: '0' + style2: '0' + style3: '0' + style4: '0' + style5: '0' + style6: '0' + style7: '0' + style8: '0' + style9: '0' + tr_chan: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_TAG + tr_slope: qtgui.TRIG_SLOPE_POS + tr_tag: '"corr_est"' + type: complex + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + xmax: '2' + xmin: '-2' + ymax: '2' + ymin: '-2' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1072, 228.0] + rotation: 0 + state: enabled +- name: qtgui_const_sink_x_0_0_0 + id: qtgui_const_sink_x + parameters: + affinity: '' + alias: '' + alpha1: '1.0' + alpha10: '1.0' + alpha2: '1.0' + alpha3: '1.0' + alpha4: '1.0' + alpha5: '1.0' + alpha6: '1.0' + alpha7: '1.0' + alpha8: '1.0' + alpha9: '1.0' + autoscale: 'False' + axislabels: 'True' + color1: '"blue"' + color10: '"red"' + color2: '"red"' + color3: '"red"' + color4: '"red"' + color5: '"red"' + color6: '"red"' + color7: '"red"' + color8: '"red"' + color9: '"red"' + comment: '' + grid: 'False' + gui_hint: 3, 1, 1, 1 + label1: '' + label10: '' + label2: '' + label3: '' + label4: '' + label5: '' + label6: '' + label7: '' + label8: '' + label9: '' + legend: 'True' + marker1: '0' + marker10: '0' + marker2: '0' + marker3: '0' + marker4: '0' + marker5: '0' + marker6: '0' + marker7: '0' + marker8: '0' + marker9: '0' + name: '"Costas Loop"' + nconnections: '1' + size: 64 + (4 + nbytes + 4)*8 + style1: '0' + style10: '0' + style2: '0' + style3: '0' + style4: '0' + style5: '0' + style6: '0' + style7: '0' + style8: '0' + style9: '0' + tr_chan: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_TAG + tr_slope: qtgui.TRIG_SLOPE_POS + tr_tag: '"corr_est"' + type: complex + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + xmax: '2' + xmin: '-2' + ymax: '2' + ymin: '-2' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1072, 316.0] + rotation: 0 + state: enabled +- name: qtgui_time_sink_x_0 + id: qtgui_time_sink_x + parameters: + affinity: '' + alias: '' + alpha1: '1.0' + alpha10: '1.0' + alpha2: '1.0' + alpha3: '1.0' + alpha4: '1.0' + alpha5: '1.0' + alpha6: '1.0' + alpha7: '1.0' + alpha8: '1.0' + alpha9: '1.0' + autoscale: 'False' + axislabels: 'True' + color1: blue + color10: dark blue + color2: red + color3: green + color4: black + color5: cyan + color6: magenta + color7: yellow + color8: dark red + color9: dark green + comment: '' + ctrlpanel: 'False' + entags: 'True' + grid: 'False' + gui_hint: 2, 0, 1, 2 + label1: Signal 1 + label10: Signal 10 + label2: Signal 2 + label3: Signal 3 + label4: Signal 4 + label5: Signal 5 + label6: Signal 6 + label7: Signal 7 + label8: Signal 8 + label9: Signal 9 + legend: 'True' + marker1: '-1' + marker10: '-1' + marker2: '-1' + marker3: '-1' + marker4: '-1' + marker5: '-1' + marker6: '-1' + marker7: '-1' + marker8: '-1' + marker9: '-1' + name: '"Preamble Correlation"' + nconnections: '1' + size: '256' + srate: '1' + stemplot: 'False' + style1: '1' + style10: '1' + style2: '1' + style3: '1' + style4: '1' + style5: '1' + style6: '1' + style7: '1' + style8: '1' + style9: '1' + tr_chan: '0' + tr_delay: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_TAG + tr_slope: qtgui.TRIG_SLOPE_POS + tr_tag: '"corr_est"' + type: float + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + ylabel: Amplitude + ymax: '1.5' + ymin: '0' + yunit: '""' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1072, 492.0] + rotation: 0 + state: enabled +- name: qtgui_time_sink_x_0_0 + id: qtgui_time_sink_x + parameters: + affinity: '' + alias: '' + alpha1: '1.0' + alpha10: '1.0' + alpha2: '1.0' + alpha3: '1.0' + alpha4: '1.0' + alpha5: '1.0' + alpha6: '1.0' + alpha7: '1.0' + alpha8: '1.0' + alpha9: '1.0' + autoscale: 'False' + axislabels: 'True' + color1: blue + color10: dark blue + color2: red + color3: green + color4: black + color5: cyan + color6: magenta + color7: yellow + color8: dark red + color9: dark green + comment: '' + ctrlpanel: 'False' + entags: 'True' + grid: 'False' + gui_hint: 4, 0, 1, 2 + label1: Signal 1 + label10: Signal 10 + label2: Signal 2 + label3: Signal 3 + label4: Signal 4 + label5: Signal 5 + label6: Signal 6 + label7: Signal 7 + label8: Signal 8 + label9: Signal 9 + legend: 'True' + marker1: '-1' + marker10: '-1' + marker2: '-1' + marker3: '-1' + marker4: '-1' + marker5: '-1' + marker6: '-1' + marker7: '-1' + marker8: '-1' + marker9: '-1' + name: '"Payload Bytes"' + nconnections: '1' + size: nbytes + 4 + srate: '1' + stemplot: 'False' + style1: '1' + style10: '1' + style2: '1' + style3: '1' + style4: '1' + style5: '1' + style6: '1' + style7: '1' + style8: '1' + style9: '1' + tr_chan: '0' + tr_delay: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_TAG + tr_slope: qtgui.TRIG_SLOPE_POS + tr_tag: '"packet_len"' + type: float + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + ylabel: Amplitude + ymax: '256' + ymin: '-1' + yunit: '""' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1232, 396.0] + rotation: 0 + state: enabled +- name: qtgui_time_sink_x_2 + id: qtgui_time_sink_x + parameters: + affinity: '' + alias: '' + alpha1: '1.0' + alpha10: '1.0' + alpha2: '1.0' + alpha3: '1.0' + alpha4: '1.0' + alpha5: '1.0' + alpha6: '1.0' + alpha7: '1.0' + alpha8: '1.0' + alpha9: '1.0' + autoscale: 'True' + axislabels: 'True' + color1: blue + color10: dark blue + color2: red + color3: green + color4: black + color5: cyan + color6: magenta + color7: yellow + color8: dark red + color9: dark green + comment: '' + ctrlpanel: 'False' + entags: 'True' + grid: 'False' + gui_hint: 1, 0, 1, 2 + label1: Signal 1 + label10: Signal 10 + label2: Signal 2 + label3: Signal 3 + label4: Signal 4 + label5: Signal 5 + label6: Signal 6 + label7: Signal 7 + label8: Signal 8 + label9: Signal 9 + legend: 'True' + marker1: '-1' + marker10: '-1' + marker2: '-1' + marker3: '-1' + marker4: '-1' + marker5: '-1' + marker6: '-1' + marker7: '-1' + marker8: '-1' + marker9: '-1' + name: '"AGC"' + nconnections: '1' + size: sps*(11 + 20 + 64 + (4 + nbytes +4)*8) + srate: samp_rate + stemplot: 'False' + style1: '1' + style10: '1' + style2: '1' + style3: '1' + style4: '1' + style5: '1' + style6: '1' + style7: '1' + style8: '1' + style9: '1' + tr_chan: '0' + tr_delay: '0' + tr_level: '0.01' + tr_mode: qtgui.TRIG_MODE_TAG + tr_slope: qtgui.TRIG_SLOPE_POS + tr_tag: '"corr_est"' + type: complex + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + ylabel: Amplitude + ymax: '1' + ymin: '-1' + yunit: '""' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [800, 504.0] + rotation: 180 + state: true + +connections: +- [blocks_message_strobe_0, strobe, phy_tx_0, sdu] +- [blocks_uchar_to_float_0, '0', qtgui_time_sink_x_0_0, '0'] +- [cdc_insert_burst_c_0, '0', iio_pluto_sink_0, '0'] +- [iio_pluto_source_0, '0', phy_rx_0, '0'] +- [phy_rx_0, '0', qtgui_const_sink_x_0_0, '0'] +- [phy_rx_0, '1', qtgui_const_sink_x_0_0_0, '0'] +- [phy_rx_0, '2', blocks_uchar_to_float_0, '0'] +- [phy_rx_0, '3', qtgui_time_sink_x_0, '0'] +- [phy_rx_0, '4', qtgui_time_sink_x_2, '0'] +- [phy_rx_0, pdu, blocks_message_debug_0, print] +- [phy_tx_0, burst, cdc_insert_burst_c_0, burst] + +metadata: + file_format: 1 + grc_version: 3.10.7.0 diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index e085ba9..69cc3c0 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -13,7 +13,5 @@ install(FILES cdc_insert_burst_c.block.yml cdc_dsa_pu_scenario_cc.block.yml cdc_dsa_stats.block.yml - cdc_bladeRF_sink.block.yml - cdc_bladeRF_source.block.yml DESTINATION share/gnuradio/grc/blocks ) diff --git a/grc/cdc_bladeRF_sink.block.yml b/grc/cdc_bladeRF_sink.block.yml deleted file mode 100644 index eab8990..0000000 --- a/grc/cdc_bladeRF_sink.block.yml +++ /dev/null @@ -1,151 +0,0 @@ -id: cdc_bladeRF_sink -label: 'CDC bladeRF Sink' -category: '[CDC]' -flags: throttle - -parameters: -- id: metadata - label: Metadata - dtype: enum - default: auto - options: ['False', 'True'] - hide: part - -- id: device_id - label: 'Device' - dtype: string - default: '0' - hide: ${ 'none' if device_id else 'part'} - -- id: nchan - label: 'Num Channels' - dtype: int - default: 1 - options: [ 1, 2 ] - -- id: verbosity - label: 'Verbosity' - dtype: enum - default: warning - options: ['verbose', 'debug', 'info', 'warning', 'error', 'critical', 'silent'] - option_labels: [verbose, debug, info, warning, error, critical, silent] - -- id: sample_rate - label: 'Sample Rate (sps)' - dtype: real - default: samp_rate - -- id: freq - label: 'Frequency (Hz)' - dtype: real - default: freq - -- id: bw - label: 'Bandwidth (Hz)' - dtype: real - default: 0 - -- id: buffers - label: 'Num Buffers' - dtype: int - default: 16 - hide: part - -- id: buflen - label: 'Buffer Size' - dtype: int - default: 8192 - hide: part - -- id: transfers - label: 'Num Transfers' - dtype: int - default: 8 - hide: part - -- id: gain0 - category: 'Channel 0' - label: 'RF Gain (dB)' - dtype: real - default: 10 - hide: ${'none' if (nchan > 0) else 'all'} - -- id: gain1 - category: 'Channel 1' - label: 'RF Gain (dB)' - dtype: real - default: 10 - hide: ${'none' if (nchan > 1) else 'all'} - -inputs: -- domain: stream - dtype: ${type.type} - multiplicity: ${nchan} - -templates: - imports: |- - import bladeRF - make: | - bladeRF.sink( - args = "numchan=" + str(${nchan}) - + ",metadata=" + '${metadata}' - + ",bladerf=" + str(${device_id}) - + ",buffers=" + str(${buffers}) - + ",buflen=" + str(${buflen}) - + ",transfers=" + str(${transfers}) - + ",verbosity=" + '${verbosity}' - ) - self.${id}.set_sample_rate(${sample_rate}) - self.${id}.set_center_freq(${freq},0) - self.${id}.set_bandwidth(${bw},0) - % if context.get('nchan')() > 0: - self.${id}.set_gain(${gain0}, 0) - % endif - % if context.get('nchan')() > 1: - self.${id}.set_gain(${gain1}, 1) - % endif - callbacks: - - set_sample_rate(${sample_rate}) - - set_center_freq(${freq}, 0) - - set_bandwidth(${bw}, 0) - - set_gain(${gain0}, 0) - - set_gain(${gain1}, 1) - -documentation: |- - CDC GRC wrapper for gr-bladeRF sink block. - - Device: - Device serial id. If 'device' not specified, the first available device is used. - - Metadata: - Provide metadata with samples - - Num Channels: - Selects the total number of channels in this multi-device configuration. Required when specifying multiple device arguments. - - Verbosity: - Sets the filter level for displayed log messages. - - Sample Rate: - The sample rate is the number of samples per second output by this block on each channel. - - Frequency: - The center frequency is the frequency the RF chain is tuned to. - - Bandwidth: - Set the bandpass filter on the radio frontend. To use the default (automatic) bandwidth filter setting, this should be zero. - - Buffers: - Number of memory buffers available for exchanging samples between host and device via USB. Smaller value will result in less latency at the risk of sample underruns. - - Buffer Size: - Size of memory buffers (in samples), which must be a multiple of 1024. Smaller value will result in less latency but requires faster host processing. - - Transfers: - Number of memory buffers in-flight at any one time. Suggested to set less than or equal to half the number of buffers. - - For each channel: - RF Gain: - Overall RF gain of the device. - -file_format: 1 diff --git a/grc/cdc_bladeRF_source.block.yml b/grc/cdc_bladeRF_source.block.yml deleted file mode 100644 index 067308c..0000000 --- a/grc/cdc_bladeRF_source.block.yml +++ /dev/null @@ -1,232 +0,0 @@ -id: cdc_bladeRF_source -label: 'CDC bladeRF Source' -category: '[CDC]' -flags: throttle - -parameters: -- id: metadata - label: Metadata - dtype: enum - default: auto - options: ['False', 'True'] - hide: part - -- id: device_id - label: 'Device' - dtype: string - default: '0' - hide: ${ 'none' if device_id else 'part'} - -- id: nchan - label: 'Num Channels' - dtype: int - default: 1 - options: [ 1, 2 ] - -- id: verbosity - label: 'Verbosity' - dtype: enum - default: warning - options: ['verbose', 'debug', 'info', 'warning', 'error', 'critical', 'silent'] - option_labels: [verbose, debug, info, warning, error, critical, silent] - -- id: sample_rate - label: 'Sample Rate (sps)' - dtype: real - default: samp_rate - -- id: freq - label: 'Frequency (Hz)' - dtype: real - default: freq - -- id: bw - label: 'Bandwidth (Hz)' - dtype: real - default: 0 - -- id: buffers - label: 'Num Buffers' - dtype: int - default: 16 - hide: part - -- id: buflen - label: 'Buffer Size' - dtype: int - default: 8192 - hide: part - -- id: transfers - label: 'Num Transfers' - dtype: int - default: 8 - hide: part - -- id: dc_offset_mode0 - category: 'Channel 0' - label: 'DC Offset Mode' - dtype: int - default: 0 - options: [0, 1, 2] - option_labels: [Off, Manual, Automatic] - hide: ${'none' if (nchan > 0) else 'all'} - -- id: iq_balance_mode0 - category: 'Channel 0' - label: 'IQ Balance Mode' - dtype: int - default: 0 - options: [0, 1, 2] - option_labels: [Off, Manual, Automatic] - hide: ${'none' if (nchan > 0) else 'all'} - -- id: gain_mode0 - category: 'Channel 0' - label: 'AGC' - dtype: enum - default: 'False' - options: ['False', 'True'] - hide: ${'none' if (nchan > 0) else 'all'} - -- id: gain0 - category: 'Channel 0' - label: 'RF Gain (dB)' - dtype: real - default: 10 - hide: ${'none' if (nchan > 0) else 'all'} - -- id: dc_offset_mode1 - category: 'Channel 1' - label: 'DC Offset Mode' - dtype: int - default: 0 - options: [0, 1, 2] - option_labels: [Off, Manual, Automatic] - hide: ${'none' if (nchan > 1) else 'all'} - -- id: iq_balance_mode1 - category: 'Channel 1' - label: 'IQ Balance Mode' - dtype: int - default: 0 - options: [0, 1, 2] - option_labels: [Off, Manual, Automatic] - hide: ${'none' if (nchan > 1) else 'all'} - -- id: gain_mode1 - category: 'Channel 1' - label: 'AGC' - dtype: enum - default: 'False' - options: ['False', 'True'] - hide: ${'none' if (nchan > 1) else 'all'} - -- id: gain1 - category: 'Channel 1' - label: 'RF Gain (dB)' - dtype: real - default: 10 - hide: ${'none' if (nchan > 1) else 'all'} - -outputs: -- domain: stream - dtype: ${type.type} - multiplicity: ${nchan} - -templates: - imports: |- - import bladeRF - make: | - bladeRF.source( - args = "numchan=" + str(${nchan}) - + ",metadata=" + '${metadata}' - + ",bladerf=" + str(${device_id}) - + ",buffers=" + str(${buffers}) - + ",buflen=" + str(${buflen}) - + ",transfers=" + str(${transfers}) - + ",verbosity=" + '${verbosity}' - ) - self.${id}.set_sample_rate(${sample_rate}) - self.${id}.set_center_freq(${freq},0) - self.${id}.set_bandwidth(${bw},0) - % if context.get('nchan')() > 0: - self.${id}.set_dc_offset_mode(${dc_offset_mode0}, 0) - self.${id}.set_iq_balance_mode(${iq_balance_mode0}, 0) - self.${id}.set_gain_mode(${gain_mode0}, 0) - self.${id}.set_gain(${gain0}, 0) - % endif - % if context.get('nchan')() > 1: - self.${id}.set_dc_offset_mode(${dc_offset_mode1}, 1) - self.${id}.set_iq_balance_mode(${iq_balance_mode1}, 1) - self.${id}.set_gain_mode(${gain_mode1}, 1) - self.${id}.set_gain(${gain1}, 1) - % endif - callbacks: - - set_sample_rate(${sample_rate}) - - set_center_freq(${freq}, 0) - - set_bandwidth(${bw}, 0) - - set_dc_offset_mode(${dc_offset_mode0}, 0) - - set_iq_balance_mode(${iq_balance_mode0}, 0) - - set_gain_mode(${gain_mode0} == True, 0) - - set_gain(${gain0}, 0) - - set_dc_offset_mode(${dc_offset_mode1}, 1) - - set_iq_balance_mode(${iq_balance_mode1}, 1) - - set_gain_mode(${gain_mode1} == True, 1) - - set_gain(${gain1}, 1) - -documentation: |- - CDC GRC wrapper for gr-bladeRF source block. - - Device: - Device serial id. If 'device' are not specified, the first available device is used. - - Metadata: - Provide metadata with samples - - Num Channels: - Selects the total number of channels in this multi-device configuration. Required when specifying multiple device arguments. - - Verbosity: - Sets the filter level for displayed log messages. - - Sample Rate: - The sample rate is the number of samples per second output by this block on each channel. - - Frequency: - The center frequency is the frequency the RF chain is tuned to. - - Bandwidth: - Set the bandpass filter on the radio frontend. To use the default (automatic) bandwidth filter setting, this should be zero. - - Num Buffers: - Number of memory buffers available for exchanging samples between device and host via USB. Smaller value will result in less latency at the risk of sample overruns. - - Buffer size: - Size of memory buffers (in samples), which must be a multiple of 1024. Smaller value will result in less latency but requires faster host processing. - - Num Transfers: - Number of buffers in-flight at any one time. Suggested to set less than or equal to half the number of memory buffers. - - For each channel: - - DC Offset Mode: - Controls the behavior of hardware DC offset corrrection. - Off: Disable correction algorithm (pass through). - Manual: Keep last estimated correction when switched from Automatic to Manual. - Automatic: Periodicallly find the best solution to compensate for DC offset. - - IQ Balance Mode: - Controls the behavior of software IQ imbalance corrrection. - Off: Disable correction algorithm (pass through). - Manual: Keep last estimated correction when switched from Automatic to Manual. - Automatic: Periodicallly find the best solution to compensate for image signals. - - AGC: - Chooses between the manual (False) and automatic (True) gain mode where appropriate. - To allow manual control of RF/IF gain stages, manual gain mode must be configured. - - RF Gain: - Overall RF gain of the device. - -file_format: 1 -- GitLab