Forum Discussion
Altera_Forum
Honored Contributor
12 years agoProbably caused by the data cache.
You either need to use the 'iord' family of instructions that bypass the data cache or set the top bit of the address (which has the same effect). Youshould also make your slave have a 32bit data bus - even if you ignore the high 24bit on writes and set them to zero on reads. If you have an 8-bit slave the Avalon fabric will contain a 'bus width adapter' than converts the 32bit requests from the nios (or other avalon master) into four 8bit requests to your slave. The bus width adapter does assert the byte enable appropriately, but the nios always asserts all byte enables for reads. The Avalon fabric really ought to offer you the choice of including the bus width adapter (appropriate for memory slaves) or ignoring the high bits (appropriate for many io devices).