Programmable interrupt controller
This article relies largely or entirely on a single source. (February 2014)
This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (September 2013) (Learn how and when to remove this template message)
In computing, a programmable interrupt controller (PIC) is an integrated circuit that helps microprocessor (or CPU) to handle interrupt requests (IRQ) coming from multiple different sources (like external I/O devices) which may come (get fired) simultaneously. It helps to prioritize IRQs so that CPU switches execution to the most appropriate interrupt handler (ISR) after the PIC assesses the IRQs' relative priorities. Common modes of a PIC include hard priorities, rotating priorities, and cascading priorities. PICs often allow the cascading of their outputs to inputs between each other. On PC architecture PIC are typically ebedded into a southbridge chips whose internal architecture is defined by chipsets' vendors' standards.
PICs typically have a common set of registers: Interrupt Request Register (IRR), In-Service Register (ISR), Interrupt Mask Register (IMR). The IRR specifies which interrupts are pending acknowledgement, and is typically a symbolic register which can not be directly accessed. The ISR register specifies which interrupts have been acknowledged, but are still waiting for an End Of Interrupt (EOI). The IMR specifies which interrupts are to be ignored and not acknowledged. A simple register schema such as this allows up to two distinct interrupt requests to be outstanding at one time, one waiting for acknowledgement, and one waiting for EOI.
There are a number of common priority schemas in PICs including hard priorities, specific priorities, and rotating priorities.
There are a number of common ways of acknowledging an interrupt has completed when an EOI is issued. These include specifying which interrupt completed, using an implied interrupt which has completed (usually the highest priority pending in the ISR), and treating interrupt acknowledgement as the EOI.
One of the best known PICs, the 8259A, was included in the x86 PC. In modern times, this is not included as a separate chip in an x86 PC, but rather as part of the motherboard's southbridge chipset. In other cases, it has been replaced by the newer Advanced Programmable Interrupt Controllers which support more interrupt outputs and more flexible priority schemas.
- Intel 8259 - Notable PIC from Intel
- Advanced Programmable Interrupt Controller (APIC)
- OpenPIC and IBM MPIC
- Inter-processor interrupt (IPI)
- Interrupt handler
- Interrupt request (IRQ)
- Interrupt latency
- Non-maskable interrupt (NMI)
- IRQL (Windows)
More information on the Intel APIC can be found in the IA-32 Intel Architecture Software Developer's Manual, Volume 3A: System Programming Guide, Part 1, Chapter 10, freely available on the Intel website.
- "Interrupt Controller - an overview | ScienceDirect Topics". www.sciencedirect.com. Retrieved 2020-07-26.