diff options
author | Nao Pross <np@0hm.ch> | 2021-12-11 14:04:56 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-12-11 14:04:56 +0100 |
commit | a644467ee7d2facf68474d3d0ef4de8a30cb1c37 (patch) | |
tree | a142b15df4b41966f2d094f261f37642f7b78955 /tests/correlator/correlator.grc | |
parent | Continue vector stream and fix bug(?) in GR 3.9 (diff) | |
download | Fading-a644467ee7d2facf68474d3d0ef4de8a30cb1c37.tar.gz Fading-a644467ee7d2facf68474d3d0ef4de8a30cb1c37.zip |
Correctly decode symbols
Diffstat (limited to '')
-rw-r--r-- | tests/correlator/correlator.grc | 180 |
1 files changed, 154 insertions, 26 deletions
diff --git a/tests/correlator/correlator.grc b/tests/correlator/correlator.grc index 26de096..db82de1 100644 --- a/tests/correlator/correlator.grc +++ b/tests/correlator/correlator.grc @@ -1,7 +1,6 @@ options: parameters: author: Naoki Pross - catch_exceptions: 'True' category: '[GRC Hier Blocks]' cmake_opt: '' comment: '' @@ -23,6 +22,7 @@ options: sizing_mode: fixed thread_safe_setters: '' title: Correlator Test + window_size: '' states: bus_sink: false bus_source: false @@ -53,7 +53,6 @@ blocks: comment: '' const_points: '[-1-1j, -1+1j, 1+1j, 1-1j]' dims: '1' - normalization: digital.constellation.AMPLITUDE_NORMALIZATION precision: '8' rot_sym: '4' soft_dec_lut: None @@ -78,6 +77,18 @@ blocks: coordinate: [496, 360.0] rotation: 0 state: enabled +- name: frame_len + id: variable + parameters: + comment: '' + value: len(testvec) + 4 + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [304, 380.0] + rotation: 0 + state: true - name: nfilts id: variable parameters: @@ -150,7 +161,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [48, 360.0] + coordinate: [48, 356.0] rotation: 0 state: enabled - name: timing_loop_bw @@ -165,6 +176,26 @@ blocks: coordinate: [224, 936.0] rotation: 0 state: enabled +- name: analog_random_source_x_0 + id: analog_random_source_x + parameters: + affinity: '' + alias: '' + comment: '' + max: '255' + maxoutbuf: '0' + min: '0' + minoutbuf: '0' + num_samps: '1000' + repeat: 'True' + type: byte + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [48, 428.0] + rotation: 0 + state: true - name: blocks_complex_to_magphase_0_0 id: blocks_complex_to_magphase parameters: @@ -240,11 +271,11 @@ blocks: parameters: affinity: '' alias: '' - align_output: 'False' + align_output: 'True' comment: '' - endianness: gr.GR_LSB_FIRST + endianness: gr.GR_MSB_FIRST k: '2' - l: '4' + l: '8' len_tag_key: '""' maxoutbuf: '0' minoutbuf: '0' @@ -252,7 +283,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [656, 1252.0] + coordinate: [816, 1252.0] rotation: 0 state: enabled - name: blocks_socket_pdu_0 @@ -272,7 +303,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [680, 1420.0] + coordinate: [680, 1428.0] rotation: 0 state: disabled - name: blocks_stream_mux_0 @@ -281,10 +312,10 @@ blocks: affinity: '' alias: '' comment: '' - lengths: '[0, len(testvec)]' + lengths: '[0, len(testvec), 4]' maxoutbuf: '0' minoutbuf: '0' - num_inputs: '2' + num_inputs: '3' type: byte vlen: '1' states: @@ -302,14 +333,14 @@ blocks: comment: '' maxoutbuf: '0' minoutbuf: '0' - num_items: len(testvec) + num_items: frame_len type: byte vlen: '1' states: bus_sink: false bus_source: false bus_structure: null - coordinate: [1208, 1264.0] + coordinate: [1072, 1264.0] rotation: 0 state: true - name: blocks_tagged_stream_align_0 @@ -327,7 +358,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [912, 1260.0] + coordinate: [520, 1260.0] rotation: 0 state: true - name: blocks_tagged_stream_to_pdu_1 @@ -394,10 +425,10 @@ blocks: block_tags: 'False' comment: '' epsilon: '1.0' - freq_offset: '0.0005' + freq_offset: '0.002' maxoutbuf: '0' minoutbuf: '0' - noise_voltage: '0.01' + noise_voltage: '0.1' seed: '243' taps: np.exp(1j * 30 / 180 * np.pi) states: @@ -455,7 +486,6 @@ blocks: maxoutbuf: '0' minoutbuf: '0' samples_per_symbol: sps - truncate: 'False' verbose: 'False' states: bus_sink: false @@ -592,7 +622,7 @@ blocks: \ = lambda tag: pmt.to_python(tag.key) == \"corr_start\"\n start_tags\ \ = list(filter(is_start, \\\n self.get_tags_in_range(0, counter,\ \ counter + len(inp))))\n\n for tag in start_tags:\n self.add_item_tag(0,\ - \ tag.offset, \\\n pmt.intern(\"frame_start\"), pmt.from_long(10))\n\ + \ tag.offset +1, \\\n pmt.intern(\"frame_start\"), pmt.from_long(8))\n\ \n print(f\"Writing {len(out)} samples\")\n return len(out)\n" affinity: '' alias: '' @@ -615,7 +645,7 @@ blocks: parameters: _source_code: "import numpy as np\nfrom gnuradio import gr\n\n# remove print for\ \ now\n# print = lambda x: None\n\nnp.set_printoptions(formatter={'int':hex})\n\ - \nclass blk(gr.sync_block):\n def __init__(self, vlen=4):\n gr.sync_block.__init__(\n\ + \nclass blk(gr.sync_block):\n def __init__(self, vlen=8):\n gr.sync_block.__init__(\n\ \ self,\n name='Printer',\n in_sig=[(np.byte,\ \ vlen)],\n out_sig=[]\n )\n\n def work(self, input_items,\ \ output_items):\n inp = np.array(input_items[0], dtype=np.uint8)\n \ @@ -625,13 +655,13 @@ blocks: comment: '' maxoutbuf: '0' minoutbuf: '0' - vlen: len(testvec) + vlen: frame_len states: - _io_cache: ('Printer', 'blk', [('vlen', '4')], [('0', 'byte', 4)], [], '', []) + _io_cache: ('Printer', 'blk', [('vlen', '8')], [('0', 'byte', 8)], [], '', []) bus_sink: false bus_source: false bus_structure: null - coordinate: [1432, 1260.0] + coordinate: [1296, 1260.0] rotation: 0 state: enabled - name: epy_block_2 @@ -683,7 +713,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [936, 1164.0] + coordinate: [1080, 1140.0] rotation: 0 state: disabled - name: fir_filter_xxx_1 @@ -919,6 +949,103 @@ blocks: coordinate: [1416, 772.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: samp_rate / sps + 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_FREE + tr_slope: qtgui.TRIG_SLOPE_POS + tr_tag: '""' + 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: [1416, 572.0] + rotation: 0 + state: true - name: qtgui_time_sink_x_0_0 id: qtgui_time_sink_x parameters: @@ -1458,16 +1585,16 @@ blocks: state: true connections: +- [analog_random_source_x_0, '0', blocks_stream_mux_0, '2'] - [blocks_complex_to_magphase_0_0, '0', qtgui_time_sink_x_0_0, '0'] - [blocks_complex_to_magphase_0_0, '1', blocks_multiply_const_vxx_0_0, '0'] - [blocks_complex_to_magphase_0_0, '1', blocks_null_sink_3, '0'] - [blocks_multiply_const_vxx_0_0, '0', qtgui_time_sink_x_2_0, '0'] - [blocks_null_source_0, '0', blocks_stream_mux_0, '0'] -- [blocks_repack_bits_bb_0, '0', blocks_tagged_stream_align_0, '0'] -- [blocks_repack_bits_bb_0, '0', epy_block_2, '0'] +- [blocks_repack_bits_bb_0, '0', blocks_stream_to_vector_0, '0'] - [blocks_stream_mux_0, '0', digital_constellation_modulator_0, '0'] - [blocks_stream_to_vector_0, '0', epy_block_1, '0'] -- [blocks_tagged_stream_align_0, '0', blocks_stream_to_vector_0, '0'] +- [blocks_tagged_stream_align_0, '0', blocks_repack_bits_bb_0, '0'] - [blocks_tagged_stream_to_pdu_1, pdus, blocks_socket_pdu_0, pdus] - [blocks_throttle_0, '0', virtual_sink_0, '0'] - [blocks_vector_source_x_0, '0', blocks_stream_mux_0, '1'] @@ -1476,7 +1603,7 @@ connections: - [digital_cma_equalizer_cc_0, '0', fir_filter_xxx_1, '0'] - [digital_cma_equalizer_cc_0, '0', qtgui_const_sink_x_0, '0'] - [digital_cma_equalizer_cc_0, '0', qtgui_time_sink_x_1_1, '0'] -- [digital_constellation_decoder_cb_0, '0', blocks_repack_bits_bb_0, '0'] +- [digital_constellation_decoder_cb_0, '0', blocks_tagged_stream_align_0, '0'] - [digital_constellation_modulator_0, '0', channels_channel_model_0, '0'] - [digital_constellation_modulator_0, '0', qtgui_time_sink_x_1_0, '0'] - [digital_corr_est_cc_0, '0', digital_costas_loop_cc_0, '0'] @@ -1486,6 +1613,7 @@ connections: - [digital_costas_loop_cc_0, '0', qtgui_const_sink_x_0_0, '1'] - [digital_pfb_clock_sync_xxx_0, '0', digital_cma_equalizer_cc_0, '0'] - [epy_block_0, '0', qtgui_const_sink_x_0_0, '0'] +- [epy_block_0, '0', qtgui_time_sink_x_0, '0'] - [epy_block_0, '0', virtual_sink_3, '0'] - [fir_filter_xxx_1, '0', blocks_complex_to_magphase_0_0, '0'] - [virtual_source_0, '0', digital_pfb_clock_sync_xxx_0, '0'] |