Rebuild the project, Rebuild the project –10 – Altera Nios II C2H Compiler User Manual

Page 32

Advertising
background image

2–10

9.1

Altera Corporation

Nios II C2H Compiler User Guide

November 2009

Tutorial

Rebuild the Project

To rebuild the project, perform the following step:

v

In the C/C++ Projects view, right-click c2h_tutorial_sw and click
Build Project

.

1

The rebuild process can take over 20 minutes, depending on
your computer's performance and the target FPGA.

In the background, the Nios II IDE performs the following tasks:

1.

Launches the C2H Compiler to analyze the

do_dma()

function,

generates the hardware accelerator, and generates the C wrapper
function.

2.

Invokes SOPC Builder to connect the accelerator into the SOPC
Builder system. The build process modifies the SOPC Builder
system file (.ptf) in the Quartus II project directory to include the
new accelerator as a component in the system.

3.

Invokes the Quartus II software to compile the hardware project and
regenerate the .sof file.

4.

Rebuilds the C/C++ application project and links the accelerator
wrapper function into the application.

Progress messages display in the Console view. The build process creates
the following files:

accelerator_c2h_tutorial_sw_do_dma.v

(or .vhd) – This file is the

HDL code for the accelerated function. It is stored in the Quartus II
project directory, and the name follows the format accelerator_<IDE
project name
>_<function name>. This file is not visible in the Nios II
IDE.

alt_c2h_do_dma.c

– This file is the C2H accelerator driver file,

containing the wrapper function for the accelerator. It is located in
software project's Debug or Release directory, and the name follows
the convention alt_c2h_<function name>.c. (If you use the Nios II
software build tools, these files are located in your software
application directory.)

c2h_accelerator_base_addresses.h

— This is the C2H accelerator

base addresses header file. It is located in the same directory as
alt_c2h_<

function name>.c.

Advertising