合成时Vivado HLS中的Pragma错误

时间:2017-04-17 06:32:20

标签: vivado-hls

模拟过程完成,没有0错误,但在合成期间显示错误。我无法找到错误。

我在合成期间在HLS工具中收到这样的错误:

  

"在E中包含的文件:/thaus/fact_L/facoriall/solution1/.autopilot/db/fact.pragma.1.cpp:1"

标头文件

include "factorial.h"

include "ap_int.h"

typedef ap_int<128> in1_t;

typedef ap_int<1024> out_t;

int factorial(in1_t N);

endif

源文件

include "factorial.h"

int factorial(in1_t N)

{

pragma HLS INTERFACE s_axilite port=N bundle=a

pragma HLS INTERFACE s_axilite port=return bundle=a

int i;

out_t fact;

fact=1;

for (i=1; i<=N; i++)

{

fact=fact*i;

}

return fact;

}

试验台

include <stdio.h>

include <stdlib.h>

include "ap_int.h"

include "factorial.h"

int main()

{

in1_t N=50;

out_t  fact=1;

int i;

fact=1;

factorial(N);

for (i=1; i<=N; i++)

{


fact=fact*i;

}

cout << "cout of fact: " << fact;

}

模拟结果

make: `csim.exe' is up to date.
cout of fact: 30414093201713378043612608166064768844377641568960512000000000000
@I [SIM-1] CSim done with 0 errors.

0 个答案:

没有答案