Forum Discussion
Altera_Forum
Honored Contributor
8 years agoIntel HLS example reports
Hello,
I am new to the concept of HLS. I am using Intel HLS and going to start with the examples that come with the installation of Quartus prime edition. Can anyone of you share the successful project report files generated after testing any of those examples ? The examples are Counter, image_downsample,interp_decim_filter,QRD and YUV2RGB. Anyone who has tried with one of these examples, it would be great if you can attach the project files post synthesis in this thread .... Will be thankful27 Replies
- Altera_Forum
Honored Contributor
Hi,
I have used Linux and Quartus 17.1 pro. Attached the report files of interp_decim_filter for reference. Best Regards, Anand Raj Shankar (This message was posted on behalf of Intel Corporation) - Altera_Forum
Honored Contributor
Hi,
For steps and complete project folders and files check the link. https://drive.google.com/file/d/1jx-ulfgpmkt7r2uycnpiimell6ybudwr/view?usp=sharing Command prompt
Best Regards, Anand Raj Shankar (This message was posted on behalf of Intel Corporation)C:\intelFPGA_pro\17.1\hls>init_hls.bat Assuming current directory (C:\intelFPGA_pro\17.1\hls\) is root of i++ Will use C:\intelFPGA_pro\17.1\hls\..\quartus to find Quartus for internal i++ use INFO: Could not find files for the given pattern(s). Will be using Modelsim at C:\intelFPGA\17.0\modelsim_ase\win32aloem Will be using Modelsim at C:\intelFPGA\17.0\modelsim_ae\win32aloem Setting environment for using Microsoft Visual Studio 2010 x64 tools. Adding C:\intelFPGA_pro\17.1\hls\bin to PATH Adding C:\intelFPGA_pro\17.1\hls\host\windows64\bin to PATH C:\intelFPGA_pro\17.1\hls>cd C:\Users\anandr1x\Downloads\counter C:\Users\anandr1x\Downloads\counter>make test-x-86-64 'make' is not recognized as an internal or external command, operable program or batch file. C:\Users\anandr1x\Downloads\counter>build.bat test -x86-64 Usage: build.bat Targets: test-msvc, test-x86-64, test-fpga, clean Example: build.bat test-x86-64 C:\Users\anandr1x\Downloads\counter>build.bat test - x86 - 64 Usage: build.bat Targets: test-msvc, test-x86-64, test-fpga, clean Example: build.bat test-x86-64 C:\Users\anandr1x\Downloads\counter>build.bat test -x86-64 Usage: build.bat Targets: test-msvc, test-x86-64, test-fpga, clean Example: build.bat test-x86-64 C:\Users\anandr1x\Downloads\counter>build.bat test-x86-64 i++ -march=x86-64 counter.cpp -o test-x86-64.exe Run test-x86-64.exe to execute the test. C:\Users\anandr1x\Downloads\counter>build.bat test-fpga i++ -march=Arria10 counter.cpp -o test-fpga.exe test-fpga.exe : warning LNK4088: image being generated due to /FORCE option; image may not run Run test-fpga.exe to execute the test. C:\Users\anandr1x\Downloads\counter> - Altera_Forum
Honored Contributor
thanks Anand.....
regarding the HLS concept specifically in Intel HLS compiler, what is real purpose of keyword ´component´? Is it the top level function ? - Altera_Forum
Honored Contributor
Hi,
Yes, To identify a function in your C++ application that you want to synthesize. Insert the component keyword in the source code before the top-level C++function to be synthesized. Refer page 7 of the link https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/hb/hls/ug-hls.pdf Best Regards, Anand Raj Shankar (This message was posted on behalf of Intel Corporation) - Altera_Forum
Honored Contributor
thanks ! one question...
just for a very simple experiment, can I synthesize only component if I dont have the test bench ? I am trying to check the a very simple code but i don´t have its test bench... - Altera_Forum
Honored Contributor
? please reply
- Altera_Forum
Honored Contributor
Hi,
Apologies for the delay. Yes, We can synthesize with no test bench. You will have no way of knowing if your component is correct, we do not recommend such informal procedure that may lead to unpredictable issues in the future. Is not about testing of tool capability now. Best Regards, Anand Raj Shankar (This message was posted on behalf of Intel Corporation) - Altera_Forum
Honored Contributor
Dear Anand
thanks for the reply..... I am trying to compile a very simple C++ algorithm. The din_t I am taking as ac_int<16> and d_out I am taking as ap_int<48>....The length of vector as N=10... I have compiled it in another HLS tool.... I will be grateful if you can check if I am following the right difrection towards synthesis in Intel HLS..... In my code there is a component and below i have the test bench under int main(void)....This test bench works in other HLS tool.... I am having problem in Intel HLS with this...Can you figure out what is wrong in it ? Will be really thankful... # include "HLS/hls.h" # include <stdio.h> # include "HLS/ac_int.h" # include "HLS/ac_fixed.h" # include "HLS/math.h" using namespace ihc; component void sol (din_t a[N], din_t b[N], dout_t *dout) { int i; int acc= 0; int a_reg, b_reg, sub, sub2; for(i=0; i<N; i++) { # pragma HLS PIPELINE II=1 a_reg = a;b_reg = b; sub = a_reg - b_reg; sub2 = sub*sub; acc += sub2; } *dout = acc; } int main(void) { int i, k, cnt; int ret_val = 0; int a[N], b[N]; din_t aa[N], bb[N]; long long int ref_res; dout_t res; cnt = 0; for (k=0; k<10; k++) { //create random data for(i=0; i<N; i++) { a = rand() % (1024*16);
b = rand() % (1024*16); aa = (din_t) a; bb = (din_t) b; } //call reference function ref_sol(a, b, &ref_res); //call design Under Test sol( aa, bb, &res); //check results printf("got %lld expected %lld\n", (long long int) res.to_double(), (long long int) ref_res); if ( (ref_res - (long long int) res) !=0 ) cnt++; } if (cnt>0) { printf("TEST FAILED: %d errors\n", cnt); ret_val = 1; } else { printf("TEST SUCCESS!\n"); ret_val = 0; } return ret_val; }
- Altera_Forum
Honored Contributor
Hi,
Can you attach the error message with complete steps followed? For both the HLS compliers. Best Regards, Anand Raj Shankar (This message was posted on behalf of Intel Corporation) - Altera_Forum
Honored Contributor
Dear Anand,
thanks for the reply. The other HLS tool is Vivado HLS and it is showing no error and test bench runs fine in that tool. I converted the code in Intel HLS format while using ac data types. My request to you is if you have a intel HLS compiler in your machine, can you run the above code and check if test bench passes or not.... I will be really grateful.