Vivado HLS: отсутствует двоичный оператор перед токеном "(" - PullRequest
0 голосов
/ 28 апреля 2020

Я следую учебному пособию по Vivado HLS и получаю эту ошибку в нескольких библиотеках и строках:

missing binary error: missing binary operator before token "("

Например, вот журнал после того, как я не смог успешно создать проект Chapter4, Lab1:

================================================================
  Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
  Version 2017.2
  Build 1909853 on Thu Jun 15 18:55:24 MDT 2017
  Copyright (C) 1986-2017 Xilinx, Inc. All Rights Reserved.
================================================================
INFO: [HLS 200-10] Running '/opt/Xilinx/Vivado_HLS/2017.2/bin/unwrapped/lnx64.o/vivado_hls'
INFO: [HLS 200-10] For user 'aris' on host 'laptop' (Linux_x86_64 version 5.3.0-46-generic) on Tue Apr 28 15:22:06 EEST 2020
INFO: [HLS 200-10] On os Ubuntu 18.04.4 LTS
INFO: [HLS 200-10] In directory '/home/aris/Documents/ece340/Vivado_HLS_Tutorial/4.Interface_Synthesis/lab1'
INFO: [HLS 200-10] Opening and resetting project '/home/aris/Documents/ece340/Vivado_HLS_Tutorial/4.Interface_Synthesis/lab1/adders_prj'.
INFO: [HLS 200-10] Adding design file 'adders.c' to the project
INFO: [HLS 200-10] Adding test bench file 'adders_test.c' to the project
INFO: [HLS 200-10] Opening and resetting solution '/home/aris/Documents/ece340/Vivado_HLS_Tutorial/4.Interface_Synthesis/lab1/adders_prj/solution1'.
INFO: [HLS 200-10] Cleaning up the solution database.
INFO: [HLS 200-10] Setting target device to 'xc7k160tfbg484-1'
INFO: [SYN 201-201] Setting up clock 'default' with a period of 1ns.
INFO: [SIM 211-2] *************** CSIM start ***************
INFO: [SIM 211-4] CSIM will launch GCC as the compiler.
   Compiling(apcc) ../../../../adders_test.c in debug mode
INFO: [HLS 200-10] Running '/opt/Xilinx/Vivado_HLS/2017.2/bin/unwrapped/lnx64.o/apcc'
INFO: [HLS 200-10] For user 'aris' on host 'laptop' (Linux_x86_64 version 5.3.0-46-generic) on Tue Apr 28 15:22:07 EEST 2020
INFO: [HLS 200-10] On os Ubuntu 18.04.4 LTS
INFO: [HLS 200-10] In directory '/home/aris/Documents/ece340/Vivado_HLS_Tutorial/4.Interface_Synthesis/lab1/adders_prj/solution1/csim/build'
ERROR: [APCC 202-3] Gcc Compile failed: 
In file included from /opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/features.h:339:0,
                 from /usr/include/setjmp.h:25,
                 from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:3:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:467:49: error: missing binary operator before token "("
In file included from /opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/limits.h:169:0,
                 from /opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/syslimits.h:7,
                 from /opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/limits.h:34,
                 from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:4:
/usr/include/limits.h:145:17: error: missing binary operator before token "("
In file included from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:12:0:
/usr/include/stdio.h:276:43: error: missing binary operator before token "("
/usr/include/stdio.h:349:17: error: missing binary operator before token "("
/usr/include/stdio.h:567:17: error: missing binary operator before token "("
/usr/include/stdio.h:592:43: error: missing binary operator before token "("
In file included from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:13:0:
/usr/include/string.h:164:21: error: missing binary operator before token "("
/usr/include/string.h:173:43: error: missing binary operator before token "("
In file included from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:14:0:
/usr/include/stdlib.h:133:35: error: missing binary operator before token "("
/usr/include/stdlib.h:139:35: error: missing binary operator before token "("
/usr/include/stdlib.h:145:35: error: missing binary operator before token "("
/usr/include/stdlib.h:151:36: error: missing binary operator before token "("
/usr/include/stdlib.h:157:36: error: missing binary operator before token "("
/usr/include/stdlib.h:163:36: error: missing binary operator before token "("
/usr/include/stdlib.h:169:37: error: missing binary operator before token "("
/usr/include/stdlib.h:211:17: error: missing binary operator before token "("
/usr/include/stdlib.h:225:35: error: missing binary operator before token "("
/usr/include/stdlib.h:231:35: error: missing binary operator before token "("
/usr/include/stdlib.h:237:35: error: missing binary operator before token "("
/usr/include/stdlib.h:243:36: error: missing binary operator before token "("
/usr/include/stdlib.h:249:36: error: missing binary operator before token "("
/usr/include/stdlib.h:255:36: error: missing binary operator before token "("
/usr/include/stdlib.h:261:37: error: missing binary operator before token "("
In file included from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:15:0:
/usr/include/math.h:66:35: error: missing binary operator before token "("
/usr/include/math.h:69:35: error: missing binary operator before token "("
/usr/include/math.h:72:35: error: missing binary operator before token "("
/usr/include/math.h:75:36: error: missing binary operator before token "("
/usr/include/math.h:78:36: error: missing binary operator before token "("
/usr/include/math.h:81:36: error: missing binary operator before token "("
/usr/include/math.h:84:37: error: missing binary operator before token "("
/usr/include/math.h:107:17: error: missing binary operator before token "("
/usr/include/math.h:115:35: error: missing binary operator before token "("
/usr/include/math.h:118:35: error: missing binary operator before token "("
/usr/include/math.h:121:35: error: missing binary operator before token "("
/usr/include/math.h:124:36: error: missing binary operator before token "("
/usr/include/math.h:127:36: error: missing binary operator before token "("
/usr/include/math.h:130:36: error: missing binary operator before token "("
/usr/include/math.h:133:37: error: missing binary operator before token "("
In file included from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:15:0:
/usr/include/math.h:203:17: error: missing binary operator before token "("
In file included from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:15:0:
/usr/include/math.h:235:17: error: missing binary operator before token "("
In file included from /usr/include/math.h:290:0,
                 from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:15:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:112:17: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:283:17: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:338:17: error: missing binary operator before token "("
In file included from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:15:0:
/usr/include/math.h:388:18: error: missing binary operator before token "("
/usr/include/math.h:405:18: error: missing binary operator before token "("
In file included from /tmp/apcc_db_aris/315601588076527097754/adders_test.c:15:0:
/usr/include/math.h:422:18: error: missing binary operator before token "("
/usr/include/math.h:439:18: error: missing binary operator before token "("
/usr/include/math.h:456:18: error: missing binary operator before token "("
/usr/include/math.h:683:17: error: missing binary operator before token "("
/usr/include/math.h:1176:17: error: missing binary operator before token "("
ERROR: [APCC 202-3] Tmp directory is /tmp/apcc_db_aris/315601588076527097754
ERROR: [APCC 202-1] APCC failed.
csim.mk:76: recipe for target 'obj/adders_test.o' failed
make: *** [obj/adders_test.o] Error 1
ERROR: [SIM 211-100] 'csim_design' failed: compilation error(s).
INFO: [SIM 211-3] *************** CSIM finish ***************
4
    while executing
"source [lindex $::argv 1] "
    ("uplevel" body line 1)
    invoked from within
"uplevel \#0 { source [lindex $::argv 1] } "

Я немного искал и обнаружил, что это ошибка препроцессора, но не могу понять, что вызывает ее на vivado hls. Я запустил тестовую программу с одним printf и одним sqrt на моей машине, и она работала нормально.

...