SLVSE46A November 2017 – January 2018 TPS65680
The loop instruction allows executing of a section of code a defined number of times. The <Line count> number of instruction immediately following the LOP command are executed <Loop Count> number of times. The minimum number of instructions allowed inside a loop is two (2) and the minimum loop count is one (1). A LOP instruction must not be followed immediately by a JMP command, although jumps are allowed inside of loops in general. Nesting of loops is not supported, i.e. the body of a loop must not contain another LOP instruction. The loop start address plus <Line count> must not exceed the maximum allowed logical address of 53, otherwise the pattern sequence terminates immediately, similarly to executing an END instruction.
Processing of the LOP instruction requires one clock cycle. Within the sequence, the level shifter output state preceding the LOP instruction is extended by one clock cycle while processing the LOP instruction as shown in the example below.
ADDR INST CLK OUTPUT STATE 1 CXE<1> 1 <1> 2 CXE<2> 2 <2> 3 LOP(2, 3) 3 <2> <-- Loop next 2 lines 3x 4 CXE<3> 4 <3> 5 CXE<4> 5 <4> 6 <3> 7 <4> 8 <3> 9 <4> 6 CXE<5> 10 <5>