Вы находитесь на странице: 1из 17

Altera SDK for OpenCL

Getting Started Guide

Subscribe Send Feedback

OCL001-13.1.1 2013.12.13

101 Innovation Drive San Jose, CA 95134 www.altera.com

TOC-2

Altera SDK for OpenCLGetting Started Guide

Contents
Altera SDK for OpenCL Getting Started Guide.................................................1-1
About Altera SDK for OpenCL Getting Started Guide..........................................................................1-1 Prerequisites..................................................................................................................................................1-1 Overview of the AOCL Setup Process.......................................................................................................1-2 Downloading the Software.........................................................................................................................1-4 Installing the AOCL and the Quartus II Software Together..................................................................1-5 Setting Up the AOCL as a Stand-Alone Software...................................................................................1-5 Installing and Uninstalling the AOCL on Windows..................................................................1-5 Installing and Uninstalling the AOCL on Linux.........................................................................1-6 Installing an FPGA Board...........................................................................................................................1-7 Creating the FPGA Hardware Configuration File of an OpenCL Kernel............................................1-8 Updating the Hardware Image on the FPGA..........................................................................................1-9 Programming the Flash Memory of an FPGA.............................................................................1-9 Setting Up the Host Application..............................................................................................................1-10 Building and Running the Host Application on Windows......................................................1-11 Building and Running the Host Application on Linux............................................................1-11 AOC Output from Successful Kernel Execution.......................................................................1-12 Conclusion..................................................................................................................................................1-13 Document Revision History.....................................................................................................................1-13

Altera Corporation

Altera SDK for OpenCL Getting Started Guide


2013.12.13

OCL001-13.1.1

Subscribe

Send Feedback

About Altera SDK for OpenCL Getting Started Guide


The Altera Software Development Kit (SDK) for OpenCL Getting Started Guide describes the procedures you follow to install the Altera SDK for OpenCL (AOCL) version 13.1. This document also contains instructions on how to compile an example OpenCL(1) application with the AOCL(2). OpenCL is a C-based open standard for the programming of heterogeneous parallel devices. The AOCL provides a compiler and tools for you to build and run OpenCL applications that target Altera field programmable gate arrays (FPGAs). Note: The AOCL supports the embedded profile of the OpenCL Specification version 1.0.
Related Information

OpenCL Reference Pages Refer to the OpenCL Reference Pages for more information on the OpenCL Specification verison 1.0. OpenCL Specification version 1.0 Refer to the OpenCL Specification version 1.0 for detailed information on the OpenCL application programming interface (API) and programming language.

Prerequisites
To install the AOCL and create an OpenCL application for an Altera preferred FPGA board, your system must meet certain hardware, operating system (OS), and software requirements.

(1) (2)

OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission of the Khronos Group. The Altera SDK for OpenCL is based on a published Khronos Specification, and has passed the Khronos Conformance Testing Process. Current conformance status can be found at www.khronos.org/conformance.
ISO 9001:2008 Registered

2013 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, HARDCOPY, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words

and logos are trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device specifications before relying on any published information and before placing orders for products or services.

www.altera.com
101 Innovation Drive, San Jose, CA 95134

1-2

Overview of the AOCL Setup Process

OCL001-13.1.1 2013.12.13

Host System Requirements To install an Altera preferred FPGA board, the host system must meet the following minimum hardware and OS requirements: The preferred accelerator board contains Stratix V FPGAs. The host system has at least 24 gigabytes (GB) of RAM. The host system must be running a 64-bit OS. Any binaries that your system builds must be 64-bit executables. The AOCL supports the following OS: Microsoft 64-bit Windows 7. Red Hat Enterprise 64-bit Linux (RHEL) 5.6. Important: You must install the Linux OS kernel source and headers, and the GNU Compiler Collection (GCC). Caution: You must have administrator privileges on the host system to install the necessary packages and drivers. The host machine motherboard must have at least one eight-lane PCI Express port (PCIe x8). If an eight-lane port is not available, you may use a sixteen-lane (PCIe x16) port. Software Prerequisites Ensure that the version of your C compiler or software development environment is compatible with the current version of the AOCL and Quartus II software. Build your host executable code using the following C compiler or software development environment: For Windows systems, use Microsoft Visual Studio verison 2010 Professional. For Linux systems, use the C compiler included with the GCC.

