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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer dgaur
Observer
2,721 Views
Registered: ‎12-10-2017

Vivado HLS 2018.1 Simulation/CoSimulation not working on Linux Ubuntu

Starting C simulation ...
/home/cdot/Xilinx/Vivado/2018.1/bin/vivado_hls /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/csim.tcl
INFO: [HLS 200-10] Running '/home/cdot/Xilinx/Vivado/2018.1/bin/unwrapped/lnx64.o/vivado_hls'
INFO: [HLS 200-10] For user 'cdot' on host 'Maverick' (Linux_x86_64 version 4.15.0-22-generic) on Tue May 29 16:38:52 IST 2018
INFO: [HLS 200-10] On os Ubuntu 18.04 LTS
INFO: [HLS 200-10] In directory '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin'
INFO: [HLS 200-10] Opening project '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj'.
INFO: [HLS 200-10] Opening solution '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7k325tffg900-2'
INFO: [SIM 211-2] *************** CSIM start ***************
INFO: [SIM 211-4] CSIM will launch GCC as the compiler.
Compiling(apcc) ../../../../fir_test.c in debug mode
INFO: [HLS 200-10] Running '/home/cdot/Xilinx/Vivado/2018.1/bin/unwrapped/lnx64.o/apcc'
INFO: [HLS 200-10] For user 'cdot' on host 'Maverick' (Linux_x86_64 version 4.15.0-22-generic) on Tue May 29 16:38:53 IST 2018
INFO: [HLS 200-10] On os Ubuntu 18.04 LTS
INFO: [HLS 200-10] In directory '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/csim/build'
ERROR: [APCC 202-3] Gcc Compile failed:
In file included from /home/cdot/Xilinx/Vivado/2018.1/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_cdot/116991527592134021009/fir_test.c:3:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:467:49: error: missing binary operator before token "("
In file included from /home/cdot/Xilinx/Vivado/2018.1/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/limits.h:169:0,
from /home/cdot/Xilinx/Vivado/2018.1/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/syslimits.h:7,
from /home/cdot/Xilinx/Vivado/2018.1/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/limits.h:34,
from /tmp/apcc_db_cdot/116991527592134021009/fir_test.c:4:
/usr/include/limits.h:145:17: error: missing binary operator before token "("
In file included from /tmp/apcc_db_cdot/116991527592134021009/fir_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_cdot/116991527592134021009/fir_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_cdot/116991527592134021009/fir_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_cdot/116991527592134021009/fir_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_cdot/116991527592134021009/fir_test.c:15:0:
/usr/include/math.h:203:17: error: missing binary operator before token "("
In file included from /tmp/apcc_db_cdot/116991527592134021009/fir_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_cdot/116991527592134021009/fir_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_cdot/116991527592134021009/fir_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_cdot/116991527592134021009/fir_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_cdot/116991527592134021009
ERROR: [APCC 202-1] APCC failed.
csim.mk:79: recipe for target 'obj/fir_test.o' failed
make: *** [obj/fir_test.o] Error 1
ERROR: [SIM 211-100] 'csim_design' failed: compilation error(s).
INFO: [SIM 211-3] *************** CSIM finish ***************
4
while executing
"source /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/csim.tcl"
invoked from within
"hls::main /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/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"
Finished C simulation.

