SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
In image, video, vision computation, there are often many operations performed on arrays of the same dimension; which can use the same addressing pattern (with different base addresses) in the memory read/write. The address generator resource is included to take advantage of this. One agen can be shared among multiple loads and/or multiple stores.
The VAGEN instruction has this assembly format:
VAGENagen, [pinc4, pinc3, pinc2, pinc1] |
Agen field is a label (A0..7) to identify one of 8 agen resources.
VAGEN is defined in strict linear order A0, A1, A2, till the last agen used in the command. The agens defined can be used (in loads and stores) in any order. It is allowed to share agen between load(s) and store(s).
The address increments represent:
Figure 8-62 shows an example of 2 × 3 × 2 × 4 data object, addressed by the loop variables i1, i2, i3 and i4, with i1 being the outer-most loop. The address increments to access the object are shown in Figure 8-62.
In the VAGEN instruction, pointers to the parameter file are encoded, not the address increments themselves. Most data objects do not require 4-dimension addressing. For example, coefficient data for 2D FIR filter is normally stored consecutively, and advance by 1 data point most of the times, and wraps back at the end of i3 loop.Then pinc4 = pinc3 is specified to one parameter register (initialized to 2 for 16-bit coefficients), and pinc2 = pinc1 to another parameter register for the wrap-back. Thus, this scheme reduces command plus parameter data.
All address increments are in bytes. This allows misaligned halfword (16-bit) and word (32-bit) accesses that are some times needed in the processing.
Each address increment is encoded with one 16-bit parameter register, treated as signed value. The above example shows address increment moving forward, but in many cases, for example coefficients for filtering, negative increments are used.
Note that the address increments together specify addressing pattern of a single pointer, and the data distribution controls how consecutive memory data from that pointer, up to 32N-bit, are distributed among the SIMD dimension of the vector register entry.
In case multiple VAGEN instructions are issued for the same agen resource (for example, A0), the last one takes effect, and the preceding ones with the same agen resource is ignored.