Forum Discussion
Altera_Forum
Honored Contributor
16 years agoWhere can i find IOR/IOW macros ?
Hi, 1)Where can I find IOR/IOW macros for component i build with sopc component editor? (i mean "user logic" component). Is there any file containing macros list that i can use for ...
Altera_Forum
Honored Contributor
16 years agoAlternatively define a C struct that maps your device registers.
Define an 'extern' variable of that type. Use the linker to place the variable at the correct address - setting the high address bit if you have the data cache enabled. You either need to make the structure members 'volatile', or put 'asm volatile("" ::: "memory")' in the C source at appropriate points to ensure gcc doesn't have any values cached in registers. Note that gcc generates additional instrctions for 8 and 16 bit volatile data.