Texas Instruments CC2650DK 사용자 설명서

다운로드
페이지 1570
Modules
The branch- event instructions bev0 and bev1 perform conditional branching, depending on event inputs
provided directly to the sensor controller from its event input. These are the same events as for the wev0
and wev1 instructions, and are described in
Sensor Controller Events.
This branching allows efficient control processing, based on external events. The instruction word embeds
a 3-bit event ID in the instruction word, directly supporting 8 external events, and more can be selected
using the prefix instruction.
Each event can be tested for being deasserted (0) or asserted (1). When the selected event input has the
expected value, the address of the next instruction to execute is determined using an 8-bit signed
displacement in the instruction word, as for the b<cc> disp instructions described above. When the
selected event input does not have the expected value, instruction fetching continues sequentially.
17.4.1.5.6.2
Loop Flow Control
The loop instructions constitute a special group of flow-control instructions that allow iterative loops to be
efficiently coded and executed.
shows the instructions.
Table 17-10. Loop Flow Instructions
Mnemonic
Description
Operation
Z
N
C
V
loop R1,rel
Loop register
(1)
loopcount = R1, loopstart = pc+1,
-
-
-
-
loopend = pc+rel
loop #n,rel
Loop
loopcount = n, loopstart = pc+1,
-
-
-
-
immediate
(1)
loopend = pc+rel
(1)
The Sensor Controller Studio assembler offsets the end-of-loot label, so it can be placed after the last instruction of the loop.
A loop instruction is executed just before the first instruction of a loop, and causes the following:
The address of the following instruction – the first instruction of the loop itself – is stored in an internal
register loopstart
The address of the instruction following the last instruction of the actual loop is determined using an 8-
bit signed displacement in the instruction word, as for the b<cc> disp instructions. The resulting
address is stored in the internal register loopend
The number of loop iterations, as determined by either the content of the r1 register or a 3-bit
immediate in the instruction word, is stored in an internal register loopcount
The loop control logic is armed.
Instruction execution continues unaffected until the address of the next instruction to be executed matches
the address stored in loopend. When this happens, loopcount is decremented, and if non-0, a branch to
the address in loopstart is executed. If loopcount is 0 after being decremented, the loop control logic is
disarmed, and instruction fetching continues sequentially.
Since there are only one set of the loopstartloopend, and loopcount registers, and these registers are not
read- or writable from other instructions, loops using the loop instructions cannot be nested. The loop
instructions are intended for use in the innermost loop only.
The loop immediate instructions provide direct support for seven commonly-used iteration counts of 2, 4,
8, 16, 32, 64, and 128 through encoding of a 3-bit field embedded in the instruction word, thus not
requiring the use of register R1.
17.4.1.5.7 Events, Sleep, and Power Management
To support low-power operation, the sensor controller supports a suspend mode where instruction
execution is halted, internal state is frozen, and the clock is stopped completely under control of external
events.
shows the instructions that provide additional power management features.
1197
SWCU117A – February 2015 – Revised March 2015
AUX – Sensor Controller with Digital and Analog Peripherals
Copyright © 2015, Texas Instruments Incorporated