0

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, it's returning only last value.

My code:

void Numberseries1(ap_uint<32> seed, ap_uint<32> &dout) { 
    static ap_uint<32> reg[15]; 
    int result=1; 
    int i; 
    for(i=0; i < 15;i++) if (result<seed) { 
        result *= 2; reg[i] =result; dout= reg[i]; 
    } 
} 

FOR EXAMPLE : N=10, it's returning only value 1024. Instead of EXPECTED RESULT : 16,32,64,128,256,512,1024,

What do I need to do to get "number series" to print sequentially like 16,32,64,128,256,512,1024, in Tera Terminal.

Ovidiu Dolha
  • 5,335
  • 1
  • 21
  • 30
Thaus
  • 23
  • 5
  • And your code is? – Ovidiu Dolha May 24 '17 at 11:02
  • void Numberseries1(ap_uint<32> seed, ap_uint<32> &dout) { static ap_uint<32> reg[15]; int result=1; int i; for(i=0; i < 15;i++) if (result – Thaus May 24 '17 at 11:14
  • Please refer this [link](https://forums.xilinx.com/t5/Welcome-Join/Returning-only-Last-value-in-XSDK-From-HLS-IP-Instead-of-series/m-p/767339#M45214) – Thaus May 24 '17 at 12:24

0 Answers0