Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHow to write software independent of module instance name in Qsys or SOPC Builder?
Hi All, I am not sure that this is the correct place to post this question. I have designed an IP Core and I have written low level driver to verify it. I am able to verify it. My question...
Altera_Forum
Honored Contributor
11 years agoIf you create an INIT() macro, then it will be invoked from alt_sys_init() before main() executes. The HAL will supply your macro with the correct# define'd value. Your initialization function can then locally store the base address and use that local value in all of your subsequent functions.
http://www.altera.com/literature/hb/nios2/n2sw_nii52005.pdf You can't really do this if you intend to have multiple instances of your hardware block in your FPGA.