type ACCUM_Register is array (Lane range 0 .. 1) of UInt32;
type ADD_Register is array (Lane range 0 .. 1) of UInt24
with Component_Size => 32;
type CTRL_Register is array (Lane range 0 .. 1) of Lane_Config;
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;
type Lane is range 0 .. 2;
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;
Least significant bit allowed to pass by the mask (inclusive)
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.
The shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE
Feed the opposite lane's result into this lane's shift+mask hardware on POP
Feed the opposite lane's result into this lane's accumulator on pop
Mask and shift is bypassed for this lane's result. This does not affect the FULL (Lane 2) result.
ORed into bits 29:28 of the lane result presented to the processor on the bus.
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.
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
Overflow flags are only present on Lane 0
Indicates if any masked-off MSBs in either ACCUM are set
Indicates if any masked-off MSBs in ACCUM0 are set
Indicates if any masked-off MSBs in ACCUM1 are set
type LANE_Register is array (Lane) of UInt32;