ContributionsMost RecentMost LikesSolutionsRe: Sample project with RTL module library not working The issue is in my expHBU.h file. I put uint8_t expHBU(uint8_t input); Rather than the CORRECT extern "C" { uint8_t expHBU(uint8_t input); } This extern is extremely esoteric and should be included in the reference manual. Re: Sample project with RTL module library not working Here are the source files I am using. I am trying to model the basic rtl library tutorial the best I can (which compiles fine in my environment). I'm sure its some easy syntax error that none of the compilers or packagers is catching. I cannot upload the .cpp and .h files because this site rejects them. Here is the source expHBU.h #include <stdint.h> #include "HLS/math.h" uint8_t expHBU(uint8_t input); expHBU.cpp #include "expHBU.h" uint8_t expHBU(uint8_t input){ return (uint8_t)exp(input); } component_testbench.cpp #include "HLS/hls.h" #include "HLS/stdio.h" #include "HLS/math.h" #include "expHBU.h" component uint8_t executeexp(uint8_t exponent) { return expHBU(exponent); } component uint8_t executeexp_basic(uint8_t exponent) { return exp(exponent); } int main() { uint8_t exponent = 3; uint8_t result = executeexp(exponent); printf("result %d \n", result); return 0; } Reminder: the x86 simulation works, but the FPGA compile does NOT Thanks, messn036 Re: Sample project with RTL module library not working Additional information: If I compile the library with just the fpga_crossgen command (exclude the expHBU.a step) fpga_crossgen exp_wrapper.xml --target hls --emulation_model expHBU.cpp -o expHBU.o And then attempt a -march=Cyclone10GX compile i++ component_testbench.cpp expHBU.o -v --dont-error-if-large-area-est -march=Cyclone10GX -o test-fpga I get the following error Compiler Error: Cannot find Library file ./test-fpga.prj/spec.xml Re: Sample project with RTL module library not working i++ component_testbench.cpp expHBU.a -v --dont-error-if-large-area-est -march=Cyclone10GX -o test-fpga Target FPGA part name: 10CX220YF780I5G Target FPGA family name: Cyclone10GX Target FPGA speed grade: -5 Resolved expHBU.a to /home/grads/messn036/OpenCL-HUBERT/OpenCL-HUBERT/component_ip/expHBU.a Analyzing component_testbench.cpp for testbench generation Creating x86-64 testbench Analyzing component_testbench.cpp for hardware generation Verifying version information in the included files. Expecting version 21.2.0.67.4 for all included files. Included files passed version check. Checked: /home/grads/messn036/OpenCL-HUBERT/OpenCL-HUBERT/component_ip/expHBU.a Preprocessing FPGA Libraries Optimizing component(s) and generating Verilog files component_testbench.cpp:9: Compiler Error: undefined reference to 'expHBU(unsigned char)' HLS Main Optimizer FAILED. make: *** [test-fpga] Error 1 I have done some basic troubleshooting in the meantime an narrowed down my error a bit. To compile the RTL library, I am using the following commands fpga_crossgen exp_wrapper.xml --target hls --emulation_model expHBU.cpp -o expHBU.o fpga_libtool --target hls --create expHBU.a expHBU.o But It seems like I need to use different flags to get the xml and verilog to compile for NOT the x86-64 simulation but for the test-fpga version. Am I right here? When should I expect to compile the xml and verilog? Sample project with RTL module library not working Hello Intel Support, I am attempting to compile a library of RTL components to use in my HLS project. The HLS project compiles when testing for x86-64 simulation, but the compiler complains about the desired RTL function being "undefined" when attempting to compile for test-fpga. I have included the relevant files .v and .xml files, but cannot upload the .cpp or .h file though they are included when I compile the library I am curious as to which file likely has the issue since I can do simulation but not compilation. Thank you in advance SolvedRe: Compiler Error: Operation cannot operate on addresses from different interfaces Any progress? I cannot find a detailed breakdown of this error anywhere so I have no idea what it even means. Compiler Error: Operation cannot operate on addresses from different interfaces I am getting the following error from the HLS compiler when compiling for FPGA. "Compiler Error: Operation cannot operate on addresses from different interfaces" The compiler points to the first line in a function that looks like this template<class T> TensorXL<T>::TensorXL(const TensorXL<T> &A) //copy constructor { t_numCols = A.t_numCols; t_numRows = A.t_numRows; transposed = A.transposed; for (unsigned i = 0; i < A.t_numRows; i++) { for (unsigned j = 0; j < A.t_numCols; j++) { matrix[i][j] = A.matrix[i][j]; } } null = false; } What does this error mean? What limitation am I running into? Thanks, messn036 Re: Tensor libraries in C/C++ compatible with HLS I was hoping to find a library that doesnt use dynamic memory location so that it would work out of the box with the intel HLS compiler. I ended up writing my own, though the matrix_mult function from intel's extended math library did help. Re: Compile Intel HLS project with CMake I ended up copying the .bat file format for windows and the Makefile format for linux. I was not trying to compile an example, but my own code. Thanks, Messn036 Compile Intel HLS project with CMake Hello Intel Community, I am having troubles with CMake using MVSC compiler directives when trying to compile with i++. I am compiling on Windows with Visual Studios 17 installed. I am using the following command to build and compile. HLS> cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=i++ .. -- The CXX compiler identification is IntelLLVM 2021.1.0 with GNU-like command-line -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: C:/Users/hunto_efxy22i/jupyterProjects/HUBERT/build HLS> cmake --build . --config Release Scanning dependencies of target tensors [ 25%] Building CXX object src/CMakeFiles/tensors.dir/tensors.cpp.obj aocl-clang: error: no such file or directory: '/nologo' aocl-clang: error: no such file or directory: '/TP' aocl-clang: error: no such file or directory: '/FdCMakeFiles/tensors.dir/tensors.pdb' HLS x86-64 compile FAILED. make.exe[2]: *** [src/CMakeFiles/tensors.dir/tensors.cpp.obj] Error 1 make.exe[1]: *** [src/CMakeFiles/tensors.dir/all] Error 2 make.exe: *** [all] Error 2 I use Unix Makefiles as when I compile with Visual Studios as my generator, I get this output: HLS> cmake -G "Visual Studio 15 2017 Win64" -D CMAKE_CXX_COMPILER=D:/Applications/intel_quartus/21.1/hls/bin/i++.exe .. -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19042. -- The CXX compiler identification is unknown -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Configuring done -- Generating done -- Build files have been written to: C:/Users/hunto_efxy22i/jupyterProjects/HUBERT/build HLS> cmake --build . --config Release Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved. Checking Build System Building Custom Rule C:/Users/hunto_efxy22i/jupyterProjects/HUBERT/src/CMakeLists.txt cl : Command line warning D9002: ignoring unknown option '-march=x86-64' [C:\Users\hunto_efxy22i\jupyterProjects\HUBERT \build\src\tensors.vcxproj] Which suggests that the CMake build system isnt using i++ at all. Since it fails to detect the compiler, I would rather stick with Unix makefiles. I have attached the outermost CMakeLists.txt. I have skipped the compiler check as it fails for the same reason that it fails now, a bunch of unknown options are passed as it seems. I have also done by best to get rid of the irrelevant MSVC compiler options by setting the flags manually, however that only seems to get rid of a few. Finally, my Cmake error file output. Detecting CXX compiler ABI info failed to compile with the following output: Change Dir: C:/Users/hunto_efxy22i/jupyterProjects/HUBERT/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/PROGRA~2/GnuWin32/bin/make.exe -f Makefile cmTC_784a2/fast && C:/PROGRA~2/GnuWin32/bin/make.exe -f CMakeFiles/cmTC_784a2.dir/build.make CMakeFiles/cmTC_784a2.dir/build make.exe[1]: Entering directory `C:/Users/hunto_efxy22i/jupyterProjects/HUBERT/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_784a2.dir/CMakeCXXCompilerABI.cpp.obj D:/Applications/intel_quartus/21.1/hls/bin/i++.exe /nologo /TP /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /FoCMakeFiles/cmTC_784a2.dir/CMakeCXXCompilerABI.cpp.obj /FdCMakeFiles/cmTC_784a2.dir/ -c D:/Applications/cmake/share/cmake-3.20/Modules/CMakeCXXCompilerABI.cpp aocl-clang: error: no such file or directory: '/nologo' aocl-clang: error: no such file or directory: '/TP' aocl-clang: error: no such file or directory: '/DWIN32' aocl-clang: error: no such file or directory: '/D_WINDOWS' aocl-clang: error: no such file or directory: '/W3' aocl-clang: error: no such file or directory: '/GR' aocl-clang: error: no such file or directory: '/EHsc' aocl-clang: error: no such file or directory: '/MDd' aocl-clang: error: no such file or directory: '/Zi' aocl-clang: error: no such file or directory: '/Ob0' aocl-clang: error: no such file or directory: '/Od' aocl-clang: error: no such file or directory: '/RTC1' aocl-clang: error: no such file or directory: '/FdCMakeFiles/cmTC_784a2.dir/' HLS x86-64 compile FAILED. I am hoping someone can help 1. Get rid of the MSVC compiler flags 2. Fix CMake not detecting the ABI so that it actually passes the correct flags by default. Thanks, Messn036