UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

C++Arbitrary Precision integer : Incorrect Result during Simulation

Highlighted
Explorer
Posts: 218
Registered: ‎03-29-2017

C++Arbitrary Precision integer : Incorrect Result during Simulation

Hi,

 

I am working with error correction Function. To verify my result, i have added test bench and simulated. Its some incorrect values but i unable to predict. Please guide me. Thanks

 

#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <ap_int.h>

using namespace std;
#define ROWS 102  //k
#define COLS 204
int main()
{

	ap_uint<1> dout[COLS];
	ap_uint<1> msg[ROWS]={1,0,1,0,0,0,1,1,1,0,0,1,0,1,1,0,1,0,0,1,0,0,0,0,1,0,0,1,0,1,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,0,0,1,0,1,1,0,1,0,1,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,1,1,1,0,0};

	ap_uint<1> Generator[ROWS][COLS];
	ap_uint<1> G[ROWS][COLS];
	static int H[ROWS][COLS] = {0,1,0,1,1,0,0,1,1,0,0,0,0,0,1,0,1,0,0,1,0,0,0,0,0,1,0,1,1,0,1,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,1,0,1,1,0,1,1,0,0,0,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1};
	int i,j,k,r,c,n;

k = ROWS;
r = ROWS;
c = COLS;
n = COLS;


//Encoder_Arbitray(msg, dout);
ap_uint<1> Codeword[COLS];
int s = 0;


for (i=0;i<k;i++)
    for(j=0;j<k;j++)
        if(i == j)
        G[i][j] = 1;

for(i=0;i<r;i++)
    for(j=0;j<k;j++)
        G[j][k+i] = H[i][j];

for(i=0;i<r;i++)
{
    for(j=0;j<c;j++)
    	Generator[i][j]=G[i][j];
}

for(j=0;j<n;j++)
{
    for(i=0;i<k;i++)
    {
        s = s + msg[i]*Generator[i][j];
    }
    Codeword[j] = s % 2;
    s = 0;
}

for(i=0;i<n;i++)
{
	dout[i]=Codeword[i];
	cout << dout<<endl;
}
}

Hls.PNG

 

I need to get result of :

Expected Output:

101000111001011010010000100101000101100010010010010010101000010110001011010101010010010010010110011100100000101111001101100011111011001010000110000000001001110101111100000010001001000001111101101001001000

 

If i simulate the same code in native C code . I am getting correct result.

 

But i need to implement in Bits Arbitrary Precision 

Observer
Posts: 46
Registered: ‎09-29-2017

Re: C++Arbitrary Precision integer : Incorrect Result during Simulation

Try at the final loop following:
if (dout != 0) cout << "1";
else cout << "0";
cout << endl;
----- Please mark the post as an answer "Accept as solution" in case it helped to solve your problem. Give kudos in case the post guided you to the solution.