Forum Discussion
Altera_Forum
Honored Contributor
15 years agoSoPC builder does not automatically create macros for your custom user component. You must do this yourself.
Look at one of the existing <component>_regs.h file as an example. Typically you include the <io.h> header file in your header file to gain access to the IOWR and IORD macros. All the information you need to access your component is compiled into the "system.h" file in your BSP or syslib software project. This will have things like the base address of your component on the NIOS' bus. As for as irq handling, the functions for working with interrupts are indicated in the HAL API reference document http://www.altera.com/literature/hb/nios2/n2sw_nii52010.pdf Again, macros you need that tell you which IRQ number your component is using are in the "system.h" file. Jake