Forum Discussion
Altera_Forum
Honored Contributor
14 years agoConnecting an 8-bit peripheral to a 32-bit avalon bus
Hello, I am connecting an I2C core to a ColdFire V1 IP Core using the Avalon Bus in SOPC. I get a warning about the slave (I2C core), which has 8-bit registers, not having byteenables. Then it ...
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