Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHow to access the Program Counter of Nios II
Hey everybody. I'm a fairly new user using this board, however I come here to search for topics that can help solve my problems. Lately I have been successful finding these troubleshooting topi...
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by james@May 30 2006, 10:13 AM nios 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.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15686)
--- quote end ---
--- Quote End --- Thanks, I will certainly take a look at that