Calculating Latency; Standard Interrupt Latency - Intel 8XC196K Series User Manual

Table of Contents

Advertisement

5.4.2

Calculating Latency

The maximum latency occurs when the interrupt request occurs too late for acknowledgment fol-
lowing the current instruction. The following worst-case calculation assumes that the current in-
struction is not a protected instruction. To calculate latency, add the following terms:
Time for the current instruction to finish execution (4 state times).
— if this is a protected instruction, the instruction that follows it must also execute before
the interrupt can be acknowledged. Add the execution time of the instruction that
follows a protected instruction.
Time for the next instruction to execute. (The longest instruction, NORML, takes 39 state
times. However, the BMOV instruction could actually take longer if it is transferring a large
block of data. If your code contains routines that transfer large blocks of data, you may want
to use the BMOV instruction in your calculation instead of NORML. See Appendix A for
instruction execution times.)
For standard interrupts only, the response time to get the vector and force the call
— 11 state times for an internal stack or 13 for an external stack
5.4.2.1

Standard Interrupt Latency

The worst-case delay for a standard interrupt is 56 state times (4 + 39 + 11 + 2) if the stack is in
external memory. This delay time does not include the time needed to execute the first instruction
in the interrupt service routine or to execute the instruction following a protected instruction. Fig-
ure 5-2 illustrates the worst-case scenario.
4 3 2 1
Ending
Execution
Instruction
EXTINT
Pending
Set
Interrupt
Response
Time
39
End
"NORML"
"NORML"
Cleared
56 State Times
Figure 5-2. Standard Interrupt Response Time
STANDARD AND PTS INTERRUPTS
11
2
Call is
If Stack
"PUSHA"
Forced
External
12
6
If Stack
External
Interrupt Routine
A0136-02
5-9

Advertisement

Table of Contents
loading

Table of Contents