Altera DE2-70 Specifikace Strana 27

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 35
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Komentáře k této Příručce

Žádné komentáře