11.07.2015 Views

Nios II Processor Reference Handbook

Nios II Processor Reference Handbook

Nios II Processor Reference Handbook

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Device & Tools SupportWhen the Synchronously capture option is turned off, the edgecaptureregister does not exist.InterruptWhen the Generate IRQ option is turned on, the PIO core is able to assertan IRQ output when a specified event occurs on input ports. The usermust further specify the cause of an IRQ event:■■Level—The core generates an IRQ whenever a specific input is highand interrupts are enabled for that input in the interruptmaskregister.Edge—The core generates an IRQ whenever a specific bit in the edgecapture register is high and interrupts are enabled for that bit in theinterruptmask register.When the Generate IRQ option is turned off, the interruptmaskregister does not exist.Device & ToolsSupportSoftwareProgrammingModelfThe PIO core supports all Altera ® FPGA families.This section describes the software programming model for the PIO core,including the register map and software constructs used to access thehardware. For <strong>Nios</strong> ® <strong>II</strong> processor users, Altera provides the HAL systemlibrary header file that defines the PIO core registers. The PIO core doesnot match the generic device model categories supported by the HAL, soit cannot be accessed via the HAL API or the ANSI C standard library.The <strong>Nios</strong> <strong>II</strong> Development Kit provides several example designs thatdemonstrate usage of the PIO core. In particular, the count_binary.cexample uses the PIO core to drive LEDs, and detect button pressesusing PIO edge-detect interrupts.Software FilesThe PIO core is accompanied by one software file,altera_avalon_pio_regs.h. This file defines the core’s register map,providing symbolic constants to access the low-level hardware.7–6 Altera Corporation<strong>Nios</strong> <strong>II</strong> <strong>Processor</strong> <strong>Reference</strong> <strong>Handbook</strong> September 2004

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!