Forum Discussion
Altera_Forum
Honored Contributor
19 years agoNios II provides the NEXTPC instruction that returns the PC of that instruction plus four.
There doesn't appear to be a HAL macro available for using this instruction from C code. However, it is relatively easy to make one yourself. Just look at the examples in the HAL nios2.h file. It is located in your Nios II kit directory under components/altera_nios2/HAL/inc.