Starting C synthesis ...
/home/cdot/Xilinx/Vivado/2018.1/bin/vivado_hls /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/csynth.tcl
INFO: [HLS 200-10] Running '/home/cdot/Xilinx/Vivado/2018.1/bin/unwrapped/lnx64.o/vivado_hls'
INFO: [HLS 200-10] For user 'cdot' on host 'Maverick' (Linux_x86_64 version 4.15.0-22-generic) on Tue May 29 16:41:53 IST 2018
INFO: [HLS 200-10] On os Ubuntu 18.04 LTS
INFO: [HLS 200-10] In directory '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin'
INFO: [HLS 200-10] Opening project '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj'.
INFO: [HLS 200-10] Adding design file 'fir.c' to the project
INFO: [HLS 200-10] Adding test bench file 'fir_test.c' to the project
INFO: [HLS 200-10] Adding test bench file 'out.gold.8.dat' to the project
INFO: [HLS 200-10] Adding test bench file 'out.gold.dat' to the project
INFO: [HLS 200-10] Opening solution '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7k325tffg900-2'
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Analyzing design file 'fir.c' ...
INFO: [HLS 200-10] Validating synthesis directives ...
INFO: [HLS 200-111] Finished Checking Pragmas Time (s): cpu = 00:00:06 ; elapsed = 00:00:05 . Memory (MB): peak = 361.430 ; gain = 0.109 ; free physical = 204 ; free virtual = 7572
INFO: [HLS 200-111] Finished Linking Time (s): cpu = 00:00:07 ; elapsed = 00:00:07 . Memory (MB): peak = 361.430 ; gain = 0.109 ; free physical = 203 ; free virtual = 7571
INFO: [HLS 200-10] Starting code transformations ...
INFO: [HLS 200-111] Finished Standard Transforms Time (s): cpu = 00:00:08 ; elapsed = 00:00:08 . Memory (MB): peak = 361.430 ; gain = 0.109 ; free physical = 197 ; free virtual = 7571
INFO: [HLS 200-10] Checking synthesizability ...
INFO: [HLS 200-111] Finished Checking Synthesizability Time (s): cpu = 00:00:08 ; elapsed = 00:00:08 . Memory (MB): peak = 361.430 ; gain = 0.109 ; free physical = 197 ; free virtual = 7570
INFO: [HLS 200-111] Finished Pre-synthesis Time (s): cpu = 00:00:09 ; elapsed = 00:00:09 . Memory (MB): peak = 489.320 ; gain = 128.000 ; free physical = 176 ; free virtual = 7550
INFO: [HLS 200-111] Finished Architecture Synthesis Time (s): cpu = 00:00:09 ; elapsed = 00:00:09 . Memory (MB): peak = 489.320 ; gain = 128.000 ; free physical = 183 ; free virtual = 7558
INFO: [HLS 200-10] Starting hardware synthesis ...
INFO: [HLS 200-10] Synthesizing 'fir' ...
INFO: [HLS 200-10] ----------------------------------------------------------------
INFO: [HLS 200-42] -- Implementing module 'fir'
INFO: [HLS 200-10] ----------------------------------------------------------------
INFO: [SCHED 204-11] Starting scheduling ...
INFO: [SCHED 204-11] Finished scheduling.
INFO: [HLS 200-111] Elapsed time: 9.52 seconds; current allocated memory: 60.496 MB.
INFO: [BIND 205-100] Starting micro-architecture generation ...
INFO: [BIND 205-101] Performing variable lifetime analysis.
INFO: [BIND 205-101] Exploring resource sharing.
INFO: [BIND 205-101] Binding ...
INFO: [BIND 205-100] Finished micro-architecture generation.
INFO: [HLS 200-111] Elapsed time: 0.03 seconds; current allocated memory: 60.678 MB.
INFO: [HLS 200-10] ----------------------------------------------------------------
INFO: [HLS 200-10] -- Generating RTL for module 'fir'
INFO: [HLS 200-10] ----------------------------------------------------------------
INFO: [RTGEN 206-500] Setting interface mode on port 'fir/y' to 's_axilite & ap_vld'.
INFO: [RTGEN 206-500] Setting interface mode on port 'fir/x' to 's_axilite & ap_none'.
INFO: [RTGEN 206-500] Setting interface mode on function 'fir' to 's_axilite & ap_ctrl_hs'.
INFO: [RTGEN 206-100] Bundling port 'return' and 'x' to AXI-Lite port fir_io.
INFO: [RTGEN 206-100] Finished creating RTL model for 'fir'.
INFO: [HLS 200-111] Elapsed time: 0.06 seconds; current allocated memory: 61.064 MB.
INFO: [RTMG 210-278] Implementing memory 'fir_shift_reg_ram (RAM)' using distributed RAMs with power-on initialization.
INFO: [RTMG 210-279] Implementing memory 'fir_c_rom' using distributed ROMs.
INFO: [HLS 200-111] Finished generating all RTL models Time (s): cpu = 00:00:10 ; elapsed = 00:00:10 . Memory (MB): peak = 489.320 ; gain = 128.000 ; free physical = 170 ; free virtual = 7551
INFO: [SYSC 207-301] Generating SystemC RTL for fir.
INFO: [VHDL 208-304] Generating VHDL RTL for fir.
INFO: [VLOG 209-307] Generating Verilog RTL for fir.
INFO: [HLS 200-112] Total elapsed time: 10.05 seconds; peak allocated memory: 61.064 MB.
Finished C synthesis.

