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

ページ / 1570
Modules
17.4.1.5 Instruction Set
The sensor controller instruction set is compact, powerful, and highly regular. The sensor controller is
based on the traditional RISC concept of having all operands in the registers, or in an immediate field
embedded directly in the instruction opcode.
Data memory can only be accessed using load and store operations, while I/O ports can be accessed
using input and output instructions as well as special bit-manipulation instructions.
For dyadic operations, the destination register appears to the left in the mnemonic except for memory and
I/O operations, where the memory and port address is always the right operand.
The following sections describes all instructions. Each table shows the instruction, the mnemonic, an
informal and a formal description of the operation performed, and how the flags Zero (Z), Negative (N),
Carry (C), and Overflow (V) are updated. The operation description is described as right-associative.
17.4.1.5.1 Memory Access
The sensor controller load and store (ld and st) instructions allow reading and writing data from or to the
AUX_RAM.
Load and store instructions transfer data between an integer register and a location in the data memory,
the address of which is determined by the current addressing mode.
shows the load and store instructions.
Table 17-3. Load and Store Instructions
Syntax
Description
Operation
Z
N
C
V
ld Rd,addr
Load direct
Rd = mem[addr]
-
-
-
-
ld Rd,(Rs)
Load indirect
Rd = mem[Rs]
-
-
-
-
ld Rd,(Rs)++
Load indirect, post-
Rd = mem[Rs], Rs++
-
-
-
-
increment
ld Rd,(Rs+R0)
Load indexed
Rd = mem[Rs+R0]
-
-
-
-
st Rd,addr
Store direct
mem[addr] = Rd
-
-
-
-
st Rd,(Rs)
Store indirect
mem[Rs] = Rd
-
-
-
-
st Rd,(Rs)++
Store indirect, post-
mem[Rs] = Rd, Rs++
-
-
-
-
increment
st Rd,(Rs+r0)
Store indexed
mem[Rs+r0] = Rd
-
-
-
-
For instructions using direct-memory addressing, a 10-bit address is embedded in the instruction word,
supporting direct access to 1K memory words 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 words. 16-bit
addressing of memory is also possible using indirect or indexed addressing.
17.4.1.5.2 I/O Access
For the sensor controller to access the other peripherals in AUX_PD (address range 0x400C 0000 to
0x400C FFFF), it must use the input and output instructions (in and out), using only the 16 lowest bits of
the 32-bit address.
Input and output instructions transfer data between an integer register and a peripheral register, the
address of which is determined by the current addressing mode.
shows the input and output instructions available.
Table 17-4. Input and Output Instructions
Syntax
Description
Operation
Z
N
C
V
in Rd,[#addr]
Input direct
Rd = reg[addr]
-
-
-
-
in Rd,(Rs)
Input indirect
Rd = reg[Rs]
-
-
-
-
out Rd,[#addr]
Output direct
reg[addr] = Rd
-
-
-
-
1193
SWCU117A – February 2015 – Revised March 2015
AUX – Sensor Controller with Digital and Analog Peripherals
Copyright © 2015, Texas Instruments Incorporated