IAS:
Interrupts



You use the interrupt mechanism in IAS to schedule interrupts a given number of instructions in the future, optionally repeating after a fixed interval. All time intervals mentioned in this document are in terms of the number of instructions that are executed, since that is the smallest quantum of execution in IAS. The action of taking an emulation-trap is counted as one instruction. Whether you use interrupts or not, the performance impact due to this mechanism is nominal.

Behavior

IAS maintains all interrupts in a queue. When the time for the earliest enabled interrupt arrives, IAS behaves exactly as if the pj_irl/pj_nmi pins to the picoJava core had been set to a specific value, that is, it resolves the interrupt level through the PSR control bits and so on. Interrupt request levels can vary from 1 to 15 on the pj_irl pins (0 => no interrupt); as a special case, the intr commands treat an IRL specification of 0 as being equivalent to scheduling an NMI or asserting the pj_nmi pin.

If you schedule multiple interrupts at the same time, the one with the highest priority overrides the others, which are effectively lost.

Note - A scheduled interrupt instantly puts the pj_irl pins to the specified IRL value: Once set, the pj_irl pin remains at that value until the next change. The only other mechanism of changing the pj_irl pin that is seen by the simulator is a write to the interrupt_ack address, which sets the state of pj_irl and pj_nml back to zero.

Once you have scheduled a nonrepeating interrupt, it is disabled. You can also explicitly disable a scheduled interrupt. However, you can disable interrupts only, not delete them. This is a known and accepted limitation and will not be fixed.

Currently, the maximum number of interrupts you can schedule is 1,000.

Commands

Following are commands for interrupts:

intr list Lists all interrupts that are currently scheduled.
intr IRL number Schedules an interrupt number of instructions from now with IRL.
intr repeat IRL number Schedules a repeating interrupt every number of instructions with IRL.
intr disable number Cancels a scheduled interrupt.

For example:

% intr 2031 2
(Schedule an irl-2 interrupt after 2,031 instructions.)

% intr repeat 1000 5
(Schedule a periodic 1,000-instruction interrupt.)

% intr 2031 1
(Schedule an irl-1 interrupt after 2,031 instructions.)

% intr 3000 0
(Schedule an NMI after 3,000 instructions.)

% intr list

IAS outputs:

Intr#  Enabled    Next Intr at    IRL     Repeating   Repeat-frequency
0        Yes           2061        2          No
1        Yes           1030        5          Yes          1000
2        Yes           2061        1          No
3        Yes           3030       NMI        No
Current instruction count is 30
Next interrupt event (#1) is scheduled at instruction count 1030

% intr disable 2
% intr list

IAS outputs:

Intr#  Enabled    Next Intr at    IRL     Repeating   Repeat-frequency
0        Yes           2061        2          No
1        Yes           1030        5          Yes          1000
2        No
3        Yes           3030       NMI         No
Current instruction count is 30
Next interrupt event (#1) is scheduled at instruction count 1030

IAS


Copyright © 1999 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303-4900 USA. All rights reserved.


Last modified 24-March-1999