Forum Discussion
Altera_Forum
Honored Contributor
21 years agoio.h vs normal data access
Hi there, Maybe a silly question... What is the purpose of the io.h headerfile? A memory addressable device can be referenced as follows: data = *(INT32U*) 0x200000; or using...
Altera_Forum
Honored Contributor
21 years agoI'm guessing that you have a data cache in your system, which is why you're seeing strange results with your first example. The second example maps onto the ldxio assembly functions which bypass the cache. For more information you should read Writing Device Drivers (page 7-4) in the Nios II Software Developer's Handbook (n2sw_nii5v2.pdf)