Table 10-6. Addressing Modes
Addressing Mode
'addr' Opcode
Field
Encode
Description
@dir
0000
Direct Addressing Mode
Example 1: MMOV32 MR1, @_VarA
Example 2: MMOV32 MR1, @_EPwm1Regs.CMPA.all
In this case the 'mmmm mmmm mmmm mmmm' opcode field will be populated with the 16-bit
address of the variable. This is the low 16-bits of the address that you would use to access the
variable using the main CPU.
For example @_VarA will populate the address of the variable VarA. and
@_EPwm1Regs.CMPA.all will populate the address of the CMPA register.
*MAR0[#imm16]++
0001
MAR0 Indirect Addressing with 16-bit Immediate Post Increment
*MAR1[#imm16]++
0010
MAR1 Indirect Addressing with 16-bit Immediate Post Increment
addr = MAR0 (or MAR1)
MAR0 (or MAR1) +=
#imm16
Access memory using the address stored in MAR0 (or MAR1).
Then post increment MAR0 (or MAR1) by #imm16.
Example 1: MMOV32 MR0, *MAR0[2]++
Example 2: MMOV32 MR1, *MAR1[-2]++
For a post increment of 0 the assembler will accept both *MAR0 and *MAR0[0]++.
The 'mmmm mmmm mmmm mmmm' opcode field will be populated with the signed 16-bit
pointer offset. For example if #imm16 is 2, then the opcode field will be 0x0002. Likewise if
#imm16 is -2, then the opcode field will be 0xFFFE.
If addition of the 16-bit immediate causes overflow, then the value will wrap around on a 16-bit
boundary.
(1)
Values not shown are reserved.
Encoding for the shift fields in the MASR32, MLSR32 and MLSL32 instructions is shown in
Table 10-7. Shift Field Encoding
Shift Value
'shift' Opcode
Field Encode
1
0000
2
0001
3
0010
....
....
32
1111
For instructions that use MRx (where x could be 'a' through 'f') as operands, the trailing alphabet appears in the
opcode as a two-bit field. For example:
MMPYF32 MRa, MRb, MRc ||
MADDF32 MRd, MRe, MRf
whose opcode is,
LSW: 0000 ffee ddcc bbaa
MSW: 0111 1010 0000 0000
The two-bit field specifies one of four working registers according to
Control Law Accelerator (CLA)
590
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Summary of Contents for TMS320 2806 Series
Page 2: ......