Forum Discussion

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

Nallatech 385 OpenCL BSP - Update from 13.1 to 14.0

Hi,

In order to update your board from 13.1 to 14.0 you will need to:

  1. Install the Altera Quartus-II 14.0 / Altera OpenCL SDK 14.0 Tools

  2. Set up your environment variables to use Altera Tools 14.0 only

  3. Install the 14.0 Nallatech 385 OpenCL BSP

  4. Update the 385 on-board flash with an aocx compiled with the 14.0 Altera Tools / 14.0 Nallatech BSP

  5. Only run host application which load 14.0 aocx file

the 13.1 flow is not compatible with the 14.0 flow

All the elements of the OpenCL flow need to be updated to 14.0: on-board flash, Altera compiler tools, Nallatech OpenCL BSP.

attention: You must have sudo or root privileges.

os support: 64-bit CentOS 6 / 64-bit RedHat 6 / 64-bit Windows 7

1- install the altera quartus-ii 14.0 / altera opencl sdk 14.0 tools

You must install all 3 elements highlighted in the image attached (link at the bottom of article):

  1. quartus ii software (includes nios ii eds)

  2. stratix v device support (includes all variations)

  3. altera sdk for opencl (standalone installer)

From this location: http://dl.altera.com/opencl/

2- set up your environment variables to use 14.0 only

Refer to the latest version of the Altera OpenCL getting started guide:

http://www.altera.com/literature/hb/opencl-sdk/aocl_getting_started.pdf

You will need to set or edit:

  • alteraoclsdkroot

  • path

  • ld_library_path (Linux only)

  • lm_license_file

  • quartus_rootdir

Verify the correct version is running with "aocl version":

# aocl version
aocl 14.0.200 (Altera Runtime Environment for OpenCL, Version 14.0 Build 200, Copyright (C) 2014 Altera Corporation)

Also, check that the license has been set up correctly:

