SPRUIG3C January 2018 – August 2019 TDA4VM , TDA4VM-Q1
The histogram update operation is very similar to the lookup operation. The statement:
Vreg = base[agen].hist_update(Vindex, Vweight);
translates to
WHIST Vindex_adj, LTBR0, Vweight
where LTCR0 specifies the table configuration,
Vindex_adj
represents the adjusted index vector as described in Section 5.5.5, and
Vweight
is the vector of weight values.
The migration tool uses the “weighted” form of histogram since there is no penalty and the VCOP Kernel-C syntax always expresses histograms in weighted form.
VCOP always saturates histogram bin values as they are updated. The saturation bounds are determined by the element type of the table, as specified by the declared type of the base pointer. Thus the C7x table configuration always enables saturation, and defines the element type to correspond to the VCOP table.
The histogram operation is implemented by the
vcop_hist::whist_update()
method of the virtual machine.