Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

helloworld issue on arria10Gx development kit

Hi,

I am trying to compile and run hello_world example of OpenCL SDK on Arria10Gx development board. Example fails to run with below error code. kindly check below steps and comment on any wrong doing.

user@user:~/opencl_examples/hello_world$ bin/host

Querying platform for info:

==========================

CL_PLATFORM_NAME = Intel(R) OpenCL

CL_PLATFORM_VENDOR = Intel(R) Corporation

CL_PLATFORM_VERSION = OpenCL 2.0

Querying device for info:

========================

CL_DEVICE_NAME = Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz

CL_DEVICE_VENDOR = Intel(R) Corporation

CL_DEVICE_VENDOR_ID = 32902

CL_DEVICE_VERSION = OpenCL 2.0 (Build 475)

CL_DRIVER_VERSION = 1.2.0.475

CL_DEVICE_ADDRESS_BITS = 64

CL_DEVICE_AVAILABLE = true

CL_DEVICE_ENDIAN_LITTLE = true

CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 262144

CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 64

CL_DEVICE_GLOBAL_MEM_SIZE = 16734322688

CL_DEVICE_IMAGE_SUPPORT = true

CL_DEVICE_LOCAL_MEM_SIZE = 32768

CL_DEVICE_MAX_CLOCK_FREQUENCY = 3400

CL_DEVICE_MAX_COMPUTE_UNITS = 12

CL_DEVICE_MAX_CONSTANT_ARGS = 480

CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 131072

CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 3

CL_DEVICE_MEM_BASE_ADDR_ALIGN = 1024

CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 128

CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 1

CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 1

CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT = 1

CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 1

CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 1

CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 1

Command queue out of order? = true

Command queue profiling enabled? = true

Using AOCX: hello_world.aocx

Context callback: clCreateProgramWithBinary failed

ERROR: CL_INVALID_BINARY

Location: ../common/src/AOCLUtils/opencl.cpp:392

Failed to create program with binary

==============================================================

Steps I followed are :

------------------------

1. Installed and setup Intel OpenCL SDK for FPGA.

2. Configured Arria10Gx development kit as per instructions specified in document

https://www.altera.com/en_us/pdfs/literature/an/an807.pdf

3. compiled OpenCL kernel with below command and generated hello_world.aocx file.

aoc device/hello_world.cl -o bin/hello_world.aocx -board a10gx

4. compiled host program with make command

5. used "bin/host" command to run host program.

Also here is the info about detected devices

user@user:~/opencl_examples/hello_world$ aoc -list-boards

Board list:

a10gx

Board Package: /home/mobiliya/intelFPGA_pro/17.1/hld/board/a10_ref

a10gx_hostch

Board Package: /home/mobiliya/intelFPGA_pro/17.1/hld/board/a10_ref

Channels: host_to_dev, dev_to_host

Thanks.

regards

Vinod

