Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Zili
Beginner
606 Views

[Harp Machine] How to emulate kernels in OpenCL?

Well, I'm using harp machine. Take the example application mem_bandwidth for instance, I wanna emulate my .cl on my own computer to see if it can work since generating the .aocx file needs many hours.

However, I don't know what to do after I use ​aoc -march=emulator -g device/mem_bandwidth.cl -o bin/mem_bandwidth --board bdw_fpga_v1.0

The emulation part in the documentation offers no help at all!.

Could anyone can help me? Thank you!​

 

 

Tags (1)
0 Kudos
4 Replies
Zili
Beginner
112 Views

Thank you for your response! Well, to do HARP application I need use a very old AOCL ​version 16.0.2. I viewed your second document and I think I've linked the libraries required already( because I can make and create the .aocx file, isn't it?). So, after I generated a emulation .aocx file, I need to invoke the env CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=<number_of_devices> <host_application_filename>  command. set the CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 is easy to understand but what about the <host_application_filename>? Here are some of my attempts:

Looking forward your response. Thank you!​

HRZ
Valued Contributor II
112 Views

If you are suing Quartus 16.0.2, none of those variables are going to work. I think the correct variable in your case would be "CL_CONTEXT_EMULATOR_DEVICE_ALTERA". The example you are using should come with a makefile to compile the host code. It probably also comes with some kind of a README that describes the correct compilation steps. When you compile the host code, just run "env CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 <host_application_filename>".

Zili
Beginner
112 Views

It's because the HARP machine require​ a special repository called SR-5.0.2 which is never provided for us. As a result I cannot make a host file. So I have to emulate my algorithm on a standard board like s5_ref and then program it on the HARP. Everything is OK now! Thank you for your response anyway!!! 😁

Reply