Altera_Forum
Honored Contributor
12 years agoSOPC/QSYS connect 32 bits avalon slave to a 8 bits SRAM
Hi everyone
my name is Alban, EE & embedded systems engineer, Strasbourg, France I made and 512k x 8bits SRAM expansion for my Cyclone II EP2C8 dev board i would like to make it accessible in the memory adress space of the NIOS i made several attempts to make it work, but i'm still facing some problems in SOPC i created a component with 8 bits readbyte/writebyte wide buses, and added some tristate logic into the VHDL file (i'm french i love VHDL ;) the problem is that the duration of the read accesses is 4 times the duration of the write access. i think it occurs because of the 32 to 8 bit hidden adapter created by SOPC builder i also tried to make a component 32 bits readbyte/writebyte wide buses, thus ignoring the 24 MSB and keeping only the 8 LSB, the duration of the read access is 1 as expected, but the read values are wrong if i try to write 00 01 02 03 ..... 0E 0F in 16 successive byte adresses (module 16) i get this 0020FF40 : 03 00 00 00 07 00 00 00 0B 00 00 00 0F 00 00 00 0020FF50 : 03 00 00 00 07 00 00 00 0B 00 00 00 0F 00 00 00 0020FF60 : 03 00 00 00 07 00 00 00 0B 00 00 00 0F 00 00 00 0020FF70 : 03 00 00 00 07 00 00 00 0B 00 00 00 0F 00 00 00 0020FF80 : 03 00 00 00 07 00 00 00 0B 00 00 00 0F 00 00 00 the goal is to use the SRAM just as any external memory chip, with 8, 16 or 32 bits storage : one byte access for 8 bit storage, two bytes accesses for 16 bits, four bytes for 32 bits, and so on... is someone kind enough to explain me what i must do ? i did not understand the avalon specifications -> 8 bits or 32 bits avalon MM slave ? -> byteenables use or not ? -> how to configure properly the BSP ? THANK YOU FOR HELPING Best regards Alban