Overview of the AOCL Setup Process


The AOCL Getting Started Guide outlines the procedures for installing the AOCL and programming your FPGA. The figure below summarizes the steps for setting up the necessary software and installing the FPGA board.

Altera Corporation

Altera SDK for OpenCL Getting Started Guide Send Feedback

OCL001-13.1.1 2013.12.13

Overview of the AOCL Setup Process

1-3

Figure 1-1: AOCL Installation Process Overview

Review prerequisites

HW, SW, OS prereq satisfied?

NO

Acquire prerequisite HW, SW, OS

YES Download installer (Quartus II software Stratix V device support, AOCL)

Install Quartus II software, Stratix V device support, AOCL NO NO YES Install FPGA board (aocl install) aocl diagnostic = PASSED? YES Run hello_world on FPGA

aoc executable runs?

Legend Action Decision

After you complete the initial software and hardware setup successfully, you can create a hardware image from the hello_world example OpenCL application. Before you program your FPGA with the hardware image, ensure that your FPGA contains an image created using a current version of the AOCL. The figure below summarizes the steps you perform to program your FPGA.

Altera SDK for OpenCL Getting Started Guide Send Feedback

Altera Corporation

1-4

Downloading the Software

OCL001-13.1.1 2013.12.13

Figure 1-2: FPGA Programming Overview


Extract hello_world OpenCL example

Check setting of AOCL_BOARD_PACKAGE_ROOT

Select target FPGA board (aoc --list-boards) hello_world.aoco Compile kernel for target board (aoc -v --board <board_name> hello_world.cl) hello_world.aocx

NO

FPGA image from current ACDS version? YES

Program FPGA flash memory

Build host application

Legend Action Decision File

Build successful?

NO

YES Run host application (host.exe)

Downloading the Software


You can download the Quartus II software version 13.1, the Stratix V device support, and the AOCL version 13.1 from the Download Center of the Altera website. To download the AOCL and all related software, perform the following tasks: 1. On the main page of the Altera website, click myAltera to log on to your myAltera account. If you do not have a myAltera account, follow the instructions on the page to create one. 2. Click Download Center. 3. Select to download the Subscription Edition of the Quartus II software. 4. Select the OS (that is, Windows or Linux).

Altera Corporation

Altera SDK for OpenCL Getting Started Guide Send Feedback

OCL001-13.1.1 2013.12.13

Installing the AOCL and the Quartus II Software Together

1-5

5. If you install the AOCL as part of the Quartus II software, perform the following steps: a. Under the Individual Files tab, select to download the Quartus II software package and the Stratix V device support. b. Under the Additional Software tab, select to download the Altera SDK for OpenCL. The Quartus II software installer installs the Quartus II software, the Stratix V device support, and the AOCL. 6. If you install the AOCL as a standalone software, only select the Altera SDK for OpenCL under Additional Software. The AOCL installer installs the AOCL without the Quartus II software and the Stratix V device support. 7. Perform the steps outlined in the download and installation instructions on the download page.

Installing the AOCL and the Quartus II Software Together


If you download the AOCL, the Quartus II software, and the Stratix V device support together, you can install the AOCL and the Stratix V device support as part of the Quartus II software. 1. Run the QuartusSetup installer, and follow the installation instructions in the Altera Software Installation and Licensing Manual. a. For Windows systems, run the QuartusSetup-<version>.exe file. b. For Linux systems, run the QuartusSetup-<version>.run file. 2. The Quartus II software installer sets the environment variable ALTERAOCLSDKROOT. Ensure that ALTERAOCLSDKROOT points to the current version of the AOCL. Refer to the Altera Software Installation and Licensing Manual for licensing and uninstallation instructions of the Quartus II software, the Stratix V device support, and the AOCL.
Related Information

