Forum Discussion
Altera_Forum
Honored Contributor
21 years agowhy is it base address?
I make leds light by using PIO of sopc! but i must change some code in niosII IDE!# include "system.h"# include "altera_avalon_pio_regs.h"# include "alt_types.h" /* * This is a freest...
Altera_Forum
Honored Contributor
21 years agoIf you have your system library compiled, look under the debug or release folder (whichever mode you compiled with) and look for system.h under system description folder. That system.h file has# defines for all the peripherals connected to that particular Nios II processor and that's where the name "PIO_0_BASE" is defined. So in your system your pio was called pio_0 or PIO_0. That software template assumes that the 8 bit pio in your system was called led_pio or LED_PIO which is why the compiler expected "LED_PIO_BASE" (that software template assumes you used a hardware reference design that was installed with Nios II).