Encoding:

MSA

011110

0100

df

wt

ws

wd

3RF

011100

6

4

1

5

5

5

6

Format:

MUL_Q.df 

Vector Fixed-Point Multiply

MUL_Q.H wd,ws,wt

MSA

Vector Fixed-Point Multiply

MUL_Q.W wd,ws,wt

MSA

Vector Fixed-Point Multiply

Purpose:

Vector Fixed-Point Multiply

Vector fixed-point multiplication.

Description:

wd[i] = ws[i] * wt[i]

The fixed-point elements in vector wt multiplied by f ixed-point elements in vector ws. The result is written to vector wd.

Fixed-point multiplication for 16-bit Q15 and 32-bit Q31 is a regular signed multiplication followed by one bit shift left with saturation. Only the most significant half of the result is preserved.

The operands and results are values in fixed-point data format df.

Restrictions:

No data-dependent exceptions are possible.

Operation:

MUL_Q.H
   for i in 0 .. WRLEN/16-1
      WR[wd]16i+15..16i = q_mul(WR[ws]16i+15..16i, WR[wt]16i+15..16i, 16)
   endfor
MUL_Q.W
   for i in 0 .. WRLEN/32-1
      WR[wd]32i+31..32i = q_mul(WR[ws]32i+31..32i, WR[wt]32i+31..32i, 32)
   endfor
function mulx_s(ts, tt, n)
   s = (tsn-1)n || tsn-1..0 
   t = (ttn-1)n || ttn-1..0
   p = s * t 
   return p2n-1..0
endfunction mulx_s
function q_mul(ts, tt, n)
   if ts = 1 || 0n-1 and tt = 1 || 0n-1 then
      return 0 || 1n-1
   else
      p = mulx_s(ts, tt, n)
      return p2n-2..n-1
   endif
endfunction q_mul

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.