Machinekit Documentation
HAL Component — LATENCYBINS
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
latencybins — comp utility for scripts/latencyhistogram
SYNOPSIS
* Usage: Read availablebins pin for the number of bins available. Set the maxbinnumber pin for the number of +/- bins. Ensure maxbinnumber ⇐ availablebins For maxbinnumber = N, the bins are numbered: -N … 0 … + N bins (the -0 bin is not populated) (total effective bins = 2*maxbinnumber +1) Set nsbinsize pin for the binsize (ns) Iterate: Set index pin to a bin number: 0 ⇐ index ⇐ maxbinnumber. Read check pin and verify that check pin == index pin. Read pbinvalue,nbinvalue,pextra,nextra pins. (pbinvalue is count for bin = +index) (nbinvalue is count for bin = -index) (pextra is count for all bins > maxbinnumber) (nextra is count for all bins < maxbinnumber)
If index is out of range ( index < 0 or index > maxbinnumber) then pbinvalue = nbinvalue = -1. The reset pin may be used to restart. The latency pin outputs the instantaneous latency.
Maintainers note: hardcoded for MAXBINNUMBER==1000
*
USAGE SYNOPSIS
* Usage: Read availablebins pin for the number of bins available. Set the maxbinnumber pin for the number of +/- bins. Ensure maxbinnumber ⇐ availablebins For maxbinnumber = N, the bins are numbered: -N … 0 … + N bins (the -0 bin is not populated) (total effective bins = 2*maxbinnumber +1) Set nsbinsize pin for the binsize (ns) Iterate: Set index pin to a bin number: 0 ⇐ index ⇐ maxbinnumber. Read check pin and verify that check pin == index pin. Read pbinvalue,nbinvalue,pextra,nextra pins. (pbinvalue is count for bin = +index) (nbinvalue is count for bin = -index) (pextra is count for all bins > maxbinnumber) (nextra is count for all bins < maxbinnumber)
If index is out of range ( index < 0 or index > maxbinnumber) then pbinvalue = nbinvalue = -1. The reset pin may be used to restart. The latency pin outputs the instantaneous latency.
Maintainers note: hardcoded for MAXBINNUMBER==1000
*
FUNCTIONS
latencybins.N.funct ( OR <newinstname>.funct )
PINS
latencybins.N.maxbinnumber s32 in (default: 1000) ( OR <newinstname>.maxbinnumber s32 in (default: 1000) )
latencybins.N.index s32 in ( OR <newinstname>.index s32 in )
latencybins.N.reset bit in ( OR <newinstname>.reset bit in )
latencybins.N.nsbinsize s32 in ( OR <newinstname>.nsbinsize s32 in )
latencybins.N.check s32 out ( OR <newinstname>.check s32 out )
latencybins.N.latency s32 out ( OR <newinstname>.latency s32 out )
latencybins.N.pbinvalue s32 out ( OR <newinstname>.pbinvalue s32 out )
latencybins.N.nbinvalue s32 out ( OR <newinstname>.nbinvalue s32 out )
latencybins.N.pextra s32 out ( OR <newinstname>.pextra s32 out )
latencybins.N.nextra s32 out ( OR <newinstname>.nextra s32 out )
latencybins.N.availablebins s32 out (default: 1000) ( OR <newinstname>.availablebins s32 out (default: 1000) )
LICENCE
GPL