UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Observer oska874
Observer
435 次查看
注册日期: ‎10-17-2012

hls 综合失败,怎么解决?

写了一段简单的代码,用hls 处理:

mt1.cpp

 

#include "mt1.h"

int mux21(int sig_a, int sig_b, int select)
{
    return sig_a*sig_b+select;
}

 

mt1.h

int mux21(int sig_a, int sig_b, int select);

mt_tb.cpp

#include "mt1.h"

int main(void)
{
    int res1 = 0;
    int res2 = 0;

    res1=mux21(1,0,0);
    res2=mux21(0,1,1);

    if(res1 && res2){
    	;;
    }
    return 0;
}

然后用hls 2016.2 进行 c synthesis,报错:

Starting C synthesis ...
C:/Xilinx/Vivado_HLS/2016.2/bin/vivado_hls.bat C:/Users/Administrator/hls/test1/matrix1/csynth.tcl
INFO: [HLS 200-10] Running 'C:/Xilinx/Vivado_HLS/2016.2/bin/unwrapped/win64.o/vivado_hls.exe'
INFO: [HLS 200-10] For user 'Administrator' on host 'tsj-033' (Windows NT_amd64 version 6.1) on Wed Mar 28 11:39:41 +0800 2018
INFO: [HLS 200-10] In directory 'C:/Users/Administrator/hls'
INFO: [HLS 200-10] Opening project 'C:/Users/Administrator/hls/test1'.
INFO: [HLS 200-10] Adding design file 'test1/mt1.h' to the project
INFO: [HLS 200-10] Adding design file 'test1/mt1.cpp' to the project
INFO: [HLS 200-10] Adding test bench file 'test1/mt1_tb.cpp' to the project
INFO: [HLS 200-10] Opening solution 'C:/Users/Administrator/hls/test1/matrix1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7z020clg484-1'
INFO: [HLS 200-10] Analyzing design file 'test1/mt1.cpp' ... 
CRITICAL WARNING: [HLS 200-70] Compilation errors found:
Stack dump:
0.	Program arguments: C:\Xilinx\Vivado_HLS\2016.2\win64\tools\clang\bin\clang.exe -fno-limit-debug-info -gcc-toolchain C:/Xilinx/Vivado_HLS/2016.2/msys -hls -fno-math-errno -c -emit-llvm -O0 -mllvm -disable-llvm-optzns -fno-threadsafe-statics -fno-use-cxa-atexit -fno-threadsafe-statics -fno-use-cxa-atexit -D__cdecl= -I C:/Xilinx/Vivado_HLS/2016.2/win64/tools/systemc/include -I C:/Xilinx/Vivado_HLS/2016.2/include -I C:/Xilinx/Vivado_HLS/2016.2/include/ap_sysc -fexceptions -I C:/Xilinx/Vivado_HLS/2016.2/common/technology/autopilot -include etc/autopilot_ssdm_op.h test1/mt1.cpp -o C:/Users/Administrator/hls/test1/matrix1/.autopilot/db/mt1.pp.00.o 
Failed checking during preprocessing.
    while executing
"source C:/Users/Administrator/hls/test1/matrix1/csynth.tcl"
    invoked from within
"hls::main C:/Users/Administrator/hls/test1/matrix1/csynth.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 hls::main {*}$args"
    (procedure "hls_proc" line 5)
    invoked from within
"hls_proc $argv"
Finished C synthesis.

 

运行c simulation 不报错

Starting C simulation ...
C:/Xilinx/Vivado_HLS/2016.2/bin/vivado_hls.bat C:/Users/Administrator/hls/test1/matrix1/csim.tcl
INFO: [HLS 200-10] Running 'C:/Xilinx/Vivado_HLS/2016.2/bin/unwrapped/win64.o/vivado_hls.exe'
INFO: [HLS 200-10] For user 'Administrator' on host 'tsj-033' (Windows NT_amd64 version 6.1) on Wed Mar 28 11:44:05 +0800 2018
INFO: [HLS 200-10] In directory 'C:/Users/Administrator/hls'
INFO: [HLS 200-10] Opening project 'C:/Users/Administrator/hls/test1'.
INFO: [HLS 200-10] Opening solution 'C:/Users/Administrator/hls/test1/matrix1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7z020clg484-1'
   Compiling ../../../mt1_tb.cpp in debug mode
   Compiling ../../../mt1.cpp in debug mode
   Generating csim.exe
INFO: [SIM 211-1] CSim done with 0 errors.
Finished C simulation.

其它都是自动生成的,没做过改动。

该怎么解决?

 

 

 

 

 

 

 

0 项奖励
1 条回复
Voyager
Voyager
84 次查看
注册日期: ‎10-24-2018

回复: hls 综合失败,怎么解决?

@oska874

This works (but gives warning in 2018.3)... On an older version 'maybe' it fails using the reserved word 'select' (which the newer version warns about).

Hope that helps

If so, please mark as solution accepted

0 项奖励