Starting C/RTL cosimulation ...
/home/cdot/Xilinx/Vivado/2018.1/bin/vivado_hls /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/cosim.tcl
INFO: [HLS 200-10] Running '/home/cdot/Xilinx/Vivado/2018.1/bin/unwrapped/lnx64.o/vivado_hls'
INFO: [HLS 200-10] For user 'cdot' on host 'Maverick' (Linux_x86_64 version 4.15.0-22-generic) on Tue May 29 16:42:51 IST 2018
INFO: [HLS 200-10] On os Ubuntu 18.04 LTS
INFO: [HLS 200-10] In directory '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin'
INFO: [HLS 200-10] Opening project '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj'.
INFO: [HLS 200-10] Opening solution '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7k325tffg900-2'
INFO: [COSIM 212-47] Using XSIM for RTL simulation.
INFO: [COSIM 212-14] Instrumenting C test bench ...
ERROR: [COSIM 212-24] TB preprocess failed : In file included from /home/cdot/Xilinx/Vivado/2018.1/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/features.h:339:0,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:1:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:467:49: error: missing binary operator before token "("
In file included from /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:1: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 /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:2: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 /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:2:0:
/usr/include/math.h:203:17: error: missing binary operator before token "("
In file included from /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:2:0:
/usr/include/math.h:235:17: error: missing binary operator before token "("
In file included from /usr/include/math.h:290:0,
from /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:2:
/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 /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:2: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 /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:2: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: [HLS 200-70] Cannot find file /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/./sim/autowrap/testbench/fir_test.c_pre.c.
ERROR: [COSIM 212-4] *** C/RTL co-simulation finished: FAIL ***
24
while executing
"source /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/cosim.tcl"
invoked from within
"hls::main /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/cosim.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/RTL cosimulation.

0 Kudos
5 Replies
Xilinx Employee
Xilinx Employee
2,686 Views
Registered: ‎05-06-2008

Re: Vivado HLS 2018.1 Simulation/CoSimulation not working on Linux Ubuntu

Hello @dgaur,

 

It appears that you maybe using CPP classes in a C file.  Can you try changing the extension for C to CPP?

 

Thanks,
Chris

0 Kudos
Observer dgaur
Observer
2,672 Views
Registered: ‎12-10-2017

Re: Vivado HLS 2018.1 Simulation/CoSimulation not working on Linux Ubuntu

<Vivado install path>/Vivado/2017.3/lnx64/tools/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/install-tools/mkheaders <Vivado install path>/Vivado/2017.3/lnx64/tools/gcc

Figured out @corna@kadionik


@chrisz wrote:

Hello @dgaur,

 

It appears that you maybe using CPP classes in a C file.  Can you try changing the extension for C to CPP?

 

Thanks,
Chris


 

$ sudo /opt/Xilinx/Vivado/2018.1/lnx64/tools/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/install-tools/mkheaders /opt/Xilinx/Vivado/2018.1/lnx64/tools/gcc

 

C simulation is now working but still getting error in C/RTL Co-simulation

 

Starting C/RTL cosimulation ...
/home/cdot/Xilinx/Vivado/2018.1/bin/vivado_hls /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/cosim.tcl
INFO: [HLS 200-10] Running '/home/cdot/Xilinx/Vivado/2018.1/bin/unwrapped/lnx64.o/vivado_hls'
INFO: [HLS 200-10] For user 'cdot' on host 'Maverick' (Linux_x86_64 version 4.15.0-22-generic) on Wed May 30 09:18:36 IST 2018
INFO: [HLS 200-10] On os Ubuntu 18.04 LTS
INFO: [HLS 200-10] In directory '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin'
INFO: [HLS 200-10] Opening project '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj'.
INFO: [HLS 200-10] Opening solution '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7k325tffg900-2'
INFO: [COSIM 212-47] Using XSIM for RTL simulation.
INFO: [COSIM 212-14] Instrumenting C test bench ...
Build using ""
Compiling apatb_fir.cpp
Compiling (apcc) fir.c_pre.c.tb.c
INFO: [HLS 200-10] Running '/home/cdot/Xilinx/Vivado/2018.1/bin/unwrapped/lnx64.o/apcc'
INFO: [HLS 200-10] For user 'cdot' on host 'Maverick' (Linux_x86_64 version 4.15.0-22-generic) on Wed May 30 09:18:39 IST 2018
INFO: [HLS 200-10] On os Ubuntu 18.04 LTS
INFO: [HLS 200-10] In directory '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/sim/wrapc'
clang: warning: argument unused during compilation: '-fno-builtin-isinf'
clang: warning: argument unused during compilation: '-fno-builtin-isnan'
INFO: [APCC 202-3] Tmp directory is /tmp/apcc_db_cdot/68451527652119415939
INFO: [APCC 202-1] APCC is done.
Compiling (apcc) fir_test.c_pre.c.tb.c
INFO: [HLS 200-10] Running '/home/cdot/Xilinx/Vivado/2018.1/bin/unwrapped/lnx64.o/apcc'
INFO: [HLS 200-10] For user 'cdot' on host 'Maverick' (Linux_x86_64 version 4.15.0-22-generic) on Wed May 30 09:18:42 IST 2018
INFO: [HLS 200-10] On os Ubuntu 18.04 LTS
INFO: [HLS 200-10] In directory '/home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/sim/wrapc'
clang: warning: argument unused during compilation: '-fno-builtin-isinf'
clang: warning: argument unused during compilation: '-fno-builtin-isnan'
In file included from /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_test.c:2:
In file included from /usr/include/stdlib.h:55:
/usr/include/x86_64-linux-gnu/bits/floatn.h:75:52: error: unsupported machine mode '__TC__'
typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
^
/usr/include/x86_64-linux-gnu/bits/floatn.h:87:9: error: unknown type name '__float128'; did you mean '__cfloat128'?
typedef __float128 _Float128;
^
/usr/include/x86_64-linux-gnu/bits/floatn.h:75:24: note: '__cfloat128' declared here
typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
^
2 errors generated.
ERROR: [HLS 200-101] Message ID '1-1' value invalid for uint argument.


