Altera_Forum
Honored Contributor
11 years agoVer. 14.0 aoc -march=emulator Option not working (Windows 7 with Bittware Board)
I have been able to get the -march=emulator option to work in the sense that the compilation process completes without an explicit error and produces the corresponding .aocx file. However, when I attempt to load and create an OpenCL program from the .aocx file (calling a method from the AOCL_Utils.cpp) I get an OpenCL run-time error = -42 which is CL_INVALID_BINARY.
Here is the line that fails in the Vector Addition Example:program = createprogramfrombinary(context, binary_file.c_str(), device, num_devices); Below is the kernel code: __attribute ((task)) __kernel void vectorAdd(__global const float * restrict x, __global const float *restrict y, __global float *restrict z) { // get index of the work item int index = get_global_id(0); // add the vector elements z[index] = x[index] + y[index]; } And here is the aoc command I am using along with the output:>aoc -v -march=emulator vectoradd.cl aoc: environment checks are completed successfully. you are now compiling the full flow!! aoc: selected target board s5phq_d5 aoc: running opencl parser.... aoc: opencl parser completed successfully. aoc: compiling for emulation .... aoc: emulator compilation completed successfully. emulator flow is successful. I'll also add that the board diagnostics are working fine; I'm running Windows Visual Studio 2013 Professional, my environment is setup using > vcvars64.bat And I am running the console with Admin rights. To help troubleshoot further, I have re-installed Windows Visual Studio 2013, the Altera Quartus software, and the updated BSP from Bittware, etc., along with numerous restarts, all of the diagnostics work and I am able to produce a correctly functioning .aocx file when performing a full hardware build. Any ideas / suggestions? Thanks!