Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to make LDPC parity check matrix H from non-systematic to systematic in C/C++

How to make LDPC parity check matrix H from non-systematic to systematic in C/C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++hardwarehelptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 13229174
    wrote on last edited by
    #1

    Hi,

    I am working LDPC encoding and decoding for hardware implementation.Through Vivado HLS, I need to transform a parity-check matrix H (that only consists of ones and zeros) from a non-standard to a standard form through C/C++ programming language. Here below you may find samples of non-standard parity check matrices in which Gauss-Jordan elimination (over GF(2)) can be applied.

    Initially, i am trying encoding part via C/C++ programming logic. please help me if you do have any idea about LDPC. I would need a method that works out with matrices of any dimension.

    this is, express it as

    Hsys = [I| P]

    This is my H matrix

    H=[1 1 0 0 1 0
    1 0 0 1 0 1
    1 1 1 0 0 1];

    Expected Systematic H matrix

    Hsys=[1 0 0 1 0 1
    0 1 0 1 1 1
    0 0 1 0 1 1];

    int main() //THIS CODE WORKS ONLY FOR THE GIVEN MATRIX BUT I NEED A METHOD THAT WORKS OUT WITH MATRICES OF ANY DIMENSION
    {
    // encoding
    int i,j;
    int message;
    int H_Matrix[3][6]={{1,1,0,0,1,0},{1,0,0,1,0,1},{1,1,1,0,0,1}};
    int temp[3][6]={0};
    for(j=0;j<6;j++)
    {
    temp[1][j]=(H_Matrix[1][j]^H_Matrix[0][j]);
    H_Matrix[1][j] = temp[1][j];
    temp[2][j]=(H_Matrix[2][j]^H_Matrix[0][j]);
    H_Matrix[2][j] = temp[2][j];
    temp[0][j]=(H_Matrix[0][j]^H_Matrix[1][j]);
    H_Matrix[0][j] = temp[0][j];
    }

    for(i=0;i<3;i++)
    {
    for(j=0;j<6;j++)
    {
    printf("%d\t ",H_Matrix[i][j]);
    }
    printf("\n");
    }
    }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups