Forum Discussion

jliu32's avatar
jliu32
Icon for New Contributor rankNew Contributor
7 years ago

Errors encountered while generating aocx file from the vector-addition OpenCL kernel

Hi everyone,

I am trying to compile the vector-addition OpenCL kernel from https://www.intel.com/content/www/us/en/programmable/products/design-software/embedded-software-developers/opencl/developer-zone.html#design-examples for the Arria 10 reference BSP. The command that I use is "aoc -o bin/vector_add_a10gx_hostch_centos.aocx -v -report -board=a10gx_hostch device/vector_add.cl" During synthesis, Quartus issues a number of errors, and the root seem to be:

Error (287078): Assertion error: Valid clear box generator not found or Errors encountered during clear box generation File: /home/jamesliu/intelFPGA_pro/17.1/quartus/libraries/megafunctions/altera_syncram.tdf Line: 127
Error (287078): Assertion error: Stratix does not support a fifo with LPM_SHOWAHEAD = "ON" File: /home/jamesliu/intelFPGA_pro/17.1/quartus/libraries/megafunctions/a_dpfifo.tdf Line: 112

My Quartus Prime Pro and AOCL versions are both 17.1.0.240. Furthermore, these errors pop up both when I run aoc under CentOS 7 and Ubuntu 16.04. Please see the attachement for the complete logs dumped by Quartus.

I wonder if anyone has run into the same issues and figured out some workarounds.

Jmuse

2 Replies

  • HRZ's avatar
    HRZ
    Icon for Frequent Contributor rankFrequent Contributor

    I have not seen the error before so I cannot give an exact solution. However, I have some recommendations that might solve your problem:

    1. Make sure you have enough disk space left for the compilation files to be stored.
    2. Try updating both Quartus and AOC to v17.1.2.
    3. Use the standard reference BSP rather than the "hostch" one which is for designs that use host channels.
  • jliu32's avatar
    jliu32
    Icon for New Contributor rankNew Contributor

    After experimenting with the environment variables for a while, I finally solved the issue.

    Previously, I set some of the OpenCL SDK environment variables using relative path:

    export INTELFPGAVERSION=17.1
    export INTELFPGAOCLSDKROOT=/opt/intelFPGA_pro/$INTELFPGAVERSION/hld
    export ALTERAOCLSDKROOT=$INTELFPGAOCLSDKROOT
    export QUARTUS_ROOTDIR_OVERRIDE=$INTELFPGAOCLSDKROOT/../quartus
    export QUARTUS_ROOTDIR=$QUARTUS_ROOTDIR_OVERRIDE
    export QSYS_ROOTDIR=$INTELFPGAOCLSDKROOT/../qsys
    export SOPC_KIT_NIOS2=$INTELFPGAOCLSDKROOT/../nios2eds
     
    export PATH=$PATH:$INTELFPGAOCLSDKROOT/bin:$INTELFPGAOCLSDKROOT/linux64/bin:$INTELFPGAOCLSDKROOT/host/linux64/bin:$QUARTUS_ROOTDIR_OVERRIDE/bin:$QSYS_ROOTDIR/bin

    Apparently the relative paths (e.g. /../) eventually caused Quartus to incorrectly assume that the device family was Stratix instead of Arria when elaborating the components inside the kernenl . Everything worked after I changed all the environment varible to absolute path:

    export INTELFPGAVERSION=17.1
    export INTELFPGAOCLSDKROOT=/opt/intelFPGA_pro/$INTELFPGAVERSION/hld
    export ALTERAOCLSDKROOT=$INTELFPGAOCLSDKROOT
    export QUARTUS_ROOTDIR_OVERRIDE=/opt/intelFPGA_pro/$INTELFPGAVERSION/quartus
    export QUARTUS_ROOTDIR=$QUARTUS_ROOTDIR_OVERRIDE
    export QSYS_ROOTDIR=/opt/intelFPGA_pro/$INTELFPGAVERSION/qsys
    export SOPC_KIT_NIOS2=/opt/intelFPGA_pro/$INTELFPGAVERSION/nios2eds
     
    export PATH=$PATH:$INTELFPGAOCLSDKROOT/bin:$INTELFPGAOCLSDKROOT/linux64/bin:$INTELFPGAOCLSDKROOT/host/linux64/bin:$QUARTUS_ROOTDIR_OVERRIDE/bin:$QSYS_ROOTDIR/bin