Forum Discussion
Altera_Forum
Honored Contributor
13 years agoI don't think this tab is here any more, but you don't need to generate software files from the component editor.
In your BSP you will find a system.h file. This should contain some defines with the base address of your component. For example if your component is called pwm, you will find a PWM_BASE constant. Then from your code, include those two files and use the IORD / IOWR macros:#include <system.h>
# include <io.h>
// read a register
IORD(PWM_BASE,reg_num);
// write a register
IOWR(PWM_BASE,reg_num, value);
reg_num is the register number, i.e. the value your component will see on the address vector when it is accessed.