RP.Interpolator

Entities

Simple Types

Array Types

Record Types

Description

ACCUM_Register

type ACCUM_Register  is array (Lane range 0 .. 1) of UInt32;

ADD_Register

type ADD_Register    is array (Lane range 0 .. 1) of UInt24
   with Component_Size => 32;

CTRL_Register

type CTRL_Register   is array (Lane range 0 .. 1) of Lane_Config;

INTERP_Peripheral

type INTERP_Peripheral is record
   ACCUM       : ACCUM_Register;
   BASE        : LANE_Register;
   POP         : LANE_Register;
   PEEK        : LANE_Register;
   CTRL        : CTRL_Register;
   ADD         : ADD_Register;
   BASE_1AND0  : UInt32;
end record;
Record fields
ACCUM
BASE
POP
PEEK
CTRL
ADD
BASE_1AND0

Lane

type Lane is range 0 .. 2;

Lane_Config

type Lane_Config is record
   SHIFT          : UInt5   := 0;
   MASK_LSB       : UInt5   := 0;
   MASK_MSB       : UInt5   := 31;
   SIGNED         : Boolean := False;
   CROSS_INPUT    : Boolean := False;
   CROSS_RESULT   : Boolean := False;
   ADD_RAW        : Boolean := False;
   FORCE_MSB      : UInt2   := 0;
   BLEND          : Boolean := False;
   CLAMP          : Boolean := False;
   OVERF           : Boolean := False;
   OVERF1          : Boolean := False;
   OVERF0          : Boolean := False;
end record;
Record fields
SHIFT

Least significant bit allowed to pass by the mask (inclusive)

MASK_LSB

Most significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out

The reset value of MASK_MSB is 0, but the SDK uses 31 in the default config, which seems preferable.

MASK_MSB

The shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE

SIGNED

Feed the opposite lane's result into this lane's shift+mask hardware on POP

CROSS_INPUT

Feed the opposite lane's result into this lane's accumulator on pop

CROSS_RESULT

Mask and shift is bypassed for this lane's result. This does not affect the FULL (Lane 2) result.

ADD_RAW

ORed into bits 29:28 of the lane result presented to the processor on the bus.

FORCE_MSB

BLEND is only on INTERP_0 Lane 0.

LANE1 result is a linear interpolation between BASE0 and BASE1, controlled by the 8 LSBs of lane 1 shift and mask value (a fractional number between 0 and 255/256ths)

LANE0 result does not have BASE0 added (yields only the 8 LSBs of lane 1 shift+mask value)

FULL result does not have lane 1 shift+mask value added (BASE2 + lane 0 shift+mask)

LANE1 SIGNED flag controls whether the interpolation is signed or unsigned.

BLEND

CLAMP is only on INTERP_1 Lane 0

LANE0 result is shifted and masked ACCUM0, clamped by a lower bound of BASE0 and upper bound of BASE1.

Signedness of these comparisons is determined by CTRL (0).SIGNED

CLAMP

Overflow flags are only present on Lane 0

Indicates if any masked-off MSBs in either ACCUM are set

OVERF

Indicates if any masked-off MSBs in ACCUM0 are set

OVERF1

Indicates if any masked-off MSBs in ACCUM1 are set

OVERF0

LANE_Register

type LANE_Register   is array (Lane) of UInt32;