Computer Laboratory

ECAD and Architecture Practical Classes

Exercises

The ticking criteria for this lablet is to complete the second of these exercises to the ticker's satisfaction. Any suggested implementation may be ignored in favour of another, sensible approach.

We provide a brief Introduction to C, which should be sufficient for these labs.

Exercise 1 - Hello World

Behaviour

Test the Qsys architecture by printing "Hello world!" to a NIOS II terminal communicating with the system on the tPad.

Implementation Advice

The standard library, stdio.h, provides the printf procedure, which writes to stdout.

To compile the projects, go Project | Build All.

Go Run | Run Configurations.... Right click on NIOS II Hardware and select New. Change Name and Project name to hello_world. In the Target Connection tab, there should be a single listing under Processors; if not, scroll to the right and click Refresh Connections. Tick both boxes under System ID checks; these relate to debugging devices that have not been included in this architecture. Finally, click Run to upload the binary and open a NIOS II terminal.

If there is no output, you may need to verify your Qsys project, regenerate, recompile and reprogram. In Eclipse, you will then need to right click on the BSP project and go NIOS II | Generate BSP, updating the HAL to reflect the changes.

Previous  |  Contents  |  Next