SPRUIG3C January 2018 – August 2019 TDA4VM , TDA4VM-Q1
On C7x, LHT operations are controlled by a handful
of control registers. C7x supports up to 4 table configurations that can be
simultaneously active. On VCOP only one table operation can be active at a time so
the migration tool always uses configuration 0 for the LHT operation. This
configuration is enabled by writing __LUT_ENABLE_0
into the LTER
register and configured via the LTBR0 and LTCR0 control registers. The LTBR
specifies the base of the configured table in L1D. Since there is only one active
table the migration tool always establishes the base address at 0, and allocates all
32K bytes for configuration 0.
The LTCR configuration specifies table properties such as number of parallel tables, element size and signedness, element promotion, and saturation behavior (for histogram). The migration tool configures these fields according to the properties of the VCOP table. Elements are always promoted to 32-bits since that’s how translated vectors are modeled.
The table configuration is computed by the
LHT_base::config()
method. The migration tool generates a call
to this method in the kernel init()
function and stores the config
value in the tvals structure. Then, in the vloops()
function, the
migration tool generates a call to LHT_base::open()
, which copies
the config value from the tvals structure into LTCR0, thereby configuring the
table.