<?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>
