MMOV16 MARx, MRa, #16I
(continued)
Load the Auxiliary Register with MRa + 16-bit Immediate Value
Table 10-14. Pipeline Activity For MMOV16 MARx, MRa , #16I
Instruction
F1
F2
D1
D2
R1
R2
E
W
MMOV16 MAR0, MR0,
#_X
MMOV16
I1
I1
MMOV16
I2
I2
I1
MMOV16
I3
I3
I2
I1
MMOV16
I4
I4
I3
I2
I1
MMOV16
I5
I5
I4
I3
I2
I1
MMOV16
I6
I6
I5
I4
I3
I2
I1
MMOV16
Example 1
; Calculate an offset into a sin/cos table
;
_Cla1Task1:
MMOV32 MR0,@_rad ; MR0 = rad
MMOV32 MR1,@_TABLE_SIZEDivTwoPi ; MR1 = TABLE_SIZE/(2*Pi)
MMPYF32 MR1,MR0,MR1 ; MR1 = rad* TABLE_SIZE/(2*Pi)
|| MMOV32 MR2,@_TABLE_MASK ; MR2 = TABLE_MASK
MF32TOI32 MR3,MR1 ; MR3 = K=int(rad*TABLE_SIZE/(2*Pi))
MAND32 MR3,MR3,MR2 ; MR3 = K & TABLE_MASK
MLSL32 MR3,#1 ; MR3 = K * 2
MMOV16 MAR0,MR3,#_Cos0 ; MAR0 K*2+addr of table.Cos0
MFRACF32 MR1,MR1 ; I1
MMOV32 MR0,@_TwoPiDivTABLE_SIZE ; I2
MMPYF32 MR1,MR1,MR0 ; I3
|| MMOV32 MR0,@_Coef3
MMOV32 MR2,*MAR0[#-64]++ ; MR2 = *MAR0, MAR0 += (-64)
...
...
MSTOP ; end of task
Control Law Accelerator (CLA)
648
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......