Forum Discussion
Altera_Forum
Honored Contributor
14 years agoI personally prefer to use the IORD/IOWR macros, so I guess it's a matter of taste ;) It shows in the code that you are in fact accessing some hardware and not regular memory. The macros also automatically bypass the data cache.
To answer Giorgio's question, the IORD/WR macros can handle an offset to the base address:IORD(BASE_ADDR,0)will read the component's first register and IORD(BASE_ADDR,1)will read the second one.