Search code examples
armxilinxbranch-predictionzynq

is return stack implemented in Zynq 7000 SOC


I am working on some research project based on ZC706 board that contain Zynq-7000 soc. i need to know that Cortex-A9 Cpu in Zynq-7000 implemented Return Stack Buffer (Return Stack Buffer is an program flow speculation technique like branch prediction) or no. In Zynq-7000 Technical reference manual i saw some registers that indicate that Return Stack was implemented or no.

enter image description here

as you can see in ETMCCER register bit 23 indicate return stack implementation detail and it's reset value is 0.

now i want to know that this means that Return Stack did not implemented in this SOC? Right?

excuse me for simple question, but i am really in doubt and i am wondering that implementing of return stack buffer is optional in ARM cores.


Solution

  • The return stack feature in the PTM is unrelated to performance features in the processor.

    With PTM (and ETMv4), an indirect branch address does not need to be traced if it matches the state of a previously traced branch and link instruction. This allows some reduction in the trace bandwidth.

    All PTM and ETM built for A-class CPU will probably implement the return stack. Since all these registers above are RAZ, I'm guessing there is no PTM in this device (but that contradicts the datasheet).