- the LM_LICENSE_FILE environment variable must be set with the full path to the license file and the license file name itself (it is not good enough to just put the path the license file in the License Manager “License file:” (file:///\\”) field)

- if the license file was generated with a MAC address it must be eth0's MAC address (http://altera.us/support/kdb/solutions/rd06112013_373.html)

- OpenCL license does not appear in License Manager list but that is to be expected

3- install the 14.0 nallatech 385 opencl bsp

Unlike for previous versions of the Altera OpenCL SDK, the 385 Board Support Package for OpenCL is not included within the OpenCL SDK installer and you must obtain the BSP from Nallatech.

First, you will need to contact Nallatech to obtain a license file to install your Nallatech 14.0 OpenCL BSP, go to:

http://www.nallatech.com/opencl-bsp.html

Go to the request link at the bottom of the page.

Nallatech will ask for some information about the board and the MAC address of the Quartus-II Build PC. Nallatech can provide a get_mac application to help customers identify which MAC address for a given host is used by the license tool. If using the get_mac application to determine your MAC address, make sure the network device is enabled.

Then, when you receive your license file, rename it to nalla_lic.dat place it in the directory set in environment variable ALTERAOCLSDKROOT

You will also receive an email providing you access to the Nallatech Support Lounge where you can download the OpenCL BSP iso. Nallatech strongly advise to always verify the download was successful by verifying the md5 checksum of the iso with the md5sum command in Linux or other methods. If you are having trouble using the Support Lounge, contact Nallatech for an alternative download method.

In Linux, make sure to use the mount command with the following options only - permission might be altered if using other options:

mount -o loop nalla_aocl_bsp_q14_0.iso /mnt/temp

For example, in CentOS 6, a right-click on the ISO file and then selecting the "Mount" menu is not acceptable and will result in a faulty installation.

When running the installer, the license string should be detected automatically; if not, you can type (or paste it) in the installer field. During installation make sure that the network device of which you provided Nallatech the MAC address to generate your BSP license is enabled.

Installer dependencies include: openssl, openssl.i686 & openssl-devel

You might have to run:

yum install openssl

Finally:

  • add $ALTERAOCLSDKROOT/board/nalla_pcie/linux64/lib to LD_LIBRARY_PATH

  • set AOCL_BOARD_PACKAGE_ROOT to $ALTERAOCLSDKROOT/board/nalla_pcie

Verify everything is set up correctly by running:

  • aocl install

  • aoc –-list-boards

  • aocl diagnostic

  • aocl diagnose acl0

4- update the 385 on-board flash with an aocx compiled with the 14.0 altera tools / 14.0 nallatech bsp

The 13.1 flow is not compatible with the 14.0 flow. In addition to updating the Quartus-II software and the Nallatech OpenCL BSP, the board needs to be updated; the on-board configuration flash needs to contain an aocx file that has been compiled with the 14.0 tools.

If the version of the aocx in flash does not match the host Altera Tools version an error message will be displayed when running the host software; the error message might be:

FAILED to read auto-discovery string at byte 16: Expected version is 13, found 11

You will need to:

  1. Rebuild a design with the 14.0 setup; for example: "aoc –v –-board pcie385_a7 vectorAdd.cl"; this might take several hours

  2. Connect your programming cable to the board - when the board is not powered (instructions for 385 board: http://www.alteraforum.com/forum/attachment.php?attachmentid=8908&d=1400634781) - For redhat users please refer to: http://www.altera.com/download/drivers/dri-usb_b-lnx.html

  3. Power the 385 host up (385 must be in the host, powered up. The USB-Blaster cable must be connected to the 385. The USB-Blaster must be connected to the computer you are running the "aocl flash ..." command from.)

  4. Make sure the USB-Blaster cable is connected to both the 385 and the computer on which you are running the "aocl flash..." command

  5. Reprogram the flash; for example: "aocl flash acl0 vector_add.aocx"

  6. Once the programming operation has finished (20min), power down the host (make sure all the LEDs on the 385 board)

  7. Power the host back up

You only need to program the flash once with an aocx built at the same version than the BSP/Quartus-II/OpenCL version that your host program will run with.

5- only run host application which load 14.0 aocx file

When running a host application which loads an aocx file, make sure that aocx file has been compiled with the 14.0 flow (Quartus-II 14.0 / OpenCL SDK 14.0 / Nallatech OpenCL BSP 14.0). The aocx files compiled with previous versions of the tools will not work.

Thanks,

G

-- edits history --

  • 07/16/2014 - openssl-devel & openssl.i686 are not required

  • 07/16/2014 - add LD_LIBRARY_PATH settings in step 3.

  • 08/07/2014 - change "aocl diagnostic acl0" to "aocl diagnose acl0" | Add "aocl diagnostic" command

  • 08/08/2014 - network device must be enabled during BSP installation

  • 08/27/2014 - always check download with md5sum

  • 09/23/2014 - Explain error message "FAILED to read auto-discovery string at byte 16: Expected version is 13, found 11" in section 4

  • 09/25/2014 - Add mount options

  • 09/30/2014 - LD_LIBRARY_PATH must include full path and license file name itself

  • 10/01/2014 - Only program the flash once when updating BSP

  • 10/01/2014 - 385 must be powered when running "aocl flash..."

8 Replies

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

    --- Quote Start ---

    Hi,In order to update your board from 13.1 to 14.0 you will need to:

    1. Install the Altera Quartus-II 14.0 / Altera OpenCL SDK 14.0 Tools

    2. Set up your environment variables to use Altera Tools 14.0 only

    3. Install the 14.0 Nallatech 385 OpenCL BSP

    4. Update the 385 on-board flash with an aocx compiled with the 14.0 Altera Tools / 14.0 Nallatech BSP

    5. Only run host application which load 14.0 aocx file

    the 13.1 flow is not compatible with the 14.0 flowAll the elements of the OpenCL flow need to be updated to 14.0: on-board flash, Altera compiler tools, Nallatech OpenCL BSP.attention: You must have sudo or root privileges.os support: 64-bit CentOS 6 / 64-bit RedHat 6 / 64-bit Windows 71- install the altera quartus-ii 14.0 / altera opencl sdk 14.0 toolsYou must install all 3 elements highlighted in the screenshot below:https://www.alteraforum.com/forum/attachment.php?attachmentid=9122

    1. quartus ii software (includes nios ii eds)

    2. stratix v device support (includes all variations)

    3. altera sdk for opencl (standalone installer)

    From this location: http://dl.altera.com/opencl/2- set up your environment variables to use 14.0 onlyRefer to the latest version of the Altera OpenCL getting started guide:http://www.altera.com/literature/hb/opencl-sdk/aocl_getting_started.pdfYou will need to set or edit:

    • alteraoclsdkroot

    • path

    • ld_library_path (Linux only)

    • lm_license_file

    • quartus_rootdir

    Verify the correct version is running with "aocl version":
    # aocl versionaocl 14.0.200 (Altera Runtime Environment for OpenCL, Version 14.0 Build 200, Copyright (C) 2014 Altera Corporation)
    Also, check that the license has been set up correctly:- the LM_LICENSE_FILE environment variable must be set (it is not good enough to just put the path the license file in the License Manager “License file:” (file:///\\”) field)- if the license file was generated with a MAC address it must be eth0's MAC address (http://altera.us/support/kdb/solutions/rd06112013_373.html)- OpenCL license does not appear in License Manager list but that is to be expected3- install the 14.0 nallatech 385 opencl bspUnlike for previous versions of the Altera OpenCL SDK, the 385 Board Support Package for OpenCL is not included within the OpenCL SDK installer and you must obtain the BSP from Nallatech.First, you will need to contact Nallatech to obtain a license file to install your Nallatech 14.0 OpenCL BSP, go to:http://www.nallatech.com/opencl-bsp.htmlGo to the request link at the bottom of the page.Then, when you receive your license file, rename it to nalla_lic.dat place it in the directory set in environment variable ALTERAOCLSDKROOTYou will also receive an email providing you access to the Nallatech Support Lounge where you can download the OpenCL BSP iso.When running the installer, the license string should be detected automatically; if not, you can type (or paste it) in the installer field. Installer dependencies include: openssl, openssl.i686 & openssl-develYou might have to run:
    yum install openssl
    yum install openssl-devel
    yum install openssl.i686
    Finally, you will need to set the AOCL_BOARD_PACKAGE_ROOT environment variable to the appropriate location:$ALTERAOCLSDKROOT/board/nalla_pcieVerify everything is set up correctly by running:

    • aocl install

    • aoc –-list-boards

    • aocl diagnostic acl0

    4- update the 385 on-board flash with an aocx compiled with the 14.0 altera tools / 14.0 nallatech bspThe 13.1 flow is not compatible with the 14.0 flow. In addition to updating the Quartus-II software and the Nallatech OpenCL BSP, the board needs to be updated; the on-board configuration flash needs to contain an aocx file that has been compiled with the 14.0 tools.You will need to:

    1. Rebuild a design with the 14.0 setup; for example: "aoc –v –-board pcie385_a7 vectorAdd.cl"; this might take several hours

    2. Connect your programming cable to the board - when the board is not powered (instructions for 385 board: http://www.alteraforum.com/forum/attachment.php?attachmentid=8908&d=1400634781) - For redhat users please refer to: http://www.altera.com/download/drivers/dri-usb_b-lnx.html

    3. Reprogram the flash; for example: "aocl flash acl0 vector_add.aocx"

    4. Once the programming operation has finished (20min), power down the host (make sure all the LEDs on the 385 board)

    5. Power the host back up

    5- only run host application which load 14.0 aocx fileWhen running a host application which loads an aocx file, make sure that aocx file has been compiled with the 14.0 flow (Quartus-II 14.0 / OpenCL SDK 14.0 / Nallatech OpenCL BSP 14.0). The aocx files compiled with previous versions of the tools will not work.Thanks,G

    --- Quote End ---

    Hi Gigi,If I use only one board as accelerator, does it mean is acl0 by default?Do you know where can I get the default hardware image of 14.0 version? Thanks.Yuxuan
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Hi,In order to update your board from 13.1 to 14.0 you will need to:

    1. Install the Altera Quartus-II 14.0 / Altera OpenCL SDK 14.0 Tools

    2. Set up your environment variables to use Altera Tools 14.0 only

    3. Install the 14.0 Nallatech 385 OpenCL BSP

    4. Update the 385 on-board flash with an aocx compiled with the 14.0 Altera Tools / 14.0 Nallatech BSP

    5. Only run host application which load 14.0 aocx file

    the 13.1 flow is not compatible with the 14.0 flowAll the elements of the OpenCL flow need to be updated to 14.0: on-board flash, Altera compiler tools, Nallatech OpenCL BSP.attention: You must have sudo or root privileges.os support: 64-bit CentOS 6 / 64-bit RedHat 6 / 64-bit Windows 71- install the altera quartus-ii 14.0 / altera opencl sdk 14.0 toolsYou must install all 3 elements highlighted in the screenshot below:https://www.alteraforum.com/forum/attachment.php?attachmentid=9122

    1. quartus ii software (includes nios ii eds)

    2. stratix v device support (includes all variations)

    3. altera sdk for opencl (standalone installer)

    From this location: http://dl.altera.com/opencl/2- set up your environment variables to use 14.0 onlyRefer to the latest version of the Altera OpenCL getting started guide:http://www.altera.com/literature/hb/opencl-sdk/aocl_getting_started.pdfYou will need to set or edit:

    • alteraoclsdkroot

    • path

    • ld_library_path (Linux only)

    • lm_license_file

    • quartus_rootdir

    Verify the correct version is running with "aocl version":
    # aocl versionaocl 14.0.200 (Altera Runtime Environment for OpenCL, Version 14.0 Build 200, Copyright (C) 2014 Altera Corporation)
    Also, check that the license has been set up correctly:- the LM_LICENSE_FILE environment variable must be set (it is not good enough to just put the path the license file in the License Manager “License file:” (file:///\\”) field)- if the license file was generated with a MAC address it must be eth0's MAC address (http://altera.us/support/kdb/solutions/rd06112013_373.html)- OpenCL license does not appear in License Manager list but that is to be expected3- install the 14.0 nallatech 385 opencl bspUnlike for previous versions of the Altera OpenCL SDK, the 385 Board Support Package for OpenCL is not included within the OpenCL SDK installer and you must obtain the BSP from Nallatech.First, you will need to contact Nallatech to obtain a license file to install your Nallatech 14.0 OpenCL BSP, go to:http://www.nallatech.com/opencl-bsp.htmlGo to the request link at the bottom of the page.Then, when you receive your license file, rename it to nalla_lic.dat place it in the directory set in environment variable ALTERAOCLSDKROOTYou will also receive an email providing you access to the Nallatech Support Lounge where you can download the OpenCL BSP iso.When running the installer, the license string should be detected automatically; if not, you can type (or paste it) in the installer field. Installer dependencies include: openssl, openssl.i686 & openssl-develYou might have to run:
    yum install openssl
    yum install openssl-devel
    yum install openssl.i686
    Finally, you will need to set the AOCL_BOARD_PACKAGE_ROOT environment variable to the appropriate location:$ALTERAOCLSDKROOT/board/nalla_pcieVerify everything is set up correctly by running:

    • aocl install

    • aoc –-list-boards

    • aocl diagnostic acl0

    4- update the 385 on-board flash with an aocx compiled with the 14.0 altera tools / 14.0 nallatech bspThe 13.1 flow is not compatible with the 14.0 flow. In addition to updating the Quartus-II software and the Nallatech OpenCL BSP, the board needs to be updated; the on-board configuration flash needs to contain an aocx file that has been compiled with the 14.0 tools.You will need to:

    1. Rebuild a design with the 14.0 setup; for example: "aoc –v –-board pcie385_a7 vectorAdd.cl"; this might take several hours

    2. Connect your programming cable to the board - when the board is not powered (instructions for 385 board: http://www.alteraforum.com/forum/attachment.php?attachmentid=8908&d=1400634781) - For redhat users please refer to: http://www.altera.com/download/drivers/dri-usb_b-lnx.html

    3. Reprogram the flash; for example: "aocl flash acl0 vector_add.aocx"

    4. Once the programming operation has finished (20min), power down the host (make sure all the LEDs on the 385 board)

    5. Power the host back up

    5- only run host application which load 14.0 aocx fileWhen running a host application which loads an aocx file, make sure that aocx file has been compiled with the 14.0 flow (Quartus-II 14.0 / OpenCL SDK 14.0 / Nallatech OpenCL BSP 14.0). The aocx files compiled with previous versions of the tools will not work.Thanks,G

    --- Quote End ---

    Hi Gigi,If I use only one board as accelerator, does it mean is acl0 by default?Do you know where can I get the default hardware image of 14.0 version? Thanks.Yuxuan
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Yuxan,

    please refer to the "Identifying the Device Name of Your FPGA Board" section in this document http://www.altera.com/literature/hb/opencl-sdk/aocl_rte_getting_started.pdf to identify the device ID of your board.

    There is no default hardware image. You should compile a design with 14.0 for your board (either D5 or A7) and program it in flash - the hello world example is pretty light or the vector add, I would use one of them if I were you.

    Thanks,

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

    After step 4.2, to we have to plug the board back in? I get this:

    Error (209062): Flash Loader IP not loaded on device 0

    Error (209053): Unexpected error in JTAG server -- error code 5

    Error (209040): Can't access JTAG chain

    Error (209012): Operation failed
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi The Smith,

    what do you mean plug the board back in?

    The 385 must be in the host, powered up. The USB-Blaster cable must be connected to the 385. The USB-Blaster must be connected to the computer you are running the "aocl flash ..." command from.

    See 385/USB-Blaster connections here:

    http://www.alteraforum.com/forum/attachment.php?attachmentid=8908&d=1400634781

    For RedHat users, please see:

    http://www.altera.com/download/drivers/dri-usb_b-lnx.html

    Some of the commands/services used within the flash update process must be run as 'root'.

    Thanks,

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

    Okay, I indeed was trying to flash it while it's lying on my desk. I got confused by the pictures in the pdf document and the wording "when the board is not powered" in step 4.2. Thanks!

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

    --- Quote Start ---

    Hi Yuxan,

    please refer to the "Identifying the Device Name of Your FPGA Board" section in this document http://www.altera.com/literature/hb/opencl-sdk/aocl_rte_getting_started.pdf to identify the device ID of your board.

    There is no default hardware image. You should compile a design with 14.0 for your board (either D5 or A7) and program it in flash - the hello world example is pretty light or the vector add, I would use one of them if I were you.

    Thanks,

    G

    --- Quote End ---

    Thank you.