Altera Nios II C2H Compiler User Manual

Page 3

Advertising
background image

Altera Corporation

9.1

iii

Contents

Chapter 1. Introduction to the C2H Compiler

User Guide Overview ........................................................................................................................... 1–1
Target Audience ..................................................................................................................................... 1–2
Introduction ............................................................................................................................................ 1–2

Features .............................................................................................................................................. 1–2
Design Abstraction and the Rise of C for FPGAs ........................................................................ 1–3
What to Expect From the C2H Compiler ...................................................................................... 1–5
C2H Support in Nios II Tool Flows ............................................................................................... 1–6

C2H Compiler Concepts ....................................................................................................................... 1–6

Simplicity and Ease of Use .............................................................................................................. 1–6
Rapid Design Iteration to Find Optimal Partitioning of Hardware and Software ................. 1–7
Accelerate Performance-Critical Sections of Code ......................................................................
1–7
The C2H Compiler Operates at the Function Level .................................................................... 1–8
System Architecture ......................................................................................................................... 1–9
Generation of a Hardware Accelerator ....................................................................................... 1–10
One-to-One Mapping From C Syntax to Hardware Structure ................................................ 1–11
Performance Depends on Memory Access Time ....................................................................... 1–12

C Code Appropriate for Hardware Acceleration ........................................................................... 1–13

Ideal Acceleration Candidates ...................................................................................................... 1–13
Poor Acceleration Candidates ...................................................................................................... 1–14
Understanding Code to Find Opportunities for Acceleration ................................................. 1–15

Next Steps ............................................................................................................................................. 1–16

Chapter 2. Getting Started Tutorial

Introduction ............................................................................................................................................ 2–1
C2H Compiler Design Flow ................................................................................................................. 2–1

Starting Point for the C2H Compiler Design Flow ..................................................................... 2–1

Typical Design Flow .............................................................................................................................. 2–2

Software Requirements ................................................................................................................... 2–2
OpenCore Plus Evaluation .............................................................................................................. 2–3

Tutorial .................................................................................................................................................... 2–4

Tutorial Design ................................................................................................................................. 2–4
Set up the Hardware for the Project .............................................................................................. 2–5
Create the Software Project ............................................................................................................. 2–6
Run the Project as Software Only .................................................................................................. 2–7
Create and Configure a Hardware Accelerator ........................................................................... 2–8
Rebuild the Project ......................................................................................................................... 2–10
Observe Results in the Report File ............................................................................................... 2–11
Observe the Accelerator in SOPC Builder .................................................................................. 2–14
Run the Project with the Accelerator ........................................................................................... 2–
14
Remove the Accelerator ................................................................................................................ 2–15

Advertising