
Contents
Altera SDK for OpenCL Cyclone V SoC Getting Started Guide........................1-1
Prerequisites..................................................................................................................................................1-2
Contents of the Altera SDK for OpenCL..................................................................................................1-2
Overview of the AOCL and Cyclone V SoC Development Kit Setup Processes.................................1-4
Cyclone V SoC Development Kit Reference Platform Board Variants................................................1-5
Design Considerations................................................................................................................................1-6
Setting Up the Altera SDK for OpenCL, SoC EDS, and the Cyclone V SoC
Development Kit for Windows....................................................................... 2-1
Upgrading to Current Version of AOCL for Cyclone V SoC................................................................2-2
Downloading the Altera SDK for OpenCL.............................................................................................. 2-2
Downloading the SoC EDS.........................................................................................................................2-3
Installing the Altera SDK for OpenCL......................................................................................................2-3
Setting the Environment Variables for Windows................................................................................... 2-4
Installing the SoC EDS ...............................................................................................................................2-5
Licensing the Software.................................................................................................................................2-5
Installing the Cyclone V SoC Development Kit...................................................................................... 2-6
Writing an SD Card Image onto the Micro SD Flash Card on Windows................................2-6
Configuring the SW3 Switches.......................................................................................................2-7
Setting Up Terminal Connection in Windows............................................................................2-8
Setting Environment Variables and Loading OpenCL Linux Kernel Driver..........................2-8
Connecting the Board to Network via Ethernet..........................................................................2-9
Creating the Hardware Configuration File of an OpenCL Kernel for SoC.......................................2-10
Executing an OpenCL Kernel on an SoC............................................................................................... 2-12
Building the Host Application..................................................................................................... 2-13
Running the Host Application.....................................................................................................2-13
Output from Successful Kernel Execution on the Cyclone V SoC Development Kit..........2-13
Uninstalling the Software......................................................................................................................... 2-14
Setting Up the Altera SDK for OpenCL, SoC EDS, and the Cyclone V SoC
Development Kit for Linux............................................................................. 3-1
Upgrading to Current Version of AOCL for Cyclone V SoC................................................................3-2
Downloading the Altera SDK for OpenCL.............................................................................................. 3-2
Downloading the SoC EDS.........................................................................................................................3-3
Installing the Altera SDK for OpenCL......................................................................................................3-3
Setting the Environment Variables for Linux..........................................................................................3-4
Installing the SoC EDS................................................................................................................................3-5
Licensing the Software.................................................................................................................................3-5
Installing the Cyclone V SoC Development Kit...................................................................................... 3-6
Writing an SD Card Image onto the Micro SD Flash Card on Linux......................................3-7
TOC-2
Altera SDK for OpenCL Cyclone V SoC Getting Started Guide
Altera Corporation

Configuring the SW3 Switches.......................................................................................................3-7
Setting Up Terminal Connection in Linux...................................................................................3-8
Setting Environment Variables and Loading OpenCL Linux Kernel Driver..........................3-9
Connecting the Board to Network via Ethernet..........................................................................3-9
Creating the Hardware Configuration File of an OpenCL Kernel for SoC.......................................3-11
Executing an OpenCL Kernel on an SoC............................................................................................... 3-13
Building the Host Application..................................................................................................... 3-14
Running the Host Application.....................................................................................................3-14
Output from Successful Kernel Execution on the Cyclone V SoC Development Kit..........3-14
Uninstalling the Software......................................................................................................................... 3-15
Document Revision History...............................................................................A-1
Altera SDK for OpenCL Cyclone V SoC Getting Started Guide
TOC-3
Altera Corporation

Altera SDK for OpenCL Cyclone V SoC Getting
Started Guide
1
2015.05.04
OCL006-15.0.0
Subscribe
Send Feedback
The Altera SDK for OpenCL Cyclone V SoC Getting Started Guide describes the procedures you follow to
set up and use the Altera
®
Software Development Kit (SDK) for OpenCL
™
(1)
(AOCL)
(2)
to run an OpenCL
application on the Altera Cyclone
®
V SoC Development Kit.
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 FPGAs.
The AOCL supports the embedded profile of the OpenCL Specification version 1.0. For more information
on the OpenCL Specification version 1.0, refer to the OpenCL Reference Pages. The OpenCL Specification
version 1.0 includes detailed information on the OpenCL application programming interface (API) and
programming language.
This document assumes the following:
1. You are knowledgeable in OpenCL concepts and application programming interfaces (APIs), as
described in the OpenCL Specification version 1.0 by the Khronos Group.
2. You have experience in creating OpenCL applications, and are familiar with the contents of the
OpenCL Specification.
3. You are familiar with the information available in the following AOCL documentation:
• Altera SDK for OpenCL Getting Started Guide.
• Altera SDK for OpenCL Programming Guide.
• Altera SDK for OpenCL Best Practices Guide.
Related Information
• OpenCL Reference Pages
• OpenCL Specification version 1.0
• Altera RTE for OpenCL Getting Started Guide
• Altera SDK for OpenCL Getting Started Guide
• Altera SDK for OpenCL Programming Guide
• Altera SDK for OpenCL Best Practices Guide
(1)
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission of the Khronos Group
™
.
(2)
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.
©
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, 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.
ISO
9001:2008
Registered
www.altera.com
101 Innovation Drive, San Jose, CA 95134

Prerequisites
To install the Altera SDK for OpenCL (AOCL) and create an OpenCL application for the Cyclone V SoC
Development Kit, your system must meet certain hardware, target platform, and software requirements.
Hardware Requirements
Ensure that your system meets the following minimum hardware and operating system (OS) require‐
ments:
1. The accelerator board is the Altera Cyclone V SoC Development Kit.
2. Development system requirements:
• You must have administrator privileges on the development system to install the necessary
packages and drivers.
• The development system has at least 8 gigabytes (GB) of RAM.
• The development system must be running on one of the following supported target platforms:
• Microsoft 64-bit Windows 7 on the x86-64 architecture.
• Red Hat Enterprise 64-bit Linux (RHEL) versions 6 on the x86-64 architecture.
You will use the development system to perform the following tasks:
• Compile OpenCL kernel source files to create hardware configuration files.
• Cross-compile the host executables to the ARM
®
processor.
• Connect your system to the SoC board so that they can communicate with each other using
UART over USB connection.
Software Prerequisites
• Linux systems require the Perl command version 5 or later. Ensure that your PATH environment
variable setting includes the path to the Perl command.
Contents of the Altera SDK for OpenCL
The AOCL provides logic components, drivers, and AOCL-specific libraries and files.
Logic Components
• The Altera Offline Compiler (AOC) translates your OpenCL device code into a hardware configuration
file that the system loads onto an Altera FPGA.
• The AOCL utility includes a set of commands you can invoke to perform high-level tasks such as
running diagnostic tests.
• The host runtime provides the OpenCL host platform application programming interface (API) and
runtime API for your OpenCL host application.
The host runtime consists of libraries that provide OpenCL APIs, hardware abstractions, and helper
libraries.
Drivers, Libraries and Files
The software installation process installs the software into a directory that you own. The
ALTERAOCLSDKROOT environment variable references the path to the software installation directory.
1-2
Prerequisites
OCL006-15.0.0
2015.05.04
Altera Corporation
Altera SDK for OpenCL Cyclone V SoC Getting Started Guide
Send Feedback