I may be able to clarify a few things here. First I will indicate that the previous post from fplank is correct. Using a pointer to reference your IO peripheral will not bypass the data cache (if you have one) on the NIOS processor. Unless .... you set the highest bit in the address (pointer). The reason for this is that NIOS uses the highest bit to indicate whether to access data from the cache or not. That is why NIOS only has 2GB of address space instead of 4GB. Setting the highest bit to 1 will bypass the data cache.
However, the preferred method for accessing IO components is to use the IOWR and IORD macros provided by altera. These macros call the NIOS assembly instructions stwio and ldwio.
Now, back to the question of accessing YOUR custom user logic. It appears that you have created a component with two avalon slave ports. Make sure that both of these ports are setup correctly in the Component Wizard. When you add your component to the SOPC system, make sure they are both connected to the avalon bus and that there are no conflicts, errors, or warnings.
Now the current method you are using to write to your component is probably not what you want to do. When you build your system library project in the NIOS IDE it will generate a file system.h. This file contains a ton of macros that are available for you to use in your code. Among these will be the base addresses of the slave ports of your component. They will appear as something like:
<NAME_OF_YOUR_COMPONENT>_<NAME_OF_PORT>_BASE
You should use the macros in your code when accessing any component rather than hard-coded values. That way if anything in your SOPC system changes, you don't have to change your C-code.
so you would write to your component using C calls like:
IOWR(<BASE_ADDRESS_GIVEN_IN_SYSTEM.H>, <OFFSET>, <DATA>);
IORD(<BASE_ADDRESS_GIVEN_IN_SYSTEM.H>, <OFFSET>);
Hope this helps. If you have further questions, feel free to post.
Jake