Specifications
28
The program loads the addresses of the Data registers in the two PIOs into processor registers
r2 and r3. It then has an infinite loop that merely transfers the data from the input PIO, Switches,
to the output PIO, LEDs.
The program includes the assembler directive
.include "nios_macros.s"
which informs the Assembler to use the Nios II macros that specify how the movia
pseudoinstructions can be assembled.
The directive
.global _start
indicates to the Assembler that the label _start is accessible outside the assembled object file.
This label is the default label we use to indicate to the Linker program the beginning of the
application program. This code is entered into a file lights.s and placed the file into a working
directory.
3.6 Altera debug client:
Altera provides the monitor software, called Altera Debug Client, for use with the DE2 board.
This software provides a simple means for compiling, assembling and downloading of programs
into a Nios II system implemented on a DE2 board. It also makes it possible for the user to
perform debugging tasks.