Altera_Forum
Honored Contributor
16 years agoPointer access to component base address
Hi,
in this post http://www.alteraforum.com/forum/showthread.php?t=19366 (http://www.alteraforum.com/forum/showthread.php?t=19366) we already talked a little bit about pointer access to an avalon component address. I don't want to use this in my design, i just would like to understand why it works at all. If i have something like this volatile alt_u32 ptr = (alt_u32 *)COMPONENT_BASE; - whereas COMPONENT_BASE is the base address of a component from system.h - then I can use the pointer to read the value at that address like that: alt_u32 value = *ptr; This I fully understand. What i don't understand is why this kind of access to the component also creates a "read" signal on the avalon bus. I would have thought that the main purpose of using the IORD(COMPONENT_BASE, 0) macro must be to trigger all according signals on the avalon bus. Can somebody please explain what is going on behind the scenes and what is the difference between the pointer access and the usage of the IORD macro? Thanks, Maik