26 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Does "aocl diagnose" pass? If not, you should repeat the process of initializing the board until aocl diagnose passes.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi vinodk,

    I work on the same topic like you and I have a compilation issue.

    When I try to compile the kernel hello_world.cl (aoc device\hello_world.cl -o bin\hello_world.aocx -board=a10gx) I get the next error:

    Error: The following files were not archived

    Error: ERROR: Archiver failed because there were no files to archive

    Error: Failed to generate 'base_bak.qar'

    Error (23031): Evaluation of Tcl script c:/intelfpga_pro/17.1/quartus/common/tcl/apps/qpm/qar.tcl unsuccessful

    Error: Quartus Prime Shell was unsuccessful. 7 errors, 0 warnings

    Error (23031): Evaluation of Tcl script import_compile.tcl unsuccessful

    Error: Quartus Prime Compiler Database Interface was unsuccessful. 1 error, 0 warnings

    Error: Compiler Error, not able to generate hardware

    I do not know what could be the problem. Searching on the Board documentation I fount this:

    Attention:

    The native Arria 10 GX FPGA Development Kit does not automatically work with the SDK. Before using the Arria 10 GX FPGA Development Kit with the SDK, you must first contact your field applications engineer or regional support center representative who will configure the development kit for you.

    Could you help me with this issue please?

    Thank you!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Does "aocl diagnose" pass? If not, you should repeat the process of initializing the board until aocl diagnose passes.

    --- Quote End ---

    Hi HRZ,

    Now "aocl diagnose" does not work. So tried to repeat the setup process to make aocl diagnose to pass. However got stuck again while programming top.sof (of a10_ref_initialization.tgz package)file to board.

    mobiliya@mobiliya:~/temp$ sudo killall jtagd

    mobiliya@mobiliya:~/temp$ sudo jtagconfig

    1) USB-BlasterII [3-5]

    02E660DD 10AX115H1(.|E2|ES)/10AX115H2/..

    020A40DD 5M(1270ZF324|2210Z)/EPM2210

    mobiliya@mobiliya:~/temp$ quartus_pgm -c 1 -m JTAG -o "p;max5_150.pof@2"

    Info: *******************************************************************

    Info: Running Quartus Prime Programmer

    Info: Version 17.1.0 Build 240 10/25/2017 SJ Pro Edition

    Info: Copyright (C) 2017 Intel Corporation. All rights reserved.

    Info: Your use of Intel Corporation's design tools, logic functions

    Info: and other software and tools, and its AMPP partner logic

    Info: functions, and any output files from any of the foregoing

    Info: (including device programming or simulation files), and any

    Info: associated documentation or information are expressly subject

    Info: to the terms and conditions of the Intel Program License

    Info: Subscription Agreement, the Intel Quartus Prime License Agreement,

    Info: the Intel FPGA IP License Agreement, or other applicable license

    Info: agreement, including, without limitation, that your use is for

    Info: the sole purpose of programming logic devices manufactured by

    Info: Intel and sold by Intel or its authorized distributors. Please

    Info: refer to the applicable agreement for further details.

    Info: Processing started: Tue Mar 20 10:27:54 2018

    Info: Command: quartus_pgm -c 1 -m JTAG -o p;max5_150.pof@2

    Info (213045): Using programming cable "USB-BlasterII [3-5]"

    Info (213011): Using programming file max5_150.pof with checksum 0x00908D89 for device 5M2210ZF256@2

    Info (209060): Started Programmer operation at Tue Mar 20 10:27:55 2018

    Info (209017): Device 2 contains JTAG ID code 0x020A40DD

    Info (209018): Device 2 silicon ID is ALTERA10-6

    Info (209044): Erasing MAXII/MAXV configuration device(s)

    Info (209023): Programming device(s)

    Info (209021): Performing verification on device(s)

    Info (209011): Successfully performed operation(s)

    Info (209061): Ended Programmer operation at Tue Mar 20 10:28:00 2018

    Info: Quartus Prime Programmer was successful. 0 errors, 0 warnings

    Info: Peak virtual memory: 422 megabytes

    Info: Processing ended: Tue Mar 20 10:28:00 2018

    Info: Elapsed time: 00:00:06

    Info: Total CPU time (on all processors): 00:00:01

    mobiliya@mobiliya:~/temp$ quartus_pgm -c 1 -m JTAG -o “p;top.sof”

    Error (213008): Programming option string "“p" is illegal. Refer to --help for legal programming option formats.

    top.sof”: command not found

    mobiliya@mobiliya:~/temp$

    Tried to program top.sof using quartus programmer( GUI utility) however failed at next step to program boardtest.aocx. Command "aocl list-devices" does not lists the board.

    mobiliya@mobiliya:~/temp$ aocl flash acl0 boardtest.aocx

    aocl flash - Initialize the FPGA with a specific startup configuration.

    Usage: aocl flash <device_name> <file.aocx>

    Supply the .aocx file for the design you wish to set as the default

    configuration which is loaded on power up.

    Description:

    This command initializes the board with a default configuration

    that is loaded onto the FPGA on power up. Not all boards will

    support this, check with your board vendor documentation.

    aocl list-devices

    --------------------------------------------------------------------

    Warning:

    No devices attached for package:

    /home/mobiliya/intelFPGA_pro/17.1/hld/board/a10_ref

    --------------------------------------------------------------------
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Hi vinodk,

    I work on the same topic like you and I have a compilation issue.

    When I try to compile the kernel hello_world.cl (aoc device\hello_world.cl -o bin\hello_world.aocx -board=a10gx) I get the next error:

    Error: The following files were not archived

    Error: ERROR: Archiver failed because there were no files to archive

    Error: Failed to generate 'base_bak.qar'

    Error (23031): Evaluation of Tcl script c:/intelfpga_pro/17.1/quartus/common/tcl/apps/qpm/qar.tcl unsuccessful

    Error: Quartus Prime Shell was unsuccessful. 7 errors, 0 warnings

    Error (23031): Evaluation of Tcl script import_compile.tcl unsuccessful

    Error: Quartus Prime Compiler Database Interface was unsuccessful. 1 error, 0 warnings

    Error: Compiler Error, not able to generate hardware

    I do not know what could be the problem. Searching on the Board documentation I fount this:

    Attention:

    The native Arria 10 GX FPGA Development Kit does not automatically work with the SDK. Before using the Arria 10 GX FPGA Development Kit with the SDK, you must first contact your field applications engineer or regional support center representative who will configure the development kit for you.

    Could you help me with this issue please?

    Thank you!

    --- Quote End ---

    Hi,

    I think you need to follow HRZ's recommendation of openCL setup guide.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    mobiliya@mobiliya:~/temp$ quartus_pgm -c 1 -m JTAG -o “p;top.sof”

    Error (213008): Programming option string "“p" is illegal. Refer to --help for legal programming option formats.

    top.sof”: command not found

    mobiliya@mobiliya:~/temp$

    Tried to program top.sof using quartus programmer( GUI utility) however failed at next step to program boardtest.aocx. Command "aocl list-devices" does not lists the board.

    --- Quote End ---

    It seems you copy/pasted the command from somewhere (a PDF or Word file?) and an incorrect quotation mark (“ instead of ") was pasted in your command line. Try rerunning the command using the correct quotation mark.