OSDN Git Service

* public snapshot of sid simulator
[pf3gnuchains/pf3gnuchains3x.git] / sid / component / interrupt / hw-interrupt-arm_ref.txt
1 * Name
2   hw-interrupt-arm/ref
3
4 * Synopsis
5   This component simulates the ARM reference interrupt controller.
6
7   Pins: reset interrupt fast-interrupt fast-interrupt-source
8         interrupt-source-0..interrupt-source-31
9   Buses: irq-registers fiq-registers
10   Attributes: interrupt fast-interrupt irq-raw-status irq-enable-register
11         fiq-raw-status fiq-enable-register
12
13   Library: libinterrupt.la
14   Symbol name: interrupt_component_library
15
16 * Functionality
17
18   - Modelling
19    
20     * The interrupt controller model features a fast interrupt line
21       (to be attached to the fIRQ line of the CPU) and 32 general
22       purpose interrupts.
23
24     * This component models ARM's abstract reference interrupt
25       controller, which is not exactly the same as the one found on
26       the PID7T evaluation board.  The version on the PID7T board has
27       an additional "FIQSelect" register, and only 15 IRQ source pins.
28
29   - Behaviors
30
31     * Reset
32
33       When the "reset" input pin is driven, this component is reset to
34       the hardware's normal power-up state.
35
36     * Register access
37
38       There are two available register busses for this model.  The normal
39       IRQ registers are available on the "irq-registers" bus, and the FIQ
40       (fast) registers are available on the "fiq-registers" bus.  Typically,
41       one would map the "fiq-registers" with an offset of 0x100 from the
42       "irq-registers". This allows one to map other devices between these
43       registers.
44
45       When the "irq-registers" bus is accessed, the appropriate 32-bit
46       control register is read or written.
47
48         address         read            write
49         0               IRQStatus       (reserved)
50         0x4             IRQRawStatus    (reserved)
51         0x8             IRQEnable       IRQEnableSet
52         0xC             (reserved)      IRQEnableClear
53         0x10            (reserved)      IRQSoft
54
55       When the "fiq-registers" bus is accessed, the appropriate 32-bit
56       control register is read or written.
57
58         address         read            write
59         0x0             FIQStatus       (reserved)
60         0x4             FIQRawStatus    (reserved)
61         0x8             FIQEnable       FIQEnableSet
62         0xC             (reserved)      FIQEnableClear
63
64       Several registers are also available as watchable attributes.
65
66     * Interrupt processing
67
68       When any interrupt source is signalled, or interrupt-enabled
69       masks are modified, pending interrupts are processed.  There are
70       three interrupt sources: the "interrupt-source-N" input pins,
71       the "fast-interrupt-source" input pin, and the special software
72       interrupt register.  Subject to the then-current
73       interrupt-enabling registers, an "interrupt" and/or
74       "fast-interrupt" output pin may be driven.
75
76       The polarity for the input interrupt source pins is positive,
77       meaning that non-zero values are interpreted as "asserted".  On
78       the other hand, the polarity for the output interrupt pins is
79       negative, meaning that zero values are to be interpreted as
80       "asserted".  
81
82       Similarly named attributes may be used to generate/monitor pin
83       traffic.
84
85   - SID conventions
86   
87   * This is a functional component.
88   * This component supports state save/restore and triggerpoints.
89
90 * Environment
91
92   - Related components
93     The interrupt controller typically sits between a CPU component, which 
94     usually has only one interrupt pin, and an array of other peripheral 
95     components.  Each of the peripheral components is capable of generating 
96     its own interrupt.  The following configuration file fragment
97     demonstrates how to connect to simple timers into the interrupt
98     subsystem of a more complete simulation:
99
100         new hw-cpu-arm7t cpu
101         new hw-timer-arm/ref-nosched timer1
102         new hw-timer-arm/ref-nosched timer2
103         new hw-interrupt-arm/ref intcontrl
104         connect-pin timer1 interrupt -> intcontrl interrupt-source-0
105         connect-pin timer2 interrupt -> intcontrl interrupt-source-1
106         connect-pin intcontrl interrupt -> cpu nirq
107
108 * SID interface reference
109
110   - low level:
111     * pins
112       - reset | input | any | reset
113       - fast-interrupt-source | input | any | interrupt handling
114       - interrupt-source-[0,31] | input | any | interrupt handling
115       - fast-interrupt | output | 0,1 | interrupt handling
116       - interrupt | output | 0,1 | interrupt handling
117
118     * buses
119       - irq-registers | 0x0 - 0x1C | read/write | register access
120       - fiq-registers | 0x0 - 0x0F | read/write | register access
121
122     * attributes
123       - interrupt | pin watchable | numeric | n/a | interrupt handling
124       - fast-interrupt | pin watchable | numeric | n/a | interrupt handling
125       - irq-raw-status | register watchable | numeric | n/a | register access
126       - irq-enable-register | register watchable | numeric | n/a | register access
127       - fiq-raw-status | register watchable | numeric | n/a | register access
128       - fiq-enable-register | register watchable | numeric | n/a | register access
129
130 * References
131   <http://www.arm.com/Documentation/UserMans/rps/#int>
132
133