Altera Software Installation and Licensing Manual

Setting Up the AOCL as a Stand-Alone Software


The installation procedure for the AOCL is OS-specific. Caution: You must install the Quartus II software and the Stratix V device support before installing the AOCL. Installing and Uninstalling the AOCL on Windows on page 1-5 Installing and Uninstalling the AOCL on Linux on page 1-6

Installing and Uninstalling the AOCL on Windows


Installing the AOCL
To install the AOCL on Windows, you must install it in an appropriate folder, and set all the necessary environment variables.

Altera SDK for OpenCL Getting Started Guide Send Feedback

Altera Corporation

1-6

Uninstalling the AOCL

OCL001-13.1.1 2013.12.13

Before you begin Attention: You must have administrator privileges. 1. Direct the installer AOCLSetup-<version>.exe to extract the AOCL to an empty folder that you own, not a system folder (for example, C:\altera\<version>\hld). Caution: The path must not contain any spaces. 2. Verify that the environment variables listed below are set.
Environment Variable Path Added

Environment variables set by the installer: ALTERAOCLSDKROOT <path_to_hld>, which is the absolute path to the folder containing the extracted installation package

Environment variables you must set manually: PATH LM_LICENSE_FILE


%ALTERAOCLSDKROOT%\bin

all the necessary license.dat files

3. Verify the successful installation of the AOCL by performing the following tasks: a. Run the cmd.exe executable. b. Type the where aoc command. If the path to the aoc.exe file is not returned, installation was unsuccessful. If installation was unsuccessful, reinstall the AOCL.

Uninstalling the AOCL


To uninstall the AOCL on Windows, you must run the uninstaller, and modify the PATH and ALTERAOCLSDKROOT environment variables. 1. From the Windows Start Menu shortcut, navigate to the Altera <version>\Altera SDK for OpenCL <version> folder. 2. Run Uninstall Altera SDK for OpenCL <version>. 3. Remove the following paths from the PATH environment variable: a. %ALTERAOCLSDKROOT%\bin b. %ALTERAOCLSDKROOT%\host\windows64\bin 4. Remove the ALTERAOCLSDKROOT environment variable.

Installing and Uninstalling the AOCL on Linux


Installing the AOCL
To install the AOCL on Linux, you must install it in an appropriate directory, and set all the necessary environment variables. Before you begin Attention: You must have sudo or root privileges.

Altera Corporation

Altera SDK for OpenCL Getting Started Guide Send Feedback

OCL001-13.1.1 2013.12.13

Uninstalling the AOCL

1-7

1. Direct the installer AOCLSetup-<version>.run to extract the AOCL to an empty directory that you own, not a system directory (for example, /usr/altera/<version>/hld). Caution: The path must not contain any spaces. 2. Verify that the environment variables listed below are set.
Environment Variable Path Added

Environment variables set by the installer: ALTERAOCLSDKROOT <path_to_hld>, which is the absolute path to the directory containing the extracted installation package

Environment variables you must set manually: PATH LM_LICENSE_FILE


$ALTERAOCLSDKROOT/bin

all the necessary license.dat files

Warning: If you install the AOCL on a system that does not contain any C Shell Resource file (.cshrc) or Bash Resource file (.bashrc) in your directory, you must set the environment variables ALTERAOCLSDKROOT and PATH manually. Alternatively, you may create the .cshrc and .bashrc files, and then append the environment variables to them. To ensure that the updates take effect, restart your terminal after you set the environment variables.

Uninstalling the AOCL


To uninstall the AOCL on Linux, you must run the uninstaller, and modify the PATH and ALTERAOCLSDKROOT environment variables. 1. 2. 3. 4. Run the aocl-<version>-uninstall.run program located in the <install directory>/uninstall directory. Remove $ALTERAOCLSDKROOT/bin from the PATH environment variable. Remove $ALTERAOCLSDKROOT/host/linux64/lib from the LD_LIBRARY_PATH environment variable. Remove the ALTERAOCLSDKROOT environment variable.

