
The central processing unit (CPU)
UM0404
60/564
DocID13284 Rev 2
All instructions that change single bit or bit groups internally use a read-modify-write
sequence that accesses the whole word containing the specified bit(s). This method has
several consequences:
•
Bit can only be modified within the internal specific address areas (IRAM, SFRs...).
External locations cannot be used with bit instructions.
•
The upper 256 bytes of the SFR area, the ESFR area and the IRAM are bit-
addressable (see
Section 2: Memory organization on page 40
). Those register bits
located within the respective sections can be directly manipulated using bit instructions.
The other SFRs must be accessed byte or word wise.
Note:
All GPRs are bit-addressable independently of the allocation of the register bank via the
context pointer CP. Even GPRs which are allocated in not bit-addressable RAM locations
provide this feature.
•
The read-modify-write approach may be critical with hardware-effected bits. In these
cases the hardware may change specific bit while the read-modify-write operation is in
progress, where the writeback would overwrite the new bit value generated by the
hardware. The solution is either the implemented hardware protection (see below) or
realized through special programming (see
Section 3.1.4: Particular pipeline effects on
Protected bits:
As mentioned in
Section 1.6: Protected bits on page 39
(hardware set) are
not modified during a read-modify-write sequence, even if an interrupt request rises
between read and write time. The hardware protection logic guarantees that only the
intended bit(s) is/are effected by the write-back operation.
Note:
If a conflict occurs between a bit manipulation generated by hardware and an intended
software access the software access has priority and determines the final value of the
respective bit (see
Section 1.6: Protected bits on page 39
).
3.3
Instruction execution times
Instruction execution time depends on where the instruction is fetched from and where
operands are read from or written to. When a program is fetched from internal memory,
most of the instructions can be processed in one instruction cycle. All external memory
accesses are performed by the on-chip External Bus Controller (EBC) which works in
parallel with the CPU. This section summarizes the execution times. A detailed description
of the execution times for the various instructions and the specific exceptions can be found
in the
ST10 Family Programming Manual
.
shows the minimum execution times
required to process a ST10F276 instruction fetched from the internal IFlash, the IRAM, or
from external memory. The values are in CPU clock cycles and assume no wait-states. Two
CPU clock cycles are equal to one instruction cycle.
These execution times apply to most of the ST10F276 instructions except some of the
branches, the multiplication, the division and a special move instruction. In case of
execution from the internal Program Memory, there is no execution time dependency on the
instruction length, except for some special branch situations. Because of the short execution
time, execution from on-chip RAM (IRAM and XRAM) is flexible for loadable and modifiable
code. Execution from external memory depends on the selected bus mode and the