Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

IORD IOWR macros vs. memory access to peripherals

What is the point of the IORD and IOWR macros? I can access my custom Avalon peripherals using them, but it seems like I can't access them like the following:

volatile alt_u32 *DEV_PTR = DEV_0_BASE;

alt_u32 data_in = 0;

data_in = DEV_PTR[0];

However, I CAN access the Altera CFI flash memory peripheral using the simple memory access method shown above and read my flash! I do not understand the distinctions. I do understand that the macros avoid the cache.

Thanks!

15 Replies