Forum Discussion
Altera_Forum
Honored Contributor
14 years agoFor IOWR_32DIRECT the offset field is in bytes. So to perform sequential 32-bit accesses you would use offsets such as 0, 4, 8, 12, etc... Using IOWR_32DIRECT you also need to make sure that the address you are accessing is on a 4 byte boundary since Nios II and the interconnect do not support unaligned accesses.
Address 9203 is not aligned to a 4 byte boundary so you'll need to break that write access down like DSL suggested. You can use IOWR_8DIRECT to write individual byte lanes at any alignment assuming the slave you are accessing has byte enables. If it doesn't have byte enables then the byte access will have side effects if the slave port is wider than 8 bits.