Installing an FPGA Board


For the AOCL to target your FPGA board, you must download and install the board package for your FPGA board from your board vendor. Before you begin Attention: You must have administrator privileges. To install an Altera preferred FPGA board, perform the following tasks: 1. Follow your board vendor's instructions to connect the FPGA board to your system. 2. Download the Altera Preferred Board Partner Program (APBPP) board package for your FPGA board from your board vendor's website. 3. Install the board package in a local folder or directory (for example, ALTERAOCLSDKROOT/board/<board_family> folder or directory, where ALTERAOCLSDKROOT points to the absolute path to the AOCL).
Altera SDK for OpenCL Getting Started Guide Send Feedback Altera Corporation

1-8

Creating the FPGA Hardware Configuration File of an OpenCL Kernel

OCL001-13.1.1 2013.12.13

4. Set the environment variable AOCL_BOARD_PACKAGE_ROOT to the local folder or directory in Step 3. 5. Invoke the command aocl install at a command prompt. Important: By invoking the aocl install command, you also install a board driver that allows communication between host programs and hardware kernel programs. 6. To verify the successful installation of the FPGA board, invoke the command aocl diagnostic to run any board vendor-recommended diagnostic test.

Creating the FPGA Hardware Configuration File of an OpenCL Kernel


The FPGA hardware configuration file of an OpenCL kernel is called an Altera Offline Compiler (AOC) Executable file (.aocx). To create the .aocx file for the hello_world example OpenCL application, you must extract the source files first, and then compile the kernel using the AOC. Before you begin Remember: For Windows system, you must develop your code in Microsoft Visual Studio 2010 Professional because the Altera SDK for OpenCL (AOCL) is compatible with 64-bit host binaries only. Remember: For Linux system, you need GNU develop tools such as gcc and make to build the OpenCL application. 1. Download the hello_world example OpenCL application from the OpenCL Design Examples page on the Altera website. 2. Extract the hello_world example to a location to which you have write access. 3. Ensure that you have installed the board package provided by your board vendor successfully. 4. Ensure that the environment variable AOCL_BOARD_PACKAGE_ROOT points to a local folder or directory such as ALTERAOCLSDKROOT/board/<board_family>. 5. Select your target FPGA board. To list the FPGA boards available in your board package, invoke the command aoc --list-boards at a command prompt. 6. At a command prompt, navigate to the hello_world design. 7. To compile the kernel for your target FPGA board, invoke the following command: aoc -v --board <board_name> hello_world.cl This command performs the following tasks: Generates the Quartus II design project files from the OpenCL source code. Checks for initial syntax errors. Performs basic optimizations. Creates a <your_kernel_filename> folder or subdirectory containing necessary intermediate files. Creates the Altera Offline Compiler Object file (.aoco). Creates the .aocx hardware configuration file.

Altera Corporation

Altera SDK for OpenCL Getting Started Guide Send Feedback

OCL001-13.1.1 2013.12.13

Updating the Hardware Image on the FPGA

1-9

Attention: The .aocx file might take hours to build, depending on the complexity of the kernel. To view the progress of the compilation on-screen, include the -v flag in your aoc command. An example output is shown below. $ aoc --board pcie385n_a7 -v hello_world.cl aoc: Environment checks are completed successfully. You are now compiling the full flow!! aoc: Selected target board pcie385n_a7 aoc: Running OpenCL parser.... aoc: OpenCL parser completed successfully. aoc: Compiling.... aoc: Linking with IP library ... aoc: First stage compilation completed successfully. aoc: Running Quartus design generator.... aoc: Quartus design generator completed successfully. aoc: Compiling Quartus project. aoc: Hardware generation completed successfully. When the line aoc: Compiling Quartus project. appears, it signifies the beginning of the hardware build, which is the time-consuming part of the compilation process. The AOC displays the line aoc: Hardware generation completed successfully. to signify the completion of the compilation process.
Related Information

