English
Language : 

W90210F Datasheet, PDF (63/67 Pages) Winbond – PA-RISC EMBEDDED CONTROLLER
W90210F
Halfword Parallel Multiply
HPMPY
Format:
0:5
05
6
HPMPY,cmplt r1,r2,t
6:10
11:15
21:25 26 27:31
r2 r1 sat g - 12 0 t
5 5 212 5 1 5
Purpose: To multiply multiple pairs of halfwords in parallel with optional saturation.
Description:The corresponding halfwords of GR r1 and GR r2 are multiplied together in parallel. Optional
saturation is performed, which forces each halfword result to either the maximum or the
minimum value, if the result would have been out of the range of the target format. The halfword
results are placed in GR t.
The completer, cmplt, determines whether modular, signed-saturation, or unsigned-saturation
multiplication is performed. When no completer is specified modular arithmetic is performed.
The completer "ss" designates signed saturation. The completer "us" indicates unsigned
saturation. For signed saturation, all operands are treated as signed numbers, and the results are
signed numbers. For unsigned saturation, the first operands, from GR r1, are treated as unsigned
numbers, the second operands, from GR r2, are treated as signed numbers, and the results are
unsigned numbers.
Operation:
switch(cmplt) {
case u(g=0, sat=00, unsigned multiplication) {
GR[t]{0..15} ← zero_ext(GR[r1]{0..15}) × zero_ext(GR[r2]{0..15})
GR[t]{16..31} ← zero_ext(GR[r1]{16..31}) × zero_ext(GR[r2]{16..31})
}
case s(g=1, sat=00, signed multiplication) {
GR[t]{0..15} ← sign_ext(GR[r1]{0..15}) × sign_ext(GR[r2]{0..15})
GR[t]{16..31} ← sign_ext(GR[r1]{16..31}) × sign_ext(GR[r2]{16..31})
}
case us(g=0, sat=01, unsigned multiplication with saturation) {
GR[t]{0..15} ← zero_ext(GR[r1]{0..15}) × zero_ext(GR[r2]{0..15})
GR[t]{16..31} ← zero_ext(GR[r1]{16..31}) × zero_ext(GR[r2]{16..31})
:
if (unsigned_sat_L)
GR[t]{0..15} ← 0xFFFF;
if (unsigned_sat_R)
GR[t]{16..31} ← 0xFFFF;
break;
}
case ss(g=1, sat=01, signed multiplication with saturation) {
GR[t]{0..15} ← sign_ext(GR[r1]{0..15}) × sign_ext(GR[r2]{0..15})
GR[t]{16..31} ← sign_ext(GR[r1]{16..31}) × sign_ext(GR[r2]{16..31})
:
if (pos_signed_sat_L)
GR[t]{0..15} ← 0x7FFF;
else if (neg_signed_sat_L)
GR[t]{0..15} ← 0x8000;
if (pos_signed_sat_R)
GR[t]{16..31} ← 0x7FFF;
else if (neg_signed_sat_R)
GR[t]{16..31} ← 0x8000;
break;
}
default:
break;
}
Exception:
Restriction:
None
Winbond defined instruction for W90210F.
63
The above information is the exclusive intellectual property of Winbond Electronics Corp. and shall not be disclosed, distributed or reproduced without permission from Winbond.
Version 1.4, 10/8/97