Forum Discussion
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by epis@Dec 13 2006, 06:01 PM 2. offset out of range for exception address on test_pio_0. maximum ofset is 0x00000002 --- Quote End --- how about this maximum ofset is 0x00000002 does that depends on regs.h file?? becose I tried diferent regs.h files and got diferent max ofset address values like 0x00000004 and 0x00000007 I just made some reading and maby I don't need this:# define IOADDR_TLED_PIO_PIO_WRITEDATA(base) definition and do I need to define reset_n ?? maby this will work
#ifndef __TLED_PIO_REGS_H__# define __TLED_PIO_REGS_H__
# include <io.h>
# define IORD_TLED_PIO_WRITEDATA(base) IORD(base, 0) # define IOWR_TLED_PIO_WRITEDATA(base, data) IOWR(base, 0, data)
# endif /* __TLED_PIO_REGS_H__ */ this is how original Altera_avalon_PIO_regs.h looks #ifndef __ALTERA_AVALON_PIO_REGS_H__# define __ALTERA_AVALON_PIO_REGS_H__
# include <io.h>
# define IOADDR_ALTERA_AVALON_PIO_DATA(base) __IO_CALC_ADDRESS_NATIVE(base, 0)# define IORD_ALTERA_AVALON_PIO_DATA(base) IORD(base, 0) # define IOWR_ALTERA_AVALON_PIO_DATA(base, data) IOWR(base, 0, data)
# define IOADDR_ALTERA_AVALON_PIO_DIRECTION(base) __IO_CALC_ADDRESS_NATIVE(base, 1)# define IORD_ALTERA_AVALON_PIO_DIRECTION(base) IORD(base, 1) # define IOWR_ALTERA_AVALON_PIO_DIRECTION(base, data) IOWR(base, 1, data)
# define IOADDR_ALTERA_AVALON_PIO_IRQ_MASK(base) __IO_CALC_ADDRESS_NATIVE(base, 2)# define IORD_ALTERA_AVALON_PIO_IRQ_MASK(base) IORD(base, 2) # define IOWR_ALTERA_AVALON_PIO_IRQ_MASK(base, data) IOWR(base, 2, data)
# define IOADDR_ALTERA_AVALON_PIO_EDGE_CAP(base) __IO_CALC_ADDRESS_NATIVE(base, 3)# define IORD_ALTERA_AVALON_PIO_EDGE_CAP(base) IORD(base, 3) # define IOWR_ALTERA_AVALON_PIO_EDGE_CAP(base, data) IOWR(base, 3, data)
# endif /* __ALTERA_AVALON_PIO_REGS_H__ */