Motorola DSP56800 Manual page 380

16-bit digital signal processor
Table of Contents

Advertisement

RND
Operation:
D + r →
D
(parallel move)
Description: Round the 36-bit value in the specified destination operand (D), store the result in the EXT and MSPs
of the destination accumulator (A2:A1 or B2:B1), and clear the LSP of the accumulator. This instruc-
tion uses the rounding technique selected by the R bit in the OMR. When the R bit in OMR is cleared
(default mode), convergent rounding is selected; when the R bit is set, two's-complement rounding is
selected. The rounding constant is added into bit 15 of the destination. Refer to Section 3.5, "Round-
ing," on page 3-30 for more information about the rounding modes.
Example:
RND
Before Execution
5
1236
I
A2
Before Execution
0
1236
II
A2
Before Execution
0
1235
III
A2
Explanation of Example:
Prior to execution, the 36-bit A accumulator contains the value $5:1236:789A for Case I, the value
$0:1236:8000 for Case II and the value $0:1235:8000 for Case III. Execution of the RND A instruction
rounds the value in the A accumulator into the MSP of the A accumulator (A1) and then zeros the LSP
of the A accumulator (A0). The example is given assuming that the convergent rounding is selected.
Case II is the special case that distinguishes convergent rounding from the two's-complement round-
ing, since it clears the LSB of the MSP after the rounding operation is performed.
A-150
Round Accumulator
A
; round A accumulator into A2:A1, zero A0
789A
A1
A0
8000
A1
A0
8000
A1
A0
DSP56800 Family Manual
Assembler Syntax:
RND
D
After Execution
5
1236
A2
After Execution
0
1236
A2
After Execution
0
1236
A2
RND
(parallel move)
0000
A1
A0
0000
A1
A0
0000
A1
A0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents