Vivado HLS 仿真错误 -- ERR:[SIM 100] 'csim_design' 失败:编译错误

时间:2021-05-29 03:46:17

标签: simulation vivado

我正在使用 Vivado HLS 进行一些高级设计。当我创建一个项目并编写一些非常简单的代码作为测试时,出现以下错误:

'''

INFO: [SIM 211-2] *************** CSIM start ***************
INFO: [SIM 211-4] CSIM will launch GCC as the compiler.
ERROR: [SIM 211-100] 'csim_design' failed: compilation error(s).
INFO: [SIM 211-3] *************** CSIM finish ***************
4
while executing
"source C:/Users/Administrator/AppData/Roaming/Xilinx/Vivado/hlstesttest/solution1/csim.tcl"
invoked from within
"hls::main C:/Users/Administrator/AppData/Roaming/Xilinx/Vivado/hlstesttest/solution1/csim.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"

'''

这是我用于合成的顶级函数:

'''

#include<stdio.h>

int add(int a,int b)
{

    int c;
    c=a+b;
    return c;

}

'''


这是我的测试平台,它也是主要功能: '''

#include<stdio.h>

extern int add(int a,int b);

int main()
{

    int a;
    int b;
    a=1;
    b=2;
    int c;
    c=add(a,b);
    return 0;

}

'''

ps:我尝试了很多方法来解决这个问题,我得出的结论是问题可能与编译器输出路径设置有关。我像使用 Eclipse 一样使用 ctrl+b 编译代码,并且可以获得调试文件夹、.o 文件、.d 文件和 .exe。但是这些文件不在 csim/build 和 csim/obj 下

非常感谢您的帮助!非常感谢!

0 个答案:

没有答案