Installing an FPGA Board on page 1-7 Altera SDK for OpenCL Programming Guide For more information on the --list-boards and --board <board_name> options of the aoc command, refer to the AOC Modifiers section of the AOCL Programming Guide. For more information on the -v option of the aoc command, refer to the -v section of the AOCL Programming Guide.

Updating the Hardware Image on the FPGA


Before you execute an OpenCL kernel program on your FPGA, ensure that the flash memory of your FPGA contains a hardware image created using a current version of the AOCL. Remember: For every major release of the AOCL and Quartus II software, you must program the flash memory of your FPGA with a hardware image created using the current version of the AOCL.

Programming the Flash Memory of an FPGA


By default, you configure an FPGA using the hardware image stored in the flash memory of the device. When there is no power, the FPGA retains the hardware configuration file in the flash memory. When you power up the system, it configures the FPGA circuitry based on this hardware image in the flash memory. Therefore, it is imperative that an OpenCL-compatible hardware configuration file is loaded into the flash memory to ensure proper configuration of the FPGA. FPGA OpenCL kernels communicate with the host program via a PCI Express (PCIe) device in the FPGA. An FPGA board compatible with the AOCL version 13.1 should be preprogrammed with a default hardware configuration file that configures the PCIe device inside the FPGA. Nevertheless, you must program the
Altera SDK for OpenCL Getting Started Guide Send Feedback Altera Corporation

1-10

Setting Up the Host Application

OCL001-13.1.1 2013.12.13

flash memory of the FPGA with an OpenCL-compatible image. If the system fails to configure the PCIe device in your FPGA board properly, the default image in the flash memory will configure the FPGA and instantiate the PCIe device. Caution: When you load the hardware configuration file into the flash memory of the FPGA, do not power down the system prematurely. Also, do not launch any host code that calls OpenCL kernels or might otherwise communicate with the FPGA board. To load your hardware configuration file into the flash memory of your FPGA board, perform the following tasks: 1. If applicable, for a Windows system, install the USB-Blaster driver so that you can load your hardware configuration file into the flash memory. For installation instructions, refer to the USB-Blaster Driver for Windows 7 and Windows Vista page on the Altera website. Note: If you have a Linux system, proceed to Step 2. RHEL 5.6 host systems natively include the USB driver. 2. Ensure that you set the AOCL_BOARD_PACKAGE_ROOT environment variable to the board package that corresponds to your FPGA board (that is, ALTERAOCLSDKROOT/board/<board_family>). 3. At a command prompt, navigate to the hello_world design. Remember: You can download the hello_world design from the OpenCL Design Examples page, and extract the example to a location to which you have write access. 4. Invoke the command aocl flash hello_world.aocx to load the hardware configuration file into the flash memory. 5. Power down your host machine and then power it up again. Warning: If you do not power down your host machine after you program the flash memory, you might not have a valid image loaded onto your FPGA.

Setting Up the Host Application


The procedures to build and run the host application that executes the OpenCL kernel on your FPGA are OS-specific. Building and Running the Host Application on Windows on page 1-11 You must build your host application in Microsoft Visual Studio version 2010 Professional, and run the application by invoking the host.exe command. Building and Running the Host Application on Linux on page 1-11 You must build your host application with the Makefile.linux file, and run the application by invoking the host.exe command. AOC Output from Successful Kernel Execution on page 1-12 When you run the host application to execute your OpenCL kernel on the target FPGA, the AOC notifies you of a successful kernel execution.

Altera Corporation

Altera SDK for OpenCL Getting Started Guide Send Feedback

OCL001-13.1.1 2013.12.13

Building and Running the Host Application on Windows

1-11

Building and Running the Host Application on Windows


You must build your host application in Microsoft Visual Studio version 2010 Professional, and run the application by invoking the host.exe command.

Building the Host Application


