Forum Discussion
Altera_Forum
Honored Contributor
11 years agoIf you are talking about the macros like IORD_32DIRECT, offset is just how many bytes from the base address.
For example if you have a component which has two 32bit registers, you might have something like this: BASE = 0x1000 //some base address LENGTH = 2 //2 registers Then to read the first register you would have IORD_32DIRECT(BASE, 0); //first register is at BASE+0 bytes To read the second register you would have: IORD_32DIRECT(BASE,4); //second register is at BASE+4 bytes (aka BASE+32bit) If you were trying to access fourth byte of the first register you would do: IORD_8DIRECT(BASE,3); //fourth byte of first register is 3 bytes after the base address.