<html>
<head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>
   scugic v2_1
</title>
<link href="$DriverApiDocsCssPath" rel="stylesheet" type="text/css">
</head>
<h3 class="PageHeader">Xilinx Processor IP Library</h3>
<hl>Software Drivers</hl>
<hr class="whs1">
<!-- Generated by Doxygen 1.4.5 -->
<div class="tabs">
  <ul>
    <li id="current"><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<h1>scugic v2_1</h1>
<p>
The generic interrupt controller driver component.<p>
The interrupt controller driver uses the idea of priority for the various handlers. Priority is an integer within the range of 1 and 31 inclusive with default of 1 being the highest priority interrupt source. The priorities of the various sources can be dynamically altered as needed through hardware configuration.<p>
The generic interrupt controller supports the following features:<p>
<ul>
<li>specific individual interrupt enabling/disabling</li><li>specific individual interrupt acknowledging</li><li>attaching specific callback function to handle interrupt source</li><li>assigning desired priority to interrupt source if default is not acceptable.</li></ul>
<p>
Details about connecting the interrupt handler of the driver are contained in the source file specific to interrupt processing, <a class="el" href="xscugic__intr_8c.html">xscugic_intr.c</a>.<p>
This driver is intended to be RTOS and processor independent. It works with physical addresses only. Any needs for dynamic memory management, threads or thread mutual exclusion, virtual memory, or cache control must be satisfied by the layer above this driver.<p>
<b>Interrupt Vector Tables</b><p>
The device ID of the interrupt controller device is used by the driver as a direct index into the configuration data table. The user should populate the vector table with handlers and callbacks at run-time using the <a class="el" href="xscugic_8c.html#27e3af2662c65df60b3d0211c68162f9">XScuGic_Connect()</a> and <a class="el" href="xscugic_8c.html#f35fc828e3ecd0472a950fb0e912f5b0">XScuGic_Disconnect()</a> functions.<p>
Each vector table entry corresponds to a device that can generate an interrupt. Each entry contains an interrupt handler function and an argument to be passed to the handler when an interrupt occurs. The user must use <a class="el" href="xscugic_8c.html#27e3af2662c65df60b3d0211c68162f9">XScuGic_Connect()</a> when the interrupt handler takes an argument other than the base address.<p>
<b>Nested Interrupts Processing</b><p>
Nested interrupts are not supported by this driver.<p>
NOTE: The generic interrupt controller is not a part of the snoop control unit as indicated by the prefix "scu" in the name of the driver. It is an independent module in APU.<p>
<pre>
 MODIFICATION HISTORY:</pre><p>
<pre> Ver   Who  Date     Changes
 ----- ---- -------- ---------------------------------------------------------
 1.00a drg  01/19/00 First release
 1.01a sdm  11/09/11 The <a class="el" href="struct_x_scu_gic.html">XScuGic</a> and <a class="el" href="struct_x_scu_gic___config.html">XScuGic_Config</a> structures have changed.
		      The HandlerTable (of type XScuGic_VectorTableEntry) is
		      moved to <a class="el" href="struct_x_scu_gic___config.html">XScuGic_Config</a> structure from <a class="el" href="struct_x_scu_gic.html">XScuGic</a> structure.</pre><p>
<pre>		      The "Config" entry in <a class="el" href="struct_x_scu_gic.html">XScuGic</a> structure is made as
		      pointer for better efficiency.</pre><p>
<pre>		      A new file named as <a class="el" href="xscugic__hw_8c.html">xscugic_hw.c</a> is now added. It is
		      to implement low level driver routines without using
		      any xscugic instance pointer. They are useful when the
		      user wants to use xscugic through device id or
		      base address. The driver routines provided are explained
		      below.
		      XScuGic_DeviceInitialize that takes device id as
		      argument and initializes the device (without calling
		      XScuGic_CfgInitialize).
		      XScuGic_DeviceInterruptHandler that takes device id
		      as argument and calls appropriate handlers from the
		      HandlerTable.
		      XScuGic_RegisterHandler that registers a new handler
		      by taking xscugic hardware base address as argument.
		      LookupConfigByBaseAddress is used to return the
		      corresponding config structure from XScuGic_ConfigTable
		      based on the scugic base address passed.
 1.02a sdm  12/20/11 Removed AckBeforeService from the <a class="el" href="struct_x_scu_gic___config.html">XScuGic_Config</a>
		      structure.
 1.03a srt  02/27/13 Moved Offset calculation macros from *.c and *_hw.c to
		      *_hw.h
		      Added APIs<ul>
<li><a class="el" href="xscugic__hw_8c.html#176144512a1c81f6b4f2ad2c51dce289">XScuGic_SetPriTrigTypeByDistAddr()</a></li><li><a class="el" href="xscugic__hw_8c.html#57ce50ab23b8fed89ff9d5f80e4e3591">XScuGic_GetPriTrigTypeByDistAddr()</a>
		      (CR 702687)
			Added support to direct interrupts to the appropriate CPU. Earlier
			  interrupts were directed to CPU1 (hard coded). Now depending
			  upon the CPU selected by the user (xparameters.h), interrupts
			  will be directed to the relevant CPU. This fixes CR 699688.
 1.04a hk   05/04/13 Assigned EffectiveAddr to CpuBaseAddress in
			  XScuGic_CfgInitialize. Fix for CR#704400 to remove warnings.
			  Moved functions XScuGic_SetPriTrigTypeByDistAddr and
             XScuGic_GetPriTrigTypeByDistAddr to <a class="el" href="xscugic__hw_8c.html">xscugic_hw.c</a>.
			  This is fix for CR#705621.
 1.05a hk   06/26/13 Modified tcl to export external interrupts correctly to
                     xparameters.h. Fix for CR's 690505, 708928 &amp; 719359.
 2.0   adk  12/10/13 Updated as per the New Tcl API's
 2.1   adk  25/04/14 Fixed the CR:789373 changes are made in the driver tcl file.</li></ul>
</pre><p>
<pre> </pre> Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.