Max2vit, Max2, For viterbi kernel (dalu) description – Freescale Semiconductor StarCore SC140 User Manual

Page 563: Status and conditions that affect instruction, Operation assembler syntax

Advertising
background image

MAX2VIT

SC140 DSP Core Reference Manual

A-249

MAX2VIT

MAX2

MAX2VIT

for Viterbi Kernel (DALU)

Description

These operations independently compare the 16-bit contents of the HP and LP of a data register pair to find
the larger value. They copy the larger value to the corresponding portion in the second data register and set
or clear Viterbi flags (VF0–VF3 in SR) to indicate which portions are larger. The HP and LP of the two
registers are compared separately as 16-bit signed values and the Viterbi flags are set or cleared
accordingly. These instructions are similar to MAX2, except they also set Viterbi flags. The MAX2VIT
instructions are intended to optimize implementation of the Viterbi decoder algorithm. The MAX2VIT
instruction is used with conjunction with the VSL instruction (see page A-423).

Status and Conditions that Affect Instruction

None.

Operation

Assembler Syntax

If Da.L

> Db.L, then 0 → VFn, Da.L → Db.L

else 1

→ VFn

MAX2VIT Da,Db

Da

Db

VFn

D4.L

D2.L

VF0

D4.H

D2.H

VF1

D0.L

D6.L

VF2

D0.H

D6.H

VF3

D12.L

D10.L

VF0

D12.H

D10.H

VF1

D8.L

D14.L

VF2

D8.H

D14.H

VF3

MAX2VIT Da,Db

For the low portion comparison, the instruction clears VFn (n=0, 2) if the LP of Da is greater than the LP of
Db. It then copies the contents of the LP of Da to the LP of Db. It sets VFn (n=0, 2) if the LP of Da is not
greater than the LP of Db. For the high portion comparison, this instruction clears VFn (n=1, 3) if the HP of
Da is greater than the HP of Db. It then copies the contents of the HP of Da to the HP of Db. It sets VFn
(n=1, 3) if the HP of Da is not greater than the HP of Db. The high bank of registers can also be used: D12
and D8 substituted for Da, and D10 and D14 substituted for Db. The encoding for the substitution is done
with a prefix.

Advertising