Encoding:

POOL32A

000000

rt

rs

ac

DPAQ_SA.L.W

01001010

POOL32Axf

111100

6

5

5

2

8

6

SPECIAL3

011111

rs

rt

0

000

ac

DPAQ_SA.L.W

01100

DPA.W.PH

110000

6

5

5

3

2

5

6

Format:

DPAQ_SA.L.W ac, rs, rt 

microMIPSDSP

Dot Product with Accumulate on Fractional Word Element

Purpose:

Dot Product with Accumulate on Fractional Word Element

Multiplication of two fractional word elements, accumulating the product to the specified 64-bit accumulator register, with saturation.

Description:

ac = sat64(ac + sat32(rs31..0 * rt31..0))

The two right-most Q31 fractional word values from registers rt and rs are multiplied together and the result leftshifted by one bit position to generate a 64-bit, Q63 fractional format intermediate product. If both multiplicands are equal to -1.0 (0x80000000 hexadecimal), the intermediate product is saturated to the maximum positive Q63 fractional value (0x7FFFFFFFFFFFFFFF hexadecimal).

The intermediate product is then added to the specified 64-bit HI/LO accumulator, creating a Q63 fractional result. If the accumulation results in overflow or underflow, the accumulator is saturated to either the maximum positive or minimum negative Q63 fractional value (0x8000000000000000 hexadecimal), respectively.

The value of ac can range from 0 to 3; a value of 0 refers to the original HI/LO register pair of the MIPS64 architecture.

If saturation occurs, a 1 is written to one of bits 16 through 19 of the DSPControl register, within the ouflag field. The value of ac determines which of these bits is set: bit 16 corresponds to ac0, bit 17 to ac1, bit 18 to ac2, and bit 19 to

ac3.

Restrictions:

No data-dependent exceptions are possible.

The operands must be values in the specified format. If they are not, the result is UNPREDICTABLE and the values of the operand vectors become UNPREDICTABLE.

Operation:

dotp63..0 = multiplyQ31Q31( ac, GPR[rs]31..0, GPR[rt]31..0 )
temp64..0 = HI[ac]31 || HI[ac]31..0 || LO[ac]31..0
temp64..0 = temp64..0 + dotp63..0
if ( temp64 != temp63 ) then
   if ( temp64 = 1 ) then
      temp63..0 = 0x8000000000000000
   else
      temp63..0 = 0x7FFFFFFFFFFFFFFF
   endif
   DSPControlouflag:16+ac = 1
endif
( HI[ac]63..0 || LO[ac]63..0 ) = (temp63)32 || temp63..32 || (temp31)32 || temp31..0 
function multiplyQ31Q31( acc1..0, a31..0, b31..0 )
   if (( a31..0 = 0x80000000 ) and ( b31..0 = 0x80000000 )) then
      temp63..0 = 0x7FFFFFFFFFFFFFFF
      DSPControlouflag:16+acc = 1
   else
      temp63..0 = ( a31..0 * b31..0 ) << 1
   endif
   return temp63..0
endfunction multiplyQ31Q31

Exceptions:

Reserved Instruction, DSP Disabled