diff options
Diffstat (limited to 'gr-fec/grc')
81 files changed, 1771 insertions, 2980 deletions
diff --git a/gr-fec/grc/CMakeLists.txt b/gr-fec/grc/CMakeLists.txt index f61603df22..5214189b99 100644 --- a/gr-fec/grc/CMakeLists.txt +++ b/gr-fec/grc/CMakeLists.txt @@ -18,9 +18,9 @@ # Boston, MA 02110-1301, USA. ######################################################################## -file(GLOB xml_files "*.xml") +file(GLOB yml_files "*.yml") install(FILES - ${xml_files} + ${yml_files} DESTINATION ${GRC_BLOCKS_DIR} ) diff --git a/gr-fec/grc/fec.tree.yml b/gr-fec/grc/fec.tree.yml new file mode 100644 index 0000000000..e9109ba316 --- /dev/null +++ b/gr-fec/grc/fec.tree.yml @@ -0,0 +1,43 @@ +'[Core]': +- Error Coding: + - Decoders: + - variable_cc_decoder_def + - variable_repetition_decoder_def + - variable_ldpc_decoder_def + - variable_ldpc_bit_flip_decoder_def + - variable_tpc_decoder_def + - variable_dummy_decoder_def + - variable_polar_decoder_sc_def + - variable_polar_decoder_sc_list_def + - variable_polar_decoder_sc_systematic_def + - Encoders: + - variable_cc_encoder_def + - variable_ccsds_encoder_def + - variable_repetition_encoder_def + - variable_tpc_encoder_def + - variable_ldpc_encoder_def + - variable_ldpc_encoder_G_def + - variable_ldpc_encoder_H_def + - variable_polar_encoder_def + - variable_polar_encoder_systematic_def + - variable_dummy_encoder_def + - fec_extended_encoder + - fec_extended_async_encoder + - fec_extended_tagged_encoder + - fec_extended_decoder + - fec_extended_tagged_decoder + - fec_generic_encoder + - fec_generic_decoder + - fec_tagged_encoder + - fec_tagged_decoder + - fec_async_encoder + - fec_async_decoder + - fec_decode_ccsds_27_fb + - fec_encode_ccsds_27_bb + - fec_puncture_xx + - fec_depuncture_bb + - fec_ber_bf + - fec_bercurve_generator + - variable_polar_code_configurator + - variable_ldpc_H_matrix_def + - variable_ldpc_G_matrix_def diff --git a/gr-fec/grc/fec_async_decoder.block.yml b/gr-fec/grc/fec_async_decoder.block.yml new file mode 100644 index 0000000000..94c3e148fd --- /dev/null +++ b/gr-fec/grc/fec_async_decoder.block.yml @@ -0,0 +1,43 @@ +id: fec_async_decoder +label: FEC Async Decoder + +parameters: +- id: decoder + label: Decoder Obj. + dtype: raw +- id: mtu + label: MTU (bytes) + dtype: int + default: '1500' +- id: packed + label: Packed + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] + hide: part +- id: rev_pack + label: Rev. Packing + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + hide: ${ ('part' if packed == 'True' else 'all') } + +inputs: +- domain: message + id: in + optional: true + +outputs: +- domain: message + id: out + optional: true + +templates: + imports: from gnuradio import fec + make: fec.async_decoder(${decoder}, ${packed}, ${rev_pack}, ${mtu}) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_async_decoder.xml b/gr-fec/grc/fec_async_decoder.xml deleted file mode 100644 index 9b67d869e4..0000000000 --- a/gr-fec/grc/fec_async_decoder.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Async Decoder</name> - <key>fec_async_decoder</key> - <import>from gnuradio import fec</import> - <make>fec.async_decoder($decoder, $packed, $rev_pack, $mtu)</make> - - <param> - <name>Decoder Obj.</name> - <key>decoder</key> - <type>raw</type> - </param> - - <param> - <name>MTU (bytes)</name> - <key>mtu</key> - <value>1500</value> - <type>int</type> - </param> - - <param> - <name>Packed</name> - <key>packed</key> - <value>False</value> - <type>enum</type> - <hide>part</hide> - <option> - <name>No</name> - <key>False</key> - </option> - <option> - <name>Yes</name> - <key>True</key> - </option> - </param> - - <param> - <name>Rev. Packing</name> - <key>rev_pack</key> - <value>True</value> - <type>enum</type> - <hide>#if $packed() == 'True' then 'part' else 'all'#</hide> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - - <sink> - <name>in</name> - <type>message</type> - <optional>1</optional> - </sink> - - <source> - <name>out</name> - <type>message</type> - <optional>1</optional> - </source> - - <doc> - </doc> - -</block> diff --git a/gr-fec/grc/fec_async_encoder.block.yml b/gr-fec/grc/fec_async_encoder.block.yml new file mode 100644 index 0000000000..4b3902196e --- /dev/null +++ b/gr-fec/grc/fec_async_encoder.block.yml @@ -0,0 +1,50 @@ +id: fec_async_encoder +label: FEC Async Encoder + +parameters: +- id: encoder + label: Encoder Obj. + dtype: raw +- id: mtu + label: MTU (bytes) + dtype: int + default: '1500' +- id: packed + label: Packed + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] + hide: part +- id: rev_unpack + label: Rev. Unpacking + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + hide: ${ ('part' if packed == 'True' else 'all') } +- id: rev_pack + label: Rev. Packing + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + hide: ${ ('part' if packed == 'True' else 'all') } + +inputs: +- domain: message + id: in + optional: true + +outputs: +- domain: message + id: out + optional: true + +templates: + imports: from gnuradio import fec + make: fec.async_encoder(${encoder}, ${packed}, ${rev_unpack}, ${rev_pack}, ${mtu}) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_async_encoder.xml b/gr-fec/grc/fec_async_encoder.xml deleted file mode 100644 index 68d516fc6d..0000000000 --- a/gr-fec/grc/fec_async_encoder.xml +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Async Encoder</name> - <key>fec_async_encoder</key> - <import>from gnuradio import fec</import> - <make>fec.async_encoder($encoder, $packed, $rev_unpack, $rev_pack, $mtu)</make> - - <param> - <name>Encoder Obj.</name> - <key>encoder</key> - <type>raw</type> - </param> - - <param> - <name>MTU (bytes)</name> - <key>mtu</key> - <value>1500</value> - <type>int</type> - </param> - - <param> - <name>Packed</name> - <key>packed</key> - <value>False</value> - <type>enum</type> - <hide>part</hide> - <option> - <name>No</name> - <key>False</key> - </option> - <option> - <name>Yes</name> - <key>True</key> - </option> - </param> - - <param> - <name>Rev. Unpacking</name> - <key>rev_unpack</key> - <value>True</value> - <type>enum</type> - <hide>#if $packed() == 'True' then 'part' else 'all'#</hide> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - - <param> - <name>Rev. Packing</name> - <key>rev_pack</key> - <value>True</value> - <type>enum</type> - <hide>#if $packed() == 'True' then 'part' else 'all'#</hide> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - - <sink> - <name>in</name> - <type>message</type> - <optional>1</optional> - </sink> - - <source> - <name>out</name> - <type>message</type> - <optional>1</optional> - </source> - - <doc> - </doc> - -</block> diff --git a/gr-fec/grc/fec_ber_bf.block.yml b/gr-fec/grc/fec_ber_bf.block.yml new file mode 100644 index 0000000000..65bb2747f0 --- /dev/null +++ b/gr-fec/grc/fec_ber_bf.block.yml @@ -0,0 +1,37 @@ +id: fec_ber_bf +label: BER + +parameters: +- id: test_mode + label: Test Mode + dtype: enum + default: 'False' + options: ['False', 'True'] +- id: berminerrors + label: BER Min. Errors + dtype: int + default: '100' + hide: ${ ('part' if test_mode else 'all') } +- id: berlimit + label: BER Limit + dtype: float + default: '-7.0' + hide: ${ ('part' if test_mode else 'all') } + +inputs: +- label: in0 + domain: stream + dtype: byte +- label: in1 + domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import fec + make: fec.ber_bf(${test_mode}, ${berminerrors}, ${berlimit}) + +file_format: 1 diff --git a/gr-fec/grc/fec_ber_bf.xml b/gr-fec/grc/fec_ber_bf.xml deleted file mode 100644 index 6d8d85e9ff..0000000000 --- a/gr-fec/grc/fec_ber_bf.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>BER</name> - <key>fec_ber_bf</key> - <import>from gnuradio import fec</import> - <make>fec.ber_bf($test_mode, $berminerrors, $berlimit)</make> - - <param> - <name>Test Mode</name> - <key>test_mode</key> - <value>False</value> - <type>enum</type> - <option> - <name>False</name> - <key>False</key> - </option> - <option> - <name>True</name> - <key>True</key> - </option> - </param> - - <param> - <name>BER Min. Errors</name> - <key>berminerrors</key> - <value>100</value> - <type>int</type> - <hide>#if $test_mode() then 'part' else 'all'#</hide> - </param> - - <param> - <name>BER Limit</name> - <key>berlimit</key> - <value>-7.0</value> - <type>float</type> - <hide>#if $test_mode() then 'part' else 'all'#</hide> - </param> - - <sink> - <name>in0</name> - <type>byte</type> - </sink> - - <sink> - <name>in1</name> - <type>byte</type> - </sink> - - <source> - <name>out</name> - <type>float</type> - </source> - -</block>
\ No newline at end of file diff --git a/gr-fec/grc/fec_bercurve_generator.block.yml b/gr-fec/grc/fec_bercurve_generator.block.yml new file mode 100644 index 0000000000..565a0cf6cd --- /dev/null +++ b/gr-fec/grc/fec_bercurve_generator.block.yml @@ -0,0 +1,63 @@ +id: fec_bercurve_generator +label: BER Curve Gen. + +parameters: +- id: esno + label: Es/N0 + dtype: raw + default: numpy.arange(0.0, 4.0, .5) + hide: part +- id: samp_rate + label: Sample Rate + dtype: float + default: '3200000' +- id: encoder_list + label: Encoder list + dtype: raw + default: '0' +- id: decoder_list + label: Decoder list + dtype: raw + default: '0' +- id: puncpat + label: Puncture Pat. + dtype: string + default: '''11''' +- id: threadtype + label: Threading Type + dtype: enum + options: ['"capillary"', '"ordinary"', '"none"'] + option_labels: [Capillary, Ordinary, None] + hide: part +- id: seed + label: Noise Seed + dtype: int + default: '0' + hide: part + +outputs: +- domain: stream + dtype: byte + multiplicity: ${ len(esno)*2 } + +templates: + imports: |- + from gnuradio import fec + import numpy + make: "fec.bercurve_generator(\n\t${encoder_list}, \\#size\n\t${decoder_list},\ + \ \\#name\n\t${esno}, \\#range of esnos\n\t${samp_rate}, \\#throttle\n \ + \ ${threadtype}, \\#threading mode\n\t${puncpat}, \\#puncture pattern\n\ + \ ${seed} \\# noise gen. seed\n)\n " + +documentation: |- + Note that this block tries to launch many parallel codes to run simultaneously. Thus, it requires that the definitions for each encoder and decoder (specified in the "Encoder list" and "Decoder list") be configured with a parallelism > 0. If the parallelism for one of the encoder or decoder definition blocks is configured to 0, you will likely see an error like: + + generic_decoder=decoder_list[i], + TypeError: 'generic_decoder_sptr' object does not support indexing + + or + + generic_encoder=encoder_list[i], + TypeError: 'generic_encoder_sptr' object does not support indexing + +file_format: 1 diff --git a/gr-fec/grc/fec_bercurve_generator.xml b/gr-fec/grc/fec_bercurve_generator.xml deleted file mode 100644 index 5dfc7c6714..0000000000 --- a/gr-fec/grc/fec_bercurve_generator.xml +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## BER Curve Generator -################################################### - --> -<block> - <name>BER Curve Gen.</name> - <key>fec_bercurve_generator</key> - <import>from gnuradio import fec</import> - <import>import numpy</import> - <make>fec.bercurve_generator( - $encoder_list, \#size - $decoder_list, \#name - $esno, \#range of esnos - $samp_rate, \#throttle - $threadtype, \#threading mode - $puncpat, \#puncture pattern - $seed \# noise gen. seed -) - </make> - - <param> - <name>Es/N0</name> - <key>esno</key> - <value>numpy.arange(0.0, 4.0, .5)</value> - <type>raw</type> - </param> - - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <value>3200000</value> - <type>float</type> - </param> - - <param> - <name>Encoder list</name> - <key>encoder_list</key> - <value>0</value> - <type>raw</type> - </param> - - <param> - <name>Decoder list</name> - <key>decoder_list</key> - <value>0</value> - <type>raw</type> - </param> - - <param> - <name>Puncture Pat.</name> - <key>puncpat</key> - <value>'11'</value> - <type>string</type> - </param> - - <param> - <name>Threading Type</name> - <key>threadtype</key> - <type>enum</type> - <hide>part</hide> - <option> - <name>Capillary</name> - <key>"capillary"</key> - </option> - <option> - <name>Ordinary</name> - <key>"ordinary"</key> - </option> - <option> - <name>None</name> - <key>"none"</key> - </option> - </param> - - <param> - <name>Noise Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - <hide>part</hide> - </param> - - <bus_source>1</bus_source> - - <source> - <name>out</name> - <type>byte</type> - <nports>len($esno)*2</nports> - </source> - - <doc> - Note that this block tries to launch many parallel codes to run simultaneously. Thus, it requires that the definitions for each encoder and decoder (specified in the "Encoder list" and "Decoder list") be configured with a parallelism > 0. If the parallelism for one of the encoder or decoder definition blocks is configured to 0, you will likely see an error like: - - generic_decoder=decoder_list[i], - TypeError: 'generic_decoder_sptr' object does not support indexing - - or - - generic_encoder=encoder_list[i], - TypeError: 'generic_encoder_sptr' object does not support indexing - </doc> -</block> diff --git a/gr-fec/grc/fec_block_tree.xml b/gr-fec/grc/fec_block_tree.xml deleted file mode 100644 index b1535e3c42..0000000000 --- a/gr-fec/grc/fec_block_tree.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Block Tree for gr-fec -################################################### - --> -<cat> - <name>[Core]</name> - <cat> - <name>Error Coding</name> - <cat> - <name>Decoders</name> - <block>variable_cc_decoder_def</block> - <block>variable_repetition_decoder_def</block> - <block>variable_ldpc_decoder_def</block> - <block>variable_ldpc_bit_flip_decoder_def</block> - <block>variable_tpc_decoder_def</block> - <block>variable_dummy_decoder_def</block> - <block>variable_polar_decoder_sc_def</block> - <block>variable_polar_decoder_sc_list_def</block> - <block>variable_polar_decoder_sc_systematic_def</block> - </cat> - <cat> - <name>Encoders</name> - <block>variable_cc_encoder_def</block> - <block>variable_ccsds_encoder_def</block> - <block>variable_repetition_encoder_def</block> - <block>variable_tpc_encoder_def</block> - <block>variable_ldpc_encoder_def</block> - <block>variable_ldpc_encoder_G_def</block> - <block>variable_ldpc_encoder_H_def</block> - <block>variable_polar_encoder_def</block> - <block>variable_polar_encoder_systematic_def</block> - <block>variable_dummy_encoder_def</block> - </cat> - <block>fec_extended_encoder</block> - <block>fec_extended_async_encoder</block> - <block>fec_extended_tagged_encoder</block> - <block>fec_extended_decoder</block> - <block>fec_extended_tagged_decoder</block> - <block>fec_generic_encoder</block> - <block>fec_generic_decoder</block> - <block>fec_tagged_encoder</block> - <block>fec_tagged_decoder</block> - <block>fec_async_encoder</block> - <block>fec_async_decoder</block> - <block>fec_decode_ccsds_27_fb</block> - <block>fec_encode_ccsds_27_bb</block> - <block>fec_puncture_xx</block> - <block>fec_depuncture_bb</block> - <block>fec_ber_bf</block> - <block>fec_bercurve_generator</block> - <block>variable_polar_code_configurator</block> - <block>variable_ldpc_H_matrix_def</block> - <block>variable_ldpc_G_matrix_def</block> - </cat> -</cat> diff --git a/gr-fec/grc/fec_decode_ccsds_27_bb.block.yml b/gr-fec/grc/fec_decode_ccsds_27_bb.block.yml new file mode 100644 index 0000000000..310b54e4e2 --- /dev/null +++ b/gr-fec/grc/fec_decode_ccsds_27_bb.block.yml @@ -0,0 +1,16 @@ +id: fec_encode_ccsds_27_bb +label: Encode CCSDS 27 + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import fec + make: fec.encode_ccsds_27_bb() + +file_format: 1 diff --git a/gr-fec/grc/fec_decode_ccsds_27_bb.xml b/gr-fec/grc/fec_decode_ccsds_27_bb.xml deleted file mode 100644 index ea11837c11..0000000000 --- a/gr-fec/grc/fec_decode_ccsds_27_bb.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Encode CCSDS 27 -################################################### - --> -<block> - <name>Encode CCSDS 27</name> - <key>fec_encode_ccsds_27_bb</key> - <import>from gnuradio import fec</import> - <make>fec.encode_ccsds_27_bb()</make> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> -</block> diff --git a/gr-fec/grc/fec_decode_ccsds_27_fb.block.yml b/gr-fec/grc/fec_decode_ccsds_27_fb.block.yml new file mode 100644 index 0000000000..51eed3783d --- /dev/null +++ b/gr-fec/grc/fec_decode_ccsds_27_fb.block.yml @@ -0,0 +1,16 @@ +id: fec_decode_ccsds_27_fb +label: Decode CCSDS 27 + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import fec + make: fec.decode_ccsds_27_fb() + +file_format: 1 diff --git a/gr-fec/grc/fec_decode_ccsds_27_fb.xml b/gr-fec/grc/fec_decode_ccsds_27_fb.xml deleted file mode 100644 index f7bd9d3b5c..0000000000 --- a/gr-fec/grc/fec_decode_ccsds_27_fb.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Decode CCSDS 27 -################################################### - --> -<block> - <name>Decode CCSDS 27</name> - <key>fec_decode_ccsds_27_fb</key> - <import>from gnuradio import fec</import> - <make>fec.decode_ccsds_27_fb()</make> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> -</block> diff --git a/gr-fec/grc/fec_decoder.block.yml b/gr-fec/grc/fec_decoder.block.yml new file mode 100644 index 0000000000..b90a4749c4 --- /dev/null +++ b/gr-fec/grc/fec_decoder.block.yml @@ -0,0 +1,41 @@ +id: fec_generic_decoder +label: FEC Decoder + +parameters: +- id: decoder + label: Decoder Object + dtype: raw + default: decoder_variable +- id: itype + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: otype + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part + +inputs: +- domain: stream + dtype: ${ itype } + +outputs: +- domain: stream + dtype: ${ otype } + +templates: + imports: from gnuradio import fec + make: fec.decoder(${decoder}, ${itype.size}, ${otype.size}) + +documentation: |- + This is a GNU Radio adaptor for any FEC decoder following the generic_decoder API in the fec module. Input and output are flexible to accomodate decoders that, say, modulate their encoded results into complex or float types. + +file_format: 1 diff --git a/gr-fec/grc/fec_decoder.xml b/gr-fec/grc/fec_decoder.xml deleted file mode 100644 index dd9d08d5f6..0000000000 --- a/gr-fec/grc/fec_decoder.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Decoder</name> - <key>fec_generic_decoder</key> - <import>from gnuradio import fec</import> - <make>fec.decoder($decoder, $itype.size, $otype.size)</make> - - <param> - <name>Decoder Object</name> - <key>decoder</key> - <value>decoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>Input Type</name> - <key>itype</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - - <param> - <name>Output Type</name> - <key>otype</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - - <sink> - <name>in</name> - <type>$itype</type> - </sink> - - <source> - <name>out</name> - <type>$otype</type> - </source> - - <doc> - This is a GNU Radio adaptor for any FEC decoder following the generic_decoder API in the fec module. Input and output are flexible to accomodate decoders that, say, modulate their encoded results into complex or float types. - </doc> - -</block>
\ No newline at end of file diff --git a/gr-fec/grc/fec_depuncture_bb.block.yml b/gr-fec/grc/fec_depuncture_bb.block.yml new file mode 100644 index 0000000000..24a3e62fcc --- /dev/null +++ b/gr-fec/grc/fec_depuncture_bb.block.yml @@ -0,0 +1,33 @@ +id: fec_depuncture_bb +label: Depuncture + +parameters: +- id: puncsize + label: Puncture Size + dtype: int +- id: puncpat + label: Puncture Pattern + dtype: int +- id: delay + label: Delay + dtype: int + default: '0' +- id: sym + label: Symbol + dtype: int + default: '127' + hide: part + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import fec + make: fec.depuncture_bb(${puncsize}, ${puncpat}, ${delay}, ${sym}) + +file_format: 1 diff --git a/gr-fec/grc/fec_depuncture_bb.xml b/gr-fec/grc/fec_depuncture_bb.xml deleted file mode 100644 index 03dec9bd70..0000000000 --- a/gr-fec/grc/fec_depuncture_bb.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Depuncture</name> - <key>fec_depuncture_bb</key> - <import>from gnuradio import fec</import> - <make>fec.depuncture_bb($puncsize, $puncpat, $delay, $sym)</make> - - <param> - <name>Puncture Size</name> - <key>puncsize</key> - <type>int</type> - </param> - - <param> - <name>Puncture Pattern</name> - <key>puncpat</key> - <type>int</type> - </param> - - <param> - <name>Delay</name> - <key>delay</key> - <value>0</value> - <type>int</type> - </param> - - <param> - <name>Symbol</name> - <key>sym</key> - <value>127</value> - <type>int</type> - <hide>part</hide> - </param> - - <sink> - <name>in</name> - <type>byte</type> - </sink> - - <source> - <name>out</name> - <type>byte</type> - </source> - -</block> diff --git a/gr-fec/grc/fec_encoder.block.yml b/gr-fec/grc/fec_encoder.block.yml new file mode 100644 index 0000000000..f530d806dc --- /dev/null +++ b/gr-fec/grc/fec_encoder.block.yml @@ -0,0 +1,41 @@ +id: fec_generic_encoder +label: FEC Encoder + +parameters: +- id: encoder + label: Constituent Encoder + dtype: raw + default: encoder_variable +- id: itype + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: otype + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part + +inputs: +- domain: stream + dtype: ${ itype } + +outputs: +- domain: stream + dtype: ${ otype } + +templates: + imports: from gnuradio import fec + make: fec.encoder(${encoder}, ${itype.size}, ${otype.size}) + +documentation: |- + This is a GNU Radio adaptor for any FEC encoder following the generic_encoder API in the fec module. Input and output are flexible to accomodate encoders that, say, modulate their encoded results into complex or float types. + +file_format: 1 diff --git a/gr-fec/grc/fec_encoder.xml b/gr-fec/grc/fec_encoder.xml deleted file mode 100644 index defb7c3b46..0000000000 --- a/gr-fec/grc/fec_encoder.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Encoder</name> - <key>fec_generic_encoder</key> - <import>from gnuradio import fec</import> - <make>fec.encoder($encoder, $itype.size, $otype.size)</make> - - <param> - <name>Constituent Encoder</name> - <key>encoder</key> - <value>encoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>Input Type</name> - <key>itype</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - - <param> - <name>Output Type</name> - <key>otype</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - - <sink> - <name>in</name> - <type>$itype</type> - </sink> - - <source> - <name>out</name> - <type>$otype</type> - </source> - - <doc> - This is a GNU Radio adaptor for any FEC encoder following the generic_encoder API in the fec module. Input and output are flexible to accomodate encoders that, say, modulate their encoded results into complex or float types. - </doc> - -</block>
\ No newline at end of file diff --git a/gr-fec/grc/fec_extended_async_encoder.block.yml b/gr-fec/grc/fec_extended_async_encoder.block.yml new file mode 100644 index 0000000000..87fb0918ef --- /dev/null +++ b/gr-fec/grc/fec_extended_async_encoder.block.yml @@ -0,0 +1,30 @@ +id: fec_extended_async_encoder +label: FEC Extended Async Encoder + +parameters: +- id: encoder_list + label: Encoder Objects + dtype: raw + default: encoder_variable +- id: puncpat + label: Puncture Pattern + dtype: string + default: '''11''' + +inputs: +- domain: message + id: in + optional: true + +outputs: +- domain: message + id: out + optional: true + +templates: + imports: from gnuradio import fec + make: fec.extended_async_encoder(encoder_obj_list=${encoder_list}, puncpat=${puncpat}) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_extended_async_encoder.xml b/gr-fec/grc/fec_extended_async_encoder.xml deleted file mode 100644 index e61696bcc4..0000000000 --- a/gr-fec/grc/fec_extended_async_encoder.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Extended Async Encoder</name> - <key>fec_extended_async_encoder</key> - <import>from gnuradio import fec</import> - <make>fec.extended_async_encoder(encoder_obj_list=$encoder_list, puncpat=$puncpat)</make> - - <param> - <name>Encoder Objects</name> - <key>encoder_list</key> - <value>encoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>Puncture Pattern</name> - <key>puncpat</key> - <value>'11'</value> - <type>string</type> - </param> - - <sink> - <name>in</name> - <type>message</type> - <optional>1</optional> - </sink> - - <source> - <name>out</name> - <type>message</type> - <optional>1</optional> - </source> - - <doc> - - </doc> - -</block> diff --git a/gr-fec/grc/fec_extended_decoder.block.yml b/gr-fec/grc/fec_extended_decoder.block.yml new file mode 100644 index 0000000000..6e8fb23dbb --- /dev/null +++ b/gr-fec/grc/fec_extended_decoder.block.yml @@ -0,0 +1,44 @@ +id: fec_extended_decoder +label: FEC Extended Decoder + +parameters: +- id: value + label: fake val + dtype: string + default: fec_extended_decoder + hide: all +- id: decoder_list + label: Decoder Objects + dtype: raw + default: decoder_variable +- id: threadtype + label: Threading Type + dtype: enum + options: [capillary, ordinary, none] + option_attributes: + arg: ['''capillary''', '''ordinary''', ' None'] +- id: ann + label: Annihilator + dtype: raw + default: None +- id: puncpat + label: Puncture Pattern + dtype: string + default: '''11''' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import fec + make: fec.extended_decoder(decoder_obj_list=${decoder_list}, threading=${threadtype.arg}, + ann=${ann}, puncpat=${puncpat}, integration_period=10000) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_extended_decoder.xml b/gr-fec/grc/fec_extended_decoder.xml deleted file mode 100644 index 9ed2f06bd0..0000000000 --- a/gr-fec/grc/fec_extended_decoder.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Extended Decoder</name> - <key>fec_extended_decoder</key> - <import>from gnuradio import fec</import> - <make>fec.extended_decoder(decoder_obj_list=$decoder_list, threading=$threadtype.arg, ann=$ann, puncpat=$puncpat, integration_period=10000)</make> - - <param> - <name>fake val</name> - <key>value</key> - <value>fec_extended_decoder</value> - <type>string</type> - <hide>all</hide> - </param> - - <param> - <name>Decoder Objects</name> - <key>decoder_list</key> - <value>decoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>Threading Type</name> - <key>threadtype</key> - <type>enum</type> - <option> - <name>Capillary</name> - <key>capillary</key> - <opt>arg:'capillary'</opt> - </option> - <option> - <name>Ordinary</name> - <key>ordinary</key> - <opt>arg:'ordinary'</opt> - </option> - <option> - <name>None</name> - <key>none</key> - <opt>arg: None</opt> - </option> - </param> - - <param> - <name>Annihilator</name> - <key>ann</key> - <value>None</value> - <type>raw</type> - </param> - - <param> - <name>Puncture Pattern</name> - <key>puncpat</key> - <value>'11'</value> - <type>string</type> - </param> - - <sink> - <name>in</name> - <type>float</type> - </sink> - - <source> - <name>out</name> - <type>byte</type> - </source> - - <doc> - - </doc> - -</block> diff --git a/gr-fec/grc/fec_extended_encoder.block.yml b/gr-fec/grc/fec_extended_encoder.block.yml new file mode 100644 index 0000000000..b478e9bbf6 --- /dev/null +++ b/gr-fec/grc/fec_extended_encoder.block.yml @@ -0,0 +1,35 @@ +id: fec_extended_encoder +label: FEC Extended Encoder + +parameters: +- id: encoder_list + label: Encoder Objects + dtype: raw + default: encoder_variable +- id: threadtype + label: Threading Type + dtype: enum + options: [capillary, ordinary, none] + option_attributes: + arg: ['''capillary''', '''ordinary''', ' None'] +- id: puncpat + label: Puncture Pattern + dtype: string + default: '''11''' + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import fec + make: fec.extended_encoder(encoder_obj_list=${encoder_list}, threading=${threadtype.arg}, + puncpat=${puncpat}) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_extended_encoder.xml b/gr-fec/grc/fec_extended_encoder.xml deleted file mode 100644 index d2a3ec87db..0000000000 --- a/gr-fec/grc/fec_extended_encoder.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Extended Encoder</name> - <key>fec_extended_encoder</key> - <import>from gnuradio import fec</import> - <make>fec.extended_encoder(encoder_obj_list=$encoder_list, threading=$threadtype.arg, puncpat=$puncpat)</make> - - <param> - <name>Encoder Objects</name> - <key>encoder_list</key> - <value>encoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>Threading Type</name> - <key>threadtype</key> - <type>enum</type> - <option> - <name>Capillary</name> - <key>capillary</key> - <opt>arg:'capillary'</opt> - </option> - <option> - <name>Ordinary</name> - <key>ordinary</key> - <opt>arg:'ordinary'</opt> - </option> - <option> - <name>None</name> - <key>none</key> - <opt>arg: None</opt> - </option> - </param> - - <param> - <name>Puncture Pattern</name> - <key>puncpat</key> - <value>'11'</value> - <type>string</type> - </param> - - <sink> - <name>in</name> - <type>byte</type> - </sink> - - <source> - <name>out</name> - <type>byte</type> - </source> - - <doc> - - </doc> - -</block> diff --git a/gr-fec/grc/fec_extended_tagged_decoder.block.yml b/gr-fec/grc/fec_extended_tagged_decoder.block.yml new file mode 100644 index 0000000000..7a22e092f4 --- /dev/null +++ b/gr-fec/grc/fec_extended_tagged_decoder.block.yml @@ -0,0 +1,47 @@ +id: fec_extended_tagged_decoder +label: FEC Extended Tagged Decoder + +parameters: +- id: value + label: fake val + dtype: string + default: fec_extended_decoder + hide: all +- id: decoder_list + label: Decoder Objects + dtype: raw + default: decoder_variable +- id: mtu + label: MTU (bytes) + dtype: int + default: '1500' +- id: ann + label: Annihilator + dtype: raw + default: None +- id: puncpat + label: Puncture Pattern + dtype: string + default: '''11''' +- id: lentagname + label: Length Tag Name + dtype: string + default: None + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import fec + make: self.${id} = ${id} = fec.extended_tagged_decoder(decoder_obj_list=${decoder_list}, + ann=${ann}, puncpat=${puncpat}, integration_period=10000, lentagname=${lentagname}, + mtu=${mtu}) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_extended_tagged_decoder.xml b/gr-fec/grc/fec_extended_tagged_decoder.xml deleted file mode 100644 index 59f34d4df9..0000000000 --- a/gr-fec/grc/fec_extended_tagged_decoder.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Extended Tagged Decoder</name> - <key>fec_extended_tagged_decoder</key> - <import>from gnuradio import fec</import> - <make>self.$(id) = $(id) = fec.extended_tagged_decoder(decoder_obj_list=$decoder_list, ann=$ann, puncpat=$puncpat, integration_period=10000, lentagname=$lentagname, mtu=$mtu)</make> - - <param> - <name>fake val</name> - <key>value</key> - <value>fec_extended_decoder</value> - <type>string</type> - <hide>all</hide> - </param> - - <param> - <name>Decoder Objects</name> - <key>decoder_list</key> - <value>decoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>MTU (bytes)</name> - <key>mtu</key> - <value>1500</value> - <type>int</type> - </param> - - <param> - <name>Annihilator</name> - <key>ann</key> - <value>None</value> - <type>raw</type> - </param> - - <param> - <name>Puncture Pattern</name> - <key>puncpat</key> - <value>'11'</value> - <type>string</type> - </param> - - <param> - <name>Length Tag Name</name> - <key>lentagname</key> - <value>None</value> - <type>string</type> - </param> - - <sink> - <name>in</name> - <type>float</type> - </sink> - - <source> - <name>out</name> - <type>byte</type> - </source> - - <doc> - - </doc> - -</block> diff --git a/gr-fec/grc/fec_extended_tagged_encoder.block.yml b/gr-fec/grc/fec_extended_tagged_encoder.block.yml new file mode 100644 index 0000000000..e59ab3365d --- /dev/null +++ b/gr-fec/grc/fec_extended_tagged_encoder.block.yml @@ -0,0 +1,37 @@ +id: fec_extended_tagged_encoder +label: FEC Extended Tagged Encoder + +parameters: +- id: encoder_list + label: Encoder Objects + dtype: raw + default: encoder_variable +- id: mtu + label: MTU (bytes) + dtype: int + default: '1500' +- id: puncpat + label: Puncture Pattern + dtype: string + default: '''11''' +- id: lentagname + label: Length Tag Name + dtype: string + default: None + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import fec + make: fec.extended_tagged_encoder(encoder_obj_list=${encoder_list}, puncpat=${puncpat}, + lentagname=${lentagname}, mtu=${mtu}) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_extended_tagged_encoder.xml b/gr-fec/grc/fec_extended_tagged_encoder.xml deleted file mode 100644 index 92df08079a..0000000000 --- a/gr-fec/grc/fec_extended_tagged_encoder.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Extended Tagged Encoder</name> - <key>fec_extended_tagged_encoder</key> - <import>from gnuradio import fec</import> - <make>fec.extended_tagged_encoder(encoder_obj_list=$encoder_list, puncpat=$puncpat, lentagname=$lentagname, mtu=$mtu)</make> - - <param> - <name>Encoder Objects</name> - <key>encoder_list</key> - <value>encoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>MTU (bytes)</name> - <key>mtu</key> - <value>1500</value> - <type>int</type> - </param> - - <param> - <name>Puncture Pattern</name> - <key>puncpat</key> - <value>'11'</value> - <type>string</type> - </param> - - <param> - <name>Length Tag Name</name> - <key>lentagname</key> - <value>None</value> - <type>string</type> - </param> - - <sink> - <name>in</name> - <type>byte</type> - </sink> - - <source> - <name>out</name> - <type>byte</type> - </source> - - <doc> - - </doc> - -</block> diff --git a/gr-fec/grc/fec_puncture_xx.block.yml b/gr-fec/grc/fec_puncture_xx.block.yml new file mode 100644 index 0000000000..de7cf16cab --- /dev/null +++ b/gr-fec/grc/fec_puncture_xx.block.yml @@ -0,0 +1,35 @@ +id: fec_puncture_xx +label: Puncture + +parameters: +- id: type + label: Type + dtype: enum + options: [byte, float] + option_attributes: + fcn: [bb, ff] + hide: part +- id: puncsize + label: Puncture Size + dtype: int +- id: puncpat + label: Puncture Pattern + dtype: int +- id: delay + label: Delay + dtype: int + default: '0' + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import fec + make: fec.puncture_${type.fcn}(${puncsize}, ${puncpat}, ${delay}) + +file_format: 1 diff --git a/gr-fec/grc/fec_puncture_xx.xml b/gr-fec/grc/fec_puncture_xx.xml deleted file mode 100644 index 1075a1c062..0000000000 --- a/gr-fec/grc/fec_puncture_xx.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Puncture</name> - <key>fec_puncture_xx</key> - <import>from gnuradio import fec</import> - <make>fec.puncture_$(type.fcn)($puncsize, $puncpat, $delay)</make> - - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - </param> - - <param> - <name>Puncture Size</name> - <key>puncsize</key> - <type>int</type> - </param> - - <param> - <name>Puncture Pattern</name> - <key>puncpat</key> - <type>int</type> - </param> - - <param> - <name>Delay</name> - <key>delay</key> - <value>0</value> - <type>int</type> - </param> - - <sink> - <name>in</name> - <type>$type</type> - </sink> - - <source> - <name>out</name> - <type>$type</type> - </source> - -</block> diff --git a/gr-fec/grc/fec_tagged_decoder.block.yml b/gr-fec/grc/fec_tagged_decoder.block.yml new file mode 100644 index 0000000000..7856bb6794 --- /dev/null +++ b/gr-fec/grc/fec_tagged_decoder.block.yml @@ -0,0 +1,47 @@ +id: fec_tagged_decoder +label: FEC Tagged Decoder + +parameters: +- id: decoder + label: Constituent Decoder + dtype: raw + default: decoder_variable +- id: mtu + label: MTU (bytes) + dtype: int + default: '1500' +- id: itype + label: Input Type + dtype: enum + options: [byte, float] + option_attributes: + size: [gr.sizeof_char, gr.sizeof_float] + hide: part +- id: otype + label: Output Type + dtype: enum + options: [byte, float] + option_attributes: + size: [gr.sizeof_char, gr.sizeof_float] + hide: part +- id: lentagname + label: Length Tag Name + dtype: string + default: '"pkt_len"' + +inputs: +- domain: stream + dtype: ${ itype } + +outputs: +- domain: stream + dtype: ${ otype } + +templates: + imports: from gnuradio import fec + make: fec.tagged_decoder(${decoder}, ${itype.size}, ${otype.size}, ${lentagname}, + ${mtu}) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_tagged_decoder.xml b/gr-fec/grc/fec_tagged_decoder.xml deleted file mode 100644 index 1ea20bd085..0000000000 --- a/gr-fec/grc/fec_tagged_decoder.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Tagged Decoder</name> - <key>fec_tagged_decoder</key> - <import>from gnuradio import fec</import> - <make>fec.tagged_decoder($decoder, $itype.size, $otype.size, $lentagname, $mtu)</make> - - <param> - <name>Constituent Decoder</name> - <key>decoder</key> - <value>decoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>MTU (bytes)</name> - <key>mtu</key> - <value>1500</value> - <type>int</type> - </param> - - <param> - <name>Input Type</name> - <key>itype</key> - <type>enum</type> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - </param> - - <param> - <name>Output Type</name> - <key>otype</key> - <type>enum</type> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - </param> - - <param> - <name>Length Tag Name</name> - <key>lentagname</key> - <value>"pkt_len"</value> - <type>string</type> - </param> - - <sink> - <name>in</name> - <type>$itype</type> - </sink> - - <source> - <name>out</name> - <type>$otype</type> - </source> - - <doc> - </doc> - -</block> diff --git a/gr-fec/grc/fec_tagged_encoder.block.yml b/gr-fec/grc/fec_tagged_encoder.block.yml new file mode 100644 index 0000000000..bf675e4188 --- /dev/null +++ b/gr-fec/grc/fec_tagged_encoder.block.yml @@ -0,0 +1,47 @@ +id: fec_tagged_encoder +label: FEC Tagged Encoder + +parameters: +- id: encoder + label: Constituent Encoder + dtype: raw + default: encoder_variable +- id: mtu + label: MTU (bytes) + dtype: int + default: '1500' +- id: itype + label: Input Type + dtype: enum + options: [byte, float] + option_attributes: + size: [gr.sizeof_char, gr.sizeof_float] + hide: part +- id: otype + label: Output Type + dtype: enum + options: [byte, float] + option_attributes: + size: [gr.sizeof_char, gr.sizeof_float] + hide: part +- id: lentagname + label: Length Tag Name + dtype: string + default: '"pkt_len"' + +inputs: +- domain: stream + dtype: ${ itype } + +outputs: +- domain: stream + dtype: ${ otype } + +templates: + imports: from gnuradio import fec + make: fec.tagged_encoder(${encoder}, ${itype.size}, ${otype.size}, ${lentagname}, + ${mtu}) + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/fec_tagged_encoder.xml b/gr-fec/grc/fec_tagged_encoder.xml deleted file mode 100644 index 30fa20e45c..0000000000 --- a/gr-fec/grc/fec_tagged_encoder.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>FEC Tagged Encoder</name> - <key>fec_tagged_encoder</key> - <import>from gnuradio import fec</import> - <make>fec.tagged_encoder($encoder, $itype.size, $otype.size, $lentagname, $mtu)</make> - - <param> - <name>Constituent Encoder</name> - <key>encoder</key> - <value>encoder_variable</value> - <type>raw</type> - </param> - - <param> - <name>MTU (bytes)</name> - <key>mtu</key> - <value>1500</value> - <type>int</type> - </param> - - <param> - <name>Input Type</name> - <key>itype</key> - <type>enum</type> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - </param> - - <param> - <name>Output Type</name> - <key>otype</key> - <type>enum</type> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - </param> - - <param> - <name>Length Tag Name</name> - <key>lentagname</key> - <value>"pkt_len"</value> - <type>string</type> - </param> - - <sink> - <name>in</name> - <type>$itype</type> - </sink> - - <source> - <name>out</name> - <type>$otype</type> - </source> - - <doc> - </doc> - -</block> diff --git a/gr-fec/grc/ldpc_decoder_def_list.block.yml b/gr-fec/grc/ldpc_decoder_def_list.block.yml new file mode 100644 index 0000000000..8dc32bdc3d --- /dev/null +++ b/gr-fec/grc/ldpc_decoder_def_list.block.yml @@ -0,0 +1,53 @@ +id: variable_ldpc_decoder_def +label: LDPC Decoder Definition + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: file + label: AList File + dtype: file_open +- id: sigma + label: Sigma + dtype: float + default: '0.5' +- id: max_iter + label: Max Iterations + dtype: int + default: '50' +value: ${ value } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.ldpc_decoder.make(${file},\ + \ ${sigma}, ${max_iter}); \n% elif int(ndim)==1 #:\nself.${id} = ${id} = map(\ + \ (lambda a: fec.ldpc_decoder.make(${file}, ${sigma}, ${max_iter})), range(0,${dim1})\ + \ ); \n% else:\nself.${id} = ${id} = map( (lambda b: map( ( lambda a: fec.ldpc_decoder.make(${file},\ + \ ${sigma}, ${max_iter})), range(0,${dim2}) ) ), range(0,${dim1})); \n% endif" + +documentation: |- + This is a soft-decision decoder that uses belief propagation (also known as message passing) that is described at: + + www.cs.toronto.edu/~radford/ftp/LDPC-2012-02-11/decoding.html + + Designed for a memoryless AWGN channel, it assumes a noise variance of the value specified for sigma. + +file_format: 1 diff --git a/gr-fec/grc/ldpc_decoder_def_list.xml b/gr-fec/grc/ldpc_decoder_def_list.xml deleted file mode 100644 index 007f85505c..0000000000 --- a/gr-fec/grc/ldpc_decoder_def_list.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>LDPC Decoder Definition</name> - <key>variable_ldpc_decoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.ldpc_decoder.make($file, $sigma, $max_iter); #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map( (lambda a: fec.ldpc_decoder.make($file, $sigma, $max_iter)), range(0,$dim1) ); #slurp -#else -self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ldpc_decoder.make($file, $sigma, $max_iter)), range(0,$dim2) ) ), range(0,$dim1)); #slurp -#end if</var_make> - <make></make> - -<!-- This definition below is wierd, it seems required for the GRC to be happy, im confused --> - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>AList File</name> - <key>file</key> - <type>file_open</type> - </param> - - <param> - <name>Sigma</name> - <key>sigma</key> - <value>0.5</value> - <type>float</type> - </param> - - <param> - <name>Max Iterations</name> - <key>max_iter</key> - <value>50</value> - <type>int</type> - </param> - - <doc> -This is a soft-decision decoder that uses belief propagation (also known as message passing) that is described at: - -www.cs.toronto.edu/~radford/ftp/LDPC-2012-02-11/decoding.html - -Designed for a memoryless AWGN channel, it assumes a noise variance of the value specified for sigma. - </doc> -</block> diff --git a/gr-fec/grc/ldpc_encoder_def_list.block.yml b/gr-fec/grc/ldpc_encoder_def_list.block.yml new file mode 100644 index 0000000000..cc31e960d9 --- /dev/null +++ b/gr-fec/grc/ldpc_encoder_def_list.block.yml @@ -0,0 +1,38 @@ +id: variable_ldpc_encoder_def +label: LDPC Encoder Definition + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: file + label: AList File + dtype: file_open +value: ${ fec.ldpc_encoder_make(file) } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.ldpc_encoder_make(${file});\ + \ \n% elif int(ndim)==1 #:\nself.${id} = ${id} = map( (lambda a: fec.ldpc_encoder_make(${file})),\ + \ range(0,${dim1}) ); \n% else:\nself.${id} = ${id} = map( (lambda b: map(\ + \ ( lambda a: fec.ldpc_encoder_make(${file})), range(0,${dim2}) ) ), range(0,${dim1}));\ + \ \n% endif" + +file_format: 1 diff --git a/gr-fec/grc/ldpc_encoder_def_list.xml b/gr-fec/grc/ldpc_encoder_def_list.xml deleted file mode 100755 index 985568afc5..0000000000 --- a/gr-fec/grc/ldpc_encoder_def_list.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> - -<block> - <name>LDPC Encoder Definition</name> - <key>variable_ldpc_encoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.ldpc_encoder_make($file); #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map( (lambda a: fec.ldpc_encoder_make($file)), range(0,$dim1) ); #slurp -#else -self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ldpc_encoder_make($file)), range(0,$dim2) ) ), range(0,$dim1)); #slurp -#end if</var_make> - <var_value>fec.ldpc_encoder_make($file)</var_value> - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>AList File</name> - <key>file</key> - <value></value> - <type>file_open</type> - </param> - -</block> diff --git a/gr-fec/grc/tpc_decoder_def_list.block.yml b/gr-fec/grc/tpc_decoder_def_list.block.yml new file mode 100644 index 0000000000..94fb55b1b9 --- /dev/null +++ b/gr-fec/grc/tpc_decoder_def_list.block.yml @@ -0,0 +1,77 @@ +id: variable_tpc_decoder_def +label: TPC Decoder Definition + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: row_poly + label: Row Encoder Polynomials + dtype: int_vector + default: '[3]' +- id: col_poly + label: Column Encoder Polynomials + dtype: int_vector + default: '[43]' +- id: krow + label: K Row + dtype: int + default: '26' +- id: kcol + label: K Col + dtype: int + default: '6' +- id: bval + label: B + dtype: int + default: '9' +- id: qval + label: Q + dtype: int + default: '3' +- id: max_iter + label: NUM Turbo Iterations + dtype: int + default: '6' +- id: decoder_type + label: Decoder Type + dtype: enum + options: ['0', '1', '2', '3', '4'] + option_labels: [Linear LOG-MAP, MAX LOG-MAP, Constant LOG-MAP, LOG-MAP (LUT Correction + Factor), LOG-MAP (C Correction Factor)] +value: ${ value } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.tpc_decoder_make(${row_poly},\ + \ ${col_poly}, ${krow}, ${kcol}, ${bval}, ${qval}, ${max_iter}, ${decoder_type});\ + \ \n% elif int(ndim)==1 #:\nself.${id} = ${id} = map( (lambda a: fec.tpc_decoder_make(${row_poly},\ + \ ${col_poly}, ${krow}, ${kcol}, ${bval}, ${qval}, ${max_iter}, ${decoder_type})),\ + \ range(0,${dim1}) ); \n% else:\nself.${id} = ${id} = map( (lambda b: map(\ + \ ( lambda a: fec.tpc_decoder_make(${row_poly}, ${col_poly}, ${krow}, ${kcol},\ + \ ${bval}, ${qval}, ${max_iter}, ${decoder_type})), range(0,${dim2}) ) ),\ + \ range(0,${dim1})); \n% endif" + +documentation: |- + This instantiates a 1-dim array or 2-dim array fo Turbo Product Encoders (TPC). + Restrictions: B and Q must be carefully chosen such that when the matrices are setup, + and the first B outputs are removed, they (the first B outputs) are all 0's. + +file_format: 1 diff --git a/gr-fec/grc/tpc_decoder_def_list.xml b/gr-fec/grc/tpc_decoder_def_list.xml deleted file mode 100644 index aac08dbb76..0000000000 --- a/gr-fec/grc/tpc_decoder_def_list.xml +++ /dev/null @@ -1,142 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>TPC Decoder Definition</name> - <key>variable_tpc_decoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.tpc_decoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval, $max_iter, $decoder_type); #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map( (lambda a: fec.tpc_decoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval, $max_iter, $decoder_type)), range(0,$dim1) ); #slurp -#else -self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.tpc_decoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval, $max_iter, $decoder_type)), range(0,$dim2) ) ), range(0,$dim1)); #slurp -#end if</var_make> - <make></make> - -<!-- This definition below is wierd, it seems required for the GRC to be happy, im confused --> - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Row Encoder Polynomials</name> - <key>row_poly</key> - <value>[3]</value> - <type>int_vector</type> - </param> - - <param> - <name>Column Encoder Polynomials</name> - <key>col_poly</key> - <value>[43]</value> - <type>int_vector</type> - </param> - - <param> - <name>K Row</name> - <key>krow</key> - <value>26</value> - <type>int</type> - </param> - - <param> - <name>K Col</name> - <key>kcol</key> - <value>6</value> - <type>int</type> - </param> - - <param> - <name>B</name> - <key>bval</key> - <value>9</value> - <type>int</type> - </param> - - <param> - <name>Q</name> - <key>qval</key> - <value>3</value> - <type>int</type> - </param> - - <param> - <name>NUM Turbo Iterations</name> - <key>max_iter</key> - <value>6</value> - <type>int</type> - </param> - - <param> - <name>Decoder Type</name> - <key>decoder_type</key> - <value></value> - <type>enum</type> - <option> - <name>Linear LOG-MAP</name> - <key>0</key> - </option> - <option> - <name>MAX LOG-MAP</name> - <key>1</key> - </option> - <option> - <name>Constant LOG-MAP</name> - <key>2</key> - </option> - <option> - <name>LOG-MAP (LUT Correction Factor)</name> - <key>3</key> - </option> - <option> - <name>LOG-MAP (C Correction Factor)</name> - <key>4</key> - </option> - </param> - - - <doc> - This instantiates a 1-dim array or 2-dim array fo Turbo Product Encoders (TPC). - Restrictions: B and Q must be carefully chosen such that when the matrices are setup, - and the first B outputs are removed, they (the first B outputs) are all 0's. - </doc> -</block> diff --git a/gr-fec/grc/tpc_encoder_def_list.block.yml b/gr-fec/grc/tpc_encoder_def_list.block.yml new file mode 100644 index 0000000000..9e47207750 --- /dev/null +++ b/gr-fec/grc/tpc_encoder_def_list.block.yml @@ -0,0 +1,66 @@ +id: variable_tpc_encoder_def +label: TPC Encoder Definition + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: row_poly + label: Row Encoder Polynomials + dtype: int_vector + default: '[3]' +- id: col_poly + label: Column Encoder Polynomials + dtype: int_vector + default: '[43]' +- id: krow + label: K Row + dtype: int + default: '26' +- id: kcol + label: K Col + dtype: int + default: '6' +- id: bval + label: B + dtype: int + default: '9' +- id: qval + label: Q + dtype: int + default: '3' +value: ${ value } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.tpc_encoder_make(${row_poly},\ + \ ${col_poly}, ${krow}, ${kcol}, ${bval}, ${qval}); \n% elif int(ndim)==1\ + \ #:\nself.${id} = ${id} = map( (lambda a: fec.tpc_encoder_make(${row_poly},\ + \ ${col_poly}, ${krow}, ${kcol}, ${bval}, ${qval})), range(0,${dim1}) ); \n\ + % else:\nself.${id} = ${id} = map( (lambda b: map( ( lambda a: fec.tpc_encoder_make(${row_poly},\ + \ ${col_poly}, ${krow}, ${kcol}, ${bval}, ${qval})), range(0,${dim2}) ) ),\ + \ range(0,${dim1})); \n% endif" + +documentation: |- + This instantiates a 1-dim array or 2-dim array fo Turbo Product Encoders (TPC). + Restrictions: B and Q must be carefully chosen such that when the matrices are setup, + and the first B outputs are removed, they (the first B outputs) are all 0's. + +file_format: 1 diff --git a/gr-fec/grc/tpc_encoder_def_list.xml b/gr-fec/grc/tpc_encoder_def_list.xml deleted file mode 100755 index c035795b58..0000000000 --- a/gr-fec/grc/tpc_encoder_def_list.xml +++ /dev/null @@ -1,107 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>TPC Encoder Definition</name> - <key>variable_tpc_encoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.tpc_encoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval); #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map( (lambda a: fec.tpc_encoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval)), range(0,$dim1) ); #slurp -#else -self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.tpc_encoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval)), range(0,$dim2) ) ), range(0,$dim1)); #slurp -#end if</var_make> - <make></make> - -<!-- This definition below is wierd, it seems required for the GRC to be happy, im confused --> - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Row Encoder Polynomials</name> - <key>row_poly</key> - <value>[3]</value> - <type>int_vector</type> - </param> - - <param> - <name>Column Encoder Polynomials</name> - <key>col_poly</key> - <value>[43]</value> - <type>int_vector</type> - </param> - - <param> - <name>K Row</name> - <key>krow</key> - <value>26</value> - <type>int</type> - </param> - - <param> - <name>K Col</name> - <key>kcol</key> - <value>6</value> - <type>int</type> - </param> - - <param> - <name>B</name> - <key>bval</key> - <value>9</value> - <type>int</type> - </param> - - <param> - <name>Q</name> - <key>qval</key> - <value>3</value> - <type>int</type> - </param> - - <doc> - This instantiates a 1-dim array or 2-dim array fo Turbo Product Encoders (TPC). - Restrictions: B and Q must be carefully chosen such that when the matrices are setup, - and the first B outputs are removed, they (the first B outputs) are all 0's. - </doc> -</block> diff --git a/gr-fec/grc/variable_cc_decoder_def_list.block.yml b/gr-fec/grc/variable_cc_decoder_def_list.block.yml new file mode 100644 index 0000000000..0dd4aa86b2 --- /dev/null +++ b/gr-fec/grc/variable_cc_decoder_def_list.block.yml @@ -0,0 +1,76 @@ +id: variable_cc_decoder_def +label: CC Decoder Definition + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: framebits + label: Frame Bits + dtype: int + default: '2048' +- id: k + label: Constraint Length (K) + dtype: int + default: '7' +- id: rate + label: Rate Inverse (1/R) (1/2) --> 2 + dtype: int + default: '2' +- id: polys + label: Polynomials + dtype: int_vector + default: '[79,109]' +- id: state_start + label: Start State + dtype: int + default: '0' +- id: state_end + label: End State + dtype: int + default: '-1' +- id: mode + label: Streaming Behavior + dtype: enum + options: [fec.CC_STREAMING, fec.CC_TERMINATED, fec.CC_TAILBITING, fec.CC_TRUNCATED] + option_labels: [Streaming, Terminated, Tailbiting, Truncated] +- id: padding + label: Byte Padding + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] +value: ${ fec.cc_decoder.make(framebits, k, rate, polys, state_start, state_end, mode, + padding) } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.cc_decoder.make(${framebits},\ + \ ${k}, ${rate}, ${polys}, ${state_start}, ${state_end}, ${mode}, ${padding})\n\ + % elif int(ndim)==1 #:\nself.${id} = ${id} = map( (lambda a: fec.cc_decoder.make(${framebits},\ + \ ${k}, ${rate}, ${polys}, ${state_start}, ${state_end}, ${mode}, ${padding})),\ + \ range(0,${dim1}) ); \n% else:\nself.${id} = ${id} = map( (lambda b: map(\ + \ ( lambda a: fec.cc_decoder.make(${framebits}, ${k}, ${rate}, ${polys}, ${state_start},\ + \ ${state_end}, ${mode}, ${padding})), range(0,${dim2}) ) ), range(0,${dim1}));\ + \ \n% endif\n " + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/variable_cc_decoder_def_list.xml b/gr-fec/grc/variable_cc_decoder_def_list.xml deleted file mode 100644 index daa7c73ef4..0000000000 --- a/gr-fec/grc/variable_cc_decoder_def_list.xml +++ /dev/null @@ -1,148 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC CC DECODER -################################################### - --> -<block> - <name>CC Decoder Definition</name> - <key>variable_cc_decoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.cc_decoder.make($framebits, $k, $rate, $polys, $state_start, $state_end, $mode, $padding) -#else if int($ndim())==1 # -self.$(id) = $(id) = map( (lambda a: fec.cc_decoder.make($framebits, $k, $rate, $polys, $state_start, $state_end, $mode, $padding)), range(0,$dim1) ); #slurp -#else -self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.cc_decoder.make($framebits, $k, $rate, $polys, $state_start, $state_end, $mode, $padding)), range(0,$dim2) ) ), range(0,$dim1)); #slurp -#end if - </var_make> - <var_value>fec.cc_decoder.make($framebits, $k, $rate, $polys, $state_start, $state_end, $mode, $padding)</var_value> - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Frame Bits</name> - <key>framebits</key> - <value>2048</value> - <type>int</type> - </param> - - <param> - <name>Constraint Length (K)</name> - <key>k</key> - <value>7</value> - <type>int</type> - </param> - - <param> - <name>Rate Inverse (1/R) (1/2) --> 2</name> - <key>rate</key> - <value>2</value> - <type>int</type> - </param> - - <param> - <name>Polynomials</name> - <key>polys</key> - <value>[79,109]</value> - <type>int_vector</type> - </param> - - <param> - <name>Start State</name> - <key>state_start</key> - <value>0</value> - <type>int</type> - </param> - - <param> - <name>End State</name> - <key>state_end</key> - <value>-1</value> - <type>int</type> - </param> - - <param> - <name>Streaming Behavior</name> - <key>mode</key> - <value></value> - <type>enum</type> - <option> - <name>Streaming</name> - <key>fec.CC_STREAMING</key> - </option> - <option> - <name>Terminated</name> - <key>fec.CC_TERMINATED</key> - </option> - <option> - <name>Tailbiting</name> - <key>fec.CC_TAILBITING</key> - </option> - <option> - <name>Truncated</name> - <key>fec.CC_TRUNCATED</key> - </option> - </param> - - <param> - <name>Byte Padding</name> - <key>padding</key> - <value>False</value> - <type>enum</type> - <option> - <name>No</name> - <key>False</key> - </option> - <option> - <name>Yes</name> - <key>True</key> - </option> - </param> - - <doc> - </doc> -</block> diff --git a/gr-fec/grc/variable_cc_encoder_def_list.block.yml b/gr-fec/grc/variable_cc_encoder_def_list.block.yml new file mode 100644 index 0000000000..43f330a617 --- /dev/null +++ b/gr-fec/grc/variable_cc_encoder_def_list.block.yml @@ -0,0 +1,66 @@ +id: variable_cc_encoder_def +label: CC Encoder Definition + +parameters: +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: framebits + label: Frame Bits + dtype: int + default: '2048' +- id: k + label: Constraint Length (K) + dtype: int + default: '7' +- id: rate + label: Rate Inverse (1/R) (1/2) --> 2 + dtype: int + default: '2' +- id: polys + label: Polynomials + dtype: int_vector + default: '[79,109]' +- id: state_start + label: Start State + dtype: int + default: '0' +- id: mode + label: Streaming Behavior + dtype: enum + options: [fec.CC_STREAMING, fec.CC_TERMINATED, fec.CC_TAILBITING, fec.CC_TRUNCATED] + option_labels: [Streaming, Terminated, Tailbiting, Truncated] +- id: padding + label: Byte Padding + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] +value: ${ fec.cc_encoder_make(framebits, k, rate, polys, state_start, mode, padding) + } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.cc_encoder_make(${framebits},\ + \ ${k}, ${rate}, ${polys}, ${state_start}, ${mode}, ${padding})\n% elif int(ndim)==1\ + \ #:\nself.${id} = ${id} = map( (lambda a: fec.cc_encoder_make(${framebits},\ + \ ${k}, ${rate}, ${polys}, ${state_start}, ${mode}, ${padding})), range(0,${dim1})\ + \ ); \n% else:\nself.${id} = ${id} = map( (lambda b: map( ( lambda a: fec.cc_encoder_make(${framebits},\ + \ ${k}, ${rate}, ${polys}, ${state_start}, ${mode}, ${padding})), range(0,${dim2})\ + \ ) ), range(0,${dim1})); \n% endif\n " + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/variable_cc_encoder_def_list.xml b/gr-fec/grc/variable_cc_encoder_def_list.xml deleted file mode 100644 index 92965204d1..0000000000 --- a/gr-fec/grc/variable_cc_encoder_def_list.xml +++ /dev/null @@ -1,133 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC MAKING FOR GREAT JUSTICE -################################################### - --> -<block> - <name>CC Encoder Definition</name> - <key>variable_cc_encoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.cc_encoder_make($framebits, $k, $rate, $polys, $state_start, $mode, $padding) -#else if int($ndim())==1 # -self.$(id) = $(id) = map( (lambda a: fec.cc_encoder_make($framebits, $k, $rate, $polys, $state_start, $mode, $padding)), range(0,$dim1) ); #slurp -#else -self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.cc_encoder_make($framebits, $k, $rate, $polys, $state_start, $mode, $padding)), range(0,$dim2) ) ), range(0,$dim1)); #slurp -#end if - </var_make> - <var_value>fec.cc_encoder_make($framebits, $k, $rate, $polys, $state_start, $mode, $padding)</var_value> - <make></make> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Frame Bits</name> - <key>framebits</key> - <value>2048</value> - <type>int</type> - </param> - - <param> - <name>Constraint Length (K)</name> - <key>k</key> - <value>7</value> - <type>int</type> - </param> - - <param> - <name>Rate Inverse (1/R) (1/2) --> 2</name> - <key>rate</key> - <value>2</value> - <type>int</type> - </param> - - <param> - <name>Polynomials</name> - <key>polys</key> - <value>[79,109]</value> - <type>int_vector</type> - </param> - - <param> - <name>Start State</name> - <key>state_start</key> - <value>0</value> - <type>int</type> - </param> - - <param> - <name>Streaming Behavior</name> - <key>mode</key> - <value></value> - <type>enum</type> - <option> - <name>Streaming</name> - <key>fec.CC_STREAMING</key> - </option> - <option> - <name>Terminated</name> - <key>fec.CC_TERMINATED</key> - </option> - <option> - <name>Tailbiting</name> - <key>fec.CC_TAILBITING</key> - </option> - <option> - <name>Truncated</name> - <key>fec.CC_TRUNCATED</key> - </option> - </param> - - <param> - <name>Byte Padding</name> - <key>padding</key> - <value>False</value> - <type>enum</type> - <option> - <name>No</name> - <key>False</key> - </option> - <option> - <name>Yes</name> - <key>True</key> - </option> - </param> - - <doc> - </doc> -</block> diff --git a/gr-fec/grc/variable_ccsds_encoder_def_list.block.yml b/gr-fec/grc/variable_ccsds_encoder_def_list.block.yml new file mode 100644 index 0000000000..7a412dde96 --- /dev/null +++ b/gr-fec/grc/variable_ccsds_encoder_def_list.block.yml @@ -0,0 +1,46 @@ +id: variable_ccsds_encoder_def +label: CCSDS Encoder Definition + +parameters: +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: framebits + label: Frame Bits + dtype: int + default: '2048' +- id: state_start + label: Start State + dtype: int + default: '0' +- id: mode + label: Streaming Behavior + dtype: enum + options: [fec.CC_STREAMING, fec.CC_TERMINATED, fec.CC_TAILBITING, fec.CC_TRUNCATED] + option_labels: [Streaming, Terminated, Tailbiting, Truncated] +value: ${ fec.ccsds_encoder_make(framebits, state_start, mode) } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.ccsds_encoder_make(${framebits},\ + \ ${state_start}, ${mode})\n% elif int(ndim)==1 #:\nself.${id} = ${id} = map(\ + \ (lambda a: fec.ccsds_encoder_make(${framebits}, ${state_start}, ${mode})),\ + \ range(0,${dim1}) ); \n% else:\nself.${id} = ${id} = map( (lambda b: map(\ + \ ( lambda a: fec.ccsds_encoder_make(${framebits}, ${state_start}, ${mode})),\ + \ range(0,${dim2}) ) ), range(0,${dim1})); \n% endif\n " + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/variable_ccsds_encoder_def_list.xml b/gr-fec/grc/variable_ccsds_encoder_def_list.xml deleted file mode 100644 index d925fd1a7e..0000000000 --- a/gr-fec/grc/variable_ccsds_encoder_def_list.xml +++ /dev/null @@ -1,97 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC MAKING FOR GREAT JUSTICE -################################################### - --> -<block> - <name>CCSDS Encoder Definition</name> - <key>variable_ccsds_encoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.ccsds_encoder_make($framebits, $state_start, $mode) -#else if int($ndim())==1 # -self.$(id) = $(id) = map( (lambda a: fec.ccsds_encoder_make($framebits, $state_start, $mode)), range(0,$dim1) ); #slurp -#else -self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ccsds_encoder_make($framebits, $state_start, $mode)), range(0,$dim2) ) ), range(0,$dim1)); #slurp -#end if - </var_make> - <var_value>fec.ccsds_encoder_make($framebits, $state_start, $mode)</var_value> - <make></make> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Frame Bits</name> - <key>framebits</key> - <value>2048</value> - <type>int</type> - </param> - - <param> - <name>Start State</name> - <key>state_start</key> - <value>0</value> - <type>int</type> - </param> - - <param> - <name>Streaming Behavior</name> - <key>mode</key> - <value></value> - <type>enum</type> - <option> - <name>Streaming</name> - <key>fec.CC_STREAMING</key> - </option> - <option> - <name>Terminated</name> - <key>fec.CC_TERMINATED</key> - </option> - <option> - <name>Tailbiting</name> - <key>fec.CC_TAILBITING</key> - </option> - <option> - <name>Truncated</name> - <key>fec.CC_TRUNCATED</key> - </option> - </param> - - <doc> - </doc> -</block> diff --git a/gr-fec/grc/variable_dummy_decoder_def_list.block.yml b/gr-fec/grc/variable_dummy_decoder_def_list.block.yml new file mode 100644 index 0000000000..14d0ff42d9 --- /dev/null +++ b/gr-fec/grc/variable_dummy_decoder_def_list.block.yml @@ -0,0 +1,40 @@ +id: variable_dummy_decoder_def +label: Dummy Decoder Definition + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: framebits + label: Frame Bits + dtype: int + default: '2048' +value: ${ fec.dummy_decoder.make(framebits) } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.dummy_decoder.make(${framebits})\n\ + % elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.dummy_decoder.make(${framebits})),\ + \ range(0,${dim1})) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda\ + \ a: fec.dummy_decoder.make(${framebits})), range(0,${dim2}))), range(0,${dim1}))\ + \ \n% endif\n " + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/variable_dummy_decoder_def_list.xml b/gr-fec/grc/variable_dummy_decoder_def_list.xml deleted file mode 100644 index 4a27971c87..0000000000 --- a/gr-fec/grc/variable_dummy_decoder_def_list.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC DUMMY DECODER -################################################### - --> -<block> - <name>Dummy Decoder Definition</name> - <key>variable_dummy_decoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.dummy_decoder.make($framebits) -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.dummy_decoder.make($framebits)), range(0,$dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.dummy_decoder.make($framebits)), range(0,$dim2))), range(0,$dim1)) #slurp -#end if - </var_make> - <var_value>fec.dummy_decoder.make($framebits)</var_value> - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value></value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Frame Bits</name> - <key>framebits</key> - <value>2048</value> - <type>int</type> - </param> - - <doc> - </doc> -</block> diff --git a/gr-fec/grc/variable_dummy_encoder_def_list.block.yml b/gr-fec/grc/variable_dummy_encoder_def_list.block.yml new file mode 100644 index 0000000000..cb9181bcd6 --- /dev/null +++ b/gr-fec/grc/variable_dummy_encoder_def_list.block.yml @@ -0,0 +1,36 @@ +id: variable_dummy_encoder_def +label: Dummy Encoder Definition + +parameters: +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: framebits + label: Frame Bits + dtype: int + default: '2048' +value: ${ fec.dummy_encoder_make(framebits) } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.dummy_encoder_make(${framebits})\n\ + % elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.dummy_encoder_make(${framebits})),\ + \ range(0,${dim1})) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda\ + \ a: fec.dummy_encoder_make(${framebits})), range(0,${dim2}))), range(0,${dim1}))\ + \ \n% endif\n " + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/variable_dummy_encoder_def_list.xml b/gr-fec/grc/variable_dummy_encoder_def_list.xml deleted file mode 100644 index 351fddadaf..0000000000 --- a/gr-fec/grc/variable_dummy_encoder_def_list.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC DUMMY ENCODER -################################################### - --> -<block> - <name>Dummy Encoder Definition</name> - <key>variable_dummy_encoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.dummy_encoder_make($framebits) -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.dummy_encoder_make($framebits)), range(0,$dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.dummy_encoder_make($framebits)), range(0,$dim2))), range(0,$dim1)) #slurp -#end if - </var_make> - <var_value>fec.dummy_encoder_make($framebits)</var_value> - <make></make> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Frame Bits</name> - <key>framebits</key> - <value>2048</value> - <type>int</type> - </param> - - <doc> - </doc> -</block> diff --git a/gr-fec/grc/variable_ldpc_G_matrix_object.block.yml b/gr-fec/grc/variable_ldpc_G_matrix_object.block.yml new file mode 100644 index 0000000000..24f0cb3cbe --- /dev/null +++ b/gr-fec/grc/variable_ldpc_G_matrix_object.block.yml @@ -0,0 +1,31 @@ +id: variable_ldpc_G_matrix_def +label: LDPC Generator Matrix + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: filename + label: File + dtype: file_open +value: ${ value } + +templates: + imports: from gnuradio import fec + var_make: self.${id} = ${id} = fec.ldpc_G_matrix(${filename}) + +documentation: |- + This block creates a LDPC Generator Matrix variable. + + This variable can be used by: + 1) LDPC Encoder Definition (via Generator) block + 2) LDPC Bit Flip Decoder Definition block + + Provide an alist file, which contains a Generator matrix, G, in the standard format G = [I P], where I is an identity matrix and P is the parity submatrix. + + The format of alist files is described at: + http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html + +file_format: 1 diff --git a/gr-fec/grc/variable_ldpc_G_matrix_object.xml b/gr-fec/grc/variable_ldpc_G_matrix_object.xml deleted file mode 100644 index cd9360c7f7..0000000000 --- a/gr-fec/grc/variable_ldpc_G_matrix_object.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC LDPC MATRIX OBJECT -################################################### - --> - -<block> - <name>LDPC Generator Matrix</name> - <key>variable_ldpc_G_matrix_def</key> - <import>from gnuradio import fec</import> - <var_make>self.$(id) = $(id) = fec.ldpc_G_matrix($filename)</var_make> - - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>File</name> - <key>filename</key> - <value></value> - <type>file_open</type> - </param> - - <doc> -This block creates a LDPC Generator Matrix variable. - -This variable can be used by: - 1) LDPC Encoder Definition (via Generator) block - 2) LDPC Bit Flip Decoder Definition block - -Provide an alist file, which contains a Generator matrix, G, in the standard format G = [I P], where I is an identity matrix and P is the parity submatrix. - -The format of alist files is described at: -http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html - </doc> -</block> diff --git a/gr-fec/grc/variable_ldpc_H_matrix_object.block.yml b/gr-fec/grc/variable_ldpc_H_matrix_object.block.yml new file mode 100644 index 0000000000..f2d1a640bd --- /dev/null +++ b/gr-fec/grc/variable_ldpc_H_matrix_object.block.yml @@ -0,0 +1,40 @@ +id: variable_ldpc_H_matrix_def +label: LDPC Parity Check Matrix + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: filename + label: File + dtype: file_open +- id: gap + label: Gap + dtype: int +value: ${ value } + +templates: + imports: from gnuradio import fec + var_make: self.${id} = ${id} = fec.ldpc_H_matrix(${filename}, ${gap}) + +documentation: |- + This block creates a FEC LDPC Parity Check Matrix variable. + + This variable can be used by: + 1) LDPC Encoder Definition (via Parity Check) block + 2) LDPC Bit Flip Decoder Definition block + + The format of alist files is described at: + http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html + + The specific format of this parity check matrix is described by Richardson and Urbanke in Appendix A of their book: Modern Coding Theory (ISBN 978-0-521-85229-6). + + As an example, see the file {$target}/share/gnuradio/fec/ldpc/n_1800_k_0902_gap_28.alist, which is used by the FEC example flowgraph ber_curve_gen_ldpc.grc. + + There is a small library of encoding-ready alist files at {$target}/share/gnuradio/fec/ldpc. + + To convert a parity check matrix to the appropriate format required for this encoder, use the python functions in {$target}/lib/python2.7/dist-packages/gnuradio/fec/LDPC/Generate_LDPC_matrix.py. + +file_format: 1 diff --git a/gr-fec/grc/variable_ldpc_H_matrix_object.xml b/gr-fec/grc/variable_ldpc_H_matrix_object.xml deleted file mode 100644 index 1bfb6be060..0000000000 --- a/gr-fec/grc/variable_ldpc_H_matrix_object.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC LDPC PARITY CHECK MATRIX OBJECT -################################################### - --> -<block> - <name>LDPC Parity Check Matrix</name> - <key>variable_ldpc_H_matrix_def</key> - <import>from gnuradio import fec</import> - <var_make>self.$(id) = $(id) = fec.ldpc_H_matrix($filename, $gap)</var_make> - - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>File</name> - <key>filename</key> - <value></value> - <type>file_open</type> - </param> - - <param> - <name>Gap</name> - <key>gap</key> - <value></value> - <type>int</type> - </param> - - <doc> -This block creates a FEC LDPC Parity Check Matrix variable. - -This variable can be used by: - 1) LDPC Encoder Definition (via Parity Check) block - 2) LDPC Bit Flip Decoder Definition block - -The format of alist files is described at: -http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html - -The specific format of this parity check matrix is described by Richardson and Urbanke in Appendix A of their book: Modern Coding Theory (ISBN 978-0-521-85229-6). - -As an example, see the file {$target}/share/gnuradio/fec/ldpc/n_1800_k_0902_gap_28.alist, which is used by the FEC example flowgraph ber_curve_gen_ldpc.grc. - -There is a small library of encoding-ready alist files at {$target}/share/gnuradio/fec/ldpc. - -To convert a parity check matrix to the appropriate format required for this encoder, use the python functions in {$target}/lib/python2.7/dist-packages/gnuradio/fec/LDPC/Generate_LDPC_matrix.py. - </doc> -</block> diff --git a/gr-fec/grc/variable_ldpc_bit_flip_decoder.block.yml b/gr-fec/grc/variable_ldpc_bit_flip_decoder.block.yml new file mode 100644 index 0000000000..4f66f07307 --- /dev/null +++ b/gr-fec/grc/variable_ldpc_bit_flip_decoder.block.yml @@ -0,0 +1,51 @@ +id: variable_ldpc_bit_flip_decoder_def +label: LDPC Bit Flip Decoder Definition + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: max_iterations + label: Max Iterations + dtype: int + default: '100' +- id: matrix_object + label: LDPC FEC Matrix ID + dtype: raw +value: ${ value } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.ldpc_bit_flip_decoder.make(${matrix_object}.get_base_sptr(),\ + \ ${max_iterations})\n% elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda\ + \ a: fec.ldpc_bit_flip_decoder.make(${matrix_object}.get_base_sptr(), ${max_iterations})),\ + \ range(0,${dim1})) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda\ + \ a: fec.ldpc_bit_flip_decoder.make(${matrix_object}.get_base_sptr(), ${max_iterations})),\ + \ range(0,${dim2}))), range(0,${dim1})) \n% endif" + +documentation: |- + This block creates a LDPC Bit Flip Decoder Definition variable. + + The decoder requires knowledge of the matrix used to create (encode) the codewords. In the LDPC FEC Matrix ID field, input the ID of either a: + 1) LDPC Generator Matrix variable, or + 2) LDPC Parity Check Matrix variable + + Max iterations may be increased from 100 for possibly better performance, but significantly higher number of iterations may slow things down. + +file_format: 1 diff --git a/gr-fec/grc/variable_ldpc_bit_flip_decoder.xml b/gr-fec/grc/variable_ldpc_bit_flip_decoder.xml deleted file mode 100644 index d905ce27fb..0000000000 --- a/gr-fec/grc/variable_ldpc_bit_flip_decoder.xml +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC LDPC BIT FLIP DECODER -################################################### - --> -<block> - <name>LDPC Bit Flip Decoder Definition</name> - <key>variable_ldpc_bit_flip_decoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.ldpc_bit_flip_decoder.make(${matrix_object}.get_base_sptr(), $max_iterations) -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.ldpc_bit_flip_decoder.make(${matrix_object}.get_base_sptr(), $max_iterations)), range(0,$dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.ldpc_bit_flip_decoder.make(${matrix_object}.get_base_sptr(), $max_iterations)), range(0,$dim2))), range(0,$dim1)) #slurp -#end if</var_make> - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value></value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Max Iterations</name> - <key>max_iterations</key> - <value>100</value> - <type>int</type> - </param> - - <param> - <name>LDPC FEC Matrix ID</name> - <key>matrix_object</key> - <type>raw</type> - </param> - - <doc> -This block creates a LDPC Bit Flip Decoder Definition variable. - -The decoder requires knowledge of the matrix used to create (encode) the codewords. In the LDPC FEC Matrix ID field, input the ID of either a: - 1) LDPC Generator Matrix variable, or - 2) LDPC Parity Check Matrix variable - -Max iterations may be increased from 100 for possibly better performance, but significantly higher number of iterations may slow things down. - </doc> -</block> diff --git a/gr-fec/grc/variable_ldpc_encoder_G.block.yml b/gr-fec/grc/variable_ldpc_encoder_G.block.yml new file mode 100644 index 0000000000..f35f473705 --- /dev/null +++ b/gr-fec/grc/variable_ldpc_encoder_G.block.yml @@ -0,0 +1,42 @@ +id: variable_ldpc_encoder_G_def +label: LDPC Encoder Definition (via Generator) + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: G + label: LDPC Generator Matrix + dtype: raw +value: ${ value } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.ldpc_gen_mtrx_encoder_make(${G})\n\ + % elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.ldpc_gen_mtrx_encoder_make(${G})),\ + \ range(0,${dim1})) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda\ + \ a: fec.ldpc_gen_mtrx_encoder_make(${G})), range(0,${dim2}))), range(0,${dim1}))\ + \ \n% endif" + +documentation: |- + Given a generator matrix in systematic form, G = [I|P], where I is the identity matrix and P is the parity submatrix, the information word s is encoded into a codeword x via: + + x = G'*s + +file_format: 1 diff --git a/gr-fec/grc/variable_ldpc_encoder_G.xml b/gr-fec/grc/variable_ldpc_encoder_G.xml deleted file mode 100644 index 3b4dbeee25..0000000000 --- a/gr-fec/grc/variable_ldpc_encoder_G.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC LDPC ENCODER DEFINITION (VIA GENERATOR) -################################################### - --> - -<block> - <name>LDPC Encoder Definition (via Generator)</name> - <key>variable_ldpc_encoder_G_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.ldpc_gen_mtrx_encoder_make($G) -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.ldpc_gen_mtrx_encoder_make($G)), range(0,$dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.ldpc_gen_mtrx_encoder_make($G)), range(0,$dim2))), range(0,$dim1)) #slurp -#end if</var_make> - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value></value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>LDPC Generator Matrix</name> - <key>G</key> - <value></value> - <type>raw</type> - </param> - - <doc> -Given a generator matrix in systematic form, G = [I|P], where I is the identity matrix and P is the parity submatrix, the information word s is encoded into a codeword x via: - -x = G'*s - </doc> -</block> diff --git a/gr-fec/grc/variable_ldpc_encoder_H.block.yml b/gr-fec/grc/variable_ldpc_encoder_H.block.yml new file mode 100644 index 0000000000..3fba6c7dbf --- /dev/null +++ b/gr-fec/grc/variable_ldpc_encoder_H.block.yml @@ -0,0 +1,42 @@ +id: variable_ldpc_encoder_H_def +label: LDPC Encoder Definition (via Parity Check) + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: H + label: Parity Check Matrix + dtype: raw +value: ${ value } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.ldpc_par_mtrx_encoder_make_H(${H})\n\ + % elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.ldpc_par_mtrx_encoder_make_H(${H})),\ + \ range(0,${dim1})) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda\ + \ a: fec.ldpc_par_mtrx_encoder_make_H(${H})), range(0,${dim2}))), range(0,${dim1}))\ + \ \n% endif" + +documentation: |- + This block creates a LDPC Encoder Definition variable. + + This encoder performs a reduced complexity algorithm described by Richardson and Urbanke in Appendix A of their book: Modern Coding Theory. Compared to the block "LDPC Encoder Definition (via Generator)," this encoder requires orders of magnitude fewer operations to create each codeword. This is accomplished by completing a significant amount of the complex matrix manipulation (including inverse, multiplication, and Gaussian elimination operations) during preprocessing. The disadvantage of this encoder is that it requires a specially formatted matrix. However, GNU Radio includes python scripts to format a standard parity check matrix appropriately for this encoder, as well as a small library of encoding-ready matrices for use. + +file_format: 1 diff --git a/gr-fec/grc/variable_ldpc_encoder_H.xml b/gr-fec/grc/variable_ldpc_encoder_H.xml deleted file mode 100644 index 555891b095..0000000000 --- a/gr-fec/grc/variable_ldpc_encoder_H.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC LDPC ENCODER DEFINITION (PARITY CHECK) -################################################### - --> -<block> - <name>LDPC Encoder Definition (via Parity Check)</name> - <key>variable_ldpc_encoder_H_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.ldpc_par_mtrx_encoder_make_H($H) -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.ldpc_par_mtrx_encoder_make_H($H)), range(0,$dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.ldpc_par_mtrx_encoder_make_H($H)), range(0,$dim2))), range(0,$dim1)) #slurp -#end if</var_make> - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value></value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Parity Check Matrix</name> - <key>H</key> - <value></value> - <type>raw</type> - </param> - <doc> -This block creates a LDPC Encoder Definition variable. - -This encoder performs a reduced complexity algorithm described by Richardson and Urbanke in Appendix A of their book: Modern Coding Theory. Compared to the block "LDPC Encoder Definition (via Generator)," this encoder requires orders of magnitude fewer operations to create each codeword. This is accomplished by completing a significant amount of the complex matrix manipulation (including inverse, multiplication, and Gaussian elimination operations) during preprocessing. The disadvantage of this encoder is that it requires a specially formatted matrix. However, GNU Radio includes python scripts to format a standard parity check matrix appropriately for this encoder, as well as a small library of encoding-ready matrices for use. - </doc> -</block> diff --git a/gr-fec/grc/variable_polar_code_configurator.block.yml b/gr-fec/grc/variable_polar_code_configurator.block.yml new file mode 100644 index 0000000000..2c07822c23 --- /dev/null +++ b/gr-fec/grc/variable_polar_code_configurator.block.yml @@ -0,0 +1,42 @@ +id: variable_polar_code_configurator +label: POLAR code Configurator + +parameters: +- id: channel + label: Channel + dtype: string + default: polar.CHANNEL_TYPE_BEC + options: [polar.CHANNEL_TYPE_BEC, polar.CHANNEL_TYPE_AWGN] + option_labels: [BEC, AWGN] +- id: block_size + label: Block size (N) + dtype: int + default: '32' +- id: num_info_bits + label: Info Bits (K) + dtype: int + default: '16' +- id: design_snr + label: design SNR + dtype: float + default: '0.0' +- id: mu + label: mu + dtype: int + default: '16' +value: ${ polar.load_frozen_bits_info(True, channel, block_size, num_info_bits, design_snr, + mu) } + +templates: + imports: from gnuradio.fec import polar + var_make: self.${id} = ${id} = polar.load_frozen_bits_info(False, ${channel}, + ${block_size}, ${num_info_bits}, ${design_snr}, ${mu}) + +documentation: "This block serves as an interface to the underlying Python functions\ + \ for channel construction.\n \n Current channel types are: BEC/AWGN\n Block\ + \ size must be a power of 2!\n Info Bits must be 0 smaller K smaller N\n Design\ + \ SNR does affect the target transmission SNR and thus performance.\n The parameter\ + \ mu is only relevant for AWGN channels. It is passed on to the corresponding\ + \ Channel construction algorithm." + +file_format: 1 diff --git a/gr-fec/grc/variable_polar_code_configurator.xml b/gr-fec/grc/variable_polar_code_configurator.xml deleted file mode 100644 index ee145b16f7..0000000000 --- a/gr-fec/grc/variable_polar_code_configurator.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>POLAR code Configurator</name> - <key>variable_polar_code_configurator</key> - <import>from gnuradio.fec import polar</import> - <var_make>self.$(id) = $(id) = polar.load_frozen_bits_info(False, $channel, $block_size, $num_info_bits, $design_snr, $mu)</var_make> - <var_value>polar.load_frozen_bits_info(True, $channel, $block_size, $num_info_bits, $design_snr, $mu)</var_value> - <make></make> - - <param> - <name>Channel</name> - <key>channel</key> - <value>polar.CHANNEL_TYPE_BEC</value> - <type>string</type> - <option> - <name>BEC</name> - <key>polar.CHANNEL_TYPE_BEC</key> - </option> - <option> - <name>AWGN</name> - <key>polar.CHANNEL_TYPE_AWGN</key> - </option> - </param> - - <param> - <name>Block size (N)</name> - <key>block_size</key> - <value>32</value> - <type>int</type> - </param> - - <param> - <name>Info Bits (K)</name> - <key>num_info_bits</key> - <value>16</value> - <type>int</type> - </param> - - <param> - <name>design SNR</name> - <key>design_snr</key> - <value>0.0</value> - <type>float</type> - </param> - - <param> - <name>mu</name> - <key>mu</key> - <value>16</value> - <type>int</type> - </param> - <doc>This block serves as an interface to the underlying Python functions for channel construction. - - Current channel types are: BEC/AWGN - Block size must be a power of 2! - Info Bits must be 0 smaller K smaller N - Design SNR does affect the target transmission SNR and thus performance. - The parameter mu is only relevant for AWGN channels. It is passed on to the corresponding Channel construction algorithm.</doc> -</block> diff --git a/gr-fec/grc/variable_polar_decoder_sc.block.yml b/gr-fec/grc/variable_polar_decoder_sc.block.yml new file mode 100644 index 0000000000..00120a65db --- /dev/null +++ b/gr-fec/grc/variable_polar_decoder_sc.block.yml @@ -0,0 +1,45 @@ +id: variable_polar_decoder_sc_def +label: POLAR Decoder SC Definition + +parameters: +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: block_size + label: Block size (N) + dtype: int +- id: num_info_bits + label: '#Info Bits (K)' + dtype: int +- id: frozen_bit_positions + label: Frozen Bit Positions + dtype: int_vector +- id: frozen_bit_values + label: Frozen Bit Values + dtype: int_vector +value: ${ fec.polar_decoder_sc.make(block_size, num_info_bits, frozen_bit_positions, + frozen_bit_values) } + +templates: + imports: from gnuradio import fec + var_make: "% if int(ndim)==0 #:\nself.${id} = ${id} = fec.polar_decoder_sc.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions}, ${frozen_bit_values}) \n% elif\ + \ int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.polar_decoder_sc.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions}, ${frozen_bit_values})), range(0,\ + \ ${dim1}) ) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda a:\ + \ fec.polar_decoder_sc.make(${block_size}, ${num_info_bits}, ${frozen_bit_positions},\ + \ ${frozen_bit_values})), range(0, ${dim2}))), range(0, ${dim1})) \n% endif" + +file_format: 1 diff --git a/gr-fec/grc/variable_polar_decoder_sc.xml b/gr-fec/grc/variable_polar_decoder_sc.xml deleted file mode 100644 index 4976afb4b6..0000000000 --- a/gr-fec/grc/variable_polar_decoder_sc.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>POLAR Decoder SC Definition</name> - <key>variable_polar_decoder_sc_def</key> - <import>from gnuradio import fec</import> - <var_make>#if int($ndim())==0 # -self.$(id) = $(id) = fec.polar_decoder_sc.make($block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values) #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.polar_decoder_sc.make($block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values)), range(0, $dim1) ) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.polar_decoder_sc.make($block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values)), range(0, $dim2))), range(0, $dim1)) #slurp -#end if</var_make> - <var_value>fec.polar_decoder_sc.make($block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values)</var_value> - <make></make> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Block size (N)</name> - <key>block_size</key> - <type>int</type> - </param> - - <param> - <name>#Info Bits (K)</name> - <key>num_info_bits</key> - <type>int</type> - </param> - - <param> - <name>Frozen Bit Positions</name> - <key>frozen_bit_positions</key> - <type>int_vector</type> - </param> - - <param> - <name>Frozen Bit Values</name> - <key>frozen_bit_values</key> - <type>int_vector</type> - </param> -</block> diff --git a/gr-fec/grc/variable_polar_decoder_sc_list.block.yml b/gr-fec/grc/variable_polar_decoder_sc_list.block.yml new file mode 100644 index 0000000000..7c9de3240f --- /dev/null +++ b/gr-fec/grc/variable_polar_decoder_sc_list.block.yml @@ -0,0 +1,49 @@ +id: variable_polar_decoder_sc_list_def +label: POLAR Decoder SC List Definition + +parameters: +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: max_list_size + label: Maximum List Size (L) + dtype: int +- id: block_size + label: Block size (N) + dtype: int +- id: num_info_bits + label: '#Info Bits (K)' + dtype: int +- id: frozen_bit_positions + label: Frozen Bit Positions + dtype: int_vector +- id: frozen_bit_values + label: Frozen Bit Values + dtype: int_vector +value: ${ fec.polar_decoder_sc_list.make(max_list_size, block_size, num_info_bits, + frozen_bit_positions, frozen_bit_values) } + +templates: + imports: from gnuradio import fec + var_make: "% if int(ndim)==0 #:\nself.${id} = ${id} = fec.polar_decoder_sc_list.make(${max_list_size},\ + \ ${block_size}, ${num_info_bits}, ${frozen_bit_positions}, ${frozen_bit_values})\ + \ \n% elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.polar_decoder_sc_list.make(${max_list_size},\ + \ ${block_size}, ${num_info_bits}, ${frozen_bit_positions}, ${frozen_bit_values})),\ + \ range(0, ${dim1})) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda\ + \ a: fec.polar_decoder_sc_list.make(${max_list_size}, ${block_size}, ${num_info_bits},\ + \ ${frozen_bit_positions}, ${frozen_bit_values})), range(0, ${dim2}))), range(0,\ + \ ${dim1})) \n% endif" + +file_format: 1 diff --git a/gr-fec/grc/variable_polar_decoder_sc_list.xml b/gr-fec/grc/variable_polar_decoder_sc_list.xml deleted file mode 100644 index 2128110ad4..0000000000 --- a/gr-fec/grc/variable_polar_decoder_sc_list.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>POLAR Decoder SC List Definition</name> - <key>variable_polar_decoder_sc_list_def</key> - <import>from gnuradio import fec</import> - <var_make>#if int($ndim())==0 # -self.$(id) = $(id) = fec.polar_decoder_sc_list.make($max_list_size, $block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values) #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.polar_decoder_sc_list.make($max_list_size, $block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values)), range(0, $dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.polar_decoder_sc_list.make($max_list_size, $block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values)), range(0, $dim2))), range(0, $dim1)) #slurp -#end if</var_make> - <var_value>fec.polar_decoder_sc_list.make($max_list_size, $block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values)</var_value> - <make></make> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Maximum List Size (L)</name> - <key>max_list_size</key> - <type>int</type> - </param> - - <param> - <name>Block size (N)</name> - <key>block_size</key> - <type>int</type> - </param> - - <param> - <name>#Info Bits (K)</name> - <key>num_info_bits</key> - <type>int</type> - </param> - - <param> - <name>Frozen Bit Positions</name> - <key>frozen_bit_positions</key> - <type>int_vector</type> - </param> - - <param> - <name>Frozen Bit Values</name> - <key>frozen_bit_values</key> - <type>int_vector</type> - </param> -</block> diff --git a/gr-fec/grc/variable_polar_decoder_sc_systematic.block.yml b/gr-fec/grc/variable_polar_decoder_sc_systematic.block.yml new file mode 100644 index 0000000000..b730b20068 --- /dev/null +++ b/gr-fec/grc/variable_polar_decoder_sc_systematic.block.yml @@ -0,0 +1,42 @@ +id: variable_polar_decoder_sc_systematic_def +label: systematic POLAR Decoder SC Definition + +parameters: +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: block_size + label: Block size (N) + dtype: int +- id: num_info_bits + label: '#Info Bits (K)' + dtype: int +- id: frozen_bit_positions + label: Frozen Bit Positions + dtype: int_vector +value: ${ fec.polar_decoder_sc_systematic.make(block_size, num_info_bits, frozen_bit_positions) + } + +templates: + imports: from gnuradio import fec + var_make: "% if int(ndim)==0 #:\nself.${id} = ${id} = fec.polar_decoder_sc_systematic.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions}) \n% elif int(ndim)==1 #:\nself.${id}\ + \ = ${id} = map((lambda a: fec.polar_decoder_sc_systematic.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions})), range(0, ${dim1}) ) \n% else:\n\ + self.${id} = ${id} = map((lambda b: map((lambda a: fec.polar_decoder_sc_systematic.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions})), range(0, ${dim2}))), range(0,\ + \ ${dim1})) \n% endif" + +file_format: 1 diff --git a/gr-fec/grc/variable_polar_decoder_sc_systematic.xml b/gr-fec/grc/variable_polar_decoder_sc_systematic.xml deleted file mode 100644 index cefc7e237d..0000000000 --- a/gr-fec/grc/variable_polar_decoder_sc_systematic.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>systematic POLAR Decoder SC Definition</name> - <key>variable_polar_decoder_sc_systematic_def</key> - <import>from gnuradio import fec</import> - <var_make>#if int($ndim())==0 # -self.$(id) = $(id) = fec.polar_decoder_sc_systematic.make($block_size, $num_info_bits, $frozen_bit_positions) #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.polar_decoder_sc_systematic.make($block_size, $num_info_bits, $frozen_bit_positions)), range(0, $dim1) ) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.polar_decoder_sc_systematic.make($block_size, $num_info_bits, $frozen_bit_positions)), range(0, $dim2))), range(0, $dim1)) #slurp -#end if</var_make> - <var_value>fec.polar_decoder_sc_systematic.make($block_size, $num_info_bits, $frozen_bit_positions)</var_value> - <make></make> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Block size (N)</name> - <key>block_size</key> - <type>int</type> - </param> - - <param> - <name>#Info Bits (K)</name> - <key>num_info_bits</key> - <type>int</type> - </param> - - <param> - <name>Frozen Bit Positions</name> - <key>frozen_bit_positions</key> - <type>int_vector</type> - </param> -</block> diff --git a/gr-fec/grc/variable_polar_encoder.block.yml b/gr-fec/grc/variable_polar_encoder.block.yml new file mode 100644 index 0000000000..7979a71f43 --- /dev/null +++ b/gr-fec/grc/variable_polar_encoder.block.yml @@ -0,0 +1,52 @@ +id: variable_polar_encoder_def +label: POLAR Encoder Definition + +parameters: +- id: is_packed + label: Packed Bits + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: block_size + label: Block size (N) + dtype: int +- id: num_info_bits + label: '#Info Bits (K)' + dtype: int +- id: frozen_bit_positions + label: Frozen Bit Positions + dtype: int_vector +- id: frozen_bit_values + label: Frozen Bit Values + dtype: int_vector +value: ${ fec.polar_encoder.make(block_size, num_info_bits, frozen_bit_positions, + frozen_bit_values, is_packed) } + +templates: + imports: from gnuradio import fec + var_make: "% if int(ndim)==0 #:\nself.${id} = ${id} = fec.polar_encoder.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions}, ${frozen_bit_values}, ${is_packed})\ + \ \n% elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.polar_encoder.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions}, ${frozen_bit_values}, ${is_packed})),\ + \ range(0, ${dim1})) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda\ + \ a: fec.polar_encoder.make(${block_size}, ${num_info_bits}, ${frozen_bit_positions},\ + \ ${frozen_bit_values}, ${is_packed})), range(0, ${dim2}))), range(0, ${dim1}))\ + \ \n% endif" + +file_format: 1 diff --git a/gr-fec/grc/variable_polar_encoder.xml b/gr-fec/grc/variable_polar_encoder.xml deleted file mode 100644 index 4147cf1edf..0000000000 --- a/gr-fec/grc/variable_polar_encoder.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>POLAR Encoder Definition</name> - <key>variable_polar_encoder_def</key> - <import>from gnuradio import fec</import> - <var_make>#if int($ndim())==0 # -self.$(id) = $(id) = fec.polar_encoder.make($block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values, $is_packed) #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.polar_encoder.make($block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values, $is_packed)), range(0, $dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.polar_encoder.make($block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values, $is_packed)), range(0, $dim2))), range(0, $dim1)) #slurp -#end if</var_make> - <var_value>fec.polar_encoder.make($block_size, $num_info_bits, $frozen_bit_positions, $frozen_bit_values, $is_packed)</var_value> - <make></make> - - <param> - <name>Packed Bits</name> - <key>is_packed</key> - <value>False</value> - <type>enum</type> - <option> - <name>No</name> - <key>False</key> - </option> - <option> - <name>Yes</name> - <key>True</key> - </option> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Block size (N)</name> - <key>block_size</key> - <type>int</type> - </param> - - <param> - <name>#Info Bits (K)</name> - <key>num_info_bits</key> - <type>int</type> - </param> - - <param> - <name>Frozen Bit Positions</name> - <key>frozen_bit_positions</key> - <type>int_vector</type> - </param> - - <param> - <name>Frozen Bit Values</name> - <key>frozen_bit_values</key> - <type>int_vector</type> - </param> -</block> diff --git a/gr-fec/grc/variable_polar_encoder_systematic.block.yml b/gr-fec/grc/variable_polar_encoder_systematic.block.yml new file mode 100644 index 0000000000..0f4c5f23a3 --- /dev/null +++ b/gr-fec/grc/variable_polar_encoder_systematic.block.yml @@ -0,0 +1,42 @@ +id: variable_polar_encoder_systematic_def +label: systematic POLAR Encoder Definition + +parameters: +- id: ndim + label: Parallelism + dtype: enum + default: '0' + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '4' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: block_size + label: Block size (N) + dtype: int +- id: num_info_bits + label: '#Info Bits (K)' + dtype: int +- id: frozen_bit_positions + label: Frozen Bit Positions + dtype: int_vector +value: ${ fec.polar_encoder_systematic.make(block_size, num_info_bits, frozen_bit_positions) + } + +templates: + imports: from gnuradio import fec + var_make: "% if int(ndim)==0 #:\nself.${id} = ${id} = fec.polar_encoder_systematic.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions}) \n% elif int(ndim)==1 #:\nself.${id}\ + \ = ${id} = map((lambda a: fec.polar_encoder_systematic.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions})), range(0, ${dim1})) \n% else:\n\ + self.${id} = ${id} = map((lambda b: map((lambda a: fec.polar_encoder_systematic.make(${block_size},\ + \ ${num_info_bits}, ${frozen_bit_positions})), range(0, ${dim2}))), range(0,\ + \ ${dim1})) \n% endif" + +file_format: 1 diff --git a/gr-fec/grc/variable_polar_encoder_systematic.xml b/gr-fec/grc/variable_polar_encoder_systematic.xml deleted file mode 100644 index 0d9bcd96ab..0000000000 --- a/gr-fec/grc/variable_polar_encoder_systematic.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>systematic POLAR Encoder Definition</name> - <key>variable_polar_encoder_systematic_def</key> - <import>from gnuradio import fec</import> - <var_make>#if int($ndim())==0 # -self.$(id) = $(id) = fec.polar_encoder_systematic.make($block_size, $num_info_bits, $frozen_bit_positions) #slurp -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.polar_encoder_systematic.make($block_size, $num_info_bits, $frozen_bit_positions)), range(0, $dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.polar_encoder_systematic.make($block_size, $num_info_bits, $frozen_bit_positions)), range(0, $dim2))), range(0, $dim1)) #slurp -#end if</var_make> - <var_value>fec.polar_encoder_systematic.make($block_size, $num_info_bits, $frozen_bit_positions)</var_value> - <make></make> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value>0</value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>4</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Block size (N)</name> - <key>block_size</key> - <type>int</type> - </param> - - <param> - <name>#Info Bits (K)</name> - <key>num_info_bits</key> - <type>int</type> - </param> - - <param> - <name>Frozen Bit Positions</name> - <key>frozen_bit_positions</key> - <type>int_vector</type> - </param> -</block> diff --git a/gr-fec/grc/variable_repetition_decoder_def_list.block.yml b/gr-fec/grc/variable_repetition_decoder_def_list.block.yml new file mode 100644 index 0000000000..50590038e5 --- /dev/null +++ b/gr-fec/grc/variable_repetition_decoder_def_list.block.yml @@ -0,0 +1,49 @@ +id: variable_repetition_decoder_def +label: Repetition Decoder Definition + +parameters: +- id: value + label: Ignore Me + dtype: raw + default: '"ok"' + hide: all +- id: ndim + label: Parallelism + dtype: enum + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: framebits + label: Frame Bits + dtype: int + default: '2048' +- id: rep + label: Repetitions + dtype: int + default: '3' +- id: prob + label: a prior prob + dtype: float + default: '0.5' +value: ${ fec.repetition_decoder.make(framebits, rep, prob) } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.repetition_decoder.make(${framebits},\ + \ ${rep}, ${prob})\n% elif int(ndim)==1 #:\nself.${id} = ${id} = map( (lambda\ + \ a: fec.repetition_decoder.make(${framebits}, ${rep}, ${prob})), range(0,${dim1})\ + \ ) \n% else:\nself.${id} = ${id} = map( (lambda b: map( ( lambda a: fec.repetition_decoder.make(${framebits},\ + \ ${rep}, ${prob})), range(0,${dim2}) ) ), range(0,${dim1})) \n% endif\n \ + \ " + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/variable_repetition_decoder_def_list.xml b/gr-fec/grc/variable_repetition_decoder_def_list.xml deleted file mode 100644 index cbeef445fa..0000000000 --- a/gr-fec/grc/variable_repetition_decoder_def_list.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC REPETITION DECODER -################################################### - --> -<block> - <name>Repetition Decoder Definition</name> - <key>variable_repetition_decoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.repetition_decoder.make($framebits, $rep, $prob) -#else if int($ndim())==1 # -self.$(id) = $(id) = map( (lambda a: fec.repetition_decoder.make($framebits, $rep, $prob)), range(0,$dim1) ) #slurp -#else -self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.repetition_decoder.make($framebits, $rep, $prob)), range(0,$dim2) ) ), range(0,$dim1)) #slurp -#end if - </var_make> - <var_value>fec.repetition_decoder.make($framebits, $rep, $prob)</var_value> - <make></make> - - <param> - <name>Ignore Me</name> - <key>value</key> - <value>"ok"</value> - <type>raw</type> - <hide>all</hide> - </param> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value></value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Frame Bits</name> - <key>framebits</key> - <value>2048</value> - <type>int</type> - </param> - - <param> - <name>Repetitions</name> - <key>rep</key> - <value>3</value> - <type>int</type> - </param> - - <param> - <name>a prior prob</name> - <key>prob</key> - <value>0.5</value> - <type>float</type> - </param> - - <doc> - </doc> -</block> diff --git a/gr-fec/grc/variable_repetition_encoder_def_list.block.yml b/gr-fec/grc/variable_repetition_encoder_def_list.block.yml new file mode 100644 index 0000000000..3e86966e72 --- /dev/null +++ b/gr-fec/grc/variable_repetition_encoder_def_list.block.yml @@ -0,0 +1,39 @@ +id: variable_repetition_encoder_def +label: Repetition Encoder Definition + +parameters: +- id: ndim + label: Parallelism + dtype: enum + options: ['0', '1', '2'] +- id: dim1 + label: Dimension 1 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 1) else 'all') } +- id: dim2 + label: Dimension 2 + dtype: int + default: '1' + hide: ${ ('none' if (int(ndim) >= 2) else 'all') } +- id: framebits + label: Frame Bits + dtype: int + default: '2048' +- id: rep + label: Repetitions + dtype: int + default: '3' +value: ${ fec.repetition_encoder_make(framebits, rep) } + +templates: + imports: from gnuradio import fec + var_make: "\n% if int(ndim)==0 #:\nself.${id} = ${id} = fec.repetition_encoder_make(${framebits},\ + \ ${rep})\n% elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.repetition_encoder_make(${framebits},\ + \ ${rep})), range(0,${dim1})) \n% else:\nself.${id} = ${id} = map((lambda\ + \ b: map((lambda a: fec.repetition_encoder_make(${framebits}, ${rep})), range(0,${dim2}))),\ + \ range(0,${dim1})) \n% endif\n " + +documentation: "" + +file_format: 1 diff --git a/gr-fec/grc/variable_repetition_encoder_def_list.xml b/gr-fec/grc/variable_repetition_encoder_def_list.xml deleted file mode 100644 index e8554189cc..0000000000 --- a/gr-fec/grc/variable_repetition_encoder_def_list.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# FEC REPETITION ENCODER -################################################### - --> -<block> - <name>Repetition Encoder Definition</name> - <key>variable_repetition_encoder_def</key> - <import>from gnuradio import fec</import> - <var_make> -#if int($ndim())==0 # -self.$(id) = $(id) = fec.repetition_encoder_make($framebits, $rep) -#else if int($ndim())==1 # -self.$(id) = $(id) = map((lambda a: fec.repetition_encoder_make($framebits, $rep)), range(0,$dim1)) #slurp -#else -self.$(id) = $(id) = map((lambda b: map((lambda a: fec.repetition_encoder_make($framebits, $rep)), range(0,$dim2))), range(0,$dim1)) #slurp -#end if - </var_make> - <var_value>fec.repetition_encoder_make($framebits, $rep)</var_value> - <make></make> - - <param> - <name>Parallelism</name> - <key>ndim</key> - <value></value> - <type>enum</type> - <option> - <name>0</name> - <key>0</key> - </option> - <option> - <name>1</name> - <key>1</key> - </option> - <option> - <name>2</name> - <key>2</key> - </option> - </param> - - <param> - <name>Dimension 1</name> - <key>dim1</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Dimension 2</name> - <key>dim2</key> - <value>1</value> - <type>int</type> - <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide> - </param> - - <param> - <name>Frame Bits</name> - <key>framebits</key> - <value>2048</value> - <type>int</type> - </param> - - <param> - <name>Repetitions</name> - <key>rep</key> - <value>3</value> - <type>int</type> - </param> - - <doc> - </doc> -</block> |