The hello_world_vs2010_<board_vendor>.sln file in the hello_world folder contains the host solution. After you open this .sln file in Microsoft Visual Studio 2010 Professional, you can build the host-side code in the main.cpp file. To build the host application, perform the following tasks: 1. Open the .sln file in Microsoft Visual Studio. 2. Verify that the build configuration is correct. The default build configuration is Debug, but you can use Release. You must select the x64 option as the solution platform. 3. Build the solution by selecting the Build > Build Solution menu option, or by pressing the F7 key. 4. Verify that the build is correct. An output ending with a message similar to the one shown below notifies you of a successful build: 1> Build succeeded. 1> 1> Time Elapsed 00:00:03:29 ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== Attention: You can ignore the LNK4009: PDB 'vc90.pdb' was not found with... warnings because they have no effect on the build. The compiler might issue this type of warning messages if you have built your Windows libraries using a previous version of Microsoft Visual Studio.

Running the Host Application


To execute the OpenCL kernel on the FPGA, run the Windows host application that you built from the .sln file. 1. Add the path %ALTERAOCLSDKROOT%\host\windows64\bin to the PATH environment variable. 2. At a command prompt, navigate to the host executable within the hello_world_<board_name> folder. 3. Invoke the host.exe command. This command runs the host executable, which in turn executes the kernel code on the FPGA.

Building and Running the Host Application on Linux


You must build your host application with the Makefile.linux file, and run the application by invoking the host.exe command.

Building the Host Application


Build the host executable with the Makefile.linux file, located in the hello_world_<board_name> directory. To build the host application, perform the following tasks: 1. Navigate to the hello_world_<board_name> directory. 2. Invoke the $ make -f Makefile.linux command.

Altera SDK for OpenCL Getting Started Guide Send Feedback

Altera Corporation

1-12

Running the Host Application

OCL001-13.1.1 2013.12.13

Running the Host Application


To execute the OpenCL kernel on the FPGA , run the Linux host application that you built from the Makefile.linux file. 1. Add the path $ALTERAOCLSDKROOT/host/linux64/lib to the LD_LIBRARY_PATH environment variable. 2. At a command prompt, navigate to the host executable within the hello_world_<board_name> directory. 3. Invoke the host.exe command. This command runs the host executable, which in turn executes the kernel code on the FPGA.

AOC Output from Successful Kernel Execution


When you run the host application to execute your OpenCL kernel on the target FPGA, the AOC notifies you of a successful kernel execution. Example output: Found 1 OpenCL platforms. Querying platform for info: ========================== CL_PLATFORM_NAME CL_PLATFORM_VENDOR CL_PLATFORM_VERSION

= Altera SDK for OpenCL = Altera Corporation = OpenCL 1.0 Altera SDK for OpenCL, Version 13.1

Querying device for info: ======================== CL_DEVICE_NAME = pcie385n_a7 : PCIe-385N Altera Stratix V Computing Card CL_DEVICE_VENDOR = Nallatech Inc. CL_DEVICE_VENDOR_ID = 4466 CL_DEVICE_VERSION = OpenCL 1.0 Altera SDK for OpenCL, Version 13.1 CL_DRIVER_VERSION = 13.1 CL_DEVICE_ADDRESS_BITS = 64 CL_DEVICE_AVAILABLE = true CL_DEVICE_ENDIAN_LITTLE = true CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 32768 CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0 CL_DEVICE_GLOBAL_MEM_SIZE = 0 CL_DEVICE_IMAGE_SUPPORT = false CL_DEVICE_LOCAL_MEM_SIZE = 16384 CL_DEVICE_MAX_CLOCK_FREQUENCY = 1000 CL_DEVICE_MAX_COMPUTE_UNITS = 1 CL_DEVICE_MAX_CONSTANT_ARGS = 8 CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 1073741824 CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 3 CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 1024 CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 128 CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 4 CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 2 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 = 0 Command queue out of order? = false Command queue profiling enabled? = true

Altera Corporation

Altera SDK for OpenCL Getting Started Guide Send Feedback

OCL001-13.1.1 2013.12.13

Conclusion

1-13

