
Philips Semiconductors
DSPCPU Operations for TM1300
PRODUCT SPECIFICATION
A-35
Dual-16 clip signed to signed
SYNTAX
[ IF rguard ] dualiclipi rsrc1 rsrc2
→
rdest
FUNCTION
if
rguard
then {
rdest<31:16> <- min(max(rscrc1<31:16>, -rsrc2<15:0>-1), rsrc2<15:0>)
rdest<15:0> <- min(max(rscrc1<15:0>, -rsrc2<15:0>-1), rsrc2<15:0>)
}
ATTRIBUTES
Function unit
Operation code
Number of operands
Modifier
Modifier range
Latency
Issue slots
dspalu
82
2
No
-
2
1,3
DESCRIPTION
The argument rsrc1 contains two signed16-bit integers, rsrc1<31:16> and rsrc1<15:0>. Each integer value is clipped
into the signed integer range (-rsrc2 -1) to rsrc2. The value in rsrc2 contains an unsigned integer and must have the
value between 0 and 0x7fff inclusive.
The dualiclipi operation optionally takes a guard, specified in rguard. If a guard is present, its LSB controls the
modification of the destination register. If the LSB of rguard is 1, rdest is written; otherwise, rdest is not changed.
EXAMPLES
Initial Values
Operation
Result
r30 = 0x00800080, r40 = 0x7f
r30 = 0x7ffff7ffff, r40 = 0x7ffe
r10 = 0, r30 = 0x7ffff7ffff, r40 = 0x7ffe
r10 = 1, r30 = 0x12345678, r40 = 0xabc
r10 = 1, r30 = 0x80008000, r40 = 0x03ff
r10 = 1, r30 = 0x800003fe, r40 = 0x03ff
r10 = 1, r30 = 0x000f03fe, r40 = 0x03ff
dualiclipi r30 r40 -> r50
dualiclipi r30 r40 -> r50
IF r10 dualiclipi r30 r40 -> r50
no change, since guard is false
IF r10 dualiclipi r30 r40 -> r50
r50 <- 0x0abc0abc
IF r10 dualiclipi r30 r40 -> r50
r50 <- 0xfc00fc00
IF r10 dualiclipi r30 r40 -> r50
r50 <- 0xfc0003fe
IF r10 dualiclipi r30 r40 -> r50
r50 <- 0x000f03fe
r50 <- 0x007f007f
r50 <- 0x7ffe7ffe
SEE ALSO
iclipi uclipi dualuclipi
imin imax quadumax
quadumin
dualiclipi