Specifications

326 www.xilinx.com Embedded System Tools Guide (EDK 6.2i)
1-800-255-7778 UG111 (v1.4) January 30, 2004
Chapter 23: Interrupt Management
R
store these routines corresponding to each of the interrupt signal. If an interrupt is active,
the interrupt controller handler calls the routine correponding to it. An argument can be
associated with such routines which gets passed when calling the routine. The vector table
used by the interrupt controller handler is automatically generated by libgen.
The association of an ISR for a peripheral interrupt signal can be done either in the MSS file
or registered at run time using the function provided by the interrupt controller
driver(XIntc_Connect, XIntc_RegisterHandler). These functions work on the vector table
generated by libgen. For mor information on the exact prototype of thse functions, refer to
the Device Drivers documentation. If the ISR’s are specified n the MSS file, libgen
automatically registers these routines with the vector table of the interrupt controller
driver listed in the order of priority. The base address of the peripherals are registered as
the arguments to be passed to the ISR in the vector table. The following MSS snippet shows
how to register the ISR for a peripheral interrupt signal :
BEGIN DRIVER
parameter HW_INSTANCE = Peripheral_1
parameter DRIVER_NAME = Peripheral_1_driver
parameter DRIVER_VER = 1.00.a
parameter INT_HANDLER = peripheral_1_int_handler, INT_PORT =
Priority1_Interrupt
END
Limitations
The following are the limitations for interrupt management using an interrupt controller
peripheral :
x The priorities associated with the interrupt sources connected the interrupt controller
peripheral are fixed statically at the time of definition in the MHS file. The priorites
cannot be changed dynamically (in user code).
x There cannot be any holes in the range of interrupt sources defined in the MHS file.
For example, in the MHS file snippet used above, a definition like the following is not
acceptable :
port Intr = Priority4_interrupt & 0b0 & Priority2_interrupt ...
Peripheral with an Interrupt port
A peripheral with an interrupt portr can be directly connected to MicroBlaze as shown in
Figure 23-2. In this case, the user is responsible for writing interrupt handler for the
peripheral interrupt signal. The following MHS snippet describes the connectivity
between MicroBlaze and a peripheral instance (say, opb_timer) :
BEGIN opb_timer
parameter INSTANCE = mytimer
parameter HW_VER = 1.00.b
parameter C_BASEADDR = 0xFFFF0000
parameter C_HIGHADDR = 0xFFFF00ff
bus_interface SOPB = opb_bus
port Interrupt = interrupt
port CaptureTrig0 = net_gnd
END
begin microblaze
parameter INSTANCE = mblaze
parameter HW_VER = 1.00.c
bus_interface DOPB = opb_bus