Texas Instruments CC2650DK ユーザーズマニュアル

ページ / 1570
Modules
17.4.1.5.6 Flow Control
The sensor controller has support for several powerful flow-control instructions, leading to efficient
execution of control flows.
17.4.1.5.6.1 Non-Loop Flow Control
shows all the non-loop flow-control instructions.
Table 17-8. Non-Loop Flow Control Instructions
Syntax
Description
Operation
Z
N
C
V
jmp addr
Jump direct
pc = addr
-
-
-
-
jsr addr
Jump subroutine
push(stack, pc+1), pc =
-
-
-
-
direct
addr
jmp (rR)
Jump indirect
pc = R0
-
-
-
-
jsr (R0)
Jump subroutine
push(stack, pc+1), pc =
-
-
-
-
indirect
R0
rts
Return subroutine
pc = pop(stack)
-
-
-
-
b<cc> rel
Branch relative if
if (cc) pc+1+rel
-
-
-
-
condition met
bra rel
Branch relative
pc+1+rel
-
-
-
-
bev0 #ev, rel
Branch if event 0
if (!events[ev]) pc+1+rel
-
-
-
-
bev1 #ev, rel
Branch if event 1
if (events[ev]) pc+1+rel
-
-
-
-
For instructions using direct memory addressing, a 10-bit address is embedded in the instruction word,
supporting direct access to 1K memory instructions in the range 0 to 1023. Using the prefix instruction, the
direct memory address can be extended to 16-bit, allowing direct access to 64K memory instructions. 16-
bit addressing is also possible using one of the indirect or the indexed addressing modes.
The b<cc> disp instructions perform conditional branching depending on the condition code flags as
shown in
.
Table 17-9. Conditional Branching
Syntax <cc>
Description
Condtion
gtu
Greater than, unsigned
!C & !Z
geu / iob0
Greater or equal, unsigned / Tested
!C
register bit = 0
eq / z
Equal / Zero
Z
novf
Not overflow
!V
pos
Positive
!N
ges
Greater or equal, signed
(N & V) | (!N & !V)
gts
Greater than, signed
( (N & V) | (!N & !V) ) & !Z
leu
Less or Equal, unsigned
C | Z
ltu / iob1
Less than, unsigned / Tested I/O bit = 1
C
neq / nz
Not Equal / Not Zero
!Z
ovf
Overflow
V
neg
Negative
N
lts
Less than, signed
(N & !V) | (!N & V)
les
Less or equal, signed
(N & !V) | (!N & V) | Z
When the condition tested is true, the next instruction is fetched from instruction memory at a location
equal to the sum of address of the instruction following the branch instruction, and an 8-bit signed
displacement in the range -128 to +127 embedded in the instruction word itself. When the condition tested
is false, instruction fetching continues sequentially. In addition to the above mentioned conditional
branches, an unconditional relative branch bra disp also exists.
1196
AUX – Sensor Controller with Digital and Analog Peripherals
SWCU117A – February 2015 – Revised March 2015
Copyright © 2015, Texas Instruments Incorporated