Altera DE2-70 Dokumentacja Strona 27

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 35
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Komentarze do niniejszej Instrukcji

Brak uwag