Hello, all
I would like to access and read Core register(GPRs, LR, Program Counter, etc) from other cores.
For example, Core0 reads Link Register of Core1 or Core2.
Is this possible to read them from other cores?
Furthermore, I want to know the generic instruction how to read Program counter.
Please share any guide that can help.
Thank you
BR
Justin
Hi Justin,
core registers are not memory mapped, so it's not possible to read core registers from other cores. Common way to share data is to use shared memory (and semaphores if necessary to ensure data coherency).
There's no instruction which would allow to read the program counter directly. I'm not sure what is your use-case but if it is really needed, one workaround is to call empty function and then you can read link register. This register will contain return address - current value of program counter. Then you can use mflr instruction.
Regards,
Lukas