Machinekit

Machinekit

Machinekit Documentation

HAL Component — WEIGHTED_SUM

INSTANTIABLE COMPONENTS — General

All instantiable components can be loaded in two manners

Using loadrt with or without count= | names= parameters as per legacy components
Using newinst, which names the instance and allows further parameters and arguments
primarily pincount= which can set the number of pins created for that instance (where applicable)

NAME

weighted_sum — Weighted Summer for Machinekit HAL

SYNOPSIS

weighted_sum

USAGE SYNOPSIS

loadrt weighted_sum
OR
newinst weighted_sum <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]

( args in [ ] denote possible args and parameters, may not be used in all components )

FUNCTIONS

weighted_sum.N.process-wsums.funct ( OR <newinstname>.process-wsums.funct (requires a floating-point thread) )

PINS

weighted_sum.N.in%02d bit in (MM=00..pincount) ( OR <newinstname>.in%02d bit in (MM=00..pincount) ) - The ## inputs of weighted summer

weighted_sum.N.hold bit in ( OR <newinstname>.hold bit in ) - When TRUE, the sum output does not change. When FALSE, the sum output tracks the bit inputs according to the weights and offset.

weighted_sum.N.sum s32 out ( OR <newinstname>.sum s32 out ) - The output of the weighted summer

weighted_sum.N.weight%02d s32 io (MM=00..pincount) ( OR <newinstname>.weight%02d s32 io (MM=00..pincount) ) - The weight of the input of weighted summer ##. The default value is 2^m.

weighted_sum.N.offset s32 io ( OR <newinstname>.offset s32 io )

INST_PARAMETERS

pincount int (default: 8)

LICENCE

GPL