SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
A VCTRL instruction variation programs the repeat end count. The syntax is:
VCTRL scalar_register, RPT_END |
Subsequent VLOOP is executed RPT_END + 1 times. Reset default is 0, or repeating just once, and is the normal mode of operation. At end of loop execution, RPT_END is automatically reset to 0, so if the subsequent is non-repeating, which is most of the cases, there is no need to issue another VCTRL RPT_END to reset it.
RPT_END is a 12-bit value; the largest value supported is 0:4095, allowing for up to 4096 iterations of the repeat loop.
Note that the VLOOP instruction that follows can be of any type (computer, table lookup, histogram).
The repeat mechanism can be viewed as enclosing VLOOP by an outer loop, i0. The difference between this i0 loop and the i1, i2, i3, i4 loops inside VLOOP is that parameter pointer is advanced at the end of VLOOP. The repeat feature allows the same program code to be executed with a different set of parameters each time.
The repeat feature is useful for performing the same processing steps on a list of data regions that are not spaced regularly and/or not having the same dimension. Instead of having a scalar loop around the repeated VLOOP, using the repeat feature reduces scalar/vector interaction and resulting overhead.
Software must allocate memory appropriately to allow results of these data blocks to be stored (sequentially or otherwise is under programmer’s control).