Jump to content
  • 0

Returning Improper Sequence values in XSDK From HLS IP


Thausikan

Question

Hi,Just start learning HLS and XSDk.  Currently I am working with number series. My goal is to print number series sequentially as for "N" times in Tera Terminal. While compiling the program codes, its returning values but it is not in sequence.

Expected result:2, 4, 8, 16,32,64,128,256,512,1024,

But i am getting : 4,8,16,256,128,1024,16,64,512,64, (not in order)

For more details refer this [link]: https://forums.xilinx.com/t5/Welcome-Join/Returning-only-Last-value-in-XSDK-From-HLS-IP-Instead-of-series/td-p/767236

void Numberseries1(ap_uint<32> seed, ap_uint<32> &dout)

{

#pragma HLS INTERFACE s_axilite port=seed bundle=a
#pragma HLS INTERFACE s_axilite port=dout bundle=a
#pragma HLS INTERFACE s_axilite port=return bundle=a
 ap_uint<32> reg[10];
    int result=1;

    int i;

    for(i=0;  i < 10;i++)

#pragma HLS unroll factor=8
        if (result<seed)
        {
            result *= 2;
            reg =result;
            dout= reg;

        }

}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...