options:
  parameters:
    author: AA
    catch_exceptions: 'True'
    category: Custom
    cmake_opt: ''
    comment: ''
    copyright: ''
    description: gnuradio flow graph
    gen_cmake: 'On'
    gen_linking: dynamic
    generate_options: qt_gui
    hier_block_src_path: '.:'
    id: viterbi_equalization
    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: Viterbi Equalization
    window_size: 2048, 2048
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [0, 4]
    rotation: 0
    state: enabled

blocks:
- name: Es
  id: variable
  parameters:
    comment: ''
    value: numpy.mean((numpy.square(numpy.abs(tot_mod[1]))))
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [464, 68]
    rotation: 0
    state: enabled
- name: EsN0_dB
  id: variable_qtgui_range
  parameters:
    comment: ''
    gui_hint: ''
    label: Es/N0 (dB)
    min_len: '200'
    orient: QtCore.Qt.Horizontal
    rangeType: float
    start: '-10'
    step: '1'
    stop: '30'
    value: '2'
    widget: counter_slider
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [608, 4]
    rotation: 0
    state: enabled
- name: R
  id: variable
  parameters:
    comment: ''
    value: 100e3
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [176, 68]
    rotation: 0
    state: enabled
- name: block
  id: variable
  parameters:
    comment: ''
    value: bpsym*1000
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [176, 4]
    rotation: 0
    state: enabled
- name: bpsym
  id: variable
  parameters:
    comment: ''
    value: int(round(math.log(fsm.I())/math.log(2)))
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [464, 4]
    rotation: 0
    state: enabled
- name: channel
  id: variable
  parameters:
    comment: ''
    value: fu.c_channel
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [272, 68]
    rotation: 0
    state: enabled
- name: fsm
  id: variable
  parameters:
    comment: ''
    value: trellis.fsm(len(modulation[1]),len(channel))
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [272, 132]
    rotation: 0
    state: enabled
- name: modulation
  id: variable
  parameters:
    comment: ''
    value: fu.pam4
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [272, 4]
    rotation: 0
    state: enabled
- name: noisevar
  id: variable
  parameters:
    comment: ''
    value: 10**(-EsN0_dB/10.0)  * Es   /2.0
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [464, 132]
    rotation: 0
    state: enabled
- name: tot_mod
  id: variable
  parameters:
    comment: ''
    value: fu.make_isi_lookup(modulation,channel,False)
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [272, 196]
    rotation: 0
    state: enabled
- name: analog_noise_source_x_0
  id: analog_noise_source_x
  parameters:
    affinity: ''
    alias: ''
    amp: noisevar**0.5
    comment: ''
    maxoutbuf: '0'
    minoutbuf: '0'
    noise_type: analog.GR_GAUSSIAN
    seed: '-42'
    type: float
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [752, 444]
    rotation: 0
    state: enabled
- name: analog_random_source_x_0
  id: analog_random_source_x
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    max: '2'
    maxoutbuf: '0'
    min: '0'
    minoutbuf: '0'
    num_samps: '1007'
    repeat: 'True'
    type: byte
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [0, 356]
    rotation: 0
    state: enabled
- name: blocks_add_xx_1
  id: blocks_add_xx
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    maxoutbuf: '0'
    minoutbuf: '0'
    num_inputs: '2'
    type: float
    vlen: '1'
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [1048, 384]
    rotation: 0
    state: enabled
- name: blocks_null_sink_1
  id: blocks_null_sink
  parameters:
    affinity: ''
    alias: ''
    bus_structure_sink: '[[0,],]'
    comment: ''
    num_inputs: '1'
    type: float
    vlen: '1'
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [1208, 344]
    rotation: 0
    state: enabled
- name: blocks_pack_k_bits_bb_0
  id: blocks_pack_k_bits_bb
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    k: bpsym
    maxoutbuf: '0'
    minoutbuf: '0'
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [384, 380]
    rotation: 0
    state: enabled
- name: blocks_throttle_0
  id: blocks_throttle
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    ignoretag: 'True'
    maxoutbuf: '0'
    minoutbuf: '0'
    samples_per_second: R
    type: byte
    vlen: '1'
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [208, 380]
    rotation: 0
    state: enabled
