Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- The IORD and IOWR macros treat the offset as a four byte word offset. Here are some examples: IOWR(0, 4, 1234). -> writes 1234 to base 0 + word offset 4 (byte address 0 + 4x4= 16) IORD(12, 2) -> reads from base 12 + word offset 2 (byte address 12+2x4 = 20) In general the byte offset is 'base + offset x 4'. The access size is always 4 bytes which is why I don't recommend using IORD and IOWR and use the 8/16/32DIRECT ones instead which always use byte offsets. --- Quote End --- I understand, thank you so much. If the word to read is a pio, for example with 8 bit, it makes sense to calculate an offset? Where can I study these things? thank you so much.