Forum Discussion
Altera_Forum
Honored Contributor
11 years agocomponents base address and offsets
I know how to get the base address of each component in a NIOS II system "Qsys" or the "system.h" file. What I dont understand is what is the offset and how to get it. for example componen...
Altera_Forum
Honored Contributor
11 years agoIOWR_16DIRECT(BASE_ADDRESS, 2*(address),DATA); //write 16bits of 'DATA' to the component at 'BASE_ADDRESS' plus offset.
Data is 16bit so addresses on your 'address' bus are spaced 2bytes apart, hence multiply by 2 when passing to the write macro. The base address can be found in the "system.h" file in the Nios BSP.