- name: blocks_unpack_k_bits_bb_0
  id: blocks_unpack_k_bits_bb
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    k: bpsym
    maxoutbuf: '0'
    minoutbuf: '0'
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [592, 740.0]
    rotation: 0
    state: enabled
- name: digital_chunks_to_symbols_xx_0
  id: digital_chunks_to_symbols_xx
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    dimension: tot_mod[0]
    in_type: short
    maxoutbuf: '0'
    minoutbuf: '0'
    num_ports: '1'
    out_type: float
    symbol_table: tot_mod[1]
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [760, 244]
    rotation: 0
    state: disabled
- name: digital_chunks_to_symbols_xx_0_0
  id: digital_chunks_to_symbols_xx
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    dimension: modulation[0]
    in_type: byte
    maxoutbuf: '0'
    minoutbuf: '0'
    num_ports: '1'
    out_type: float
    symbol_table: modulation[1]
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [512, 372]
    rotation: 0
    state: enabled
- name: fec_ber_bf_0
  id: fec_ber_bf
  parameters:
    affinity: ''
    alias: ''
    berlimit: '-7.0'
    berminerrors: '100'
    comment: ''
    maxoutbuf: '0'
    minoutbuf: '0'
    test_mode: 'False'
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [792, 744.0]
    rotation: 0
    state: enabled
- name: fir_filter_xxx_0
  id: fir_filter_xxx
  parameters:
    affinity: ''
    alias: ''
    comment: ''
    decim: '1'
    maxoutbuf: '0'
    minoutbuf: '0'
    samp_delay: '0'
    taps: fu.c_channel
    type: fff
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [712, 372]
    rotation: 0
    state: enabled
- name: import_0
  id: import
  parameters:
    alias: ''
    comment: ''
    imports: import numpy
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [0, 116]
    rotation: 0
    state: enabled
- name: import_0_0
  id: import
  parameters:
    alias: ''
    comment: ''
    imports: import gnuradio.trellis.fsm_utils as fu
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [0, 212]
    rotation: 0
    state: enabled
- name: import_0_1
  id: import
  parameters:
    alias: ''
    comment: ''
    imports: import math
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [0, 164]
    rotation: 0
    state: enabled
- name: note_0
  id: note
  parameters:
    alias: ''
    comment: ''
    note: Substititue the metrics/Viterbi block with Viterbi_combo
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [752, 612]
    rotation: 0
    state: enabled
- name: qtgui_number_sink_0
  id: qtgui_number_sink
  parameters:
    affinity: ''
    alias: ''
    autoscale: 'False'
    avg: '0'
    color1: ("black", "black")
    color10: ("black", "black")
    color2: ("black", "black")
    color3: ("black", "black")
    color4: ("black", "black")
    color5: ("black", "black")
    color6: ("black", "black")
    color7: ("black", "black")
    color8: ("black", "black")
    color9: ("black", "black")
    comment: ''
    factor1: '1'
    factor10: '1'
    factor2: '1'
    factor3: '1'
    factor4: '1'
    factor5: '1'
    factor6: '1'
    factor7: '1'
    factor8: '1'
    factor9: '1'
    graph_type: qtgui.NUM_GRAPH_HORIZ
    gui_hint: ''
    label1: BER
    label10: ''
    label2: ''
    label3: ''
    label4: ''
    label5: ''
    label6: ''
    label7: ''
    label8: ''
    label9: ''
    max: '1'
    min: '0'
    name: '"BER"'
    nconnections: '1'
    type: float
    unit1: ''
    unit10: ''
    unit2: ''
    unit3: ''
    unit4: ''
    unit5: ''
    unit6: ''
    unit7: ''
    unit8: ''
    unit9: ''
    update_time: '0.10'
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [984, 700]
    rotation: 0
    state: enabled
- name: trellis_encoder_xx_0
  id: trellis_encoder_xx
  parameters:
    affinity: ''
    alias: ''
    blocklength: '0'
    blockwise: 'False'
    comment: ''
    fsm_args: fsm
    init_state: '0'
    maxoutbuf: '0'
    minoutbuf: '0'
    type: bs
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [520, 244]
    rotation: 0
    state: disabled
