Motorola CPU32 Reference Manual page 216

M68300 series central processor unit
Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

TBLU
TBLUN
Table Lookup and Interpolate (Unsigned)
Operation:
Rounded:
ENTRY (n)
+
{(ENTRY (n + 1) - ENTRY(n))
*
Ox [7:0]}
1256 => Ox
Unrounded:
ENTRY(n)
*
256
+
{(ENTRY(n +
1) -
ENTRY(n))
*
Ox [7:0]}
=>
Ox
Where ENTRY(n) and ENTRY(n + 1) are either:
TBLU
TBLUN
1. Consecutive entries in the table pointed to by the (ea) and indexed by
Ox [15:8]
*
size or,
Assembler
Syntax:
Attributes:
2. The registers Oym, Oyn respectively
TBLU.(size)
TBLUN.(size)
TBLU.(size)
TBLUN.(size)
(ea),Ox
(ea),Ox
Oym:Oyn,Ox
Oym:Oyn, Ox
Size=(Byte, Word, Long)
(Result rounded)
(Result not rounded)
(Result rounded)
(Result not rounded)
Description:
The signed table lookup and interpolate instruction, TBLU, allows the efficient use of
compressed linear data tables to model complex functions. The TBLU instruction has two modes
of operation: table lookup and interpolate mode, and data register interpolate mode.
For table lookup and interpolate mode, data register Ox [15:0] contains the independent variable
X. The effective address points to the start of a signed byte, word, or long-word table containing a
linear representation of the dependent variable, Y, as a function of X. In general, the independent
variable, located in the low-order word of Ox, consists of an 8-bit integer part and an 8-bit fractional
part. An assumed radix point is located between bits 7 and 8. The integer part, Ox [15:8], is
scaled by the operand size and is used as an offset into the table. The selected entry in the table
is subtracted from the next consecutive entry. A fractional portion of this difference is taken by
multiplying by the interpolation fraction, Ox [7:0]. The adjusted difference is then added to the
selected table entry. The result is returned in the destination data register, Ox.
For register interpolate mode, the interpolation occurs using the Oym and Oyn registers in place of
the two table entries.
For this mode, only the fractional portion, Ox [7:0], is used in the
interpolation, and the integer portion, Ox [15:8], is ignored. The register interpolation mode may
be used with several table lookup and interpolations to model multidimentional functions.
CPU32 REFERENCE MANUAL
INSTRUCTION SET
MOTOROLA
4-163
III

Advertisement

Table of Contents
loading

Table of Contents