Thausikan Posted May 27, 2017 Share Posted May 27, 2017 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 More sharing options...
jpeyron Posted May 30, 2017 Share Posted May 30, 2017 Hi @Thausikan, I am not very experienced with HLS. Had you tried to remove all but the initial #pragma. I do not see reg being set as a datatype? thank you, Jon Link to comment Share on other sites More sharing options...
Question
Thausikan
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.