SYNOPSIS
loadrt weighted_sum wsum_sizes=size[,size,…]
Erzeugt gewichtete Summengruppen mit der angegebenen Anzahl von Eingabebits (size,).
BESCHREIBUNG
The weighted_sum converts a group of bits to an integer. The conversion is the sum of the weights of the bits that are on plus any offset. The weight of the m-th bit is 2\^m. This is similar to a binary coded decimal but with more options. The hold bit stops processing the input changes so the sum will not change.
The default value for each weight is 2\^m where m is the bit number. This results in a binary to unsigned conversion.
Die Anzahl der gewichteten Summierer ist auf 8 begrenzt und jeder kann bis zu 16 Eingangsbits haben.
FUNKTIONEN
- process_wsums (erfordert einen Gleitkomma-Thread)
-
Lesen Sie alle Eingabewerte und aktualisieren Sie alle Ausgabewerte.
PINS
- wsum.N.bit.M.in bool in
-
Der mte Eingang der gewichteten Summe n.
- wsum.N.hold bool in
-
Wenn TRUE, ändert sich der sum-Ausgang nicht. Bei FALSE folgt der sum-Ausgang den bit-Eingängen entsprechend den Gewichten und dem Offset.
- wsum.N.sum sint out
-
Die Ausgabe des gewichteten Summierers.
- wsum.N.bit.M.weight sint rw
-
Das Gewicht des m-ten Eingangs des gewichteten Summierers n. Voreingestellt ist 2m.
- wsum.N.offset sint rw
-
Der Offset wird zu den Gewichten aller TRUE-Eingaben addiert, um die Endsumme zu erhalten.