Kernel initialization is complete. Launching the kernel... Thread #2: Hello from Altera's OpenCL Compiler! Kernel execution is complete.

Conclusion
You have performed successfully all the steps necessary to execute an OpenCL application on a preferred FPGA-based accelerator board. You may follow the same steps to execute a different OpenCL example application using the AOCL. For more in-depth explanation on the features of the AOCL, refer to the Altera SDK for OpenCL Programming Guide. The programming guide also serves as a general guide to writing OpenCL applications with the AOCL. The Altera SDK for OpenCL Optimization Guide helps you master optimization techniques for AOCL applications. Both guides are available on the AOCL documentation page of the Altera website.
Related Information

Altera SDK for OpenCL Programming Guide Refer to the AOCL Programming Guide for guidelines on creating OpenCL applications using the AOCL. Altera SDK for OpenCL Optimization Guide Refer to the AOCL Optimization Guide for guidelines on optimizing your OpenCL applications using the AOCL.

Document Revision History


Date Version Changes

December 2013

13.1.1

Updated the Prerequisites section to include a reminder to install Linux kernel source, headers, and GCC.

Altera SDK for OpenCL Getting Started Guide Send Feedback

Altera Corporation

1-14

Document Revision History

OCL001-13.1.1 2013.12.13

Date

Version

Changes

November 2013

13.1.0

Reorganized information flow. Updated the Prerequisites section. Updated board installation instructions. Updated software download instructions. Inserted the section Installing the AOCL and the Quartus II Software Together. Updated software installation and uninstallation instructions. Inserted the following figures: AOCL Installation Process Overview FPGA Programming Overview Removed the Licensing section. Removed all board-specific installation and configuration instructions. Changed example OpenCL application used to demonstrate kernel configuration and FPGA programming from moving_average to hello_world. Inserted the section Updating the Hardware Image on the FPGA, which contained the updated flash programming instructions. Removed the section Installing the USB-Blaster Driver on Windows. Updated output from successful execution of hello_world kernel on FPGA for Windows and Linux systems. Removed the figure Contents of the Moving Average Example. Removed the figure Opening host.sln in Visual Studio.

June 2013

13.0 SP1.0

Updated requisite Quartus II and AOCL software versions from 13.0 to 13.0 SP1. Inserted the figure A Correct Windows Device Manager After Complete Board Driver Installation for a BittWare Board. Updated the vendor and device IDs in the Verifying the Functionality of the BittWare Board section for Windows. Updated the AOCL installation instructions for Linux systems that do not contain a .cshrc or a .bashrc file in the directory. Updated path to the AOCL design examples. Updated the figure Contents of the Moving Average Example. Updated flash programming instructions.

Altera Corporation

Altera SDK for OpenCL Getting Started Guide Send Feedback

OCL001-13.1.1 2013.12.13

Document Revision History

1-15

Date

Version

Changes

May 2013

13.0.1

Renamed the OpenCL_SDK folder or directory to AOCL. Inserted warning about the AOCL installation dependency on .cshrc and .bashrc files for Linux systems. Included reminder to BittWare board users about installing the BittWare development software. Inserted warning about potential Jungo WinDriver installation failure for systems running on Windows 7. Included reinstallation instructions. Inserted warnings about error messages displayed for aocl commands that have not been implemented for the BittWare FPGA board. Inserted caution message about setting the environment variable AOCL_BOARD_PACKAGE_ROOT. Updated board driver installation procedures for Windows and Linux systems. Modified the path to the default location of the AOCL for Windows and Linux systems. Modified the path name added to the PATH environment variable when installing the AOCL on Linux systems. The path name should be $QUARTUS_ROOTDIR/bin instead of $QUARTUS_ROOTDIR/bin64. Updated installation and compilation procedures. Incorporated licensing procedure. Updated flash programming procedure and moved it to Appendix A. Updated links to software and documentation download pages.

May 2013

13.0.0

November 2012

12.1.0

Initial release.

Altera SDK for OpenCL Getting Started Guide Send Feedback

Altera Corporation

Вам также может понравиться