English
Language : 

W90210F Datasheet, PDF (50/67 Pages) Winbond – PA-RISC EMBEDDED CONTROLLER
W90210F
Halfword parallel average
Format:
HAVE r1,r2,t
0:5
5:10
11:15
26 27:31
02 r2 r1 0 0 0b 0 t
6
5 5 31 6 1 5
Purpose: To average multiple pairs of halfwords in parallel.
HAVE
Description:The corresponding halfwords of GR r1 and GR r2 are averaged in parallel. Both operands
are unsigned. The average is obtained by adding the corresponding halfwords, and shifting
the result right by one bit, to perform a divide by 2, with the halfword carry bit from the
addition shifted back into the leftmost position of each result. The halfword results are
placed in GR t.
Unbiased rounding is performed on the result of summation, to reduce the accumulation of
rounding errors with cascaded operations.
Operation:
cat(carry_L, sum{0..15}) ← GR[r1]{0..15} + GR[r2]{0..15}
cat(carry_R, sum{16..31}) ← GR[r1]{16..31} + GR[r2]{16..31}
new_lsb_L ← sum{14} | sum{15};
new_lsb_R ← sum{30} | sum{31};
GR[t]{0..15} ← cat(carry_L,sum{0..13}, new_lsb_L);
GR[t]{16..31} ← cat(carry_L,sum{16..29}, new_lsb_R);
Exceptions: None.
/* unbiased rounding */
/* unbiased rounding */
50
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