Altera DE2-70 Spezifikationen Seite 27

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 35
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 26
27
3.5 Running the Application Program:
Having configured the required hardware in the FPGA device, it is now necessary to create and
execute an application program that performs the desired operation. This can be done by writing
the required program either in the Nios II assembly language or in a high-level language such
as C.
A Nios II assembly-language program that implements the trivial task of light control circuit is
shown as:
.include "nios_macros.s"
.equ Switches, 0x00001800
.equ LEDs, 0x00001810
.global _start
_start:
movia r2, Switches
movia r3, LEDs
loop: ldbio r4, 0(r2)
stbio r4, 0(r3)
br loop
Seitenansicht 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Kommentare zu diesen Handbüchern

Keine Kommentare