nios_custom pci_bridge
API Reference Manual  /  4 Model-to-Model Interfaces  / 

nios_eic

Description
The nios_eic must be implemented by devices that acts as Nios® External Interrupt Controllers. After the external IRQ signal in the CPU has been raised, the CPU will query the registered External Interrupt Controller for information about the current interrupt request. When the CPU calls the handled function, it has finished processing the request.

The handler function should return the logical address of the interrupt handler.

The level should return the interrupt level.

The reg_set should return the shadow register set number.

The nmi should indicate if this is a non-maskable interrupt.

See Intel® Nios® II processor reference guide page 3-41 for further information.

SIM_INTERFACE(nios_eic) {
        logical_address_t (*handler)(conf_object_t *NOTNULL obj);
        uint32 (*level)(conf_object_t *NOTNULL obj);
        uint32 (*reg_set)(conf_object_t *NOTNULL obj);
        bool (*nmi)(conf_object_t *NOTNULL obj);

        void (*handled)(conf_object_t *NOTNULL obj);
};

#define NIOS_EIC_INTERFACE "nios_eic"

Execution Context
Cell Context for all methods.

nios_custom pci_bridge