English
Language : 

C161 Datasheet, PDF (21/400 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller
&3,
$UFKLWHFWXUDO 2YHUYLHZ
High Performance Branch-, Call-, and Loop Processing
Due to the high percentage of branching in controller applications, branch instructions
have been optimized to require one extra machine cycle only when a branch is taken.
This is implemented by precalculating the target address while decoding the instruction.
To decrease loop execution overhead, three enhancements have been provided:
• The first solution provides single cycle branch execution after the first iteration of a loop.
Thus, only one machine cycle is lost during the execution of the entire loop. In loops
which fall through upon completion, no machine cycles are lost when exiting the loop. No
special instructions are required to perform loops, and loops are automatically detected
during execution of branch instructions.
• The second loop enhancement allows the detection of the end of a table and avoids
the use of two compare instructions embedded in loops. One simply places the lowest
negative number at the end of the specific table, and specifies branching if neither this
value nor the compared value have been found. Otherwise the loop is terminated if either
condition has been met. The terminating condition can then be tested.
• The third loop enhancement provides a more flexible solution than the Decrement and
Skip on Zero instruction which is found in other microcontrollers. Through the use of
Compare and Increment or Decrement instructions, the user can make comparisons to
any value. This allows loop counters to cover any range. This is particularly
advantageous in table searching.
Saving of system state is automatically performed on the internal system stack avoiding
the use of instructions to preserve state upon entry and exit of interrupt or trap routines.
Call instructions push the value of the IP on the system stack, and require the same
execution time as branch instructions.
Instructions have also been provided to support indirect branch and call instructions.
This supports implementation of multiple CASE statement branching in assembler
macros and high level languages.
User’s Manual
2-5
1999-08