FORMAT
ap_puts_err [OPTIONS] [ Message namespace] [ Message ID] [ Message string] [ Tcl message key]
<string>
<uint>
<string>
<string>


cosim.tv.mk:66: recipe for target 'obj/fir_test.c_pre.c.tb.o' failed
which: /home/cdot/Xilinx/Vivado/2018.1/lnx64/tools/gcc/bin/g++: u k ow comma d
In file included from apatb_fir.cpp:18:0:
/home/cdot/Xilinx/Vivado/2018.1/include/ap_stream.h:70:2: warning: #warning AP_STREAM macros are deprecated. Please use hls::stream<> from "hls_stream.h" instead. [-Wcpp]
make: *** [obj/fir_test.c_pre.c.tb.o] Error 1
ERROR: [COSIM 212-317] C++ compile error.
ERROR: [COSIM 212-321] EXE file generate failed.
ERROR: [COSIM 212-321] EXE file generate failed.
ERROR: [COSIM 212-331] Aborting co-simulation: C simulation failed, compilation errors.
ERROR: [COSIM 212-4] *** C/RTL co-simulation finished: FAIL ***
command 'ap_source' returned error code
while executing
"source /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/cosim.tcl"
invoked from within
"hls::main /home/cdot/LABS/training/hlx_flow/lab/KC705/fir_lin/fir_prj/solution1/cosim.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/RTL cosimulation.

 

0 Kudos
Xilinx Employee
Xilinx Employee
2,613 Views
Registered: ‎05-06-2008

Re: Vivado HLS 2018.1 Simulation/CoSimulation not working on Linux Ubuntu

Hello @dgaur,

 

Thank you for the PM and the fir.h file.  

 

Can you get the Csim to pass?

  I get a Csim 'Output Does not match the golden output' message from the testbench.

 

I did take the out.dat and created a out.gold.dat file, but I am not sure if this is expected results or not.  And this gets past the CSim failure.

 

I ran CSynth and RTL CoSim on Ubuntu 16.04.03, and it passes.  I think the Csim libraries from the Ubuntu directory is not working as expected.  Do you have access to a Ubuntu 16.04.03 machine?

 

Thanks,

Chris

 

Thanks,
Chris

Observer dgaur
Observer
2,589 Views
Registered: ‎12-10-2017

Re: Vivado HLS 2018.1 Simulation/CoSimulation not working on Linux Ubuntu

Thanks Chris! It seems to be a gcc /clang issue (if we include <math.h>)

 

refer

 

https://github.com/apple/cups/issues/5106

https://bugs.llvm.org/show_bug.cgi?id=13530#c3

https://stackoverflow.com/questions/13525774/clang-and-float128-bug-error

 

My ubuntu 18.04 machine has

 

gcc --version
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0

 

clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

 

Some solution

1. give -std=c++11 as compiler option

2.

#ifdef __clang__typedef struct { long double x, y; } __float128;
#endi

I haven't tried them but will see if they work

 

I will retry CoSim again if I could get access to a ubuntu 16.04 machine

 

regards,

 

Deepak

0 Kudos
Newbie cxh
Newbie
2,182 Views
Registered: ‎09-01-2018

Re: Vivado HLS 2018.1 Simulation/CoSimulation not working on Linux Ubuntu

Hi Deepak,

 

How did you deal with this problem?

 

error: unsupported machine mode '__TC__'

 

Best,

Xuhao

0 Kudos