On Sun, 7 Feb 2021 16:29:22 -0800 (PST), in
gmane.comp.hardware.beagleboard.user Tom Stepleton
<stepleton-re5jqeeqqe8avxtiumw...@public.gmane.org> wrote:


>
>you have a maximum of 65535 repetitions. Very good. What happens though if 
>you want three times that? Can you do
>
>  LOOP Exit, 3
>  LDI  r10.w0, 0xffff
>  LOOP Exit, r10.w0


        Off hand, I'd suspect one can NOT nest LOOP instructions. However, a
literal reading of the "operation" section could imply that each LOOP
instruction expands into two data items (counter and top) which may be
allocated/inlined in the code. 

        Seems like it would be faster to just write a test program nesting two
LOOP instructions, the outer with a small immediate count, and the inner
reading from a register preset with a similar small count. Maybe have the
inner loop simply increment some counter, and check if the counter has the
result of multiple loops, or just one (and which one, inner or outer).


>Bonus question: the manual tells us that "The loop is 
>non-interruptible(LOOP)." What does non-interruptible mean---do interrupt 
>bits in r31 never get set inside a loop?

        Since the PRU doesn't have asynchronous interrupts by default I'm not
sure what "interruptible" would mean... However, SPRUHF8A indicates that
there is an "interruptible loop" variant.

-=-=-=-
5.3.4.3.18 Hardware Loop Assist (LOOP, ILOOP)

        Defines a hardware-assisted loop operation. The loop can be
non-interruptible (LOOP), or can be interruptible based on an external
break signal (ILOOP). The loop operation works by detecting when the
instruction pointer would normal hit the instruction at the designated
target label, and instead decrementing a loop counter and jumping back to
the instruction immediately following the loop instruction.

Definition:
        LOOP LABEL, OP(256)
        ILOOP LABEL, OP(256)
-=-=-=-

        Possibly, "interruptible" in this case means via JTAG type debugger.
"LOOP" runs to completion before a debugger can get control, while "ILOOP"
allows debugger to take control within the loop.


-- 
Dennis L Bieber

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/kl232g53thmeo6ph364kef3h5g0u568h92%404ax.com.

Reply via email to