Hi
we are working with OMAP-L138 and use the PRU with LUT
I have a lookup table (LUT) of 16 elements (of 32 bits), Is it possible to load this array on Registers, and depenting the value on anthor regigter to read the correct value?
or if you have any other way to load the LUT data into the PRU without too many stalls
Thanks
PF
Hi PF,Yes, you can load the LUT into 16 of the PRU registers. This will leave you with 14 remaining registers than can be used for all other PRU operations. If your application needs more than 14 registers for PRU operations, I would suggest loading the LUT into the PRU DRAM and reading from this memory. Regards,Melissa
Hi Melissa
Thanks,
you can load the LUT into 16 of the PRU registers.
What is the pru instructions that can read the specific data from register?
Ex: If R0 = 0x0A; How can I load the 10th element to R1?
Hi PF,
You can use the MOV instruction to copy data from one register into another.
For example, if R0 = 0x0A, you can move the 10th element (stored in R11) to R1 as follows:
QBEQ BRANCH1_LABEL, R0, 10 // if R0 = 0x0A, jump to BRANCH1_LABEL
...
BRANCH1_LABEL:
MOV R1, R11 // Copy contents of R11 to R1
JMP BRANCH2_LABEL // Return to BRANCH2_LABEL
Regards,
Melissa