FONT SIZE : AAA
Interrupt Signals
The PS IOP interrupt signals are routed to the PL and are asserted asynchronously to the FCLK clocks. Going the other way, the PL can assert up to 20 interrupts asynchronously to the PS, with up to 16 of the interrupt signals mapped to the interrupt controller as a peripheral interrupt. Each interrupt signal is mapped to one or both of the CPUs and is set to a priority level. The four remaining PL interrupt signals are inverted and directly routed to the nIRQ and nFIQ signals of the Private Peripheral Interrupt (PPI) unit of the interrupt controller. Each CPU has its own nIRQ and nFIQ signal. The relevant interrupt signals between the PS and PL are summarised in Table 10.10 [5].
Generic Interrupt Controller (GIC)
The general interrupt controller is based on the non-vectored ARM General Interrupt Controller Architecture v1.0.
The controller manages interrupts that are sent to the CPUs from the PS and the PL. It is a centralised resource, and is capable of enabling, disabling, masking and prioritising interrupt sources, sending them to the appropriate CPU(s) in a programmed manner as the next interrupt is accepted by the CPU interface [5]. The controller also supports security extension for the implementation of a security-aware system [5].
GIC registers are accessed via the CPU private bus which ensures fast read/write response times by avoiding bottlenecks and temporary blockages in the interconnect [5].
All interrupt sources are centralised by the interrupt distributor before the one with the highest priority is dispatched to the individual CPUs. The GIC also ensures that an interrupt that targets more than one CPU can only be taken by a single CPU at a time. A unique interrupt ID number identifies each interrupt source, and have their own configurable priority and list of targeted CPUs [5].
Interrupt Sources
An overview of the individual interrupt sources is provided in this section, covering:
• CPU Private Peripheral Interrupts (PPIs) • PL and PS Shared Peripheral Interrupts (SPIs) • Software Generated Interrupts (SGIs)
A block diagram of the interrupt sources is outlined in Figure 10.7.
CPU Private Peripheral Interrupts (PPI)
Each CPU core connects to a private set of five peripheral interrupts, which are summa rised in Table 10.11 [5].
The GIC must be programmed to accommodate the fact that all PPI sensitivity types are fixed by the requesting sources and cannot be changed. These registers are not programmed by the Boot ROM, and therefore the GIC must be programmed to accom modate these sensitivity types by the SDK device drivers [5].
It is worth noting that both the interrupt (IRQ) and fast interrupt (FIQ) signals from the PL are inverted when transferring to the PS, before being sent to the interrupt controller. The signals are therefore active High in the PS at the PS-PL interface before being inverted to active Low level in the PL.
Shared Peripheral Interrupts (SPI)
A group of roughly 60 interrupts from various modules can be routed to the PL or one or both of the CPUs. The prioritisation and reception of those of the interrupts that are destined for the CPUs is managed by the interrupt controller [5].
As with PPIs, the interrupt sensitivity types of SPIs are fixed by the requesting sources and cannot be changed. The SDK drivers must program the GIC to accommodate the sensitivity types.
The various SPI interrupts are summarised in Table 10.12.
Software Generated Interrupts (SGI)
Each CPU core is capable of interrupting both CPUs, the other CPU or itself using a SGI. There are 16 SGIs, which are summarised in Table 10.13 [5]. An SGI is generated by writing the SGI interrupt number to the Software Generated Interrupts Register (ICDSGIR) and specifying the target CPU, or CPUs. The write is carried out on the CPU private bus of the source CPU. A separate set of SGI registers is available to each CPU, allowing them to generate one or more of the 16 software generated interrupts. The interrupts are cleared by either reading the Interrupt Acknowledge Register (ICCIAR) or by writing a value of ‘1’ to the corresponding bits of the Interrupt Clear-Pending Register (ICDICPR) [5].
All SGIs are edge triggered, and the sensitivity types for them are fixed and cannot be changed.
Interrupt Prioritisation and Handling
This section will briefly touch upon the way in which interrupts are prioritised and handled by Zynq devices.
Interrupt Prioritisation
All interrupt requests, whether they are PPI, SGI or SPI, are assigned a unique ID number which is used by the interrupt controller to arbitrate. A list of pending interrupts for each CPU is held by the interrupt distributor, which will select the highest priority interrupt before asserting it to the CPU interface. If two interrupts of equal priority arrive at the same time, the one with the lowest interrupt ID is issued first [5].
Prioritisation logic exists for each CPU, enabling the highest priority interrupt to be selected for each CPU. The central list of interrupts, processors and activation information is held by the interrupt distributor which is then responsible for triggering software interrupts to the CPUs [5]. In order to provide a separate copy for each processor, the SGI and PPI distributor registers are banked. Logic ensures that an interrupt targeting more than one CPU can only be taken by one CPU at a time [5]
Upon transmission of the highest pending interrupt to the CPU interfaces, the interrupt distributor will receive back an acknowledgement from the CPU allowing it to change the status of the corresponding interrupt. The interrupt can only be ended by the CPU that acknowledges the interrupt [5].
Interrupt Handling
The interrupt distributor operates a state machine for each supported interrupt on each CPU interrupt. The possible interrupt states are [1]:
• inactive
• pending
• active
• active and pending
When the interrupt controller receives an interrupt request, it will mark the state of that request as pending. The regeneration of a pending interrupt does not affect the state of that interrupt [1]. Once the interrupt has been acknowledged, the status changes from pending to active and pending if the pending state of the interrupt persists after the interrupt has become active, or the interrupt is generated again. Otherwise, the status is changed from pending to active [1]. When the interrupt controller receives confirmation from the processor that the interrupt handling has been completed, the status of the interrupt is changed from active to inactive, provided that the interrupt has not been generated again. Otherwise, it is changed from pending and active to pending.
Further information on the handling of interrupts by the GIC is covered in Chapter 3 Interrupt Handling and Prioritization of the ARM Generic Interrupt Controller Architecture Specification [1]
Further Reading
It is impossible to cover all aspects of interrupts within the confines of this chapter; the ARM specification of the GIC is over 150 pages long! With that being the case, a few of the topics that can be found in the ARM Generic Interrupt Controller Architecture Specification [1] are highlighted below:
• GIC security extensions
• Interrupt handling state machines
• Programmers model interface to the GIC
• Details of GIC registers
• Distributor and CPU interface
Manufacturer:Xilinx
Product Categories:
Lifecycle:Obsolete -
RoHS:
Manufacturer:Xilinx
Product Categories: FPGAs
Lifecycle:Obsolete -
RoHS:
Manufacturer:Xilinx
Product Categories: FPGAs
Lifecycle:Active Active
RoHS:
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Active Active
RoHS:
Manufacturer:Xilinx
Product Categories: CPLD/FPGA
Lifecycle:Obsolete -
RoHS:
Support