Exceptions
140
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Architecture
2.3.2.1
Prefetch Aborts
When a Prefetch Abort (PABT) occurs, the processor marks the prefetched instruction as invalid, but does
not take the exception until the instruction is to be executed. If the instruction is not executed, for example
because a branch occurs while it is in the pipeline, the abort does not take place.
All prefetch aborts are precise aborts.
2.3.2.2
Data Aborts
An error occurring on a data memory access can generate a data abort. If the instruction generating the
memory access is not executed, for example, because it fails its condition codes, or is interrupted, the
data abort does not take place.
A Data Abort (DABT) can be either precise or imprecise, depending on the type of fault that caused it.
2.3.2.3
Precise Aborts
A precise abort, also known as a synchronous abort, is one for which the exception is guaranteed to be
taken on the instruction that generated the aborting memory access. The abort handler can use the value
in the Link Register (r14_abt) to determine which instruction generated the abort, and the value in the
Saved Program Status Register (SPSR_abt) to determine the state of the processor when the abort
occurred.
2.3.2.4
Imprecise Aborts
An imprecise abort, also known as an asynchronous abort, is one for which the exception is taken on a
later instruction to the instruction that generated the aborting memory access. The abort handler cannot
determine which instruction generated the abort, or the state of the processor when the abort occurred.
Therefore, imprecise aborts are normally fatal.
Imprecise aborts can be generated by store instructions to normal-type or device-type memory. When the
store instruction is committed, the data is normally written into a buffer that holds the data until the
memory system has sufficient bandwidth to perform the write access. This gives read accesses higher
priority. The write data can be held in the buffer for a long period, during which many other instructions
can complete. If an error occurs when the write is finally performed, this generates an imprecise abort.
The TMS570LC43x microcontroller architecture applies techniques at the system level to mitigate the
impact of imprecise aborts. System level adoption of write status sidebands to the data path allow bus
masters to comprehend imprecise aborts, turning them into precise aborts. In cases where this approach
is not feasible, buffering bridges or other sources of imprecision may build a FIFO of current transactions
such that an imprecise abort may be registered at the point of imprecision for later analysis.
Masking Of Imprecise Aborts:
The nature of imprecise aborts means that they can occur while the processor is handling a different
abort. If an imprecise abort generates a new exception in such a situation, the banked link register
(R14_abt) and the Saved Processor Status Register (SPSR_abt) values are overwritten. If this occurs
before the data is pushed to the stack in memory, the state information about the first abort is lost. To
prevent this from happening, the Current Processor Status Register (CPSR) contains a mask bit to
indicate that an imprecise abort cannot be accepted, the A-bit. When the A-bit is set, any imprecise abort
that occurs is held pending by the processor until the A-bit is cleared, when the exception is actually
taken. The A-bit is automatically set when abort, IRQ or FIQ exceptions are taken, and on reset. The
application must only clear the A-bit in an abort handler after the state information has either been stacked
to memory, or is no longer required.
NOTE:
Default Behavior for Imprecise Aborts
The A-bit in the CPSR is set by default. This means that no imprecise abort exception will
occur. The application must enable imprecise abort exception generation by clearing the A-
bit of the CPSR.