Forum Discussion
Altera_Forum
Honored Contributor
14 years agoFirst the avalon bus structure by default is 32-bit data, word addressing, using byteenables. When a slave is only 8-bits wide the SOPC builder will generate a 32-bit to 8-bit converter. This converter needs the byteeneables from the slave to be able to tell which specific byte address to write/read. Otherwise each read/write on the avalon will be a word access and the converter will perform 4 byte accesses from the slave. This will result in the effect that you are seeing. Just do this in your code.
input [1:0] byteenable; wire [2:0] address_int; assign address_int = {address[2], byteenable}; Use the address_int in your case. Of course you will have to map in the byteenable in the component as well. /Boris