Computer Laboratory

ECAD and Architecture Practical Classes

Lablet 1.2 - Architecture and Software

Eclipse (NIOS II) Schematic

A mature C compiler, producing binaries for the NIOS II processor used in the Qsys system, is available under Eclipse.

The aim of this section is to complete a simple C program to interact with the architecture you created. Using Eclipse, the program binary may be downloaded to the FPGA and executed; a NIOS II terminal will be used for standard input and output streams.

Eclipse (NIOS II) Project Creation

In Quartus, go Tools | NIOS II Software Build Tools for Eclipse. In your project directory, create a folder called software and set this as the Eclipse working directory.

In Eclipse, go File | New | NIOS II Application and BSP from Template. The Board Support Package (BSP) will be generated automatically as a separate project; it forms a Hardware Abstraction Layer (HAL) to interact with your architecture in code.

Click ... to the right of SOPC Information File name and select hello_world.sopcinfo from your project directory. In addition to the Verilog hierarchy, Qsys also generates this file describing your system. It will be used to create the BSP. Enter hello_world as the Project name and select Blank Project as the template. Click Finish.

You may need to refer to the trouble-shooting guide at this point.

Right click on the hello_world project and go New | Source File. Set the Source file to hello_world.c (for example) and the Template to <None>. Click Finish.

Previous  |  Contents  |  Next