- name: trellis_metrics_x_0
  id: trellis_metrics_x
  parameters:
    affinity: ''
    alias: ''
    card: fsm.O()
    comment: ''
    dim: tot_mod[0]
    maxoutbuf: '0'
    metric_type: digital.TRELLIS_EUCLIDEAN
    minoutbuf: '0'
    table: tot_mod[1]
    type: f
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [208, 548]
    rotation: 0
    state: disabled
- name: trellis_viterbi_combined_xx_0
  id: trellis_viterbi_combined_xx
  parameters:
    affinity: ''
    alias: ''
    block_size: block//bpsym
    comment: ''
    dim: tot_mod[0]
    final_state: '-1'
    fsm_args: fsm
    init_state: '-1'
    maxoutbuf: '0'
    metric_type: digital.TRELLIS_EUCLIDEAN
    minoutbuf: '0'
    out_type: b
    table: tot_mod[1]
    type: f
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [352, 692]
    rotation: 0
    state: enabled
- name: trellis_viterbi_x_0
  id: trellis_viterbi_x
  parameters:
    affinity: ''
    alias: ''
    block_size: block//bpsym
    comment: ''
    final_state: '-1'
    fsm_args: fsm
    init_state: '-1'
    maxoutbuf: '0'
    minoutbuf: '0'
    type: b
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [432, 548]
    rotation: 0
    state: disabled
- name: virtual_sink_0
  id: virtual_sink
  parameters:
    alias: ''
    comment: ''
    stream_id: observation
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [1176, 396]
    rotation: 0
    state: enabled
- name: virtual_sink_0_0
  id: virtual_sink
  parameters:
    alias: ''
    comment: ''
    stream_id: info
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [216, 460]
    rotation: 0
    state: enabled
- name: virtual_source_0
  id: virtual_source
  parameters:
    alias: ''
    comment: ''
    stream_id: observation
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [0, 740]
    rotation: 0
    state: enabled
- name: virtual_source_0_0
  id: virtual_source
  parameters:
    alias: ''
    comment: ''
    stream_id: info
  states:
    bus_sink: false
    bus_source: false
    bus_structure: null
    coordinate: [416, 460]
    rotation: 0
    state: enabled

connections:
- [analog_noise_source_x_0, '0', blocks_add_xx_1, '1']
- [analog_random_source_x_0, '0', blocks_throttle_0, '0']
- [analog_random_source_x_0, '0', virtual_sink_0_0, '0']
- [blocks_add_xx_1, '0', blocks_null_sink_1, '0']
- [blocks_add_xx_1, '0', virtual_sink_0, '0']
- [blocks_pack_k_bits_bb_0, '0', digital_chunks_to_symbols_xx_0_0, '0']
- [blocks_pack_k_bits_bb_0, '0', trellis_encoder_xx_0, '0']
- [blocks_throttle_0, '0', blocks_pack_k_bits_bb_0, '0']
- [blocks_unpack_k_bits_bb_0, '0', fec_ber_bf_0, '0']
- [digital_chunks_to_symbols_xx_0, '0', blocks_add_xx_1, '0']
- [digital_chunks_to_symbols_xx_0_0, '0', fir_filter_xxx_0, '0']
- [fec_ber_bf_0, '0', qtgui_number_sink_0, '0']
- [fir_filter_xxx_0, '0', blocks_add_xx_1, '0']
- [trellis_encoder_xx_0, '0', digital_chunks_to_symbols_xx_0, '0']
- [trellis_metrics_x_0, '0', trellis_viterbi_x_0, '0']
- [trellis_viterbi_combined_xx_0, '0', blocks_unpack_k_bits_bb_0, '0']
- [trellis_viterbi_x_0, '0', blocks_unpack_k_bits_bb_0, '0']
- [virtual_source_0, '0', trellis_metrics_x_0, '0']
- [virtual_source_0, '0', trellis_viterbi_combined_xx_0, '0']
- [virtual_source_0_0, '0', fec_ber_bf_0, '1']

metadata:
  file_format: 1
  grc_version: v3.11.0.0git-689-g85dee02b
