www.ti.com
Instructions
F32TOUI16R RaH, RbH
Convert 32-bit Floating-Point Value to 16-bit Unsigned Integer and Round
Operands
RaH
floating-point destination register (R0H to R7H)
RbH
floating-point source register (R0H to R7H)
Opcode
LSW: 1110 0110
1000 1110
MSW: 1000 0000
00bb baaa
Description
Convert the 32-bit floating-point value in RbH to an unsigned 16-bit integer and round to
the closest even value. The result will be stored in RaH. To instead truncate the
converted value, use the F32TOUI16 instruction.
RaH(15:0)
= F32ToUI16round(RbH)
RaH(31:16) = 0x0000
Flags
This instruction does not affect any flags:
Flag
TF
ZI
NI
ZF
NF
LUF
LVF
Modified
No
No
No
No
No
No
No
Pipeline
This is a 2 pipeline cycle (2p) instruction. That is:
F32TOUI16R
RaH, RbH
; 2 pipeline cycles (2p)
NOP
; 1 cycle delay or non-conflicting instruction
; <-- F32TOUI16R completes, RaH updated
NOP
Any instruction in the delay slot must not use RaH as a destination register or use RaH
as a source operand.
Example
MOVIZ
R5H, #0x412C
; R5H = 0x412C
MOVXI
R5H, #0xCCCD
; R5H = 0xCCCD
; R5H = 10.8 (0x412CCCCD)
F32TOUI16R
R6H, R5H
; R6H (15:0)
= F32TOUI16round (R5H)
; R6H (31:16) = 0x0000
MOVF32
R7H, #-10.8
; R7H = -10.8 (0x0xC12CCCCD)
; <-- F32TOUI16R complete,
; R6H (15:0)
= 11.0 (0x000B)
; R6H (31:16) = 0.0
(0x0000)
F32TOUI16R
R0H, R7H
; R0H (15:0)
= F32TOUI16round (R7H)
; R0H (31:16) = 0x0000
NOP
; 1 Cycle delay for F32TOUI16R to complete
; <-- F32TOUI16R complete,
; R0H (15:0)
= 0.0 (0x0000)
; R0H (31:16) = 0.0 (0x0000)
See also
SPRUEO2A – June 2007 – Revised August 2008
Instruction Set
55
Содержание TMS320C28 series
Страница 2: ...2 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 12: ...Introduction 12 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 20: ...CPU Register Set 20 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 136: ...Instruction Set 136 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...