Closed HKLee2040 closed 5 years ago
Hi @HKLee2040 , it seems as though you are missing some dependencies:
[error] (run-main-0) java.io.IOException: Cannot run program "vivado_hls" (in directory "/tmp/hls_syn_ExecAddrGen"): error=2, No such file or directory
BISMO requires you to have Vivado (which includes Vivado HLS) installed and available on PATH. Make sure you run /path/to/vivado/installation/settings64.sh
before trying to compile BISMO.
@maltanar Thanks. It works. However, I met another error, could you help me?
=======> Driver written to BitSerialMatMulAccel.hpp [success] Total time: 3 s, completed Jun 28, 2019 9:37:11 PM mkdir -p /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy; \ mkdir -p /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/driver; \ mkdir -p /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/test; \ mkdir -p /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/rtlib; \ mkdir -p /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/hls_include; \ cp -rf /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/hw/driver/ /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/driver/; \ cp -rf /media/walker/DATA/work/bismo/new/bismo/src/main/resources/cpp/app/ /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/test/; cp -rf /media/walker/DATA/work/bismo/new/bismo/src/main/resources/cpp/lib/ /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/rtlib; \ cp -rf /media/walker/DATA/tools/Xilinx/Vivado/2017.4/bin/../include/ /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/hls_include; mkdir -p /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy; cp -f /media/walker/DATA/work/bismo/new/bismo/src/main/script/VerilatedTester/target/ /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/ cd /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy; \ sh compile_rtlib.sh; g++: error: verilog/verilated/.cpp: Not a directory platforms/VerilatedTester.mk:63: recipe for target '/media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/libbismo_rt.so' failed make: *** [/media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/libbismo_rt.so] Error 1
To me it looks like you're still missing a dependency; the new version of BISMO also needs Verilator, have you installed it?
g++: error: verilog/verilated/*.cpp: Not a directory
On Ubuntu you should be able to do sudo apt-get install verilator
and that should be enough. On other distributions, please see the Verilator website and modify the Verilator installation path on this line
I had installed verilator. Is it the right version?
verilator --version Verilator 3.874 2015-06-06 rev verilator_3_872-20-g0d43051
The path is the same as "/usr/share/verilator/include"
OK, that version of Verilator should be recent enough. It seems as though Verilator is not working correctly. You could try doing a clean rebuild, or if that does not work either, can you do the following:
PLATFORM=VerilatedTester make /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/verilog/verilated
and post the output here?
The output is very long. I only post the final output
[success] Total time: 87 s, completed Jun 28, 2019 10:25:12 PM mkdir -p /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/verilog; \ cp -rf /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/hw/verilog/ /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/verilog; \ cp -rf /media/walker/DATA/work/bismo/new/bismo/fpga-tidbits/src/main/resources/verilog/ /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/verilog; \ cd /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/verilog; \ verilator -Iother-verilog --cc TesterWrapper.v -Wno-assignin -Wno-fatal -Wno-lint -Wno-style -Wno-COMBDLY -Wno-STMTDLY --Mdir verilated --trace; \ cp -rf /usr/share/verilator/include/verilated.cpp /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/verilog/verilated; \ cp -rf /usr/share/verilator/include/verilated_vcd_c.cpp /media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/deploy/verilog/verilated; %Error-BLKLOOPINIT: Q_srl.v:195: Unsupported: Delayed assignment to array inside for loops (non-delayed is ok - see docs) %Error: Exiting due to 1 error(s) %Error: See the manual and http://www.veripool.org/verilator for more assistance. %Error: Command Failed /usr/bin/verilator_bin -Iother-verilog --cc TesterWrapper.v -Wno-assignin -Wno-fatal -Wno-lint -Wno-style -Wno-COMBDLY -Wno-STMTDLY --Mdir verilated --trace
If I change the command to be PLATFORM=VerilatedTester make all --> "all" instead of "emu" compilation is success
Should I use "all"?
It actually looks like your Verilator version isn't able to correctly handle some of the sources, can you try with a newer version? I have Verilator 3.916 (which is what I get on Ubuntu 18.04 with apt-get) and I'm able to build without any errors.
make all
doesn't do the compilation step (Verilog to C++ translation with Verilator) which is failing, so it won't solve the problem (you'd still have to run the compile_rtlib.sh script in the deployment folder after make all
, and it will fail in the same way).
Yes, the problem is solved if I use verilator 3.912. But... new error message occurs: Is it libgmp issue? Which version do you use?
sh compile_rtlib.sh; In file included from ./hls_include/gmp.h:53:0, from ./hls_include/floating_point_v7_0_bitacc_cmodel.h:143, from ./hls_include/hls_fpo.h:172, from ./hls_include/hls_half.h:57, from ./hls_include/ap_int.h:74, from rtlib/BISMOInstruction.hpp:35, from rtlib/BISMOInstruction.cpp:32: /usr/include/c++/5/cstddef:51:11: error: ‘::max_align_t’ has not been declared using ::max_align_t; ^ In file included from rtlib/BitSerialMatMulAccelDriver.hpp:42:0, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt.cpp:32: ./test/gemmbitserial/gemmbitserial.hpp:509:2: warning: #warning "Compiling using generic popcount" [-Wcpp]
^ In file included from ./hls_include/gmp.h:53:0, from ./hls_include/floating_point_v7_0_bitacc_cmodel.h:143, from ./hls_include/hls_fpo.h:172, from ./hls_include/hls_half.h:57, from ./hls_include/ap_int.h:74, from rtlib/BISMOInstruction.hpp:35, from rtlib/BitSerialMatMulAccelDriver.hpp:44, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt.cpp:32: /usr/include/c++/5/cstddef:51:11: error: ‘::max_align_t’ has not been declared using ::max_align_t; ^ rtlib/bismo_rt.cpp: In function ‘void bismo_rt::deinit()’: rtlib/bismo_rt.cpp:60:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] platform->deallocAccelBuffer((void *) accel_p2s_bitpar_buffer); ^ In file included from rtlib/BitSerialMatMulAccelDriver.hpp:42:0, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt_instrumentation.cpp:32: ./test/gemmbitserial/gemmbitserial.hpp:509:2: warning: #warning "Compiling using generic popcount" [-Wcpp]
^ In file included from ./hls_include/gmp.h:53:0, from ./hls_include/floating_point_v7_0_bitacc_cmodel.h:143, from ./hls_include/hls_fpo.h:172, from ./hls_include/hls_half.h:57, from ./hls_include/ap_int.h:74, from rtlib/BISMOInstruction.hpp:35, from rtlib/BitSerialMatMulAccelDriver.hpp:44, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt_instrumentation.cpp:32: /usr/include/c++/5/cstddef:51:11: error: ‘::max_align_t’ has not been declared using ::max_align_t; ^ In file included from rtlib/BitSerialMatMulAccelDriver.hpp:42:0, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt_matmul.hpp:35, from rtlib/bismo_rt_matmul.cpp:32: ./test/gemmbitserial/gemmbitserial.hpp:509:2: warning: #warning "Compiling using generic popcount" [-Wcpp]
^ In file included from ./hls_include/gmp.h:53:0, from ./hls_include/floating_point_v7_0_bitacc_cmodel.h:143, from ./hls_include/hls_fpo.h:172, from ./hls_include/hls_half.h:57, from ./hls_include/ap_int.h:74, from rtlib/BISMOInstruction.hpp:35, from rtlib/BitSerialMatMulAccelDriver.hpp:44, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt_matmul.hpp:35, from rtlib/bismo_rt_matmul.cpp:32: /usr/include/c++/5/cstddef:51:11: error: ‘::max_align_t’ has not been declared using ::max_align_t; ^ In file included from rtlib/BitSerialMatMulAccelDriver.hpp:42:0, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt_matmul.hpp:35, from rtlib/bismo_rt_matmul_api.cpp:32: ./test/gemmbitserial/gemmbitserial.hpp:509:2: warning: #warning "Compiling using generic popcount" [-Wcpp]
^
In file included from ./hls_include/gmp.h:53:0,
from ./hls_include/floating_point_v7_0_bitacc_cmodel.h:143,
from ./hls_include/hls_fpo.h:172,
from ./hls_include/hls_half.h:57,
from ./hls_include/ap_int.h:74,
from rtlib/BISMOInstruction.hpp:35,
from rtlib/BitSerialMatMulAccelDriver.hpp:44,
from rtlib/bismo_rt_internal.hpp:35,
from rtlib/bismo_rt_matmul.hpp:35,
from rtlib/bismo_rt_matmul_api.cpp:32:
/usr/include/c++/5/cstddef:51:11: error: ‘::max_align_t’ has not been declared
using ::max_align_t;
^
In file included from rtlib/bismo_rt_matmul.hpp:36:0,
from rtlib/bismo_rt_matmul_api.cpp:32:
rtlib/bismo_rt_matrix.hpp: In instantiation of ‘bismo_rt::Matrix
^ In file included from ./hls_include/gmp.h:53:0, from ./hls_include/floating_point_v7_0_bitacc_cmodel.h:143, from ./hls_include/hls_fpo.h:172, from ./hls_include/hls_half.h:57, from ./hls_include/ap_int.h:74, from rtlib/BISMOInstruction.hpp:35, from rtlib/BitSerialMatMulAccelDriver.hpp:44, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt_p2s.cpp:32: /usr/include/c++/5/cstddef:51:11: error: ‘::max_align_t’ has not been declared using ::max_align_t; ^ rtlib/bismo_rt_p2s.cpp: In function ‘void bismo_rt::p2s(const uint8_t, uint32_t, size_t, size_t, size_t, bool, bool, size_t)’: rtlib/bismo_rt_p2s.cpp:86:75: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] platform->copyBufferHostToAccel((void )host_p2s_bitpar_buffer, (void )accel_p2s_bitpar_buffer, nbytes_bitpar_aligned); ^ rtlib/bismo_rt_p2s.cpp:89:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void )accel_p2s_bitpar_buffer, // source buffer ^ rtlib/bismo_rt_p2s.cpp:91:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void ) accel_buf_dst, // dest buffer ^ rtlib/bismo_rt_p2s.cpp: In function ‘bool bismo_rt::selftest_p2s()’: rtlib/bismo_rt_p2s.cpp:128:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] platform->copyBufferAccelToHost((void )accel_buf, accel_mat_bs, nbytes_bitser); ^ rtlib/bismo_rt_p2s.cpp:139:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] platform->deallocAccelBuffer((void *)accel_buf); ^ In file included from rtlib/BitSerialMatMulAccelDriver.hpp:42:0, from rtlib/bismo_rt_internal.hpp:35, from rtlib/bismo_rt_test.cpp:32: ./test/gemmbitserial/gemmbitserial.hpp:509:2: warning: #warning "Compiling using generic popcount" [-Wcpp]
^
In file included from ./hls_include/gmp.h:53:0,
from ./hls_include/floating_point_v7_0_bitacc_cmodel.h:143,
from ./hls_include/hls_fpo.h:172,
from ./hls_include/hls_half.h:57,
from ./hls_include/ap_int.h:74,
from rtlib/BISMOInstruction.hpp:35,
from rtlib/BitSerialMatMulAccelDriver.hpp:44,
from rtlib/bismo_rt_internal.hpp:35,
from rtlib/bismo_rt_test.cpp:32:
/usr/include/c++/5/cstddef:51:11: error: ‘::max_align_t’ has not been declared
using ::max_align_t;
^
In file included from rtlib/bismo_rt_matrix.hpp:38:0,
from rtlib/bismo_rt_test.cpp:33:
rtlib/bismo_rt_shared_buffer.hpp: In instantiation of ‘bismo_rt::SharedBuffer
I've not had this issue and I would guess this is some toolchain version difference. If you prefer to use Docker, there is a Dockerfile
under the repo root in the dev
branch, which should not have any of these build issues.
If you don't want to use Docker, I had a look at the the error message you are getting, and this issue seems related, and the suggested solution is to add #include <cstddef>
before any HLS includes. For BISMO if you add that to the beginning of BISMOInstruction.hpp
it might be enough to propagate to all the HLS files.
@maltanar
Yes, I add #include
Thanks!
Previous version works very well. Now, I want to test the latest version. However, when I run "PLATFORM=VerilatedTester make emu", I got the following error message
buildInfoPackage: Chisel, version: 2.2.39, scalaVersion: 2.11.11, sbtVersion: 0.13.16, builtAtString: 2018-04-18 17:37:17.153, builtAtMillis: 1524073037153
Writing template defines to /tmp/hls_syn_ExecAddrGen/ExecAddrGen_TemplateDefs.hpp [error] (run-main-0) java.io.IOException: Cannot run program "vivado_hls" (in directory "/tmp/hls_syn_ExecAddrGen"): error=2, No such file or directory java.io.IOException: Cannot run program "vivado_hls" (in directory "/tmp/hls_syn_ExecAddrGen"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:69) at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:100) at scala.sys.process.ProcessBuilderImpl$AbstractBuilder$$anonfun$runBuffered$1.apply(ProcessBuilderImpl.scala:148) at scala.sys.process.ProcessBuilderImpl$AbstractBuilder$$anonfun$runBuffered$1.apply(ProcessBuilderImpl.scala:148) at scala.sys.process.ProcessLogger$$anon$1.buffer(ProcessLogger.scala:99) at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.runBuffered(ProcessBuilderImpl.scala:148) at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:114) at fpgatidbits.hlstools.TidbitsHLSTools$.hlsToVerilog(HLSTools.scala:30) at fpgatidbits.TidbitsMakeUtils$$anonfun$makeHLSDependencies$1.apply(Main.scala:149) at fpgatidbits.TidbitsMakeUtils$$anonfun$makeHLSDependencies$1.apply(Main.scala:137) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) at fpgatidbits.TidbitsMakeUtils$.makeHLSDependencies(Main.scala:137) at bismo.Settings$.makeHLSDependencies(Main.scala:83) at bismo.HLSMain$.main(Main.scala:135) at bismo.HLSMain.main(Main.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:69)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:100)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder$$anonfun$runBuffered$1.apply(ProcessBuilderImpl.scala:148)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder$$anonfun$runBuffered$1.apply(ProcessBuilderImpl.scala:148)
at scala.sys.process.ProcessLogger$$anon$1.buffer(ProcessLogger.scala:99)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.runBuffered(ProcessBuilderImpl.scala:148)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:114)
at fpgatidbits.hlstools.TidbitsHLSTools$.hlsToVerilog(HLSTools.scala:30)
at fpgatidbits.TidbitsMakeUtils$$anonfun$makeHLSDependencies$1.apply(Main.scala:149)
at fpgatidbits.TidbitsMakeUtils$$anonfun$makeHLSDependencies$1.apply(Main.scala:137)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at fpgatidbits.TidbitsMakeUtils$.makeHLSDependencies(Main.scala:137)
at bismo.Settings$.makeHLSDependencies(Main.scala:83)
at bismo.HLSMain$.main(Main.scala:135)
at bismo.HLSMain.main(Main.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
[trace] Stack trace suppressed: run 'last compile:runMain' for the full output.
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run 'last compile:runMain' for the full output.
[error] (compile:runMain) Nonzero exit code: 1
[error] Total time: 3 s, completed Jun 28, 2019 8:46:49 PM
Makefile:127: recipe for target '/media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/hw/verilog/ExecInstrGen.v' failed
make: *** [/media/walker/DATA/work/bismo/new/bismo/build/2x64x2/VerilatedTester/hw/verilog/ExecInstrGen.v] Error 1