diff --git a/examples/cdc_pu_1chan_rx.grc b/examples/cdc_pu_1chan_rx.grc index 2f410e6042402ca54c64bf7a77a92894a47f5be8..2e0fcd9e75b84cb384239e14ee3391f2a2652cf2 100644 --- a/examples/cdc_pu_1chan_rx.grc +++ b/examples/cdc_pu_1chan_rx.grc @@ -82,6 +82,23 @@ blocks: coordinate: [656, 484.0] rotation: 0 state: enabled +- name: reset_var + id: variable_qtgui_push_button + parameters: + comment: '' + gui_hint: '' + label: Reset Stats + pressed: 'True' + released: 'False' + type: bool + value: '0' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [784, 12.0] + rotation: 0 + state: true - name: rf_freq id: variable_qtgui_range parameters: @@ -225,6 +242,39 @@ blocks: bus_structure: null coordinate: [48, 124.0] rotation: 0 + state: disabled +- name: blocks_message_debug_0 + id: blocks_message_debug + parameters: + affinity: '' + alias: '' + comment: '' + en_uvec: 'True' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1072, 216.0] + rotation: 0 + state: true +- name: cdc_dsa_stats_0 + id: cdc_dsa_stats + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + period: ' 1' + primary: 'True' + reset: reset_var + tput_offered: 8*260*25/50e-3 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [776, 220.0] + rotation: 0 state: true - name: digital_ofdm_rx_0 id: digital_ofdm_rx @@ -253,55 +303,122 @@ blocks: coordinate: [264, 148.0] rotation: 0 state: true -- name: epy_block_0 - id: epy_block +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: - _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ - \ GRC will instantiate the first class it finds\nto get ports and parameters\ - \ of your block. The arguments to __init__ will\nbe the parameters. All of\ - \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ - from gnuradio import gr\n\nimport pmt\nimport time\n\nclass blk(gr.sync_block):\ - \ # other base classes are basic_block, decim_block, interp_block\n \"\"\ - \"Embedded Python Block example - a simple multiply const\"\"\"\n\n def __init__(self):\n\ - \ \"\"\"arguments to this function show up as parameters in GRC\"\"\"\ - \n gr.sync_block.__init__(\n self,\n name='Count\ - \ Thruput', # will show up in GRC\n in_sig=[],\n out_sig=[]\n\ - \ )\n self.message_port_register_in(pmt.intern('pdu'))\n \ - \ self.set_msg_handler(pmt.intern('pdu'), self.handle_msg)\n self.count\ - \ = 0\n self.t = time.time()\n\n def handle_msg(self, msg):\n \ - \ self.count += 1\n if self.count % 500 == 0:\n t = time.time()\n\ - \ print(self.count, ':', t - self.t)\n self.t = t\n" affinity: '' alias: '' comment: '' maxoutbuf: '0' minoutbuf: '0' + tag: packet_len + type: byte states: - _io_cache: ('Count Thruput', 'blk', [], [('pdu', 'message', 1)], [], 'Embedded - Python Block example - a simple multiply const', []) bus_sink: false bus_source: false bus_structure: null - coordinate: [744, 232.0] + coordinate: [496, 228.0] rotation: 0 state: true -- name: pdu_tagged_stream_to_pdu_0 - id: pdu_tagged_stream_to_pdu +- name: qtgui_freq_sink_x_0 + id: qtgui_freq_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' + average: '1.0' + axislabels: 'True' + bw: samp_rate + 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' + fc: rf_freq + fftsize: '1024' + freqhalf: 'True' + grid: 'False' + gui_hint: '' + label: Relative Gain + label1: '' + label10: '''''' + label2: '''''' + label3: '''''' + label4: '''''' + label5: '''''' + label6: '''''' + label7: '''''' + label8: '''''' + label9: '''''' + legend: 'True' maxoutbuf: '0' minoutbuf: '0' - tag: packet_len - type: byte + name: '""' + nconnections: '1' + norm_window: 'False' + showports: 'False' + tr_chan: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_FREE + tr_tag: '""' + type: complex + units: dB + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + wintype: window.WIN_BLACKMAN_hARRIS + ymax: '10' + ymin: '-140' states: bus_sink: false bus_source: false bus_structure: null - coordinate: [496, 228.0] + coordinate: [264, 388.0] rotation: 0 state: true +- name: zeromq_sub_msg_source_0 + id: zeromq_sub_msg_source + parameters: + address: '' + affinity: '' + alias: '' + bind: 'False' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + timeout: '100' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [776, 316.0] + rotation: 180 + state: disabled - name: zeromq_sub_source_0 id: zeromq_sub_source parameters: @@ -323,13 +440,17 @@ blocks: bus_structure: null coordinate: [24, 380.0] rotation: 0 - state: disabled + state: enabled connections: - [bladeRF_source_0, '0', digital_ofdm_rx_0, '0'] +- [bladeRF_source_0, '0', qtgui_freq_sink_x_0, '0'] +- [cdc_dsa_stats_0, stats, blocks_message_debug_0, print] - [digital_ofdm_rx_0, '0', pdu_tagged_stream_to_pdu_0, '0'] -- [pdu_tagged_stream_to_pdu_0, pdus, epy_block_0, pdu] +- [pdu_tagged_stream_to_pdu_0, pdus, cdc_dsa_stats_0, pdu] +- [zeromq_sub_msg_source_0, out, cdc_dsa_stats_0, stats_in] - [zeromq_sub_source_0, '0', digital_ofdm_rx_0, '0'] +- [zeromq_sub_source_0, '0', qtgui_freq_sink_x_0, '0'] metadata: file_format: 1 diff --git a/examples/cdc_pu_1chan_tx.grc b/examples/cdc_pu_1chan_tx.grc index e7f1535011d885388ff4dac036784edc889c5953..bc11f93dab6f822f42f061014ba261cf880d1cc8 100644 --- a/examples/cdc_pu_1chan_tx.grc +++ b/examples/cdc_pu_1chan_tx.grc @@ -54,7 +54,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [24, 436.0] + coordinate: [24, 404.0] rotation: 0 state: enabled - name: occupied_carriers @@ -67,7 +67,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [384, 436.0] + coordinate: [384, 404.0] rotation: 0 state: enabled - name: pdu_size @@ -91,7 +91,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [544, 436.0] + coordinate: [544, 404.0] rotation: 0 state: enabled - name: pilot_symbols @@ -103,7 +103,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [672, 436.0] + coordinate: [672, 404.0] rotation: 0 state: enabled - name: randomize @@ -204,7 +204,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [96, 436.0] + coordinate: [96, 404.0] rotation: 0 state: enabled - name: sync_word2 @@ -222,7 +222,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [240, 436.0] + coordinate: [240, 404.0] rotation: 0 state: enabled - name: tx_gain @@ -312,9 +312,9 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [1072, 164.0] + coordinate: [1200, 164.0] rotation: 0 - state: enabled + state: disabled - name: blocks_multiply_const_vxx_0 id: blocks_multiply_const_vxx parameters: @@ -370,7 +370,7 @@ blocks: bus_structure: null coordinate: [1040, 404.0] rotation: 0 - state: disabled + state: enabled - name: cdc_dsa_pu_scenario_cc_0 id: cdc_dsa_pu_scenario_cc parameters: @@ -401,7 +401,7 @@ blocks: cp_len: fft_len//4 fft_len: fft_len header_mod: '"BPSK"' - log: 'True' + log: 'False' maxoutbuf: '0' minoutbuf: '0' occupied_carriers: occupied_carriers @@ -451,7 +451,7 @@ blocks: color9: '"dark green"' comment: '' ctrlpanel: 'False' - fc: '0' + fc: rf_freq fftsize: '1024' freqhalf: 'True' grid: 'False' @@ -498,7 +498,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [1072, 84.0] + coordinate: [1200, 84.0] rotation: 0 state: enabled - name: qtgui_time_sink_x_0 @@ -556,7 +556,7 @@ blocks: marker9: '-1' name: '""' nconnections: '1' - size: 2080*2 + size: '1024' srate: samp_rate stemplot: 'False' style1: '1' @@ -595,7 +595,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [1072, 4.0] + coordinate: [1200, 4.0] rotation: 0 state: enabled - name: zeromq_pub_sink_0 @@ -617,7 +617,7 @@ blocks: bus_structure: null coordinate: [1200, 380.0] rotation: 0 - state: disabled + state: enabled connections: - [analog_random_source_x_0, '0', blocks_stream_to_tagged_stream_0, '0'] diff --git a/examples/cdc_pu_2chan_rx.grc b/examples/cdc_pu_2chan_rx.grc new file mode 100644 index 0000000000000000000000000000000000000000..a8be060ba2b4246f44be751bfe332fe104378572 --- /dev/null +++ b/examples/cdc_pu_2chan_rx.grc @@ -0,0 +1,560 @@ +options: + parameters: + author: '' + catch_exceptions: 'True' + category: '[GRC Hier Blocks]' + cmake_opt: '' + comment: '' + copyright: University of Melbourne + description: '' + gen_cmake: 'On' + gen_linking: dynamic + generate_options: qt_gui + hier_block_src_path: '.:' + id: cdc_pu_2chan_rx + 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: DSA Primary User Rx - 2 Channel + window_size: (1000,1000) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 8] + rotation: 0 + state: enabled + +blocks: +- name: fft_len + id: variable + parameters: + comment: '' + value: '64' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [16, 588.0] + rotation: 0 + state: enabled +- name: n_chan + id: variable + parameters: + comment: '' + value: '2' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [184, 12.0] + rotation: 0 + state: enabled +- name: occupied_carriers + id: variable + parameters: + comment: '' + value: (list(range(-26, -21)) + list(range(-20, -7)) + list(range(-6, 0)) + list(range(1, + 7)) + list(range(8, 21)) + list(range(22, 27)),) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [376, 588.0] + rotation: 0 + state: enabled +- name: pilot_carriers + id: variable + parameters: + comment: '' + value: ((-21, -7, 7, 21,),) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [536, 588.0] + rotation: 0 + state: enabled +- name: pilot_symbols + id: variable + parameters: + comment: '' + value: ((1, 1, 1, -1,),) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [664, 588.0] + rotation: 0 + state: enabled +- name: reset_var + id: variable_qtgui_push_button + parameters: + comment: '' + gui_hint: '' + label: Reset Stats + pressed: 'True' + released: 'False' + type: bool + value: '0' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1104, 12.0] + rotation: 0 + state: true +- name: rf_freq + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: RF Frequency + min_len: '200' + orient: QtCore.Qt.Horizontal + rangeType: float + start: 70e6 + step: 1e3 + stop: 6e9 + value: 915e6 + widget: counter + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [280, 12.0] + rotation: 0 + state: true +- name: rx_gain + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: Rx Gain (dB) + min_len: '200' + orient: QtCore.Qt.Horizontal + rangeType: float + start: '-15' + step: '1' + stop: '60' + value: '30' + widget: counter + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [408, 12.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: [184, 76.0] + rotation: 0 + state: enabled +- name: sync_word1 + id: variable + parameters: + comment: '' + value: '[0., 0., 0., 0., 0., 0., 0., 1.41421356, 0., -1.41421356, 0., 1.41421356, + 0., -1.41421356, 0., -1.41421356, 0., -1.41421356, 0., 1.41421356, 0., -1.41421356, + 0., 1.41421356, 0., -1.41421356, 0., -1.41421356, 0., -1.41421356, 0., -1.41421356, + 0., 1.41421356, 0., -1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, + 0., -1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, 0., -1.41421356, + 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 0., 0., 0., 0., 0.]' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [88, 588.0] + rotation: 0 + state: enabled +- name: sync_word2 + id: variable + parameters: + comment: '' + value: '[0j, 0j, 0j, 0j, 0j, 0j, (-1+0j), (-1+0j), (-1+0j), (-1+0j), (1+0j), (1+0j), + (-1+0j), (-1+0j), (-1+0j), (1+0j), (-1+0j), (1+0j), (1+0j), (1 +0j), (1+0j), + (1+0j), (-1+0j), (-1+0j), (-1+0j), (-1+0j), (-1+0j), (1+0j), (-1+0j), (-1+0j), + (1+0j), (-1+0j), 0j, (1+0j), (-1+0j), (1+0j), (1+0j), (1+0j), (-1+0j), (1+0j), + (1+0j), (1+0j), (-1+0j), (1+0j), (1+0j), (1+0j), (1+0j), (-1+0j), (1+0j), (-1+0j), + (-1+0j), (-1+0j), (1+0j), (-1+0j), (1+0j), (-1+0j), (-1+0j), (-1+0j), (-1+0j), + 0j, 0j, 0j, 0j, 0j]' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [232, 588.0] + rotation: 0 + state: enabled +- name: bladeRF_source_0 + id: bladeRF_source + parameters: + affinity: '' + alias: '' + bias_tee0: 'False' + bias_tee1: 'False' + bw: '0' + comment: '' + dac: '10000' + dc_calibration: LPF_TUNING + dc_offset_mode0: '0' + dc_offset_mode1: '0' + device_id: '0' + fpga_image: '' + fpga_reload: 'False' + freq: rf_freq + gain0: rx_gain + gain1: '10' + gain_mode0: 'False' + gain_mode1: 'False' + if_gain0: '0' + if_gain1: '20' + in_clk: ONBOARD + iq_balance_mode0: '0' + iq_balance_mode1: '0' + lpf_mode: disabled + maxoutbuf: '0' + metadata: 'False' + minoutbuf: '0' + nchan: '1' + out_clk: 'False' + ref_clk: 10e6 + sample_rate: n_chan*samp_rate + sampling: internal + show_pmic: 'False' + smb: '0' + 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: [24, 124.0] + rotation: 0 + state: disabled +- name: blocks_message_debug_0 + id: blocks_message_debug + parameters: + affinity: '' + alias: '' + comment: '' + en_uvec: 'True' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1392, 216.0] + rotation: 0 + state: true +- name: cdc_dsa_stats_0 + id: cdc_dsa_stats + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + period: ' 1' + primary: 'True' + reset: reset_var + tput_offered: '0.0' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1096, 220.0] + rotation: 0 + state: true +- name: digital_ofdm_rx_0 + id: digital_ofdm_rx + parameters: + affinity: '' + alias: '' + comment: '' + cp_len: '16' + fft_len: '64' + header_mod: '"BPSK"' + log: 'False' + maxoutbuf: '0' + minoutbuf: '0' + occupied_carriers: occupied_carriers + packet_len_key: '"packet_len"' + payload_mod: '"QPSK"' + pilot_carriers: pilot_carriers + pilot_symbols: pilot_symbols + scramble_bits: 'False' + sync_word1: sync_word1 + sync_word2: sync_word2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [536, 148.0] + rotation: 0 + state: true +- name: digital_ofdm_rx_0_0 + id: digital_ofdm_rx + parameters: + affinity: '' + alias: '' + comment: '' + cp_len: '16' + fft_len: '64' + header_mod: '"BPSK"' + log: 'False' + maxoutbuf: '0' + minoutbuf: '0' + occupied_carriers: occupied_carriers + packet_len_key: '"packet_len"' + payload_mod: '"QPSK"' + pilot_carriers: pilot_carriers + pilot_symbols: pilot_symbols + scramble_bits: 'False' + sync_word1: sync_word1 + sync_word2: sync_word2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [536, 356.0] + rotation: 0 + state: true +- name: freq_xlating_fft_filter_ccc_0 + id: freq_xlating_fft_filter_ccc + parameters: + affinity: '' + alias: '' + center_freq: samp_rate/2 + comment: '' + decim: n_chan + maxoutbuf: '0' + minoutbuf: '0' + nthreads: '4' + samp_delay: '0' + samp_rate: n_chan*samp_rate + taps: filter.firdes.low_pass(1, n_chan*samp_rate, 0.49e6, 0.1e6) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [280, 196.0] + rotation: 0 + state: true +- name: freq_xlating_fft_filter_ccc_0_0 + id: freq_xlating_fft_filter_ccc + parameters: + affinity: '' + alias: '' + center_freq: -samp_rate/2 + comment: '' + decim: n_chan + maxoutbuf: '0' + minoutbuf: '0' + nthreads: '4' + samp_delay: '0' + samp_rate: n_chan*samp_rate + taps: filter.firdes.low_pass(1, n_chan*samp_rate, 0.49e6, 0.1e6) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [280, 404.0] + rotation: 0 + state: true +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + tag: packet_len + type: byte + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [776, 228.0] + rotation: 0 + state: true +- name: pdu_tagged_stream_to_pdu_0_0 + id: pdu_tagged_stream_to_pdu + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + tag: packet_len + type: byte + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [776, 436.0] + rotation: 0 + state: true +- name: qtgui_freq_sink_x_0 + id: qtgui_freq_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' + average: '1.0' + axislabels: 'True' + bw: samp_rate + 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' + fc: rf_freq + fftsize: '1024' + freqhalf: 'True' + grid: 'False' + gui_hint: '' + label: Relative Gain + label1: '' + label10: '''''' + label2: '''''' + label3: '''''' + label4: '''''' + label5: '''''' + label6: '''''' + label7: '''''' + label8: '''''' + label9: '''''' + legend: 'True' + maxoutbuf: '0' + minoutbuf: '0' + name: '""' + nconnections: '1' + norm_window: 'False' + showports: 'False' + tr_chan: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_FREE + tr_tag: '""' + type: complex + units: dB + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + wintype: window.WIN_BLACKMAN_hARRIS + ymax: '10' + ymin: '-140' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [280, 316.0] + rotation: 0 + state: enabled +- name: zeromq_sub_msg_source_0 + id: zeromq_sub_msg_source + parameters: + address: '' + affinity: '' + alias: '' + bind: 'False' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + timeout: '100' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1088, 316.0] + rotation: 180 + state: disabled +- name: zeromq_sub_source_0 + id: zeromq_sub_source + parameters: + address: tcp://127.0.0.1:95000 + affinity: '' + alias: '' + comment: '' + hwm: '-1' + key: '' + maxoutbuf: '0' + minoutbuf: '0' + pass_tags: 'False' + timeout: '100' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [16, 412.0] + rotation: 0 + state: enabled + +connections: +- [bladeRF_source_0, '0', freq_xlating_fft_filter_ccc_0, '0'] +- [bladeRF_source_0, '0', freq_xlating_fft_filter_ccc_0_0, '0'] +- [bladeRF_source_0, '0', qtgui_freq_sink_x_0, '0'] +- [cdc_dsa_stats_0, stats, blocks_message_debug_0, print] +- [digital_ofdm_rx_0, '0', pdu_tagged_stream_to_pdu_0, '0'] +- [digital_ofdm_rx_0_0, '0', pdu_tagged_stream_to_pdu_0_0, '0'] +- [freq_xlating_fft_filter_ccc_0, '0', digital_ofdm_rx_0, '0'] +- [freq_xlating_fft_filter_ccc_0_0, '0', digital_ofdm_rx_0_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, cdc_dsa_stats_0, pdu] +- [pdu_tagged_stream_to_pdu_0_0, pdus, cdc_dsa_stats_0, pdu] +- [zeromq_sub_msg_source_0, out, cdc_dsa_stats_0, stats_in] +- [zeromq_sub_source_0, '0', freq_xlating_fft_filter_ccc_0, '0'] +- [zeromq_sub_source_0, '0', freq_xlating_fft_filter_ccc_0_0, '0'] +- [zeromq_sub_source_0, '0', qtgui_freq_sink_x_0, '0'] + +metadata: + file_format: 1 diff --git a/examples/cdc_pu_2chan_tx.grc b/examples/cdc_pu_2chan_tx.grc new file mode 100644 index 0000000000000000000000000000000000000000..a05381c0f633d04a3043f3c660d71d13c7702b07 --- /dev/null +++ b/examples/cdc_pu_2chan_tx.grc @@ -0,0 +1,893 @@ +options: + parameters: + author: '' + catch_exceptions: 'True' + category: '[GRC Hier Blocks]' + cmake_opt: '' + comment: '' + copyright: University of Melbourne + description: '' + gen_cmake: 'On' + gen_linking: dynamic + generate_options: qt_gui + hier_block_src_path: '.:' + id: cdc_pu_2chan_tx + 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: DSA Primary User Tx - 2 Channel + window_size: '' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 8] + rotation: 0 + state: enabled + +blocks: +- name: duration_ms + id: variable + parameters: + comment: '' + value: '50' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [632, 12.0] + rotation: 0 + state: true +- name: fft_len + id: variable + parameters: + comment: '' + value: '64' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [16, 628.0] + rotation: 0 + state: enabled +- name: n_chan + id: variable + parameters: + comment: '' + value: '2' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [184, 12.0] + rotation: 0 + state: enabled +- name: occupied_carriers + id: variable + parameters: + comment: '' + value: (list(range(-26, -21)) + list(range(-20, -7)) + list(range(-6, 0)) + list(range(1, + 7)) + list(range(8, 21)) + list(range(22, 27)),) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [376, 628.0] + rotation: 0 + state: enabled +- name: pdu_size + id: variable + parameters: + comment: '' + value: '260' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [552, 12.0] + rotation: 0 + state: enabled +- name: pilot_carriers + id: variable + parameters: + comment: '' + value: ((-21, -7, 7, 21,),) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [536, 628.0] + rotation: 0 + state: enabled +- name: pilot_symbols + id: variable + parameters: + comment: '' + value: ((1, 1, 1, -1,),) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [664, 628.0] + rotation: 0 + state: enabled +- name: randomize + id: variable_qtgui_chooser + parameters: + comment: '' + gui_hint: '' + label: Randomize + label0: 'False' + label1: 'True' + label2: '' + label3: '' + label4: '' + labels: '[]' + num_opts: '2' + option0: '0' + option1: 'True' + option2: '2' + option3: '3' + option4: '4' + options: '[0, 1, 2]' + orient: Qt.QVBoxLayout + type: raw + value: 'False' + widget: combo_box + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [736, 12.0] + rotation: 0 + state: true +- name: rf_freq + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: RF Frequency + min_len: '200' + orient: QtCore.Qt.Horizontal + rangeType: float + start: 70e6 + step: 1e3 + stop: 6e9 + value: 915e6 + widget: counter + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [280, 12.0] + rotation: 0 + state: true +- name: samp_rate + id: variable + parameters: + comment: '' + value: '1000000' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [184, 76.0] + rotation: 0 + state: enabled +- name: scenario + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: Scenario + min_len: '200' + orient: QtCore.Qt.Horizontal + rangeType: int + start: '0' + step: '1' + stop: 2**n_chan - 1 + value: 2**n_chan - 1 + widget: counter + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [872, 12.0] + rotation: 0 + state: true +- name: sync_word1 + id: variable + parameters: + comment: '' + value: '[0., 0., 0., 0., 0., 0., 0., 1.41421356, 0., -1.41421356, 0., 1.41421356, + 0., -1.41421356, 0., -1.41421356, 0., -1.41421356, 0., 1.41421356, 0., -1.41421356, + 0., 1.41421356, 0., -1.41421356, 0., -1.41421356, 0., -1.41421356, 0., -1.41421356, + 0., 1.41421356, 0., -1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, + 0., -1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, 0., -1.41421356, + 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 0., 0., 0., 0., 0.]' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [88, 628.0] + rotation: 0 + state: enabled +- name: sync_word2 + id: variable + parameters: + comment: '' + value: '[0j, 0j, 0j, 0j, 0j, 0j, (-1+0j), (-1+0j), (-1+0j), (-1+0j), (1+0j), (1+0j), + (-1+0j), (-1+0j), (-1+0j), (1+0j), (-1+0j), (1+0j), (1+0j), (1 +0j), (1+0j), + (1+0j), (-1+0j), (-1+0j), (-1+0j), (-1+0j), (-1+0j), (1+0j), (-1+0j), (-1+0j), + (1+0j), (-1+0j), 0j, (1+0j), (-1+0j), (1+0j), (1+0j), (1+0j), (-1+0j), (1+0j), + (1+0j), (1+0j), (-1+0j), (1+0j), (1+0j), (1+0j), (1+0j), (-1+0j), (1+0j), (-1+0j), + (-1+0j), (-1+0j), (1+0j), (-1+0j), (1+0j), (-1+0j), (-1+0j), (-1+0j), (-1+0j), + 0j, 0j, 0j, 0j, 0j]' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [232, 628.0] + rotation: 0 + state: enabled +- name: taps_resampler + id: variable + parameters: + comment: '' + value: filter.firdes.low_pass(1, n_chan*samp_rate, 0.49e6, 100e3) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1184, 12.0] + rotation: 0 + state: enabled +- name: tx_gain + id: variable_qtgui_range + parameters: + comment: '' + gui_hint: '' + label: Tx Gain + min_len: '200' + orient: QtCore.Qt.Horizontal + rangeType: float + start: '-23' + step: '1' + stop: '66' + value: '30' + widget: counter + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [408, 12.0] + rotation: 0 + state: true +- name: analog_random_source_x_0 + id: analog_random_source_x + parameters: + affinity: '' + alias: '' + comment: '' + max: '256' + maxoutbuf: '0' + min: '0' + minoutbuf: '0' + num_samps: '1000' + repeat: 'True' + type: byte + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [32, 236.0] + rotation: 0 + state: true +- name: analog_random_source_x_0_0 + id: analog_random_source_x + parameters: + affinity: '' + alias: '' + comment: '' + max: '256' + maxoutbuf: '0' + min: '0' + minoutbuf: '0' + num_samps: '1000' + repeat: 'True' + type: byte + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [32, 460.0] + rotation: 0 + state: true +- name: analog_sig_source_x_0 + id: analog_sig_source_x + parameters: + affinity: '' + alias: '' + amp: '1' + comment: '' + freq: samp_rate/2 + maxoutbuf: '0' + minoutbuf: '0' + offset: '0' + phase: '0' + samp_rate: n_chan*samp_rate + type: complex + waveform: analog.GR_COS_WAVE + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1168, 316.0] + rotation: 0 + state: enabled +- name: analog_sig_source_x_0_0 + id: analog_sig_source_x + parameters: + affinity: '' + alias: '' + amp: '1' + comment: '' + freq: -samp_rate/2 + maxoutbuf: '0' + minoutbuf: '0' + offset: '0' + phase: '0' + samp_rate: n_chan*samp_rate + type: complex + waveform: analog.GR_COS_WAVE + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1168, 540.0] + rotation: 0 + state: enabled +- name: bladeRF_sink_0 + id: bladeRF_sink + parameters: + affinity: '' + alias: '' + bias_tee0: 'False' + bias_tee1: 'False' + bw: '0' + comment: '' + dac: '10000' + dc_calibration: LPF_TUNING + device_id: '0' + fpga_image: '' + fpga_reload: 'False' + freq: rf_freq + gain0: tx_gain + gain1: '10' + if_gain0: '0' + if_gain1: '20' + in_clk: ONBOARD + lpf_mode: disabled + maxoutbuf: '0' + metadata: 'False' + minoutbuf: '0' + nchan: '1' + out_clk: 'False' + ref_clk: '0' + sample_rate: samp_rate + sampling: internal + show_pmic: 'False' + smb: '0' + 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: [1872, 196.0] + rotation: 0 + state: disabled +- name: blocks_add_xx_0 + id: blocks_add_xx + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + num_inputs: '2' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1544, 264.0] + rotation: 0 + state: enabled +- name: blocks_multiply_const_vxx_0 + id: blocks_multiply_const_vxx + parameters: + affinity: '' + alias: '' + comment: '' + const: '0.025' + maxoutbuf: '0' + minoutbuf: '0' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [656, 260.0] + rotation: 0 + state: true +- name: blocks_multiply_const_vxx_0_0 + id: blocks_multiply_const_vxx + parameters: + affinity: '' + alias: '' + comment: '' + const: '0.025' + maxoutbuf: '0' + minoutbuf: '0' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [656, 484.0] + rotation: 0 + state: true +- name: blocks_multiply_xx_0 + id: blocks_multiply_xx + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + num_inputs: '2' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1400, 248.0] + rotation: 0 + state: enabled +- name: blocks_multiply_xx_0_0 + id: blocks_multiply_xx + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + num_inputs: '2' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1400, 472.0] + rotation: 0 + state: enabled +- name: blocks_stream_to_tagged_stream_0 + id: blocks_stream_to_tagged_stream + parameters: + affinity: '' + alias: '' + comment: '' + len_tag_key: '"packet_len"' + maxoutbuf: '0' + minoutbuf: '0' + packet_len: pdu_size + type: byte + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [200, 252.0] + rotation: 0 + state: true +- name: blocks_stream_to_tagged_stream_0_0 + id: blocks_stream_to_tagged_stream + parameters: + affinity: '' + alias: '' + comment: '' + len_tag_key: '"packet_len"' + maxoutbuf: '0' + minoutbuf: '0' + packet_len: pdu_size + type: byte + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [192, 476.0] + rotation: 0 + state: true +- name: blocks_throttle_0 + id: blocks_throttle + parameters: + affinity: '' + alias: '' + comment: '' + ignoretag: 'True' + maxoutbuf: '0' + minoutbuf: '0' + samples_per_second: n_chan*samp_rate + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1648, 276.0] + rotation: 0 + state: enabled +- name: cdc_dsa_pu_scenario_cc_0 + id: cdc_dsa_pu_scenario_cc + parameters: + affinity: '' + alias: '' + comment: '' + duration_ms: duration_ms + maxoutbuf: '0' + minoutbuf: '0' + num_channels: n_chan + random: randomize + samp_rate: samp_rate + scenario: scenario + seed: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [832, 236.0] + rotation: 0 + state: enabled +- name: digital_ofdm_tx_0 + id: digital_ofdm_tx + parameters: + affinity: '' + alias: '' + comment: '' + cp_len: fft_len//4 + fft_len: fft_len + header_mod: '"BPSK"' + log: 'False' + maxoutbuf: '0' + minoutbuf: '0' + occupied_carriers: occupied_carriers + packet_len_key: '"packet_len"' + payload_mod: '"QPSK"' + pilot_carriers: pilot_carriers + pilot_symbols: pilot_symbols + rolloff: '0' + scramble_bits: 'False' + sync_word1: sync_word1 + sync_word2: sync_word2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [432, 172.0] + rotation: 0 + state: enabled +- name: digital_ofdm_tx_0_0 + id: digital_ofdm_tx + parameters: + affinity: '' + alias: '' + comment: '' + cp_len: fft_len//4 + fft_len: fft_len + header_mod: '"BPSK"' + log: 'False' + maxoutbuf: '0' + minoutbuf: '0' + occupied_carriers: occupied_carriers + packet_len_key: '"packet_len"' + payload_mod: '"QPSK"' + pilot_carriers: pilot_carriers + pilot_symbols: pilot_symbols + rolloff: '0' + scramble_bits: 'False' + sync_word1: sync_word1 + sync_word2: sync_word2 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [432, 396.0] + rotation: 0 + state: enabled +- name: qtgui_freq_sink_x_0 + id: qtgui_freq_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' + average: '1.0' + axislabels: 'True' + bw: n_chan*samp_rate + 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' + fc: rf_freq + fftsize: '1024' + freqhalf: 'True' + grid: 'False' + gui_hint: '' + label: Relative Gain + label1: '' + label10: '''''' + label2: '''''' + label3: '''''' + label4: '''''' + label5: '''''' + label6: '''''' + label7: '''''' + label8: '''''' + label9: '''''' + legend: 'True' + maxoutbuf: '0' + minoutbuf: '0' + name: '""' + nconnections: '1' + norm_window: 'False' + showports: 'False' + tr_chan: '0' + tr_level: '0.0' + tr_mode: qtgui.TRIG_MODE_FREE + tr_tag: '""' + type: complex + units: dB + update_time: '0.10' + width1: '1' + width10: '1' + width2: '1' + width3: '1' + width4: '1' + width5: '1' + width6: '1' + width7: '1' + width8: '1' + width9: '1' + wintype: window.WIN_BLACKMAN_hARRIS + ymax: '10' + ymin: '-140' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1872, 116.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: '' + 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: '""' + nconnections: '1' + size: '1024' + srate: n_chan*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.1' + tr_mode: qtgui.TRIG_MODE_TAG + tr_slope: qtgui.TRIG_SLOPE_POS + tr_tag: '"packet_len"' + 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: [1872, 36.0] + rotation: 0 + state: enabled +- name: rational_resampler_xxx_0 + id: rational_resampler_xxx + parameters: + affinity: '' + alias: '' + comment: '' + decim: '1' + fbw: '0' + interp: '2' + maxoutbuf: '0' + minoutbuf: '0' + taps: taps_resampler + type: ccc + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1192, 220.0] + rotation: 0 + state: true +- name: rational_resampler_xxx_0_0 + id: rational_resampler_xxx + parameters: + affinity: '' + alias: '' + comment: '' + decim: '1' + fbw: '0' + interp: '2' + maxoutbuf: '0' + minoutbuf: '0' + taps: taps_resampler + type: ccc + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1192, 444.0] + rotation: 0 + state: enabled +- name: zeromq_pub_sink_0 + id: zeromq_pub_sink + parameters: + address: tcp://127.0.0.1:95000 + affinity: '' + alias: '' + comment: '' + hwm: '-1' + key: '' + pass_tags: 'False' + timeout: '100' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1872, 412.0] + rotation: 0 + state: enabled + +connections: +- [analog_random_source_x_0, '0', blocks_stream_to_tagged_stream_0, '0'] +- [analog_random_source_x_0_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] +- [analog_sig_source_x_0, '0', blocks_multiply_xx_0, '1'] +- [analog_sig_source_x_0_0, '0', blocks_multiply_xx_0_0, '1'] +- [blocks_add_xx_0, '0', blocks_throttle_0, '0'] +- [blocks_multiply_const_vxx_0, '0', cdc_dsa_pu_scenario_cc_0, '0'] +- [blocks_multiply_const_vxx_0_0, '0', cdc_dsa_pu_scenario_cc_0, '1'] +- [blocks_multiply_xx_0, '0', blocks_add_xx_0, '0'] +- [blocks_multiply_xx_0_0, '0', blocks_add_xx_0, '1'] +- [blocks_stream_to_tagged_stream_0, '0', digital_ofdm_tx_0, '0'] +- [blocks_stream_to_tagged_stream_0_0, '0', digital_ofdm_tx_0_0, '0'] +- [blocks_throttle_0, '0', bladeRF_sink_0, '0'] +- [blocks_throttle_0, '0', qtgui_freq_sink_x_0, '0'] +- [blocks_throttle_0, '0', qtgui_time_sink_x_0, '0'] +- [blocks_throttle_0, '0', zeromq_pub_sink_0, '0'] +- [cdc_dsa_pu_scenario_cc_0, '0', rational_resampler_xxx_0, '0'] +- [cdc_dsa_pu_scenario_cc_0, '1', rational_resampler_xxx_0_0, '0'] +- [digital_ofdm_tx_0, '0', blocks_multiply_const_vxx_0, '0'] +- [digital_ofdm_tx_0_0, '0', blocks_multiply_const_vxx_0_0, '0'] +- [rational_resampler_xxx_0, '0', blocks_multiply_xx_0, '0'] +- [rational_resampler_xxx_0_0, '0', blocks_multiply_xx_0_0, '0'] + +metadata: + file_format: 1